getCurrentDown: function() {
var interval = setInterval(() => {
this.BtnText = this.second + 's 重新获取';
this.second--; //在data中定义second倒计时的时间
if (this.second == 0) {
clearInterval(interval);
this.second = 60;
this.BtnText = '获取验证码';
}
}, 1000);
}
网友评论