Browse Source

修改页面返回时,没有先回到首页的问题

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

+ 8 - 6
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -91,12 +91,14 @@ export default {
         [this.$route.query.fromPage]: 1
       })
       localStorage.setItem(`${this.$route.query.fromPage}`, this.$route.query.fromPage)
-      this.$router.push({
-        path: this.$route.query.fromPage, query: {
-          ...this.$route.query,
-          loginCount: 1
-        }
-      });
+      setTimeout(() => {
+        this.$router.push({
+          path: this.$route.query.fromPage, query: {
+            ...this.$route.query,
+            loginCount: 1
+          }
+        });
+      }, 300)
     }
     const {type = '', code = ''} = this.$route.query
     // 无牌车流程