feat: 添加切换租户功能,支持平台用户获取新 token,并优化租户选择逻辑

This commit is contained in:
Ray.Hao
2026-01-12 08:03:28 +08:00
parent a24bb92ba8
commit 9ac4d3da02
5 changed files with 50 additions and 17 deletions

View File

@@ -25,6 +25,15 @@ const AuthAPI = {
});
},
/** 切换租户(平台用户) - 返回新的 token */
switchTenant(tenantId: number) {
return request<any, LoginResponse>({
url: `${AUTH_BASE_URL}/switch-tenant`,
method: "post",
params: { tenantId },
});
},
/** 刷新 token 接口*/
refreshToken(refreshToken: string) {
return request<any, LoginResponse>({