Merge branch 'feature/coupon' into release/180420
Showing
2 changed files
with
4 additions
and
11 deletions
@@ -353,8 +353,8 @@ function handleCoupons(params) { | @@ -353,8 +353,8 @@ function handleCoupons(params) { | ||
353 | couponData = orderComputeCouponPay; | 353 | couponData = orderComputeCouponPay; |
354 | } | 354 | } |
355 | 355 | ||
356 | - if (!validCouponCount && !couponData.coupon_count) { | ||
357 | - showText = '无可用'; | 356 | + if (!couponData.coupon_count) { |
357 | + showText = `${validCouponCount}张可用`; | ||
358 | } | 358 | } |
359 | 359 | ||
360 | if (validCouponCount && couponData.coupon_count) { | 360 | if (validCouponCount && couponData.coupon_count) { |
@@ -362,21 +362,13 @@ function handleCoupons(params) { | @@ -362,21 +362,13 @@ function handleCoupons(params) { | ||
362 | priceText = `-¥${couponData.coupon_amount_str}`; | 362 | priceText = `-¥${couponData.coupon_amount_str}`; |
363 | } | 363 | } |
364 | 364 | ||
365 | - if (validCouponCount && !couponData.coupon_count) { | ||
366 | - showText = `${validCouponCount}张可用`; | ||
367 | - } | ||
368 | - | ||
369 | - if (!_.isEmpty(orderComputeCouponPay) && | 365 | + if (validCouponCount && |
370 | couponData.coupon_count && | 366 | couponData.coupon_count && |
371 | params.userCheckCoupon === 'Y') { | 367 | params.userCheckCoupon === 'Y') { |
372 | showText = `已选${couponData.coupon_count}张`; | 368 | showText = `已选${couponData.coupon_count}张`; |
373 | priceText = `-¥${couponData.coupon_amount_str}`; | 369 | priceText = `-¥${couponData.coupon_amount_str}`; |
374 | } | 370 | } |
375 | 371 | ||
376 | - if (!_.isEmpty(orderComputeCouponPay) && !couponData.coupon_count) { | ||
377 | - showText = `${validCouponCount}张可用`; | ||
378 | - } | ||
379 | - | ||
380 | return { | 372 | return { |
381 | showText, priceText, couponCode | 373 | showText, priceText, couponCode |
382 | }; | 374 | }; |
-
Please register or login to post a comment