diff --git a/src/core/service/plugins/app/router-guard.js b/src/core/service/plugins/app/router-guard.js index 96ae2a53b0bb627f92bf7fbccbcb958b69f224b6..27ec5e19f2a0472906ff1b711c8f3e3ff6d29693 100644 --- a/src/core/service/plugins/app/router-guard.js +++ b/src/core/service/plugins/app/router-guard.js @@ -104,13 +104,14 @@ function beforeEach (to, from, next, routes) { if (from.meta.isQuit) { // 如果 redirectTo 的前一个页面是 quit 类型,则新打开的页面也是 quit to.meta.isQuit = true to.meta.isEntry = !!from.meta.isEntry - } - if (from.meta.isTabBar) { // 如果是 tabBar,需要更新系统组件 tabBar 内的 list 数据 - to.meta.isTabBar = true - to.meta.tabBarIndex = from.meta.tabBarIndex - const appVm = getApp().$children[0] - appVm.$set(appVm.tabBar.list[to.meta.tabBarIndex], 'pagePath', to.meta.pagePath) - } + } + // 小程序没有这个逻辑,当时为何加了保留并更新 tabBar 的逻辑? + // if (from.meta.isTabBar) { // 如果是 tabBar,需要更新系统组件 tabBar 内的 list 数据 + // to.meta.isTabBar = true + // to.meta.tabBarIndex = from.meta.tabBarIndex + // const appVm = getApp().$children[0] + // appVm.$set(appVm.tabBar.list[to.meta.tabBarIndex], 'pagePath', to.meta.pagePath) + // } } break