Commit 5292a92b6122c6ff0bc83885fae7715aa9d9bda2

Authored by yvan.ni
1 parent 2b43715b

app.js 要用setTimeout延迟调用

Showing 1 changed file with 24 additions and 18 deletions
@@ -671,24 +671,30 @@ App({ @@ -671,24 +671,30 @@ App({
671 671
672 //清空登录时候缓存的值 672 //清空登录时候缓存的值
673 onHide: function () { 673 onHide: function () {
674 - if(!this.globalData.no_clear) {  
675 - this.globalData.is_test = 0;  
676 - this.globalData.guide_id = null; //导购清空  
677 - this.globalData.first_leader = null; //分享的会员清空  
678 - this.globalData.wuliu = null; //关闭要把物流清空  
679 - this.globalData.room_id = null; //关闭要把房间号关闭  
680 - this.globalData.room_goods_id = null; //关闭要把物流清空  
681 - this.globalData.config2 = null; //清除config2的缓存  
682 - this.globalData.config = null; //清除config的缓存  
683 - this.globalData.gr_index = 0; //商品分组的序列  
684 - this.globalData.pk_store = null;  
685 - this.globalData.wxapp_buy_obj = null;  
686 - this.globalData.dis_buy_obj = null; //等级卡的购买记录  
687 - this.globalData.storeFooter = null; //底部的导航  
688 - this.globalData.full_screen = null; //全屏  
689 - }else{  
690 - this.globalData.no_clear=0;  
691 - } 674 + var th=this;
  675 + setTimeout(function () {
  676 + console.log("app onhide");
  677 + console.log(th.globalData.no_clear);
  678 + if(!th.globalData.no_clear) {
  679 + th.globalData.is_test = 0;
  680 + th.globalData.guide_id = null; //导购清空
  681 + th.globalData.first_leader = null; //分享的会员清空
  682 + th.globalData.wuliu = null; //关闭要把物流清空
  683 + th.globalData.room_id = null; //关闭要把房间号关闭
  684 + th.globalData.room_goods_id = null; //关闭要把物流清空
  685 + th.globalData.config2 = null; //清除config2的缓存
  686 + th.globalData.config = null; //清除config的缓存
  687 + th.globalData.gr_index = 0; //商品分组的序列
  688 + th.globalData.pk_store = null;
  689 + th.globalData.wxapp_buy_obj = null;
  690 + th.globalData.dis_buy_obj = null; //等级卡的购买记录
  691 + th.globalData.storeFooter = null; //底部的导航
  692 + th.globalData.full_screen = null; //全屏
  693 + }else{
  694 + th.globalData.no_clear=0;
  695 + }
  696 + },500)
  697 +
692 }, 698 },
693 699
694 clear_word: function (word) { 700 clear_word: function (word) {