Commit 3252878a authored by huangjie's avatar huangjie

*

parent da003db4
...@@ -235,6 +235,7 @@ ...@@ -235,6 +235,7 @@
smstime:60, smstime:60,
smstitle:'获取验证码', smstitle:'获取验证码',
showcode:false,//是否展示验证码 showcode:false,//是否展示验证码
nosend:false,
}; };
}, },
...@@ -267,16 +268,21 @@ ...@@ -267,16 +268,21 @@
}); });
}, },
getsms(){ getsms(){
if(this.nosend == true){
return false
}
logincaptchaSms(this.dxform).then(res=>{ logincaptchaSms(this.dxform).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.$message.success('已发送短信!') this.$message.success('已发送短信!')
let _this = this let _this = this
_this.nosend = true
this.timers = setInterval(()=>{ this.timers = setInterval(()=>{
_this.smstitle = _this.smstime +'秒后重试' _this.smstitle = _this.smstime +'秒后重试'
_this.smstime--; _this.smstime--;
if(_this.smstime <= 0){ if(_this.smstime <= 0){
_this.smstitle = '发送验证码' _this.smstitle = '发送验证码'
clearInterval(_this.timers) clearInterval(_this.timers)
_this.nosend = false
} }
},1000) },1000)
}else{ }else{
......
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