Authored by 郭成尧

showTips

... ... @@ -8,6 +8,7 @@
<input type="text" name="couponCodeInput" placeholder="请输入优惠券码">
<button id="exchangeCouponBtn" class="exchange-coupon-btn">兑换</button>
</div>
{{#if showTips}}
<div class="tip-box">
<div class="tips">
{{{headMsg}}}
... ... @@ -16,6 +17,7 @@
<span class="iconfont">&#xe623;</span>
</div>
</div>
{{/if}}
<div class="coupon-list usable">
{{#usableCouponsList}}
{{#each ./coupons}}
... ... @@ -60,9 +62,9 @@
{{/if}}
{{#each ./coupons}}
<div class="coupon">
<div class="coupon-left{{#isEqualOr coupon_type '1' '3'}} coupon-left-activity{{/isEqualOr}}{{#isEqualOr coupon_type '5'}} coupon-left-freight{{/isEqualOr}}{{#isEqualOr coupon_type '6'}} coupon-left-shop{{/isEqualOr}}">
<div class="coupon-left{{#isEqualOr coupon_type '1' '3' '8'}} coupon-left-activity{{/isEqualOr}}{{#isEqualOr coupon_type '5'}} coupon-left-freight{{/isEqualOr}}{{#isEqualOr coupon_type '6'}} coupon-left-shop{{/isEqualOr}}">
<p class="value">
{{#isEqualOr coupon_type '1' '3' '6'}}¥{{/isEqualOr}}
{{#isEqualOr coupon_type '1' '3' '6' '8'}}¥{{/isEqualOr}}
<span>{{coupon_value_str}}</span>
</p>
<p class="threshold">{{use_rule}}</p>
... ... @@ -70,7 +72,7 @@
<div class="coupon-right">
<div class="info">
<p class="title">
<span class="{{#isEqualOr coupon_type '1' '3'}} type-activity{{/isEqualOr}}{{#isEqualOr coupon_type '5'}} type-freight{{/isEqualOr}}{{#isEqualOr coupon_type '6'}} type-shop{{/isEqualOr}}">[{{catalog_name}}]</span> {{coupon_name}}</p>
<span class="{{#isEqualOr coupon_type '1' '3' '8'}} type-activity{{/isEqualOr}}{{#isEqualOr coupon_type '5'}} type-freight{{/isEqualOr}}{{#isEqualOr coupon_type '6'}} type-shop{{/isEqualOr}}">[{{catalog_name}}]</span> {{coupon_name}}</p>
<p class="time">{{coupon_validity}}</p>
<p class="desc unusable-desc">{{desc}}</p>
</div>
... ...
... ... @@ -387,6 +387,7 @@ const couponProcess = conponData => {
let headMsg = _.replace(_.get(conponData, 'usable_coupon_catalogs.head_msg', []), '\n', '<br>');
let usableCouponNumStr = '';
let unusableCouponNumStr = '';
let showTips = true;
_.forEach(unusableCouponsList, listItem => {
if (listItem.coupons && listItem.coupons.length) {
... ... @@ -408,13 +409,18 @@ const couponProcess = conponData => {
unusableCouponNumStr = unusableCouponNum + '';
}
if (!unusableCouponNum) {
showTips = false;
}
return {
usableCouponNumStr,
unusableCouponNumStr,
usableCouponsList,
unusableCouponsList,
couponPay,
headMsg
headMsg,
showTips
};
};
... ...