Commit 8e123a0898935e6542b211f95d29b0560953620b

Authored by yvan.ni
1 parent e26b4b98

虚拟成团的控制

pages/cart/cart_wk/cart_wk.js
@@ -200,6 +200,7 @@ Page({ @@ -200,6 +200,7 @@ Page({
200 distr_type = 0, 200 distr_type = 0,
201 exp_type = 0, 201 exp_type = 0,
202 teamgroup = null, 202 teamgroup = null,
  203 + teamlist=null,
203 th = this; 204 th = this;
204 //---获取订单--- 205 //---获取订单---
205 await getApp().request.promiseGet("/api/weshop/order/get/" + oo.stoid + "/" + ord, {}).then(res => { 206 await getApp().request.promiseGet("/api/weshop/order/get/" + oo.stoid + "/" + ord, {}).then(res => {
@@ -234,8 +235,18 @@ Page({ @@ -234,8 +235,18 @@ Page({
234 teamgroup = res.data.data.pageData[0]; 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 var jsarr = JSON.parse(teamgroup.jt_json); 246 var jsarr = JSON.parse(teamgroup.jt_json);
238 var count = teamgroup.jt_ct_num; 247 var count = teamgroup.jt_ct_num;
  248 + if(teamgroup.is_xuni_ct) count=teamlist.ct_num;
  249 +
239 //要计算尾款的价钱 250 //要计算尾款的价钱
240 var price = 0; 251 var price = 0;
241 jsarr.forEach(function (value, index) { 252 jsarr.forEach(function (value, index) {
@@ -275,7 +286,8 @@ Page({ @@ -275,7 +286,8 @@ Page({
275 pickup: pickup, 286 pickup: pickup,
276 exp_type: exp_type, 287 exp_type: exp_type,
277 goods: goods, 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,7 +71,11 @@
71 <view class='chentuan bdr14'> 71 <view class='chentuan bdr14'>
72 <view class='ct_one jc_sb'> 72 <view class='ct_one jc_sb'>
73 <view class='ct_one_left'>成团人数</view> 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 </view> 79 </view>
76 <view class='ct_one jc_sb'> 80 <view class='ct_one jc_sb'>
77 <view class='ct_one_left'>成团金额</view> 81 <view class='ct_one_left'>成团金额</view>