Commit f51ac2e14ccf75bb2018c47970f2116f67e7572b
1 parent
04a2dfa6
优化分销
Showing
1 changed file
with
12 additions
and
4 deletions
packageA/pages/distribution/myteam/myteam.js
| ... | ... | @@ -8,7 +8,7 @@ Page({ |
| 8 | 8 | * 页面的初始数据 |
| 9 | 9 | */ |
| 10 | 10 | data: { |
| 11 | - tabArr: ['一级分销','二级分销'],//'分销' | |
| 11 | + tabArr: ['一级分销'],//'分销' | |
| 12 | 12 | currentTabIndex: 0, //记录当前点击的Tab索引 |
| 13 | 13 | |
| 14 | 14 | list: null, |
| ... | ... | @@ -35,9 +35,17 @@ Page({ |
| 35 | 35 | app.request.promiseGet('/api/weshop/storeDistribut/get/'+app.globalData.setting.stoid,{ |
| 36 | 36 | }).then(res=>{ |
| 37 | 37 | if(res.data.code==0 && res.data.data){ |
| 38 | - if(res.data.data.firstName) self.data.tabArr[0]=res.data.data.firstName; | |
| 39 | - if(res.data.data.secondName) self.data.tabArr[1]=res.data.data.secondName; | |
| 40 | - self.setData({tabArr:self.data.tabArr}) | |
| 38 | + if(res.data.data.is_shshow==0) | |
| 39 | + { | |
| 40 | + self.setData({tabArr:['一级分销','二级分销']}) | |
| 41 | + } | |
| 42 | + | |
| 43 | + if(res.data.data.firstName) self.data.tabArr[0]=res.data.data.firstName; | |
| 44 | + if(res.data.data.is_shshow==0) | |
| 45 | + { | |
| 46 | + if(res.data.data.secondName) self.data.tabArr[1]=res.data.data.secondName; | |
| 47 | + } | |
| 48 | + self.setData({tabArr:self.data.tabArr}) | |
| 41 | 49 | } |
| 42 | 50 | }) |
| 43 | 51 | }, | ... | ... |