Commit 4105ae2e866fd09f58b0ee5766e97d002234a6c0
1 parent
88ed133c
~~ 尾款使用优惠券的优化 ~~~
Showing
1 changed file
with
7 additions
and
1 deletions
packageE/pages/cart/cart_wk/cart_wk.js
@@ -513,8 +513,14 @@ Page({ | @@ -513,8 +513,14 @@ Page({ | ||
513 | }).then(res => { | 513 | }).then(res => { |
514 | 514 | ||
515 | if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | 515 | if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { |
516 | + | ||
516 | quan_price = res.data.data[0].WareCashSum; | 517 | quan_price = res.data.data[0].WareCashSum; |
518 | + | ||
519 | + if(quan_price>th.data.order.tail_money){ | ||
520 | + quan_price=th.data.order.tail_money | ||
521 | + } | ||
517 | allpice=allpice-quan_price; | 522 | allpice=allpice-quan_price; |
523 | + | ||
518 | } | 524 | } |
519 | }) | 525 | }) |
520 | } | 526 | } |
@@ -538,7 +544,7 @@ Page({ | @@ -538,7 +544,7 @@ Page({ | ||
538 | } | 544 | } |
539 | 545 | ||
540 | //如果有使用优惠券,如何订单促销有控制使用优惠券不参与此活动的话 | 546 | //如果有使用优惠券,如何订单促销有控制使用优惠券不参与此活动的话 |
541 | - if(quan_price>0 && ord_prom.is_xz_yh ){ | 547 | + if(quan_price>0 && ord_prom && ord_prom.is_xz_yh ){ |
542 | ord_prom=null; | 548 | ord_prom=null; |
543 | } | 549 | } |
544 | th.data.ord_prom=ord_prom; | 550 | th.data.ord_prom=ord_prom; |