From 522877ae5bddcb27699b893c27f149d6a3c7e408 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 15 十一月 2024 18:29:02 +0800
Subject: [PATCH] ll

---
 admin/src/views/login.vue |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 43277c4..6cdf919 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -115,11 +115,11 @@
       if (this.loading) {
         return
       }
-      this.loading = true
       if (this.activeTab == 0) {
         if (!this.__check()) {
           return
         }
+        this.loading = true
         loginByPassword({
           username: this.username.trim(),
           password: this.password,
@@ -154,12 +154,15 @@
         if (!smsCode) {
           return Message.error('璇疯緭鍏ラ獙璇佺爜')
         }
+        this.loading = true
         loginByPhone({ phone, code: smsCode }).then(res => {
           if (this.isRemPsd) {
             localStorage.setItem('phone', this.username.trim())
           }
           Cookies.set('dm_user_token', res)
           this.$router.push('index')
+        }).catch(e => {
+          this.refreshCaptcha()
         }).finally(() => {
           this.loading = false
         })
@@ -266,7 +269,8 @@
       background-size: 100% 100%;
       padding-left: 40px;
       padding-top: 60px;
-      .h2{
+
+      .h2 {
         color: $primary-color;
         background-color: #fff;
         height: 24px;
@@ -278,6 +282,7 @@
         display: flex;
         margin-bottom: 12px;
       }
+
       .h3 {
         font-size: 28px;
         font-weight: 700;

--
Gitblit v1.9.3