Authored by Rock Zhang

修复结算页切换运送方式时YOHO币会显示错乱的bug;修复使用免邮券不显示的bug

Code Review By Rock Zhang
... ... @@ -14,7 +14,7 @@ function init() {
deliveryId: 1,
deliveryTimeId: 1,
paymentTypeId: 1,
yohoCoin: $('.coin').data('yoho-coin') || 0,
yohoCoin: 0,
addressId: null,
couponCode: null,
couponName: null,
... ...
... ... @@ -486,7 +486,7 @@ class CartModel
// 优惠券数据
$coupons = array('couponName' => '');
if (!empty($orderCompute['coupon_amount'])) {
if (isset($orderCompute['coupon_amount']) && (!empty($orderCompute['coupon_amount']) || ($orderCompute['coupon_amount'] === 0 && $orderCompute['shipping_cost'] === 0))) {
$coupons['couponName'] = $orderInfo['couponName'];
}
$result['coupon'] = $coupons;
... ...