Commit 8e123a0898935e6542b211f95d29b0560953620b
1 parent
e26b4b98
虚拟成团的控制
Showing
2 changed files
with
18 additions
and
2 deletions
pages/cart/cart_wk/cart_wk.js
... | ... | @@ -200,6 +200,7 @@ Page({ |
200 | 200 | distr_type = 0, |
201 | 201 | exp_type = 0, |
202 | 202 | teamgroup = null, |
203 | + teamlist=null, | |
203 | 204 | th = this; |
204 | 205 | //---获取订单--- |
205 | 206 | await getApp().request.promiseGet("/api/weshop/order/get/" + oo.stoid + "/" + ord, {}).then(res => { |
... | ... | @@ -234,8 +235,18 @@ Page({ |
234 | 235 | teamgroup = res.data.data.pageData[0]; |
235 | 236 | }); |
236 | 237 | |
238 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + order.pt_prom_id, { | |
239 | + data: { } | |
240 | + }).then(res => { | |
241 | + if(res.data.code==0) teamlist=res.data.data; | |
242 | + }); | |
243 | + | |
244 | + | |
245 | + | |
237 | 246 | var jsarr = JSON.parse(teamgroup.jt_json); |
238 | 247 | var count = teamgroup.jt_ct_num; |
248 | + if(teamgroup.is_xuni_ct) count=teamlist.ct_num; | |
249 | + | |
239 | 250 | //要计算尾款的价钱 |
240 | 251 | var price = 0; |
241 | 252 | jsarr.forEach(function (value, index) { |
... | ... | @@ -275,7 +286,8 @@ Page({ |
275 | 286 | pickup: pickup, |
276 | 287 | exp_type: exp_type, |
277 | 288 | goods: goods, |
278 | - teamgroup: teamgroup | |
289 | + teamgroup: teamgroup, | |
290 | + teamlist: teamlist, | |
279 | 291 | }); |
280 | 292 | |
281 | 293 | //--计算物流-- | ... | ... |
pages/cart/cart_wk/cart_wk.wxml
... | ... | @@ -71,7 +71,11 @@ |
71 | 71 | <view class='chentuan bdr14'> |
72 | 72 | <view class='ct_one jc_sb'> |
73 | 73 | <view class='ct_one_left'>成团人数</view> |
74 | - <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view> | |
74 | + <view class='ct_one_right'> | |
75 | + <text wx:if="{{teamgroup.is_xuni_ct}}" class='redwz'>{{teamgroup.jt_ct_num}}</text> | |
76 | + <text wx:else class='redwz'>{{teamgroup.jt_ct_num}}</text> | |
77 | + 人 | |
78 | + </view> | |
75 | 79 | </view> |
76 | 80 | <view class='ct_one jc_sb'> |
77 | 81 | <view class='ct_one_left'>成团金额</view> | ... | ... |