Browse Source

fix(SCRM-4707): [DE][C端]临时停车,安卓手机,使用无牌车扫一扫,扫码以后没有反应

john 1 năm trước cách đây
mục cha
commit
207202080e
1 tập tin đã thay đổi với 12 bổ sung1 xóa
  1. 12 1
      src/pages/parkingFeeV2/mixins/parkingFee.js

+ 12 - 1
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -682,7 +682,18 @@ export default {
             // scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
             success: (res) => {
               console.log('H5页面扫码获取到的参数——成功', res);
-              runScanFn(res);
+              // const test = {"resultStr": "lp$Qed.3YuVi*D7vXilrrV0571a2&type=unlicensedOut", "errMsg": "scanQRCode:ok"}
+              let path = res.resultStr.replace(/.*([a-z0-9]{6}&type)/g, '8b$1')
+              console.log(614, path);
+              const regex = /(\w+)&type=(\w+)/;
+              const match = path.match(regex);
+              const obj = { code: match[1], type: match[2] };
+              console.log(618, obj);
+              this.$store.commit('SET_UNLICENSED_INFO', obj);
+              this.$nextTick(() => {
+                this.qrCodesRule(obj.code, 'scan');
+              })
+              // runScanFn(res);
               // this.formMsg.deviceCode = res.resultStr;
             },
             error: (res) => {