优化退回登录页面功能

This commit is contained in:
2026-09-23 17:03:19 +08:00
parent 761b7da0fc
commit 0f8c3d7b51
+2
View File
@@ -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()