Browse Source

fix: projectId没有存储

John-Hong 2 years ago
parent
commit
4f1bd771f7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/App.vue

+ 3 - 2
src/App.vue

@@ -60,6 +60,8 @@ 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 (platform === 'micromessenger' && !kipAccessToken) {
         // 如果用户没有登录的话,我们需要让用户完成授权拿到 openid
         const openid = uni.getStorageSync('openid');
@@ -75,8 +77,7 @@ export default {
         }
         // 初始化微信
         initWxJsSdkConfig(['chooseWXPay']);
-        this.$store.commit('SET_GROUP_ID', query.groupId);
-        this.$store.commit('SET_MALL_ID', query.mallid);
+        
         // 如果用户不选择登录,则不走登录逻辑
         const passLogin = uni.getStorageSync('passLogin');
         console.log(82, { passLogin });