多租户:登录界面,根据 host 域名获取对应的租户编号

(cherry picked from commit 85ee558bef)
This commit is contained in:
YunaiV
2023-11-06 19:42:28 +08:00
committed by shizhong
parent e2047eb6e9
commit adba0142f1
2 changed files with 30 additions and 10 deletions

View File

@ -27,6 +27,11 @@ export const getTenantIdByNameApi = (name: string) => {
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
}
// 使用租户域名,获得租户信息
export const getTenantByWebsite = (website: string) => {
return request.get({ url: '/system/tenant/get-by-website?website=' + website })
}
// 登出
export const loginOutApi = () => {
return request.post({ url: '/system/auth/logout' })