Browse Source

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

当从支付页面返回后,防止刷新其他页面
Tron 2 năm trước cách đây
mục cha
commit
ec9e7391da
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/App.vue

+ 2 - 2
src/App.vue

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