|
@@ -75,7 +75,6 @@ export default {
|
|
|
CacheTool.init();
|
|
|
if (this.isInit) return;
|
|
|
this.isInit = false;
|
|
|
-
|
|
|
const kipAccessToken = uni.getStorageSync('kipAccessToken');
|
|
|
const query = getUrlParams();
|
|
|
// console.log('h5登录时的参数', query);
|
|
@@ -89,6 +88,20 @@ export default {
|
|
|
query?.groupId || uni.getStorageSync('groupId')
|
|
|
);
|
|
|
}
|
|
|
+ if (
|
|
|
+ (query.mallId && query.mallId !== 'undefined') ||
|
|
|
+ uni.getStorageSync('mallId')
|
|
|
+ ) {
|
|
|
+ this.$store.commit(
|
|
|
+ 'SET_MALL_ID',
|
|
|
+ query?.mallId?.replace('#/', '') || uni.getStorageSync('mallId')
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (uni.getStorageSync('member')) {
|
|
|
+ this.$store.dispatch('getUserDetail');
|
|
|
+ this.$store.commit('SET_USER_INFO', uni.getStorageSync('member'));
|
|
|
+ this.$store.commit('SET_MEMBER', uni.getStorageSync('member'));
|
|
|
+ }
|
|
|
// 如果用户没有openid
|
|
|
const openid = uni.getStorageSync('openid');
|
|
|
// console.log(949494, openid);
|
|
@@ -106,21 +119,6 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- // console.log(85, platform);
|
|
|
- if (
|
|
|
- (query.mallId && query.mallId !== 'undefined') ||
|
|
|
- uni.getStorageSync('mallId')
|
|
|
- ) {
|
|
|
- this.$store.commit(
|
|
|
- 'SET_MALL_ID',
|
|
|
- query?.mallId?.replace('#/', '') || uni.getStorageSync('mallId')
|
|
|
- );
|
|
|
- }
|
|
|
- if (uni.getStorageSync('member')) {
|
|
|
- this.$store.dispatch('getUserDetail');
|
|
|
- this.$store.commit('SET_USER_INFO', uni.getStorageSync('member'));
|
|
|
- this.$store.commit('SET_MEMBER', uni.getStorageSync('member'));
|
|
|
- }
|
|
|
// 当前页面是否是在微信公众号运行:start
|
|
|
// 微信公众号环境 start
|
|
|
if (platform === 'micromessenger') {
|