|
@@ -60,8 +60,13 @@ export default {
|
|
|
const kipAccessToken = uni.getStorageSync('kipAccessToken');
|
|
|
const query = getUrlParams();
|
|
|
const platform = getPlatform();
|
|
|
- this.$store.commit('SET_GROUP_ID', query.groupId);
|
|
|
- this.$store.commit('SET_MALL_ID', query.mallid);
|
|
|
+ if (query.groupId && query.groupId !== 'undefined') {
|
|
|
+ this.$store.commit('SET_GROUP_ID', query.groupId);
|
|
|
+ }
|
|
|
+ if (query.mallid && query.mallid !== 'undefined') {
|
|
|
+ this.$store.commit('SET_MALL_ID', query.mallid);
|
|
|
+ }
|
|
|
+
|
|
|
// console.log(65, kipAccessToken);
|
|
|
// TODO true 需要取消
|
|
|
if (platform === 'micromessenger' && !kipAccessToken) {
|
|
@@ -289,6 +294,23 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ h5init() {
|
|
|
+ if(uni.getStorageSync('groupId')) {
|
|
|
+ this.$store.commit('SET_GROUP_ID', uni.getStorageSync('groupId'));
|
|
|
+ }
|
|
|
+ if(uni.getStorageSync('kipUserId')) {
|
|
|
+ this.$store.commit('SET_KIP_USER_ID', uni.getStorageSync('kipUserId'));
|
|
|
+ }
|
|
|
+ if(uni.getStorageSync('mallId')) {
|
|
|
+ this.$store.commit('SET_MALL_ID', uni.getStorageSync('mallId'));
|
|
|
+ }
|
|
|
+ if(uni.getStorageSync('openid')) {
|
|
|
+ this.$store.commit('SET_OPENID', uni.getStorageSync('openid'));
|
|
|
+ }
|
|
|
+ if(uni.getStorageSync('mobile')) {
|
|
|
+ this.$store.commit('SET_OPENID', uni.getStorageSync('mobile'));
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|