修改客户端路由配置
This commit is contained in:
parent
feb5693789
commit
aaaa9028f0
@ -47,14 +47,17 @@ router.beforeEach(async (to, from, next) => {
|
||||
next();
|
||||
return false;
|
||||
}
|
||||
// console.log(routes,to,6999)
|
||||
if(routes.findIndex(r => r.path === to.path) >= 0){
|
||||
// if(to.toShow && !token){
|
||||
// next({
|
||||
// path: '/login'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
routes.forEach(item=>{
|
||||
if(item.tokenShow && item.path === to.path){
|
||||
if(!token){
|
||||
next({
|
||||
path: '/login'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
next();
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user