Commit f2857d1c0768720b2819d291fed78c3f461eb33b
1 parent
5b6df4cd
我的团队的名称
Showing
2 changed files
with
11 additions
and
27 deletions
packageA/pages/distribution/myteam/myteam.js
... | ... | @@ -8,7 +8,7 @@ Page({ |
8 | 8 | * 页面的初始数据 |
9 | 9 | */ |
10 | 10 | data: { |
11 | - tabArr: ['A级分销','B级分销'],//'分销' | |
11 | + tabArr: ['一级分销','二级分销'],//'分销' | |
12 | 12 | currentTabIndex: 0, //记录当前点击的Tab索引 |
13 | 13 | |
14 | 14 | list: null, |
... | ... | @@ -31,31 +31,15 @@ Page({ |
31 | 31 | userInfo: data, |
32 | 32 | }); |
33 | 33 | }); |
34 | - // 判断会员是否授权登录, | |
35 | - // 没有登录则跳转到登录页, | |
36 | - // 已登录则设置已登录状态,请求加载签到数据 | |
37 | - // isLogin记录登录状态 | |
38 | - // app.isLogin().then(function(data) { | |
39 | - // console.log('data', data); | |
40 | - // // 1.登录成功 | |
41 | - // self.setData({ | |
42 | - // isLogin: true, | |
43 | - // userInfo: data, | |
44 | - // }); | |
45 | - // // 2.请求数据 | |
46 | - // // 默认请求A级分销 | |
47 | - // self.getData(true, '/api/weshop/users/distribut/teamlist', { | |
48 | - // store_id: app.globalData.setting.stoid, | |
49 | - // user_id: app.globalData.user_id, | |
50 | - // level: 1, | |
51 | - // }); | |
52 | - // // 默认请求佣金用户排行 | |
53 | - // // this.get('/api/weshop/users/distribut/rankingUser', { | |
54 | - // // store_id: app.globalData.setting.stoid, | |
55 | - // // user_id: app.globalData.user_id, | |
56 | - // // }); | |
57 | - | |
58 | - // }); | |
34 | + | |
35 | + app.request.promiseGet('/api/weshop/storeDistribut/get/1',{ | |
36 | + }).then(res=>{ | |
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}) | |
41 | + } | |
42 | + }) | |
59 | 43 | }, |
60 | 44 | |
61 | 45 | /** | ... | ... |
packageA/pages/profile/profile.js
... | ... | @@ -671,7 +671,7 @@ Page({ |
671 | 671 | } |
672 | 672 | |
673 | 673 | //-- 新的会员 -- |
674 | - if(back_data && back_data.data.pickup_id && !set_data.sto_sele_id){ | |
674 | + if(back_data && back_data.data && back_data.data.pickup_id && !set_data.sto_sele_id){ | |
675 | 675 | set_data.stoname=back_data.data.pickup_name; |
676 | 676 | set_data.sto_sele_id=back_data.data.pickup_id; |
677 | 677 | } | ... | ... |