Browse Source

当从支付页面返回后,防止刷新其他页面

john 2 years ago
parent
commit
5758cff771

+ 10 - 1
src/pages/parkingFee/mixins/parkingFee.js

@@ -108,6 +108,15 @@ export default {
     }
     }
   },
   },
   async mounted() {
   async mounted() {
+    console.log(1111111);
+    setTimeout(() => {
+      window?.toWXSendMsg({
+        type: 'nowRoute',
+        options: {
+          fullPath: '1'
+        },
+      });
+    }, 100);
     setTimeout(() => {
     setTimeout(() => {
       uni.setNavigationBarTitle({
       uni.setNavigationBarTitle({
         title: '停车缴费',
         title: '停车缴费',
@@ -663,7 +672,7 @@ export default {
         // 记录buildingId,确保 buildingId 是最新的数据
         // 记录buildingId,确保 buildingId 是最新的数据
         window.localStorage.setItem('buildingId', qrCodesres.buildingId);
         window.localStorage.setItem('buildingId', qrCodesres.buildingId);
         // 如果是无牌车扫码:出场
         // 如果是无牌车扫码:出场
-        console.log('模拟出场', this.unlicensedInfo.type);
+        // console.log('模拟出场', this.unlicensedInfo.type);
         this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
           name: 'parkingFeeDetail',
           name: 'parkingFeeDetail',
         });
         });

+ 8 - 0
src/pages/parkingFee/mixins/parkingFeePayment.js

@@ -6,6 +6,14 @@ export default {
     const params = this.$route.query;
     const params = this.$route.query;
     this.msg = params.msg;
     this.msg = params.msg;
     this.vehicleNo = params.vehicleNo;
     this.vehicleNo = params.vehicleNo;
+    setTimeout(() => {
+      window?.toWXSendMsg({
+        type: 'nowRoute',
+        options: {
+          fullPath: '1'
+        },
+      });
+    }, 100);
     setTimeout(() => {
     setTimeout(() => {
       uni.setNavigationBarTitle({
       uni.setNavigationBarTitle({
         title: '停车出场提示',
         title: '停车出场提示',

+ 8 - 0
src/pages/parkingFee/mixins/parkingFeeSuccess.js

@@ -33,6 +33,14 @@ export default {
     },
     },
   },
   },
   mounted() {
   mounted() {
+    setTimeout(() => {
+      window?.toWXSendMsg({
+        type: 'nowRoute',
+        options: {
+          fullPath: '1'
+        },
+      });
+    }, 100);
     setTimeout(() => {
     setTimeout(() => {
       uni.setNavigationBarTitle({
       uni.setNavigationBarTitle({
         title: '提示',
         title: '提示',

+ 8 - 0
src/pages/parkingFee/parkingFeeMsg.vue

@@ -77,6 +77,14 @@ export default {
     })
     })
   },
   },
   async created() {
   async created() {
+    setTimeout(() => {
+      window?.toWXSendMsg({
+        type: 'nowRoute',
+        options: {
+          fullPath: '1'
+        },
+      });
+    }, 100);
     setTimeout(() => {
     setTimeout(() => {
       uni.setNavigationBarTitle({
       uni.setNavigationBarTitle({
         title: '停车缴费提示',
         title: '停车缴费提示',