fix: 修复登录页面登录选项展示不全的问题

--bug=1032146 --user=刘瑞斌 【系统设置】第一次打开登录页没有LDAP和普通登录信息,刷新后恢复正常 https://www.tapd.cn/55049933/s/1428331
This commit is contained in:
CaptainB 2023-10-19 10:52:57 +08:00 committed by 刘瑞斌
parent 6f11e38410
commit 9a2ab6208b
1 changed files with 11 additions and 19 deletions

View File

@ -71,7 +71,7 @@ import {
saveBaseUrl
} from "../../api/user";
import {useUserStore} from "@/store"
import {checkMicroMode, operationConfirm} from "../../utils";
import {operationConfirm} from "../../utils";
import {getModuleList} from "../../api/module";
import {getLicense} from "../../api/license";
import {setLanguage} from "../../i18n";
@ -140,13 +140,10 @@ export default {
.catch(() => {
});
// ldap open
//
if (checkMicroMode()) {
checkLdapOpen("/ldap/open")
.then(response => {
this.openLdap = response.data;
});
}
checkLdapOpen("/ldap/open")
.then(response => {
this.openLdap = response.data;
});
getModuleList()
.then(response => {
let modules = {};
@ -161,13 +158,10 @@ export default {
if (!hasLicense()) {
return;
}
// sso
if (checkMicroMode()) {
getAuthSources()
.then(response => {
this.authSources = response.data;
});
}
getAuthSources()
.then(response => {
this.authSources = response.data;
});
getDisplayInfo()
.then(response => {
if (response.data[3].paramValue) {
@ -205,10 +199,8 @@ export default {
created: function () {
document.addEventListener("keydown", this.watchEnter);
let authenticate = localStorage.getItem('AuthenticateType');
if (checkMicroMode()) {
if (authenticate === 'LOCAL' || authenticate === 'LDAP') {
this.form.authenticate = authenticate;
}
if (authenticate === 'LOCAL' || authenticate === 'LDAP') {
this.form.authenticate = authenticate;
}
},