feature: add a redirect url when not logged in
https://github.com/PanJiaChen/vue-element-admin/issues/438
This commit is contained in:
@@ -30,7 +30,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
next('/login')
|
||||
next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user