|
@@ -132,17 +132,21 @@
|
|
|
mobile: this.phoneBindingForm.phone
|
|
|
}
|
|
|
Http.put('/api/verify/mobile', params).then((res) => {
|
|
|
- this.hasVerifyCode = true;
|
|
|
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{
|
|
|
+ this.hasVerifyCode = true;
|
|
|
+ let codeTimer = setInterval(function () {
|
|
|
+ if (_this.codeTime > 0) {
|
|
|
+ _this.codeTime--;
|
|
|
+ } else {
|
|
|
+ clearInterval(codeTimer);
|
|
|
+ _this.hasVerifyCode = false;
|
|
|
+ this.codeTime = 10;
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
}).catch(err => {
|
|
|
notify('error', '获取验证码失败:' + err.data);
|
|
|
})
|