| downNum:15,//倒计时时间 | downNum:15,//倒计时时间 | ||||
| setInt:null,//倒计时元素 | setInt:null,//倒计时元素 | ||||
| pizeTip:0,//抓奖提示框 | pizeTip:0,//抓奖提示框 | ||||
| pageUnload:false,//页面是否退出了 | |||||
| setGroup:{ | setGroup:{ | ||||
| left:null, | left:null, | ||||
| right: null, | right: null, | ||||
| * 生命周期函数--监听页面卸载 | * 生命周期函数--监听页面卸载 | ||||
| */ | */ | ||||
| onUnload: function () { | onUnload: function () { | ||||
| this.data.pageUnload = true; | |||||
| clearInterval(this.data.setInt); | |||||
| }, | }, | ||||
| /** | /** | ||||
| }) | }) | ||||
| }, | }, | ||||
| getGameAwardList: function () {//获取游戏中奖数据 | getGameAwardList: function () {//获取游戏中奖数据 | ||||
| if(this.data.pageUnload){ | |||||
| return; | |||||
| } | |||||
| app.wxRequest(app.globalData.urlRoot + "award/getGameAwardList", this.data.configure,res=>{ | app.wxRequest(app.globalData.urlRoot + "award/getGameAwardList", this.data.configure,res=>{ | ||||
| if(res.code==200){ | if(res.code==200){ | ||||
| if(res.data){ | if(res.data){ | ||||
| },this) | },this) | ||||
| }, | }, | ||||
| noMoreData: function (duration,left){ | noMoreData: function (duration,left){ | ||||
| if(this.data.pageUnload){ | |||||
| return; | |||||
| } | |||||
| console.log(1); | console.log(1); | ||||
| this.aniFun(duration, left); | this.aniFun(duration, left); | ||||
| setTimeout(() => { | setTimeout(() => { |