data{
inte:" "
},
onshow:function(){
_this.setData({
inte:setInterval(function () {
_this.GetGroupPurchaseList();
}, 2000) })
}
关闭页面,清除定时器
onHide:function(){
var _this=this;
console.log("onHide方法执行")
clearInterval(_this.data.inte)},
onUnload:function(){
var _this=this;
console.log("onUnload方法执行")
clearInterval( _this.data.inte)}
网友评论