优化退回登录页面功能
This commit is contained in:
@@ -46,8 +46,10 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 加入/login判断,防止vue-router报错
|
// 加入/login判断,防止vue-router报错
|
||||||
if(!token && to.path !== "/login") {
|
if(!token && to.path !== "/login") {
|
||||||
next('/login')
|
next('/login')
|
||||||
|
return
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
|
|||||||
Reference in New Issue
Block a user