select-coupons.hbs
4.69 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
{{#result}}
<section>
<div class="filter-box">
<span class="filter-btn valid active">可用({{usableCouponNumStr}})</span>
<span class="filter-btn invalid">不可用({{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">
<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 coupon_type '1'}} coupon-left-activity{{/isEqualOr}}
{{#isEqualOr coupon_type '5'}} coupon-left-freight{{/isEqualOr}}
{{#isEqualOr coupon_type '6'}} coupon-left-shop{{/isEqualOr}}
{{/isEqualOr}}">
<p class="value">
{{#isEqualOr coupon_type '1' '3' '6'}}¥{{/isEqualOr}}
<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>
<span class="top-tip"></span>
</div>
{{/each}}
{{/ usableCouponsList}}
</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 coupon_type '1' '3'}} 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}}
<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 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>
<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}}
</div>
<div class="use-now">
{{#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>