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