Browse Source

容器视图返回航班视图问题解决

zhongxiaoyu 2 years ago
parent
commit
aa46a81bca
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/router/index.js

+ 1 - 1
src/router/index.js

@@ -91,7 +91,7 @@ router.beforeEach((to, from, next) => {
   if (from.path.includes('flightView') && from.query.flightNO && from.query.flightDate) {
     store.dispatch('keepAlive/savePage', from)
   }
-  if (to.path.includes('flightView') && from.path.includes('baggageView') && (!to.query.flightNO || !to.query.flightDate)) {
+  if (to.path.includes('flightView') && (!to.query.flightNO || !to.query.flightDate) && from.meta?.keepAlive) {
     const savedPage = store.getters.savedPages.find(savedPage => savedPage.name === to.name)
     if (savedPage) {
       next(savedPage.fullPath)