20260804223152
This commit is contained in:
1 parent
75b1ccaa6d
commit
7c9761a4fc
71 files changed
+5534
-9113
No files matched your search
@@ -34,11 +34,11 @@ router.beforeEach(async (to) => {
|
||||
return getRedirectPath(to.query.redirect);
|
||||
}
|
||||
|
||||
if (to.meta.requiresAuth && to.path !== "/dashboard" && to.path !== "/") {
|
||||
if (to.meta.moduleId) {
|
||||
const permissionStore = usePermissionStore();
|
||||
try {
|
||||
await permissionStore.load();
|
||||
if (!permissionStore.canAccessRoute(to.path)) {
|
||||
if (!permissionStore.canAccess(to.meta.moduleId)) {
|
||||
message.warning("没有该模块的访问权限");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user