//点击阅读服务协议
goRead() {
var that = this;
//设置阅读协议的倒计时
let countdown = setInterval(() => {
if (that.readSecond > 1) {
that.readSecond--;
} else {
clearInterval(countdown); //到0就清除定时
that.readSecond = "";
}
}
JS用setInterval实现倒计时功能(到0则自动清除)
于 2021-08-24 14:35:31 首次发布
关键词由CSDN通过智能技术生成