Commit 2aa5a2a2b9934299af99229366f0ea1da7f604de
1 parent
c9f02dcc
预售 切换包邮券和 优惠券时的bug
Showing
2 changed files
with
22 additions
and
10 deletions
packageC/pages/presell/cart/cart.js
| ... | ... | @@ -655,8 +655,12 @@ Page({ |
| 655 | 655 | } |
| 656 | 656 | }) |
| 657 | 657 | }else{ |
| 658 | - var txt="using_quan["+bn_pick+"]"; | |
| 659 | - th.setData({[txt]:{}}); | |
| 658 | + th.setData({quan_price:0}); | |
| 659 | + if(th.data.using_quan[bn_pick].isby==1){ | |
| 660 | + var txt="using_quan["+bn_pick+"]"; | |
| 661 | + th.setData({[txt]:{}}); | |
| 662 | + } | |
| 663 | + | |
| 660 | 664 | } |
| 661 | 665 | |
| 662 | 666 | if(quan_price>0){ |
| ... | ... | @@ -1724,15 +1728,17 @@ Page({ |
| 1724 | 1728 | } |
| 1725 | 1729 | }) |
| 1726 | 1730 | |
| 1727 | - if(quan_price>0) { | |
| 1728 | - if (quan_price <th.data.tail_pay) th.setData({quan_price:quan_price}) | |
| 1731 | + if (quan_price > 0) { | |
| 1732 | + if (quan_price < th.data.tail_pay) th.setData({quan_price: quan_price}) | |
| 1729 | 1733 | else { |
| 1730 | - th.setData({quan_price: th.data.tail_pay}) | |
| 1731 | - quan_price=th.data.tail_pay; | |
| 1734 | + th.setData({quan_price: th.data.tail_pay}) | |
| 1735 | + quan_price = th.data.tail_pay; | |
| 1732 | 1736 | } |
| 1733 | - }else{ | |
| 1737 | + } else { | |
| 1734 | 1738 | th.setData({quan_price: 0}) |
| 1735 | 1739 | } |
| 1740 | + }else{ | |
| 1741 | + th.setData({quan_price: 0}) | |
| 1736 | 1742 | } |
| 1737 | 1743 | }else{ |
| 1738 | 1744 | th.setData({quan_price: 0}) |
| ... | ... | @@ -1906,7 +1912,13 @@ Page({ |
| 1906 | 1912 | |
| 1907 | 1913 | //显示支付选择 |
| 1908 | 1914 | show_pay: function () { |
| 1909 | - this.setData({show_pay_type: 1}); | |
| 1915 | + //不用钱直接支付 | |
| 1916 | + if(this.data.order_m<=0){ | |
| 1917 | + this.to_pay_type(1); | |
| 1918 | + }else{ | |
| 1919 | + this.setData({show_pay_type: 1}); | |
| 1920 | + } | |
| 1921 | + | |
| 1910 | 1922 | }, |
| 1911 | 1923 | //关闭支付 |
| 1912 | 1924 | close_show_pay: function () { | ... | ... |
packageC/pages/presell/cart/cart.wxml
| ... | ... | @@ -340,8 +340,8 @@ |
| 340 | 340 | <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m,2)}}</text> |
| 341 | 341 | </view> |
| 342 | 342 | </view> |
| 343 | - <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">提交订单</button> | |
| 344 | - <button wx:else class="tips-btn" bindtap="show_pay">提交订单</button> | |
| 343 | + <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> | |
| 344 | + <button wx:else class="tips-btn" bindtap="show_pay">支付尾款</button> | |
| 345 | 345 | <!-- 预售 --> |
| 346 | 346 | <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> |
| 347 | 347 | </view> | ... | ... |