var that = this
var count = 60;
var re=/^1[3|4|5|7|8][0-9]\d{4,8}$/;
if(!re.test(that.data.mobile))
{
wx.showModal({
title: "请输入正确的手机号"
});
return false;
}else{
if(that.data.isdisable==false){
that.sendcode()
wx.showModal({
title: "发送成功"
});
var timer = setInterval(function () {
count--;
if (count >= 1) {
that.setData({
verifyInfo: count + 's'
})
} else {
that.setData({
verifyInfo: '获取验证码'
})
clearInterval(timer);
that.data.isdisable = false;
}
}, 1000);
that.data.isdisable = true;
}
}
网友评论