Commit a00268269095bb7450c3e03a0aeff2738a7d526d
1 parent
76263827
购物车加减修改, 商品列表
Showing
3 changed files
with
13 additions
and
11 deletions
pages/cart/cart2/cart2.js
@@ -153,8 +153,6 @@ Page({ | @@ -153,8 +153,6 @@ Page({ | ||
153 | 153 | ||
154 | var th = this; | 154 | var th = this; |
155 | to.getwuliu(function (e) { | 155 | to.getwuliu(function (e) { |
156 | - console.log("ws"); | ||
157 | - console.log("物流的数据77777777777777",e); | ||
158 | th.setData({ wu_arr: e }) | 156 | th.setData({ wu_arr: e }) |
159 | typeof func == "function" && func(); | 157 | typeof func == "function" && func(); |
160 | }) | 158 | }) |
@@ -286,9 +284,17 @@ Page({ | @@ -286,9 +284,17 @@ Page({ | ||
286 | //如果是物流的话,全部自提的控制要弄成0 | 284 | //如果是物流的话,全部自提的控制要弄成0 |
287 | if (e_t == 0) th.setData({ is_all_zt:0}); | 285 | if (e_t == 0) th.setData({ is_all_zt:0}); |
288 | var narr = new Array(); narr.push(item); | 286 | var narr = new Array(); narr.push(item); |
289 | - //-----------拼装购物车结算的数组----------------- | 287 | + |
288 | + //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号----------------- | ||
289 | + var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code; | ||
290 | + if(e_t==0 && def_exp_code){ | ||
291 | + for(var k=0;k<th.data.wu_arr.length;k++){ | ||
292 | + var itme=th.data.wu_arr[k]; if(def_exp_code=item.code){ m_wind=k; } | ||
293 | + } | ||
294 | + } | ||
295 | + | ||
290 | var ie = { | 296 | var ie = { |
291 | - pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: 0, distr_t: dis_t, | 297 | + pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t, |
292 | goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0}; | 298 | goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0}; |
293 | arr.push(ie); | 299 | arr.push(ie); |
294 | } | 300 | } |
pages/cart/cart2/cart2.wxml
@@ -79,9 +79,6 @@ | @@ -79,9 +79,6 @@ | ||
79 | </view> | 79 | </view> |
80 | 80 | ||
81 | 81 | ||
82 | - | ||
83 | - | ||
84 | - | ||
85 | <view class="set-mes"> | 82 | <view class="set-mes"> |
86 | <view wx:if="{{order.store_prom}}"> | 83 | <view wx:if="{{order.store_prom}}"> |
87 | <icon color="#f23030" size="16" type="info"></icon> | 84 | <icon color="#f23030" size="16" type="info"></icon> |
pages/goods/goodsList/goodsList.js
@@ -26,13 +26,12 @@ Page({ | @@ -26,13 +26,12 @@ Page({ | ||
26 | this.data.is_new=t.is_new; | 26 | this.data.is_new=t.is_new; |
27 | this.data.is_hot=t.is_hot; | 27 | this.data.is_hot=t.is_hot; |
28 | 28 | ||
29 | - console.log(t.cat_id); | ||
30 | - console.log(t.pid); | ||
31 | - | ||
32 | if (0 != t.cat_id && t.cat_id != undefined) { | 29 | if (0 != t.cat_id && t.cat_id != undefined) { |
33 | url += "&cat_id=" + t.cat_id; | 30 | url += "&cat_id=" + t.cat_id; |
34 | - if (t.pid != undefined && t.pid != null){ | 31 | + if (t.parent_id == undefined && t.parent_id == null){ |
35 | url += "&parent_id=0"; | 32 | url += "&parent_id=0"; |
33 | + }else{ | ||
34 | + url += "&parent_id="+t.parent_id; | ||
36 | } | 35 | } |
37 | } | 36 | } |
38 | 37 |