Commit 67cb46564f2c08daf1e4a3716d2e5ddd8de623e2
1 parent
2cafeda1
update专享礼包添加
Showing
1 changed file
with
10 additions
and
4 deletions
pages/giftpack/buygiftpack/giftpackbuy.js
| ... | ... | @@ -25,7 +25,8 @@ Page({ |
| 25 | 25 | curpage: 1, //当前分页数 |
| 26 | 26 | pageSize: 10, //页大小 |
| 27 | 27 | total: 0, //总数量 |
| 28 | - ad_data:null, | |
| 28 | + ad_data:null, | |
| 29 | + first_leader: e.globalData.first_leader || 0, // 推荐人ID | |
| 29 | 30 | }, |
| 30 | 31 | onLoad: function(options) { |
| 31 | 32 | |
| ... | ... | @@ -91,7 +92,8 @@ Page({ |
| 91 | 92 | "giftBagId": id, //礼包Id |
| 92 | 93 | "storeId": that.getStorageID, //商家Id |
| 93 | 94 | "userId": that.getUserID, //用户ID |
| 94 | - "buyFrom": 2 | |
| 95 | + "buyFrom": 2, | |
| 96 | + "first_leader": that.first_leader | |
| 95 | 97 | }; |
| 96 | 98 | |
| 97 | 99 | //-- 分享导购要记录 -- |
| ... | ... | @@ -141,11 +143,13 @@ Page({ |
| 141 | 143 | |
| 142 | 144 | |
| 143 | 145 | }, |
| 146 | + // 积分兑换 | |
| 144 | 147 | GetBuyIntegral: function(e) { |
| 145 | 148 | var that = this.data; |
| 146 | 149 | var th = this; |
| 147 | 150 | var id = e.currentTarget.dataset.id; //活动id |
| 148 | 151 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
| 152 | + | |
| 149 | 153 | my_confirm.open( |
| 150 | 154 | "是否确定兑换该礼包", |
| 151 | 155 | "取消", |
| ... | ... | @@ -162,7 +166,8 @@ Page({ |
| 162 | 166 | "giftBagId": id, //礼包Id |
| 163 | 167 | "storeId": that.getStorageID, //商家Id |
| 164 | 168 | "userId": that.getUserID, //用户ID |
| 165 | - "buyFrom": 2 | |
| 169 | + "buyFrom": 2, | |
| 170 | + "first_leader": that.first_leader | |
| 166 | 171 | }; |
| 167 | 172 | |
| 168 | 173 | //-- 分享导购要记录 -- |
| ... | ... | @@ -309,7 +314,8 @@ Page({ |
| 309 | 314 | path:pagePath, |
| 310 | 315 | } |
| 311 | 316 | }, |
| 312 | - | |
| 317 | + | |
| 318 | + // 分享朋友圈 | |
| 313 | 319 | onShareTimeline() { |
| 314 | 320 | var curPage=this; |
| 315 | 321 | var pagePath = curPage.route; //当前页面url | ... | ... |