| | |
| | | // query: firstMenu.query || {}, |
| | | // meta: firstMenu.meta || {}, |
| | | // }) |
| | | store.commit('ADD_TAG', { |
| | | name: toMenu.name, |
| | | path: toMenu.path, |
| | | fullPath: toMenu.path, |
| | | params: toMenu.params || {}, |
| | | query: toMenu.query || {}, |
| | | meta: toMenu.meta || {}, |
| | | }) |
| | | if (toMenu && to.meta?.isTab !== false) { |
| | | store.commit('ADD_TAG', { |
| | | name: toMenu.name, |
| | | path: toMenu.path, |
| | | fullPath: toMenu.path, |
| | | params: toMenu.params || {}, |
| | | query: toMenu.query || {}, |
| | | meta: toMenu.meta || {}, |
| | | }) |
| | | } |
| | | |
| | | next(to.fullPath) |
| | | } |
| | |
| | | if (meta.isAuth === false) { |
| | | next() |
| | | } else { |
| | | const { VITE_APP_PARENT_SYSTEM, VITE_APP_ENV } = import.meta.env |
| | | const isDev = VITE_APP_ENV === 'development' |
| | | isDev ? next('/login') : window.location.replace(`${VITE_APP_PARENT_SYSTEM}/#/login`) |
| | | logOutFun() |
| | | } |
| | | } |
| | | }) |