commit
This commit is contained in:
@@ -2066,10 +2066,8 @@ router.onError((error) => {
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
console.log(111);
|
||||
let toName = to.name
|
||||
let token = store.state.token
|
||||
console.log(toName);
|
||||
// 返回值为登录状态
|
||||
if ((token === null || token === '') && (toName !== 'Login' && to.meta.requireAuth)) {
|
||||
return next('/Login')
|
||||
|
||||
Reference in New Issue
Block a user