Selaa lähdekoodia

验证码优化

rongxin_prod
庞东旭 1 vuosi sitten
vanhempi
commit
037d9ec431
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. +7
    -3
      src/views/login.vue

+ 7
- 3
src/views/login.vue Näytä tiedosto

@@ -149,7 +149,9 @@ export default {
code:null,
isSmsLogin: false, //是否手机验证码
computeTime: 0,
height:0
height:0,
uuid:'',
uuidPhone:'',
};
},
created() {
@@ -171,13 +173,13 @@ export default {
methods: {
getCode() {
getCodeImg().then((res) => {
this.formData.uuid = res.uuid;
this.uuid = res.uuid;
this.codeUrl = "data:image/gif;base64," + res.img;
});
},
getCodePhone() {
getCodeImg().then((res) => {
this.formData.uuid = res.uuid;
this.uuidPhone = res.uuid;
this.codeUrlPhone = "data:image/gif;base64," + res.img;
});
},
@@ -242,6 +244,7 @@ export default {
}
this.loading = true;
this.formData.code = this.mobileCode;
this.formData.uuid = this.uuidPhone
this.$store
.dispatch("SmsLogin", this.formData)
.then(() => {
@@ -278,6 +281,7 @@ export default {
return false;
}
this.formData.code = this.code;
this.formData.uuid = this.uuid;
this.$store
.dispatch("Login", this.formData)
.then(() => {


Ladataan…
Peruuta
Tallenna