From e6ce3c3577b1344c37d7be27f1db5d9f6287c873 Mon Sep 17 00:00:00 2001
From: wen <1515>
Date: Thu, 13 Oct 2022 01:39:11 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/login/index.vue | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index ac91af5..89bf9b3 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -55,8 +55,8 @@
auto-complete="on"
/>
-
-
+
+
@@ -104,6 +104,11 @@ export default {
}
}
return {
+
+ loading: false,
+ captcha_loading: true, // 验证码加载状态
+ passwordType: 'password',
+ redirect: undefined,
loginForm: {
username: '',
password: '',
@@ -116,11 +121,7 @@ export default {
],
password: [{ required: true, trigger: 'blur', validator: validatePassword }],
captcha: [{ required: true, trigger: 'blur', validator: validateCaptcha }]
- },
- loading: false,
- captcha_loading: false,
- passwordType: 'password',
- redirect: undefined
+ }
}
},
watch: {
@@ -136,10 +137,12 @@ export default {
// 页面数据
getCustomers() {
let thiss = this;
- axios.post('/api/captcha', 'refresh').then(function (response) {
+ this.captcha_loading = true;
+ axios.post('/api/captcha').then(function (response) {
let datamain = response.data;
thiss.captchaimg = datamain.data;
- console.log(response);
+ thiss.captcha_loading = false;
+ //console.log(response);
}).catch(function (error) {
//console.log(error);
this.$message({
@@ -165,12 +168,9 @@ export default {
if (valid) {
this.loading = true
let thiss = this;
- axios.post('/api/login', this.loginForm, {
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
+ axios.post('/api/login', this.loginForm, {headers: {'Content-Type': 'multipart/form-data'}
}).then(function (response) {
- console.log(thiss.$router)
+ console.log(response)
thiss.$router.push({path: '/usermange'})
console.log('6666');
}).catch(function (error) {
@@ -301,7 +301,7 @@ $cursor: #3c3535;
}
.captcha_k{display:flex;}
.captcha_k .captcha_main{width:100px;height:54px;margin: 0 0 0 15px;}
- .captcha_k .captcha_img{border-radius:6px;display:block;max-width:100%;height:100%;}
+ .captcha_k .captcha_img{border-radius:6px;display:block;max-width:100%;height:100%;cursor:pointer;}
.captcha_k>.el-form-item{flex:1;}
}