Commit 3bfdd35b by wangjian

1

parent af1111b0
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
this.toast('验证码发送成功'); this.toast('验证码发送成功');
this.startTime(); this.startTime();
} else { } else {
this.toast(res.messaage); this.toast(res.message);
} }
}) })
.catch(err => { .catch(err => {
...@@ -61,15 +61,21 @@ export default { ...@@ -61,15 +61,21 @@ export default {
}, 1000); }, 1000);
}, },
submit() { submit() {
if (this.code.length != 4) {
this.toast('请输入正确的验证码')
return
}
this.$net.post('/staff/password/change', {code: this.code}) this.$net.post('/staff/password/change', {code: this.code})
.then(res => { .then(res => {
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.$router.replaceTo('SetPwd', {randomCode: res.data.randomCode}) this.$router.replaceTo('SetPwd', {randomCode: res.data.randomCode})
} else {
this.toast('请输入正确的验证码')
} }
}) })
.catch(err => { .catch(err => {
this.toast('请输入正确的验证码')
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment