Commit 6e9100cc04a2f4bc3a49fa0deb503ef9792f91f4

Authored by yvan.ni
1 parent 2767e587

整个窗体的宽度

Showing 1 changed file with 14 additions and 5 deletions
... ... @@ -104,8 +104,7 @@ App({
104 104 cartGoodsNum:this.globalData.cartGoodsNum
105 105 })
106 106 },
107   -
108   -
  107 +
109 108 globalData: {
110 109 cartGoodsNum:0, //购物车总数量
111 110 isTabBar :false,
... ... @@ -132,7 +131,10 @@ App({
132 131 to_group:null, //参团传递的数据
133 132 wxapp_buy_obj:null, //微信小程序购买的Object
134 133 pk_store:null, //选择的门店
135   -
  134 + first_leader:null, //分享会员ID
  135 + guide_id:null, //分享导购ID
  136 +
  137 + windowWidth:0, //整个窗体的宽度
136 138 },
137 139 auth: o,
138 140 request: a,
... ... @@ -145,6 +147,7 @@ App({
145 147 var rpxR = 750 / clientWidth;
146 148 var calc = wx.getSystemInfoSync().windowHeight * rpxR;
147 149 this.globalData.heigth=calc;
  150 + this.globalData.windowWidth=clientWidth;
148 151  
149 152 var app=this;
150 153 if(!app.globalData.userInfo){
... ... @@ -380,7 +383,6 @@ App({
380 383  
381 384 //同步化,在调用的时候要await
382 385 async get_isbuy() {
383   -
384 386 var th=this;
385 387 await api.check_isbuy({ store_id: t.stoid, type: 5 }).then(res=>{
386 388 var o=res;
... ... @@ -562,7 +564,14 @@ App({
562 564 }
563 565 },1000);
564 566 }
565   - }
  567 + },
  568 +
  569 + //清空登录时候缓存的值
  570 + onHide:function () {
  571 + this.globalData.is_test=0;
  572 + this.globalData.guide_id=null; //导购清空
  573 + this.globalData.first_leader=null; //分享的会员清空
  574 + }
566 575  
567 576  
568 577 });
... ...