@@ -52,7 +52,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
|
||||
next()
|
||||
} else {
|
||||
next('/login') // 否则全部重定向到登录页
|
||||
next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
|
||||
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user