From 26aafce0a3612ff8f550df5b85b50a1d4d4b6188 Mon Sep 17 00:00:00 2001 From: jmal Date: Sat, 12 Jul 2025 19:19:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor(login):=20=E4=BC=98=E5=8C=96=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2=20MFA=20=E9=AA=8C=E8=AF=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整 MFA 验证码加载状态管理,提升用户体验 - 移除多余的 catch 块,简化代码结构- 在 mfaConfig 组件中: - 优化二维码显示样式,移除不必要的 fit 属性 - 修正 el-input 组件的 v-model 绑定方式 --- src/views/login/index.vue | 5 +++-- src/views/setting/cloudSetting/mfaConfig.vue | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index d538a32..92b9ca3 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -282,10 +282,11 @@ export default { this.$store.dispatch('user/verifyMfaCode', this.loginForm).then(() => { this.$store.dispatch('user/setMenuList').then(() => { this.$router.push({ path: this.redirect || '/' }) - this.verifyMfaCodeLoading = false - }).catch(() => { + }).finally(() => { this.verifyMfaCodeLoading = false }) + }).catch(() => { + this.verifyMfaCodeLoading = false }) }, validUsername() { diff --git a/src/views/setting/cloudSetting/mfaConfig.vue b/src/views/setting/cloudSetting/mfaConfig.vue index 58765e4..d609d4e 100644 --- a/src/views/setting/cloudSetting/mfaConfig.vue +++ b/src/views/setting/cloudSetting/mfaConfig.vue @@ -25,8 +25,7 @@