|
@@ -10,7 +10,7 @@ import { i18nRender } from '@/locales'
|
|
|
|
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
|
|
-const whiteList = ['login', 'register', 'registerResult']
|
|
|
+const allowList = ['login', 'register', 'registerResult']
|
|
|
const loginRoutePath = '/user/login'
|
|
|
const defaultRoutePath = '/dashboard/workplace'
|
|
|
|
|
@@ -61,8 +61,8 @@ router.beforeEach((to, from, next) => {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- if (whiteList.includes(to.name)) {
|
|
|
-
|
|
|
+ if (allowList.includes(to.name)) {
|
|
|
+
|
|
|
next()
|
|
|
} else {
|
|
|
next({ path: loginRoutePath, query: { redirect: to.fullPath } })
|