微信小程序 功能函数 计时器时间:2021-03-08 19:23:53 let lovetime = setInterval(function () { let str = '(' + n + ')' + '重新获取' that.setData({ getText2: str }) if (n <= 0) { that.setData({ loveChange: true, getText2: '重新获取' }) clearInterval(lovetime); } n--; }, 1000);