update 更新 注册/登录/顶部栏 优化租户开关判断逻辑 ;

This commit is contained in:
zlyx 2023-03-30 10:02:25 +08:00
parent befa87ba54
commit 6a412f27c6
3 changed files with 15 additions and 9 deletions

View File

@ -117,8 +117,10 @@ function dynamicClearEvent() {
function initTenantList() {
getTenantList().then(res => {
const vo = res.data;
tenantList.value = vo.voList;
tenantEnabled.value = vo.tenantEnabled === undefined ? true : vo.tenantEnabled;
if (tenantEnabled.value) {
tenantList.value = vo.voList;
}
});
}

View File

@ -157,11 +157,13 @@ function getCode() {
function initTenantList() {
getTenantList().then(res => {
const vo = res.data;
tenantList.value = vo.voList;
if (tenantList.value != null && tenantList.value.length !== 0) {
loginForm.value.tenantId = tenantList.value[0].tenantId;
}
tenantEnabled.value = vo.tenantEnabled === undefined ? true : vo.tenantEnabled;
if (tenantEnabled.value) {
tenantList.value = vo.voList;
if (tenantList.value != null && tenantList.value.length !== 0) {
loginForm.value.tenantId = tenantList.value[0].tenantId;
}
}
});
}

View File

@ -173,11 +173,13 @@ function getCode() {
function initTenantList() {
getTenantList().then(res => {
const vo = res.data;
tenantList.value = vo.voList;
if (tenantList.value != null && tenantList.value.length !== 0) {
loginForm.value.tenantId = tenantList.value[0].tenantId;
}
tenantEnabled.value = vo.tenantEnabled === undefined ? true : vo.tenantEnabled;
if (tenantEnabled.value) {
tenantList.value = vo.voList;
if (tenantList.value != null && tenantList.value.length !== 0) {
loginForm.value.tenantId = tenantList.value[0].tenantId;
}
}
});
}