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