feat(role): 添加角色管理相关常量并优化角色状态切换

refactor(role): 使用常量替换硬编码的角色ID和key
fix(role): 修正角色排序默认值为1
feat(component): 导出ApiSwitch全局组件
This commit is contained in:
dap
2026-01-15 10:03:39 +08:00
parent 07fa5626fd
commit 448856e547
4 changed files with 36 additions and 9 deletions

View File

@@ -41,6 +41,16 @@ export const UNAUTHORIZED_CODE = 401;
* 超管用户ID
*/
export const SUPERADMIN_USER_ID = 1;
export const SUPERADMIN_ROLE_ID = 1;
/**
* 超管角色key
*/
export const SUPERADMIN_ROLE_KEY = 'superadmin';
/**
* 管理员(非超管) 角色key
*/
export const ADMIN_ROLE_KEY = 'admin';
/**
* 对应 字典-S系统开关的状态