From eb82684152ffb0acddf67da92e4533a0190eb258 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期五, 10 十月 2025 18:27:31 +0800 Subject: [PATCH] 对接口 --- admin/src/views/login.vue | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue index ee91131..12a0bb7 100644 --- a/admin/src/views/login.vue +++ b/admin/src/views/login.vue @@ -3,6 +3,7 @@ <img src="@/assets/images/bg@2x.png" class="main_bg" alt=""> <div class="login_wrap"> <div class="login_img"> + <div class="h2">鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺</div> <div class="h3">鏅烘収鐗╂祦鍥尯瀹夋秷涓�浣撳寲绯荤粺</div> </div> <div class="form_wrap"> @@ -114,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, @@ -153,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 }) @@ -173,7 +177,7 @@ } sendSmsPost({ phone, type: 0 }).then(res => { Message.success('鐭俊鍙戦�佹垚鍔�') - this.downTime = 10 + this.downTime = 60 let timer = setInterval(() => { if (this.downTime == 0) { return clearInterval(timer) @@ -264,7 +268,20 @@ background: url("../assets/images/login_img@2x.png"); background-size: 100% 100%; padding-left: 40px; - padding-top: 80px; + padding-top: 60px; + + .h2 { + color: $primary-color; + background-color: #fff; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 4px; + width: 208px; + display: flex; + margin-bottom: 12px; + } .h3 { font-size: 28px; -- Gitblit v1.9.3