|
@@ -59,7 +59,7 @@ import { qrCodes,unlicensedCarCheckIn } from "@/api/parking";
|
|
|
import baseMixins from "@/pages/parkingFee/mixins/base";
|
|
|
import uni from '@/utils/uniHooks';
|
|
|
import { initWxJsSdkConfig } from '@/utils/login';
|
|
|
-import { getPlatform,getUrlParams } from '@/utils';
|
|
|
+import { getPlatform,getUrlParams, theCommunicationBetweenWechatAndH5IsNormal } from '@/utils';
|
|
|
import {mapState} from "vuex";
|
|
|
|
|
|
export default {
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
this.$store.commit('SET_UNLICENSED_INFO', {});
|
|
|
},
|
|
|
// 无牌车闸机扫码
|
|
|
- scanCarCode() {
|
|
|
+ async scanCarCode() {
|
|
|
const runScanFn = (res) => {
|
|
|
/*
|
|
|
针对微信的小程序码进行的兼容改造
|
|
@@ -130,6 +130,13 @@ export default {
|
|
|
// 微信小程序
|
|
|
const platform = getPlatform();
|
|
|
if (platform === 'miniprogram') {
|
|
|
+ // 判断微信小程序与 h5 是否正常通信
|
|
|
+ const isReload = await theCommunicationBetweenWechatAndH5IsNormal()
|
|
|
+ if(!isReload) {
|
|
|
+ uni.setStorageSync('isReload', 1)
|
|
|
+ window.location.reload()
|
|
|
+ return
|
|
|
+ }
|
|
|
window.toWXSendMsg({
|
|
|
type: 'scanQRCode',
|
|
|
});
|