优化超级管理员角色检查逻辑
- 更新 `checkIsSuperAdmin` 函数的返回值处理,确保正确获取超级管理员状态,提升权限管理的准确性。
This commit is contained in:
@@ -2388,8 +2388,8 @@ onMounted(async () => {
|
||||
|
||||
// 获取当前用户角色
|
||||
try {
|
||||
const res = await checkIsSuperAdmin();
|
||||
isSuperAdmin.value = res.data || false;
|
||||
const res: any = await checkIsSuperAdmin();
|
||||
isSuperAdmin.value = res.data?.isSuperAdmin || false;
|
||||
} catch (error) {
|
||||
isSuperAdmin.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user