| | |
| | | import { initFrontEndControlRoutes } from '/@/router/frontEnd'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { nextTick } from 'vue'; |
| | | |
| | | // 读取 `/src/stores/themeConfig.ts` 是否开启后端控制路由配置 |
| | | const storesThemeConfig = useThemeConfig(pinia); |
| | |
| | | Session.clear(); |
| | | NProgress.done(); |
| | | } else if (token && to.path === '/login') { |
| | | next('/homeMenu'); |
| | | next('/newMenu'); |
| | | NProgress.done(); |
| | | } else { |
| | | } else if (token && to.path === '/newMenu') { |
| | | next(); |
| | | NProgress.done(); |
| | | } else if (token && (to.path === '/warningScreen' || to.path === '/screenPage')) { |
| | | next(); |
| | | NProgress.done(); |
| | | }else { |
| | | const storesRoutesList = useRoutesList(pinia); |
| | | const { routesList } = storeToRefs(storesRoutesList); |
| | | if (routesList.value.length === 0) { |