diff --git a/yudao-ui-admin/src/views/login.vue b/yudao-ui-admin/src/views/login.vue index 7c9d76432..785235dae 100644 --- a/yudao-ui-admin/src/views/login.vue +++ b/yudao-ui-admin/src/views/login.vue @@ -187,6 +187,14 @@ export default { created() { // 租户开关 this.tenantEnable = getTenantEnable(); + if (this.tenantEnable) { + getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户 + const tenantId = res.data; + if (tenantId && tenantId >= 0) { + setTenantId(tenantId) + } + }); + } // 验证码开关 this.captchaEnable = getCaptchaEnable(); // 重定向地址