mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: streamline loading state handling and update login endpoint case
This commit is contained in:
parent
dea6702cca
commit
fca42666a3
|
|
@ -22,7 +22,7 @@ const ldapLogin: (request: LoginRequest, loading?: Ref<boolean>) => Promise<Resu
|
|||
request,
|
||||
loading
|
||||
) => {
|
||||
return post('/ldap/login', request, undefined, loading)
|
||||
return post('/LDAP/login', request, undefined, loading)
|
||||
}
|
||||
/**
|
||||
* 获取图形验证码
|
||||
|
|
|
|||
|
|
@ -283,9 +283,7 @@ const login = () => {
|
|||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
router.push({ name: 'home' })
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
.finally(() => (loading.value = false))
|
||||
} else {
|
||||
const publicKey = forge.pki.publicKeyFromPem(user.rasKey)
|
||||
const encrypted = publicKey.encrypt(JSON.stringify(loginForm.value), 'RSAES-PKCS1-V1_5')
|
||||
|
|
|
|||
Loading…
Reference in New Issue