|
@@ -100,15 +100,21 @@
|
|
Http.put('/api/verify/email', params).then((res) => {
|
|
Http.put('/api/verify/email', params).then((res) => {
|
|
this.hasVerifyCode = true;
|
|
this.hasVerifyCode = true;
|
|
let _this = this;
|
|
let _this = this;
|
|
- let codeTimer = setInterval(function () {
|
|
|
|
- if (_this.codeTime > 0) {
|
|
|
|
- _this.codeTime--;
|
|
|
|
- } else {
|
|
|
|
- clearInterval(codeTimer);
|
|
|
|
- _this.hasVerifyCode = false;
|
|
|
|
- this.codeTime = 10;
|
|
|
|
- }
|
|
|
|
- }, 1000)
|
|
|
|
|
|
+ if (res.msg == "ERROR") {
|
|
|
|
+ notify('error', '验证码获取失败:' + res.data);
|
|
|
|
+ }else{
|
|
|
|
+ notify('success', res.data);
|
|
|
|
+ let codeTimer = setInterval(function () {
|
|
|
|
+ if (_this.codeTime > 0) {
|
|
|
|
+ _this.codeTime--;
|
|
|
|
+ } else {
|
|
|
|
+ clearInterval(codeTimer);
|
|
|
|
+ _this.hasVerifyCode = false;
|
|
|
|
+ this.codeTime = 10;
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
notify('error', '获取验证码失败:' + err.data);
|
|
notify('error', '获取验证码失败:' + err.data);
|
|
})
|
|
})
|