Explorar el Código

Merge pull request #213 from John-Hong/John/release-2.13.0/SCRM-4320

当从支付页面返回后,防止刷新其他页面
Tron hace 2 años
padre
commit
f8a029f164
Se han modificado 2 ficheros con 11 adiciones y 0 borrados
  1. 5 0
      src/App.vue
  2. 6 0
      src/pages/parkingFee/mixins/parkingFeeDetail.js

+ 5 - 0
src/App.vue

@@ -102,11 +102,16 @@ export default {
         }
         // 保留 carList
         const carList = uni.getStorageSync('carList');
+        // 保留 buildingId
+        const buildingId = uni.getStorageSync('buildingId');
         // 每次进入页面清空 缓存数据
         window.localStorage.clear();
         if (carList) {
           uni.setStorageSync('carList', JSON.parse(carList));
         }
+        if (buildingId) {
+          uni.setStorageSync('buildingId', buildingId);
+        }
         this.$store.commit('SET_IS_INIT', false);
         window.token = `${window.location.href}`.replace(/.*wx\/(.*)\/.*/g, '$1');
         try {

+ 6 - 0
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -378,6 +378,12 @@ export default {
                   paySign: prepayJson.paySign,
                 }
               }
+              window?.toWXSendMsg({
+                type: 'nowRoute',
+                options: {
+                  fullPath: '1'
+                },
+              });
               window.toWXSendMsg({
                 type: 'openWxPay',
                 options: options,