| @@ -20,7 +20,10 @@ Page({ | |||||
| showIf: false, | showIf: false, | ||||
| }, | }, | ||||
| onUnload:function(){ | onUnload:function(){ | ||||
| console.log("onUnload"); | |||||
| let that = this; | |||||
| clearInterval(that.data.setInter); | |||||
| }, | |||||
| onHide:function(){ | |||||
| let that = this; | let that = this; | ||||
| clearInterval(that.data.setInter); | clearInterval(that.data.setInter); | ||||
| }, | }, | ||||
| @@ -99,6 +99,10 @@ Page({ | |||||
| let that = this; | let that = this; | ||||
| clearInterval(that.data.setInter); | clearInterval(that.data.setInter); | ||||
| }, | }, | ||||
| onHide: function () { | |||||
| let that = this; | |||||
| clearInterval(that.data.setInter); | |||||
| }, | |||||
| // onHide:function(){ | // onHide:function(){ | ||||
| // console.log(app.globalData.sight) | // console.log(app.globalData.sight) | ||||
| // wx.setScreenBrightness({ | // wx.setScreenBrightness({ | ||||
| @@ -17,6 +17,10 @@ Page({ | |||||
| let that = this; | let that = this; | ||||
| clearInterval(that.data.setInter); | clearInterval(that.data.setInter); | ||||
| }, | }, | ||||
| onHide: function () { | |||||
| let that = this; | |||||
| clearInterval(that.data.setInter); | |||||
| }, | |||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| let that = this; | let that = this; | ||||
| that.setData({ | that.setData({ | ||||