function countdown(that) {
    var second = that.data.second
    if (second == 0) {
    that.setData({
    second: 600
});
    return;
}
var time = setTimeout(function() {
    that.setData({
    second: second - 1
    });
countdown(that);
}, 1000)
}这段十分钟计时的代码。
我要是用 countdown(that); 语句在:
onLoad: function(options)
 中就可以使用。但是在其他方法中就不能运行了。
曾经也成功过几次,也不知道搞了什么成功的。
totosspace
					橋本奈奈未
随时随地看视频慕课网APP