select-coupons.hbs
5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{{#result}}
<section>
<div class="filter-box">
<span class="filter-btn valid active" data-num="{{usableCouponNumStr}}">可用({{usableCouponNumStr}})</span>
<span class="filter-btn invalid" data-num="{{unusableCouponNumStr}}">不可用({{unusableCouponNumStr}})</span>
</div>
<div class="exchange-box">
<input type="text" name="couponCodeInput" placeholder="请输入优惠券码">
<button id="exchangeCouponBtn" class="exchange-coupon-btn">兑换</button>
</div>
<div class="tip-box{{#if noShowTips}} hide{{/if}}">
<div class="tips">
{{{headMsg}}}
</div>
<div class="tip-close">
<span class="iconfont"></span>
</div>
</div>
<div class="coupon-list usable">
{{#usableCouponsList}}
{{#each ./coupons}}
<div class="coupon{{#isEqualOr is_selected_support 'N'}} no-support-selected{{/isEqualOr}}" data-code="{{coupon_code}}">
<div class="coupon-left{{#isEqualOr is_selected_support 'Y'}}
{{#isEqualOr catalog 200}} coupon-left-activity{{/isEqualOr}}
{{#isEqualOr catalog 300}} coupon-left-freight{{/isEqualOr}}
{{#isEqualOr catalog 100}} coupon-left-shop{{/isEqualOr}}
{{/isEqualOr}}">
<p class="value">
<span>{{coupon_value_str}}</span>
</p>
<p class="threshold">{{use_rule}}</p>
</div>
<div class="coupon-right">
<div class="info">
<p class="title">
<span>[{{catalog_name}}]</span> {{coupon_name}}</p>
<p class="time">{{coupon_validity}}</p>
{{#isEqualOr is_selected_support 'N'}}
<p class="desc">{{desc}}</p>
{{/isEqualOr}}
</div>
<div class="check">
{{#isEqualOr is_selected_support 'Y'}}
<span class="iconfont checkbox{{#isEqualOr selected 'Y'}} icon-cb-radio{{^}} icon-radio{{/isEqualOr}}"></span>
{{^}}
<span class="iconfont icon-point1"></span>
{{/isEqualOr}}
</div>
</div>
{{#isEqualOr is_overdue_soon 'Y'}}
<span class="top-tip"></span>
{{/isEqualOr}}
</div>
{{/each}}
{{/ usableCouponsList}}
{{#isEqualOr usableCouponNumStr '0'}}
<div class="no-conpon-now">
<div class="icon-not"></div>
<p>暂无优惠券</p>
</div>
{{/isEqualOr}}
</div>
<div class="coupon-list unusable hide">
{{#unusableCouponsList}}
{{#if ./name}}
<div class="coupon-list-type"><hr><span>{{./name}}</span><hr></div>
{{/if}}
{{#each ./coupons}}
<div class="coupon">
<div class="coupon-left{{#isEqualOr catalog 200}} coupon-left-activity{{/isEqualOr}}{{#isEqualOr catalog 300}} coupon-left-freight{{/isEqualOr}}{{#isEqualOr catalog 100}} coupon-left-shop{{/isEqualOr}}">
<p class="value">
<span>{{coupon_value_str}}</span>
</p>
<p class="threshold">{{use_rule}}</p>
</div>
<div class="coupon-right">
<div class="info">
<p class="title">
<span class="{{#isEqualOr catalog 200}} type-activity{{/isEqualOr}}{{#isEqualOr catalog 300}} type-freight{{/isEqualOr}}{{#isEqualOr catalog 100}} type-shop{{/isEqualOr}}">[{{catalog_name}}]</span> {{coupon_name}}</p>
<p class="time">{{coupon_validity}}</p>
<p class="desc unusable-desc">{{desc}}</p>
</div>
</div>
{{#isEqualOr is_overdue_soon 'Y'}}
<span class="top-tip"></span>
{{/isEqualOr}}
</div>
{{/each}}
{{/ unusableCouponsList}}
{{#isEqualOr unusableCouponNumStr '0'}}
<div class="no-conpon-now">
<div class="icon-not"></div>
<p>暂无优惠券</p>
</div>
{{/isEqualOr}}
</div>
<div class="use-now" id="useNowBox">
{{#couponPay}}
<div class="left-info">
<p>已选择
<span class="nums">{{coupon_count}}</span> 张,共优惠
<span class="nums">{{coupon_amount_str}}</span> 元</p>
<p>待支付
<span class="nums">{{to_pay_amount_str}}</span> 元</p>
</div>
{{/ couponPay}}
<button class="use-now-btn" id="useNowBtn">确认</button>
</div>
{{/ result}}
</section>