Browse Source

微信小程序登录逻辑梳理_v3

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

+ 3 - 0
src/App.vue

@@ -114,8 +114,11 @@ export default {
         // 如果是微信小程序入口,先把 传过来的 token 和 pageId 保存下来
         if (platform === 'miniprogram') {
           const { pageId, token } = query;
+          console.log(117, query);
+          console.log(118, window.location.href);
           uni.setStorageSync('pageId', pageId);
           uni.setStorageSync('token', token);
+          return;
         }
         // 当进入其他页面时,需要先打开路由展示
         this.isInit = true;