Commit 8bbf81f708f5ca2f3aba0d264d522ade307955d7
1 parent
c5bde6e2
1. 同城配送
2. 地址栏的bug
Showing
2 changed files
with
16 additions
and
8 deletions
pages/cart/cart2/cart2.js
| ... | ... | @@ -420,6 +420,8 @@ Page({ |
| 420 | 420 | var arr = new Array(); |
| 421 | 421 | var carr = su.data.data.pageData; |
| 422 | 422 | |
| 423 | + th.setData({ is_all_zt: 1 }); | |
| 424 | + | |
| 423 | 425 | //-- 找出所有的门店 -- |
| 424 | 426 | var pick_id_arr=[]; var len=carr.length; |
| 425 | 427 | for(var i=0;i<len;i++){ |
| ... | ... | @@ -644,7 +646,7 @@ Page({ |
| 644 | 646 | } |
| 645 | 647 | arr[j].exp_type = e_t; |
| 646 | 648 | if (e_t == 0) th.setData({ is_all_zt: 0 }); |
| 647 | - else if (e_t == 1) th.setData({ is_all_zt: 1 }); | |
| 649 | + //else if (e_t == 1) th.setData({ is_all_zt: 1 }); | |
| 648 | 650 | } |
| 649 | 651 | |
| 650 | 652 | //-- 把等级卡会优惠多少钱装进去 -- |
| ... | ... | @@ -688,7 +690,7 @@ Page({ |
| 688 | 690 | } |
| 689 | 691 | //如果是物流的话,全部自提的控制要弄成0 |
| 690 | 692 | if (e_t == 0) th.setData({ is_all_zt: 0 }); |
| 691 | - else th.setData({ is_all_zt: 1 }); | |
| 693 | + //else th.setData({ is_all_zt: 1 }); | |
| 692 | 694 | |
| 693 | 695 | var narr = new Array(); |
| 694 | 696 | narr.push(car_item); |
| ... | ... | @@ -737,7 +739,6 @@ Page({ |
| 737 | 739 | |
| 738 | 740 | //-- 是不是全部自提清空 -- |
| 739 | 741 | if (ie.exp_type == 0 || ie.exp_type == 2) th.setData({ is_all_zt: 0 }); |
| 740 | - | |
| 741 | 742 | break; |
| 742 | 743 | } |
| 743 | 744 | } |
| ... | ... | @@ -811,7 +812,10 @@ Page({ |
| 811 | 812 | var fd=arr[ik].goods.filter(function (e) { |
| 812 | 813 | return e.is_same_city!=1 || e.whsle_id>0 |
| 813 | 814 | }) |
| 814 | - if(!fd || fd.length==0) arr[ik].show_same_city=1; | |
| 815 | + if(!fd || fd.length==0){ | |
| 816 | + arr[ik].show_same_city=1; | |
| 817 | + th.setData({is_all_zt:0}) | |
| 818 | + } | |
| 815 | 819 | } |
| 816 | 820 | |
| 817 | 821 | //深拷贝 |
| ... | ... | @@ -1906,11 +1910,13 @@ Page({ |
| 1906 | 1910 | var order_prom_amount = 0; |
| 1907 | 1911 | var order_prom_id = 0; |
| 1908 | 1912 | var o_condition = cart_item.order_amount; |
| 1913 | + var t_o_condition=cart_item.order_amount; | |
| 1914 | + | |
| 1915 | + | |
| 1909 | 1916 | //看一下是不是不用组合购的订单优惠的叠加 |
| 1910 | 1917 | if (is_has_zh) { |
| 1911 | 1918 | o_condition = o_price_no_zh - quan_price; |
| 1912 | 1919 | } |
| 1913 | - | |
| 1914 | 1920 | //看一下是不是不用组合购的订单优惠的叠加 |
| 1915 | 1921 | if (is_has_ladder) { |
| 1916 | 1922 | o_condition = o_price_no_zh - quan_price; |
| ... | ... | @@ -1918,6 +1924,7 @@ Page({ |
| 1918 | 1924 | |
| 1919 | 1925 | if(whsle_goods_price>0){ |
| 1920 | 1926 | o_condition=o_condition-whsle_goods_price; |
| 1927 | + t_o_condition=t_o_condition-whsle_goods_price; | |
| 1921 | 1928 | } |
| 1922 | 1929 | |
| 1923 | 1930 | //-- 在选择到同城配送的时候 -- |
| ... | ... | @@ -1926,7 +1933,7 @@ Page({ |
| 1926 | 1933 | var gd_w=0; |
| 1927 | 1934 | for (let ib in c_arr[i].goods) { |
| 1928 | 1935 | let item_bb = c_arr[i].goods[ib]; |
| 1929 | - gd_w += item_bb['weight'] * item_bb['buynum']; | |
| 1936 | + gd_w += item_bb['weight'] * item_bb['goods_num']; | |
| 1930 | 1937 | } |
| 1931 | 1938 | |
| 1932 | 1939 | if(!lon) { | ... | ... |
pages/cart/cart2/cart2.wxml
| ... | ... | @@ -166,7 +166,7 @@ |
| 166 | 166 | </view> |
| 167 | 167 | |
| 168 | 168 | <!-- 同城配送 --> |
| 169 | - <view data-t='2' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w2" style="display:{{item.show_same_city?'none':'flex;align-items: center'}};"> | |
| 169 | + <view data-t='2' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w2" style="display:{{!item.show_same_city?'none':'flex;align-items: center'}};"> | |
| 170 | 170 | |
| 171 | 171 | <block wx:if="{{item.exp_type==2}}"> |
| 172 | 172 | <icon data-t='2' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon> |
| ... | ... | @@ -175,7 +175,8 @@ |
| 175 | 175 | <view class="circle xc-hookts on"></view> |
| 176 | 176 | </block> |
| 177 | 177 | |
| 178 | - <view bindtap='setexptype_w2' data-t='2' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind' class="yu_er">同城配送</view> | |
| 178 | + <view bindtap='setexptype_w2' data-t='2' data-ind="{{pidx}}" | |
| 179 | + data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind' class="yu_er">同城配送</view> | |
| 179 | 180 | </view> |
| 180 | 181 | </view> |
| 181 | 182 | ... | ... |