this.countdownTime = null;
let send = 60;
--send;
this.getSmsCodeTip = `${send}s后重新获取`;
this.countdownTime = setInterval(()=>{
--send;
if(send === 0){
this.getSmsCodeTip = '重新获取';
send = 60;
this.isCountDown = true;
clearInterval(this.countdownTime);
}else{
this.getSmsCodeTip = `${send}s后重新获取`;
}
},1000);
验证码倒计时
发布时间 2023-05-22 11:43:22作者: 膽小