diff --git a/src/views/login.vue b/src/views/login.vue index 97dd456c..2d280b99 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -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(() => {