diff --git a/ui/src/api/user.ts b/ui/src/api/user.ts index 1133f2e39..0d6697054 100644 --- a/ui/src/api/user.ts +++ b/ui/src/api/user.ts @@ -22,7 +22,7 @@ const ldapLogin: (request: LoginRequest, loading?: Ref) => Promise { - return post('/ldap/login', request, undefined, loading) + return post('/LDAP/login', request, undefined, loading) } /** * 获取图形验证码 diff --git a/ui/src/views/login/index.vue b/ui/src/views/login/index.vue index 99b6bc87b..a46f2991d 100644 --- a/ui/src/views/login/index.vue +++ b/ui/src/views/login/index.vue @@ -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')