Procházet zdrojové kódy

验证码优化

rongxin_prod
庞东旭 před 1 rokem
rodič
revize
037d9ec431
1 změnil soubory, kde provedl 7 přidání a 3 odebrání
  1. +7
    -3
      src/views/login.vue

+ 7
- 3
src/views/login.vue Zobrazit soubor

@@ -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(() => {


Načítá se…
Zrušit
Uložit