refactor: 多租户适配调整

This commit is contained in:
Ray.Hao
2025-12-11 21:19:02 +08:00
parent 9176298b44
commit 888e17e405
12 changed files with 260 additions and 74 deletions

View File

@@ -1,6 +1,6 @@
import request from "@/utils/request";
const TENANT_BASE_URL = "/api/v1/tenant";
const TENANT_BASE_URL = "/api/v1/tenants";
/**
* 租户信息
@@ -37,7 +37,7 @@ const TenantAPI = {
*/
getTenantList() {
return request<any, TenantInfo[]>({
url: `${TENANT_BASE_URL}/list`,
url: `${TENANT_BASE_URL}`,
method: "get",
});
},
@@ -59,7 +59,7 @@ const TenantAPI = {
*/
switchTenant(tenantId: number) {
return request<any, TenantInfo>({
url: `${TENANT_BASE_URL}/switch/${tenantId}`,
url: `${TENANT_BASE_URL}/${tenantId}/switch`,
method: "post",
});
},