修复结算页切换运送方式时YOHO币会显示错乱的bug;修复使用免邮券不显示的bug
Code Review By Rock Zhang
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -14,7 +14,7 @@ function init() { | @@ -14,7 +14,7 @@ function init() { | ||
14 | deliveryId: 1, | 14 | deliveryId: 1, |
15 | deliveryTimeId: 1, | 15 | deliveryTimeId: 1, |
16 | paymentTypeId: 1, | 16 | paymentTypeId: 1, |
17 | - yohoCoin: $('.coin').data('yoho-coin') || 0, | 17 | + yohoCoin: 0, |
18 | addressId: null, | 18 | addressId: null, |
19 | couponCode: null, | 19 | couponCode: null, |
20 | couponName: null, | 20 | couponName: null, |
@@ -486,7 +486,7 @@ class CartModel | @@ -486,7 +486,7 @@ class CartModel | ||
486 | 486 | ||
487 | // 优惠券数据 | 487 | // 优惠券数据 |
488 | $coupons = array('couponName' => ''); | 488 | $coupons = array('couponName' => ''); |
489 | - if (!empty($orderCompute['coupon_amount'])) { | 489 | + if (isset($orderCompute['coupon_amount']) && (!empty($orderCompute['coupon_amount']) || ($orderCompute['coupon_amount'] === 0 && $orderCompute['shipping_cost'] === 0))) { |
490 | $coupons['couponName'] = $orderInfo['couponName']; | 490 | $coupons['couponName'] = $orderInfo['couponName']; |
491 | } | 491 | } |
492 | $result['coupon'] = $coupons; | 492 | $result['coupon'] = $coupons; |
-
Please register or login to post a comment