lcw
This commit is contained in:
@ -50,6 +50,9 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (whiteList.indexOf(to.path) > -1) {
|
||||
// console.log("路由2");
|
||||
next()
|
||||
} else {
|
||||
// 路由不在白名单中,重定向到登录页面
|
||||
next('/login')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user