refactor: update login mode handling and simplify QR code tab logic
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
wxg0103 2025-08-06 11:44:48 +08:00
parent e4575389eb
commit 885b65cbbe

View File

@ -346,7 +346,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
}
function changeMode(val: string) {
loginMode.value = val === 'LDAP' ? val : 'LOCAL'
loginMode.value = val === 'LDAP' ? val : ''
if (val === 'QR_CODE') {
loginMode.value = val
showQrCodeTab.value = true
@ -396,11 +396,8 @@ onBeforeMount(() => {
: t('views.system.authentication.scanTheQRCode.lark'),
})
})
if (modeList.value.length === 0) {
showQrCodeTab.value = true
} else {
modeList.value = ['QR_CODE', ...modeList.value]
}
showQrCodeTab.value = true
modeList.value = ['QR_CODE', ...modeList.value]
}
}
})