新增管理员权限检查和模型选择逻辑优化

- 在用户 API 中新增 `checkIsSuperAdmin` 函数,用于检查用户是否为超级管理员。
- 更新模型选择器,非管理员用户只能选择内置模型并需配置 API Key,提升安全性和用户体验。
- 优化模型配置页面,动态显示操作按钮,确保管理员与普通用户的操作权限区分明确。
This commit is contained in:
2026-05-12 13:52:24 +08:00
parent 87b25dee42
commit 72af38ea00
5 changed files with 103 additions and 40 deletions

View File

@@ -69,3 +69,10 @@ export function deleteUser(ids: number[]) {
data: { ids },
});
}
export function checkIsSuperAdmin() {
return request({
url: '/admin-go/api/v1/system/user/checkIsSuperAdmin',
method: 'get',
});
}