diff --git a/pages/couponorder/detail/index.js b/pages/couponorder/detail/index.js index 523105b..1d00625 100644 --- a/pages/couponorder/detail/index.js +++ b/pages/couponorder/detail/index.js @@ -20,7 +20,10 @@ Page({ showIf: false, }, onUnload:function(){ - console.log("onUnload"); + let that = this; + clearInterval(that.data.setInter); + }, + onHide:function(){ let that = this; clearInterval(that.data.setInter); }, diff --git a/pages/orderquanma/index.js b/pages/orderquanma/index.js index efb1c0a..99efeb3 100644 --- a/pages/orderquanma/index.js +++ b/pages/orderquanma/index.js @@ -99,6 +99,10 @@ Page({ let that = this; clearInterval(that.data.setInter); }, + onHide: function () { + let that = this; + clearInterval(that.data.setInter); + }, // onHide:function(){ // console.log(app.globalData.sight) // wx.setScreenBrightness({ diff --git a/pages/passCar/couponDetail/couponDetail.js b/pages/passCar/couponDetail/couponDetail.js index d970043..5ee5b91 100644 --- a/pages/passCar/couponDetail/couponDetail.js +++ b/pages/passCar/couponDetail/couponDetail.js @@ -17,6 +17,10 @@ Page({ let that = this; clearInterval(that.data.setInter); }, + onHide: function () { + let that = this; + clearInterval(that.data.setInter); + }, onLoad: function (options) { let that = this; that.setData({