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