refactor: 权限系统模块重构完成

Former-commit-id: b33078bfbfea309af518cfab41080d0fea819491
This commit is contained in:
horizons
2022-10-21 00:59:49 +08:00
parent b0a0033371
commit cf24d080e5
16 changed files with 576 additions and 990 deletions

View File

@@ -28,7 +28,7 @@ router.beforeEach(async (to, from, next) => {
} else {
try {
await user.getUserInfo();
const roles = user.roles || ['ROOT'];
const roles = user.roles;
const accessRoutes: any = await permission.generateRoutes(roles);
accessRoutes.forEach((route: any) => {
router.addRoute(route);