Commit 10398d681cfab5ef9d5e8402b68757496b96b0c8

Authored by yvan.ni
1 parent 0ebd4c0b

底部导航的问题

Showing 1 changed file with 34 additions and 6 deletions
@@ -11,6 +11,7 @@ App({ @@ -11,6 +11,7 @@ App({
11 //使用getCurrentPages可以获取当前加载中所有的页面对象的一个数组,数组最后一个就是当前页面。 11 //使用getCurrentPages可以获取当前加载中所有的页面对象的一个数组,数组最后一个就是当前页面。
12 var custum_data=this.globalData.custum_data; 12 var custum_data=this.globalData.custum_data;
13 var isIpx=this.globalData.isIpx; 13 var isIpx=this.globalData.isIpx;
  14 + var is_read=this.globalData.is_read;
14 //var curPageArr = getCurrentPages(); //获取加载的页面 15 //var curPageArr = getCurrentPages(); //获取加载的页面
15 //var curPage = curPageArr[curPageArr.length - 1]; //获取当前页面的对象 16 //var curPage = curPageArr[curPageArr.length - 1]; //获取当前页面的对象
16 var curPage=th; 17 var curPage=th;
@@ -18,7 +19,7 @@ App({ @@ -18,7 +19,7 @@ App({
18 if (pagePath.indexOf('/') != 0) { 19 if (pagePath.indexOf('/') != 0) {
19 pagePath = '/' + pagePath; 20 pagePath = '/' + pagePath;
20 } 21 }
21 - if(isIpx){ 22 + if(is_read){
22 if(custum_data){ 23 if(custum_data){
23 that.set_custom_nav(custum_data,isIpx,pagePath,url,curPage); 24 that.set_custom_nav(custum_data,isIpx,pagePath,url,curPage);
24 }else{ 25 }else{
@@ -49,10 +50,32 @@ App({ @@ -49,10 +50,32 @@ App({
49 that.globalData.isIpx=isIpx; 50 that.globalData.isIpx=isIpx;
50 getApp().request.promiseGet("/api/weshop/storeFooter/get/"+stoid, { 51 getApp().request.promiseGet("/api/weshop/storeFooter/get/"+stoid, {
51 }).then(res => { 52 }).then(res => {
  53 + this.globalData.is_read=true;
52 var e = res; 54 var e = res;
53 if(e.data.code != -1){ 55 if(e.data.code != -1){
54 that.globalData.custum_data=e.data.data; 56 that.globalData.custum_data=e.data.data;
55 - that.set_custom_nav(e.data.data,isIpx,pagePath,url,curPage); 57 +
  58 + var itemList = that.globalData.custum_data.data;
  59 + itemList = JSON.parse(itemList)
  60 +
  61 + if(!itemList[0].weappurl){
  62 + that.globalData.custum_data=null;
  63 + var tabBar = {
  64 + 'iscustom':2,
  65 + 'url':url,
  66 + 'active':pagePath,
  67 + 'isIpx':isIpx,
  68 + cartGoodsNum:this.globalData.cartGoodsNum
  69 + }
  70 + curPage.setData({
  71 + tabBar:tabBar,
  72 + isIpx:isIpx,
  73 + cartGoodsNum:this.globalData.cartGoodsNum
  74 + })
  75 + }else{
  76 + that.set_custom_nav(e.data.data,isIpx,pagePath,url,curPage);
  77 + }
  78 +
56 }else{ 79 }else{
57 var tabBar = { 80 var tabBar = {
58 'iscustom':2, 81 'iscustom':2,
@@ -136,7 +159,10 @@ App({ @@ -136,7 +159,10 @@ App({
136 first_leader:null, //分享会员ID 159 first_leader:null, //分享会员ID
137 guide_id:null, //分享导购ID 160 guide_id:null, //分享导购ID
138 161
139 - windowWidth:0, //整个窗体的宽度 162 + windowWidth:0, //整个窗体的宽度
  163 +
  164 + room_id:null, //直播间分享的房间ID
  165 + room_goods_id:null, //直播间分享的商品ID
140 166
141 }, 167 },
142 auth: o, 168 auth: o,
@@ -563,9 +589,11 @@ App({ @@ -563,9 +589,11 @@ App({
563 //清空登录时候缓存的值 589 //清空登录时候缓存的值
564 onHide:function () { 590 onHide:function () {
565 this.globalData.is_test=0; 591 this.globalData.is_test=0;
566 - this.globalData.guide_id=null; //导购清空  
567 - this.globalData.first_leader=null; //分享的会员清空  
568 - th.globalData.wuliu=null; //关闭要把物流清空 592 + this.globalData.guide_id=null; //导购清空
  593 + this.globalData.first_leader=null; //分享的会员清空
  594 + this.globalData.wuliu=null; //关闭要把物流清空
  595 + this.globalData.room_id=null; //关闭要把房间号关闭
  596 + this.globalData.room_goods_id=null; //关闭要把物流清空
569 } 597 }
570 598
571 599