Răsfoiți Sursa

fix(KIP-11965): 【DE】【C端】临时停车。用户无法使用纸质券

john 1 an în urmă
părinte
comite
48ec91af37

+ 6 - 6
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -165,12 +165,12 @@ export default {
       this.showSq = true;
     }
     try {
-      // const href = window.location.href;
-      // if(!isAlipayClient && !/808[0-9]/.test(href)) {
-      //   setTimeout(async () => {
-      //     await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
-      //   }, 1500)
-      // }
+      const href = window.location.href;
+      if(!isAlipayClient && !/808[0-9]/.test(href)) {
+        setTimeout(async () => {
+          await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
+        }, 1500)
+      }
     } catch (e) {
       console.log(e)
     }

+ 15 - 9
src/pages/parkingFeeV2/mixins/parkingFeePaperCoupon.js

@@ -37,15 +37,7 @@ export default {
     //     title: '纸质优惠券减免',
     //   });
     // },300);
-    const platform = getPlatform();
-    if ( platform === 'micromessenger' ) {
-      // this.getTicket();
-      await initWxJsSdkConfig(['checkJsApi','scanQRCode']);
-      // await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
-      // if (window.wxJsSdkConfigInitPromise) {
-      //   await window.wxJsSdkConfigInitPromise;
-      // }
-    }
+    // const platform = getPlatform();
     this.pageInit()
     // setTimeout(() => {
     //   uni.setNavigationBarTitle({
@@ -62,6 +54,18 @@ export default {
     //     },
     //   });
     // }, 500)
+    try {
+      const href = window.location.href;
+      console.log('初始化扫码1');
+      if(!isAlipayClient && !/808[0-9]/.test(href)) {
+        setTimeout(async () => {
+          console.log('初始化扫码2');
+          await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
+        }, 500)
+      }
+    } catch (e) {
+      console.log(e)
+    }
   },
   computed: {
     ...mapState({
@@ -107,6 +111,7 @@ export default {
       };
       // 支付宝小程序
       // const platform = getPlatform();
+      console.log(110);
       if ( isAlipayClient ) {
         window.toWXSendMsg({
           type: 'scanQRCode',
@@ -116,6 +121,7 @@ export default {
           runScanFn(options.options);
         });
       } else {
+        console.log(120);
         this.$wx.scanQRCode({
           desc: 'scanQRCode desc',
           needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,