Parcourir la source

feat(KIP-6765): KERRY+小程序临停缴费功能未登录身份使用流程

John-Hong il y a 2 ans
Parent
commit
0d8f564099

+ 1 - 1
src/App.vue

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

+ 5 - 4
src/pages/login/openWx.vue

@@ -80,14 +80,15 @@ export default {
     },
     async getOpenId(code) {
       try {
-        /*this.$store.commit('SET_OPENID', 'odJnI0-Y6ZJap-Ow9nmJH-4WyxhU');
+        this.$store.commit('SET_OPENID', 'odJnI0-Y6ZJap-Ow9nmJH-4WyxhU');
         // 判断用户是否需要登录,
         await this.checkIsLogin(() => {
           this.$router.replace({
             path: 'home',
           });
-        });*/
-        // 通过code获取 openId等用户信息,/api/user/wechat/login 为后台接口
+        });
+
+        /*// 通过code获取 openId等用户信息,/api/user/wechat/login 为后台接口
         const { appid, secret } = getAppIdByGroupIdAndMallId({
           groupId: this.$route.params.groupId,
           mallId: this.$route.params.mallId,
@@ -112,7 +113,7 @@ export default {
               path: 'home',
             });
           });
-        }
+        }*/
       } catch (err) {
         console.log(106, err);
       }

+ 9 - 2
src/pages/parkingFee/parkingFeeDetail.vue

@@ -2,7 +2,7 @@
   <div>
     <scroll-view class="scroll-Y">
       <div>
-        <div @click="scan">扫一扫</div>
+        <!-- <div @click="scan">扫一扫</div> -->
         <div class="warp">
           <div
             :class="{
@@ -603,6 +603,7 @@ export default {
     // 创建订单
     async createParkOrder() {
       console.log(603);
+      debugger;
       try {
         uni.showLoading({
           title: '加载中',
@@ -616,6 +617,8 @@ export default {
           mobile: this.mobile,
           groupId: this.groupId,
           createuser: 'sys_miniprogram',
+          projectId: uni.getStorageSync('groupId'),
+          // appId: uni.getStorageSync('appid'),
         };
         this.$md(params);
         const res = await this.$request({
@@ -625,6 +628,8 @@ export default {
           header: JSON.parse(uni.getStorageSync('handleUser')),
         });
         uni.hideLoading();
+        console.log(629, res.data);
+        debugger;
         if (res.data.code === 0) {
           this.bindflag = res.data.data.bind;
           this.parkInfo = res.data.data;
@@ -1936,6 +1941,8 @@ export default {
         });
       });
     },
+    /*
+    // 验证扫码环节
     scan() {
       wx.scanQRCode({
         desc: 'scanQRCode desc',
@@ -1952,7 +1959,7 @@ export default {
           console.log(1950, res);
         },
       });
-    },
+    },*/
   },
 };
 </script>

+ 4 - 1
src/pages/parkingFee/parkingFeePaperCoupon.vue

@@ -149,7 +149,8 @@ export default {
   async mounted() {
     const platform = getPlatform();
     if (platform === 'micromessenger') {
-      this.getTicket();
+      // this.getTicket();
+      await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
       // await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
       // if (window.wxJsSdkConfigInitPromise) {
       //   await window.wxJsSdkConfigInitPromise;
@@ -427,6 +428,7 @@ export default {
       });
       this.$router.back();
     },
+    /*
     // h5获取配置---公众号支付
     getTicket() {
       let self = this;
@@ -475,6 +477,7 @@ export default {
         },
       });
     },
+    */
   },
 };
 </script>