标签:htm === erro else ror turn color 消息 发送
1.调用获取验证码方法
createCodeEmail(){
let vm=this;
if(vm.timeOut>0){
return false;
}
vm.timeOut=99;
if(!vm.name){
modal.error(‘请输入用户名获取验证码‘);
return false;
}
let url=‘/user/loginVerifyCode‘;
let params={‘account‘:vm.name};
$.ajaxSend(url,params).done(function(data) {
if (data.code===‘00000000‘) {
modal.success(‘验证码发送至邮箱‘+data.msg);
vm.codeKey=data.payload.results.codeKey;
}else {
modal.error(‘验证码发送至邮箱‘+data.msg+‘,请重试!‘);
}
});
},
2.定时器
created(){
let vm = this;
setInterval(function(){
vm.timeOut--;
},1000)
},
3.html
<span class="btn time">请({{timeOut}})后再发送</span>
标签:htm === erro else ror turn color 消息 发送
原文地址:https://www.cnblogs.com/cx709452428/p/10314037.html