Authored by 郭成尧

Merge branch 'feature/coupon' into release/180420

... ... @@ -40,3 +40,4 @@
</div>
{{/ pageData}}
</div>
<input type="hidden" id="no-download">
... ...
... ... @@ -353,8 +353,8 @@ function handleCoupons(params) {
couponData = orderComputeCouponPay;
}
if (!validCouponCount && !couponData.coupon_count) {
showText = '无可用';
if (!couponData.coupon_count) {
showText = `${validCouponCount}张可用`;
}
if (validCouponCount && couponData.coupon_count) {
... ... @@ -362,21 +362,13 @@ function handleCoupons(params) {
priceText = `-${couponData.coupon_amount_str}`;
}
if (validCouponCount && !couponData.coupon_count) {
showText = `${validCouponCount}张可用`;
}
if (!_.isEmpty(orderComputeCouponPay) &&
if (validCouponCount &&
couponData.coupon_count &&
params.userCheckCoupon === 'Y') {
showText = `已选${couponData.coupon_count}张`;
priceText = `-${couponData.coupon_amount_str}`;
}
if (!_.isEmpty(orderComputeCouponPay) && !couponData.coupon_count) {
showText = `${validCouponCount}张可用`;
}
return {
showText, priceText, couponCode
};
... ...