验证码倒计时

// 验证码倒计时
settime: function (that, countdown) {
if (countdown == 0) {
that.setData({
is_show: true,
})
countdown = 60;
return;
} else {
countdown--;
that.setData({
is_show: false,
numbers: countdown
})
 
}
setTimeout(function () {
getApp().settime(that, countdown)
}, 1000)
},
原文地址:https://www.cnblogs.com/weiwentaweb/p/8136342.html