diff --git a/src/router/index.ts b/src/router/index.ts index 6e7d8c5bef09cfdc1e44c2d985c2c65938a7d56b..5cf1cda463f609d0a0aa059f454861193b5d0242 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,6 +7,7 @@ import { createGuard } from './guard/'; import { basicRoutes } from './routes/'; import { scrollBehavior } from './scrollBehavior'; +import { REDIRECT_NAME } from './constant'; export const hashRouter = createWebHashHistory(); @@ -20,7 +21,7 @@ const router = createRouter({ // reset router export function resetRouter() { - const resetWhiteNameList = ['Login']; + const resetWhiteNameList = ['Login', REDIRECT_NAME]; router.getRoutes().forEach((route) => { const { name } = route; if (name && !resetWhiteNameList.includes(name as string)) {