Commit 6b8a4eb72864cbae50bd545138e171b8a5401290
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
1 changed file
with
10 additions
and
9 deletions
pages/cart/cart2/cart2.js
| ... | ... | @@ -1001,9 +1001,9 @@ Page({ |
| 1001 | 1001 | |
| 1002 | 1002 | //-- 搭配促销的门店配送方式的修复 -- |
| 1003 | 1003 | et = 1; |
| 1004 | - distr_t = 0; | |
| 1004 | + distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流 | |
| 1005 | 1005 | for (var hi in narr) { |
| 1006 | - var dis_t = narr[hi].distr_type; | |
| 1006 | + var dis_t = narr[hi].distr_type; | |
| 1007 | 1007 | if (dis_t == 2) { |
| 1008 | 1008 | th.setData({is_all_zt: 0}); |
| 1009 | 1009 | et = 0; |
| ... | ... | @@ -1012,10 +1012,9 @@ Page({ |
| 1012 | 1012 | distr_t = dis_t; |
| 1013 | 1013 | } |
| 1014 | 1014 | } |
| 1015 | - | |
| 1016 | 1015 | //自选的时候,系统配置了默认的配送方式是物流的时候 |
| 1017 | 1016 | if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) { |
| 1018 | - et = 0; | |
| 1017 | + et = 2; | |
| 1019 | 1018 | } |
| 1020 | 1019 | |
| 1021 | 1020 | |
| ... | ... | @@ -2255,6 +2254,7 @@ Page({ |
| 2255 | 2254 | this.data.is_summit_ing = 1; |
| 2256 | 2255 | var th = this, pdata = new Array(); |
| 2257 | 2256 | var ff = true; |
| 2257 | + | |
| 2258 | 2258 | //------------立即购买------------- |
| 2259 | 2259 | if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { |
| 2260 | 2260 | if (th.data.bn_exp_type == 0 && th.data.user_addr == null) { |
| ... | ... | @@ -2265,14 +2265,13 @@ Page({ |
| 2265 | 2265 | if (!ff) return false; |
| 2266 | 2266 | var addr = th.data.user_addr; |
| 2267 | 2267 | if (th.data.bn_exp_type == 1) addr = null; |
| 2268 | - | |
| 2269 | 2268 | if (th.data.bn_exp_type == 0) |
| 2270 | 2269 | if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) { |
| 2271 | 2270 | getApp().my_warnning("读取物流失败", 0, th); |
| 2272 | 2271 | th.data.is_summit_ing = 0; |
| 2273 | 2272 | return false; |
| 2274 | 2273 | } |
| 2275 | - | |
| 2274 | + | |
| 2276 | 2275 | var item = { |
| 2277 | 2276 | 'user_id': to.globalData.user_id, |
| 2278 | 2277 | 'consignee': addr == null ? "" : addr.consignee, |
| ... | ... | @@ -2492,6 +2491,7 @@ Page({ |
| 2492 | 2491 | } |
| 2493 | 2492 | pdata.push(item); |
| 2494 | 2493 | } else { |
| 2494 | + | |
| 2495 | 2495 | //---------购物车的结算--------- |
| 2496 | 2496 | if (th.data.is_all_zt == 0 && th.data.user_addr == null) { |
| 2497 | 2497 | th.data.is_summit_ing = 0; |
| ... | ... | @@ -2501,6 +2501,7 @@ Page({ |
| 2501 | 2501 | if (!ff) return false; |
| 2502 | 2502 | |
| 2503 | 2503 | var addr = th.data.user_addr; |
| 2504 | + // 自提,地址数据清空 exp_type设置为1 | |
| 2504 | 2505 | if (th.data.is_all_zt == 1) addr = null; |
| 2505 | 2506 | var val_arr = th.data.user_note; |
| 2506 | 2507 | |
| ... | ... | @@ -2511,8 +2512,8 @@ Page({ |
| 2511 | 2512 | return false; |
| 2512 | 2513 | } |
| 2513 | 2514 | |
| 2514 | - var order_prom_list_cart = th.data.order_prom_list_cart; | |
| 2515 | - | |
| 2515 | + var order_prom_list_cart = th.data.order_prom_list_cart;; | |
| 2516 | + console.log('xxxxxxxxxxxxxxxx', order_prom_list_cart) | |
| 2516 | 2517 | //--组装推送数据-- |
| 2517 | 2518 | for (var i = 0; i < order_prom_list_cart.length; i++) { |
| 2518 | 2519 | var t_item = order_prom_list_cart[i]; |
| ... | ... | @@ -2740,7 +2741,7 @@ Page({ |
| 2740 | 2741 | |
| 2741 | 2742 | |
| 2742 | 2743 | } |
| 2743 | - | |
| 2744 | + | |
| 2744 | 2745 | if (pdata.length == 0) return; |
| 2745 | 2746 | var str = JSON.stringify(pdata); |
| 2746 | 2747 | ... | ... |