fix: 【SYSTEM 系统管理】未开启租户,不使用 url 进行租户识别

pull/791/head
YunaiV 2025-07-10 13:29:43 +08:00
parent 896e24dc1d
commit 2e495f1312
2 changed files with 14 additions and 10 deletions

View File

@ -239,6 +239,7 @@ const getLoginFormCache = () => {
} }
// //
const getTenantByWebsite = async () => { const getTenantByWebsite = async () => {
if (loginData.tenantEnable === 'true') {
const website = location.host const website = location.host
const res = await LoginApi.getTenantByWebsite(website) const res = await LoginApi.getTenantByWebsite(website)
if (res) { if (res) {
@ -246,6 +247,7 @@ const getTenantByWebsite = async () => {
authUtil.setTenantId(res.id) authUtil.setTenantId(res.id)
} }
} }
}
const loading = ref() // ElLoading.service const loading = ref() // ElLoading.service
// //
const handleLogin = async (params: any) => { const handleLogin = async (params: any) => {

View File

@ -233,6 +233,7 @@ const getTenantId = async () => {
// //
const getTenantByWebsite = async () => { const getTenantByWebsite = async () => {
if (registerData.tenantEnable === 'true') {
const website = location.host const website = location.host
const res = await LoginApi.getTenantByWebsite(website) const res = await LoginApi.getTenantByWebsite(website)
if (res) { if (res) {
@ -240,6 +241,7 @@ const getTenantByWebsite = async () => {
authUtil.setTenantId(res.id) authUtil.setTenantId(res.id)
} }
} }
}
const loading = ref() // ElLoading.service const loading = ref() // ElLoading.service
watch( watch(