Selaa lähdekoodia

feat(KIP-10996): Temp parking Frontend |移动端后台切换到小程序重刷订单页面

john 2 vuotta sitten
vanhempi
sitoutus
96e2711833
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      src/pages/parkingFee/mixins/parkingFeeDetail.js

+ 7 - 1
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -58,7 +58,13 @@ export default {
         },
       });
       window.subscribe('reload',(  ) => {
-        window.location.reload();
+        // 如果当前路由不是支付页面,则回退到当前页面再刷新页面
+        if(this.$route.name !== 'parkingFeeDetail') {
+          this.$router.back()
+        }
+        setTimeout(() => {
+          window.location.reload();
+        }, 100)
       });
     }, 700)
     setTimeout(() => {