|
|
|
@ -17,7 +17,7 @@ |
|
|
|
|
onLaunch({ path, query, scene }) { |
|
|
|
|
console.log(this.$route); |
|
|
|
|
// #ifdef H5 |
|
|
|
|
const storeId = this.$route.query.storeId; |
|
|
|
|
const storeId = this.getQueryString('storeId'); |
|
|
|
|
console.log(storeId); |
|
|
|
|
uni.setStorageSync('storeId', storeId || ''); |
|
|
|
|
// #endif |
|
|
|
@ -42,6 +42,15 @@ |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
getQueryString(name) { |
|
|
|
|
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); |
|
|
|
|
var r = window.location.search.substr(1).match(reg); |
|
|
|
|
if (r != null) { |
|
|
|
|
return unescape(r[2]); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// app启动参数 |
|
|
|
|
onStartupQuery(query) { |
|
|
|
|