File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
src/views/Login/components Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -239,11 +239,13 @@ const getLoginFormCache = () => {
239
239
}
240
240
// 根据域名,获得租户信息
241
241
const getTenantByWebsite = async () => {
242
- const website = location .host
243
- const res = await LoginApi .getTenantByWebsite (website )
244
- if (res ) {
245
- loginData .loginForm .tenantName = res .name
246
- authUtil .setTenantId (res .id )
242
+ if (loginData .tenantEnable === ' true' ) {
243
+ const website = location .host
244
+ const res = await LoginApi .getTenantByWebsite (website )
245
+ if (res ) {
246
+ loginData .loginForm .tenantName = res .name
247
+ authUtil .setTenantId (res .id )
248
+ }
247
249
}
248
250
}
249
251
const loading = ref () // ElLoading.service 返回的实例
Original file line number Diff line number Diff line change @@ -233,11 +233,13 @@ const getTenantId = async () => {
233
233
234
234
// 根据域名,获得租户信息
235
235
const getTenantByWebsite = async () => {
236
- const website = location .host
237
- const res = await LoginApi .getTenantByWebsite (website )
238
- if (res ) {
239
- registerData .registerForm .tenantName = res .name
240
- authUtil .setTenantId (res .id )
236
+ if (registerData .tenantEnable === ' true' ) {
237
+ const website = location .host
238
+ const res = await LoginApi .getTenantByWebsite (website )
239
+ if (res ) {
240
+ registerData .registerForm .tenantName = res .name
241
+ authUtil .setTenantId (res .id )
242
+ }
241
243
}
242
244
}
243
245
const loading = ref () // ElLoading.service 返回的实例
You can’t perform that action at this time.
0 commit comments