feat(auth): 实现平台超管与多租户角色权限深度隔离、前端动态路由白名单及DeepSeek配额守卫

这个提交包含在:
wikiboss
2026-09-21 11:21:54 +08:00
父节点 0f1a318f95
当前提交 13752f9906
共有 11 个文件被更改,包括 380 次插入 和 28 次删除

查看文件

@@ -150,10 +150,10 @@ export function request<T>(config: RequestConfig): Promise<T> {
'content-type': 'application/json',
};
// 自动挂载 Authorization 与 x-tenant-id
// 自动挂载 Authorization 与 x-tenant-id (对齐 Cool-Admin 原生 JWT 格式)
const token = getAuthToken();
if (token) {
headers['Authorization'] = token.startsWith('Bearer ') ? token : `Bearer ${token}`;
headers['Authorization'] = token.startsWith('Bearer ') ? token.substring(7) : token;
}
const tenantId = getTenantId();