From 5292a92b6122c6ff0bc83885fae7715aa9d9bda2 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Fri, 11 Mar 2022 17:12:00 +0800 Subject: [PATCH] app.js 要用setTimeout延迟调用 --- app.js | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/app.js b/app.js index a9b91af..cdd939d 100644 --- a/app.js +++ b/app.js @@ -671,24 +671,30 @@ App({ //清空登录时候缓存的值 onHide: function () { - if(!this.globalData.no_clear) { - this.globalData.is_test = 0; - this.globalData.guide_id = null; //导购清空 - this.globalData.first_leader = null; //分享的会员清空 - this.globalData.wuliu = null; //关闭要把物流清空 - this.globalData.room_id = null; //关闭要把房间号关闭 - this.globalData.room_goods_id = null; //关闭要把物流清空 - this.globalData.config2 = null; //清除config2的缓存 - this.globalData.config = null; //清除config的缓存 - this.globalData.gr_index = 0; //商品分组的序列 - this.globalData.pk_store = null; - this.globalData.wxapp_buy_obj = null; - this.globalData.dis_buy_obj = null; //等级卡的购买记录 - this.globalData.storeFooter = null; //底部的导航 - this.globalData.full_screen = null; //全屏 - }else{ - this.globalData.no_clear=0; - } + var th=this; + setTimeout(function () { + console.log("app onhide"); + console.log(th.globalData.no_clear); + if(!th.globalData.no_clear) { + th.globalData.is_test = 0; + th.globalData.guide_id = null; //导购清空 + th.globalData.first_leader = null; //分享的会员清空 + th.globalData.wuliu = null; //关闭要把物流清空 + th.globalData.room_id = null; //关闭要把房间号关闭 + th.globalData.room_goods_id = null; //关闭要把物流清空 + th.globalData.config2 = null; //清除config2的缓存 + th.globalData.config = null; //清除config的缓存 + th.globalData.gr_index = 0; //商品分组的序列 + th.globalData.pk_store = null; + th.globalData.wxapp_buy_obj = null; + th.globalData.dis_buy_obj = null; //等级卡的购买记录 + th.globalData.storeFooter = null; //底部的导航 + th.globalData.full_screen = null; //全屏 + }else{ + th.globalData.no_clear=0; + } + },500) + }, clear_word: function (word) { -- libgit2 0.21.4