perf: 修改路由守卫
This commit is contained in:
@ -6,8 +6,6 @@ export function checkRoutePermission(routeName: string) {
|
|||||||
|
|
||||||
if (!routeName) return false;
|
if (!routeName) return false;
|
||||||
|
|
||||||
// console.log({ routeName, allowAccessRoutes });
|
|
||||||
const route = allowAccessRoutes.find((route) => route.name === routeName);
|
const route = allowAccessRoutes.find((route) => route.name === routeName);
|
||||||
console.log({ route });
|
|
||||||
return !!route;
|
return !!route;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,8 @@ export default function setupUserLoginInfoGuard(router: Router) {
|
|||||||
next('/');
|
next('/');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
next();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user