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;}
}