From 2e495f131230742b45f7d81ed6e7020aaba70654 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 10 Jul 2025 13:29:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90SYSTEM=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=80=91=E6=9C=AA=E5=BC=80=E5=90=AF=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=EF=BC=8C=E4=B8=8D=E4=BD=BF=E7=94=A8=20url=20=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=A7=9F=E6=88=B7=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login/components/LoginForm.vue | 12 +++++++----- src/views/Login/components/RegisterForm.vue | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index fa661236..37d8b8c7 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -239,11 +239,13 @@ const getLoginFormCache = () => { } // 根据域名,获得租户信息 const getTenantByWebsite = async () => { - const website = location.host - const res = await LoginApi.getTenantByWebsite(website) - if (res) { - loginData.loginForm.tenantName = res.name - authUtil.setTenantId(res.id) + if (loginData.tenantEnable === 'true') { + const website = location.host + const res = await LoginApi.getTenantByWebsite(website) + if (res) { + loginData.loginForm.tenantName = res.name + authUtil.setTenantId(res.id) + } } } const loading = ref() // ElLoading.service 返回的实例 diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue index 73f276ca..a1243efa 100644 --- a/src/views/Login/components/RegisterForm.vue +++ b/src/views/Login/components/RegisterForm.vue @@ -233,11 +233,13 @@ const getTenantId = async () => { // 根据域名,获得租户信息 const getTenantByWebsite = async () => { - const website = location.host - const res = await LoginApi.getTenantByWebsite(website) - if (res) { - registerData.registerForm.tenantName = res.name - authUtil.setTenantId(res.id) + if (registerData.tenantEnable === 'true') { + const website = location.host + const res = await LoginApi.getTenantByWebsite(website) + if (res) { + registerData.registerForm.tenantName = res.name + authUtil.setTenantId(res.id) + } } } const loading = ref() // ElLoading.service 返回的实例