Authored by 郭成尧

coupon_count

... ... @@ -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
};
... ...