refactor: update login mode handling and simplify QR code tab logic
This commit is contained in:
parent
e4575389eb
commit
885b65cbbe
@ -346,7 +346,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeMode(val: string) {
|
function changeMode(val: string) {
|
||||||
loginMode.value = val === 'LDAP' ? val : 'LOCAL'
|
loginMode.value = val === 'LDAP' ? val : ''
|
||||||
if (val === 'QR_CODE') {
|
if (val === 'QR_CODE') {
|
||||||
loginMode.value = val
|
loginMode.value = val
|
||||||
showQrCodeTab.value = true
|
showQrCodeTab.value = true
|
||||||
@ -396,13 +396,10 @@ onBeforeMount(() => {
|
|||||||
: t('views.system.authentication.scanTheQRCode.lark'),
|
: t('views.system.authentication.scanTheQRCode.lark'),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
if (modeList.value.length === 0) {
|
|
||||||
showQrCodeTab.value = true
|
showQrCodeTab.value = true
|
||||||
} else {
|
|
||||||
modeList.value = ['QR_CODE', ...modeList.value]
|
modeList.value = ['QR_CODE', ...modeList.value]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user