Parcourir la source

feat(KIP-7159): 获取openid

John-Hong il y a 2 ans
Parent
commit
d387261fc6
4 fichiers modifiés avec 11 ajouts et 4 suppressions
  1. 4 0
      public/index.html
  2. 0 2
      src/App.vue
  3. 6 1
      src/pages/login/login.vue
  4. 1 1
      src/pages/parkingFee/parkingFeeDetail.vue

+ 4 - 0
public/index.html

@@ -41,6 +41,10 @@
         }, 200);
       });
     }
+    if ( /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) ) {
+      // https://developers.weixin.qq.com/community/develop/doc/000ae2cb950808f90d8bc415551800
+      window.H5_LAUNCH_URL = location.href;
+    }
   </script>
   <script>
       // var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))

+ 0 - 2
src/App.vue

@@ -122,8 +122,6 @@ export default {
       }
       // 如果是微信公众号
       if (getIsWxh5()) {
-        // https://developers.weixin.qq.com/community/develop/doc/000ae2cb950808f90d8bc415551800
-        window.H5_LAUNCH_URL = location.href;
         // 判断用户是否登录
         this.micromessengerInit();
       }

+ 6 - 1
src/pages/login/login.vue

@@ -421,7 +421,12 @@ export default {
               _this.saveAgreementAction();
               _this.queryMember();
               // 返回首页
-              _this.$router.push({ path: 'home' });
+              window.location.href = `${
+                window.location.origin
+              }/tparking/${uni.getStorageSync('groupId')}/${uni.getStorageSync(
+                'mallId'
+              )}/`;
+              // _this.$router.push({ path: 'home' });
               // setTimeout(() => {
               //   window.location.reload();
               // }, 700);

+ 1 - 1
src/pages/parkingFee/parkingFeeDetail.vue

@@ -634,7 +634,7 @@ export default {
           });
           params.projectId = projectId;
           params.appId = appid;
-          params.kipUserId = uni.getStorageSync('userInfo').id;
+          params.kipUserId = uni.getStorageSync('userInfo')?.id;
         }
 
         this.$md(params);