简单的倒计时方法:
<view>{{time}}</view>
var test_number = 60 Page({ count_down: function () { var _this = this; setInterval(function () { test_number-- if (test_number >= 0) { _this.setData({ time: test_number }) }else{ console.log('我已经到0了') } }, 1000) }, onShow: function () { this.count_down() } })