|
|
@ -11,7 +11,7 @@ const router = createRouter({ |
|
|
|
|
|
|
|
router.beforeEach((to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => { |
|
|
|
const systemStore = useSystemStore() |
|
|
|
if (getToken() && systemStore.systemStatus.currentUser?.username) { |
|
|
|
if (getToken() && (systemStore.systemStatus.currentUser?.username || import.meta.env.FT_NODE_ENV !== 'prod')) { |
|
|
|
if (to.name === 'login') { |
|
|
|
next({ name: from.name }) |
|
|
|
} |
|
|
|