From 885b65cbbea70fe0acb2e9a0d8ea103aa01b4cde Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 6 Aug 2025 11:44:48 +0800 Subject: [PATCH] refactor: update login mode handling and simplify QR code tab logic --- ui/src/views/chat/user-login/index.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ui/src/views/chat/user-login/index.vue b/ui/src/views/chat/user-login/index.vue index 008ee0a4a..c0f4a0ea8 100644 --- a/ui/src/views/chat/user-login/index.vue +++ b/ui/src/views/chat/user-login/index.vue @@ -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] } } })