Showing
2 changed files
with
49 additions
and
1 deletions
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <p>店铺券、活动券、运费券可叠加使用;</p> | 12 | <p>店铺券、活动券、运费券可叠加使用;</p> |
13 | <p>跨店铺店铺券可以叠加使用,同一个店铺的店铺券不可叠加使用。</p> | 13 | <p>跨店铺店铺券可以叠加使用,同一个店铺的店铺券不可叠加使用。</p> |
14 | </div> | 14 | </div> |
15 | - <div class="close"><span class="iconfont"></span></div> | 15 | + <div class="tip-close"><span class="iconfont"></span></div> |
16 | </div> | 16 | </div> |
17 | <div class="coupon-list"> | 17 | <div class="coupon-list"> |
18 | <div class="coupon"> | 18 | <div class="coupon"> |
@@ -31,5 +31,23 @@ | @@ -31,5 +31,23 @@ | ||
31 | <div class="check"><span class="iconfont checkbox icon-cb-radio"></span></div> | 31 | <div class="check"><span class="iconfont checkbox icon-cb-radio"></span></div> |
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |
34 | + <div class="coupon"> | ||
35 | + <div class="coupon-left"> | ||
36 | + <p class="value">¥ | ||
37 | + <span>100</span> | ||
38 | + </p> | ||
39 | + <p class="threshold">满499可用</p> | ||
40 | + </div> | ||
41 | + <div class="coupon-right"> | ||
42 | + <div class="info"> | ||
43 | + <p class="title"> | ||
44 | + <span>[店铺券]</span>Adidas Origins店铺使用</p> | ||
45 | + <p class="time">2018.1.12-2018.5.20</p> | ||
46 | + </div> | ||
47 | + <div class="check"> | ||
48 | + <span class="iconfont checkbox icon-radio"></span> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + </div> | ||
34 | </div> | 52 | </div> |
35 | </div> | 53 | </div> |
@@ -4,6 +4,36 @@ import Page from 'yoho-page'; | @@ -4,6 +4,36 @@ import Page from 'yoho-page'; | ||
4 | class SelectCouponController extends Page { | 4 | class SelectCouponController extends Page { |
5 | constructor() { | 5 | constructor() { |
6 | super(); | 6 | super(); |
7 | + | ||
8 | + this.view = { | ||
9 | + coupon: $('.coupon'), | ||
10 | + checkbox: $('.checkbox'), | ||
11 | + tipBox: $('.tip-box'), | ||
12 | + tipClose: $('.tip-close') | ||
13 | + }; | ||
14 | + | ||
15 | + this.view.coupon.on('click', '.checkbox', this.check.bind(this)); | ||
16 | + this.view.tipClose.on('click', this.closeTip.bind(this)); | ||
17 | + } | ||
18 | + | ||
19 | + /** | ||
20 | + * 优惠券勾选处理 | ||
21 | + */ | ||
22 | + check(e) { | ||
23 | + let theCoupon = $(e.currentTarget); | ||
24 | + | ||
25 | + if (theCoupon.hasClass('icon-cb-radio')) { | ||
26 | + theCoupon.removeClass('icon-cb-radio').addClass('icon-radio'); | ||
27 | + } else { | ||
28 | + theCoupon.removeClass('icon-radio').addClass('icon-cb-radio'); | ||
29 | + } | ||
30 | + } | ||
31 | + | ||
32 | + /** | ||
33 | + * 关闭提示框 | ||
34 | + */ | ||
35 | + closeTip() { | ||
36 | + this.view.tipBox.hide(); | ||
7 | } | 37 | } |
8 | } | 38 | } |
9 | 39 |
-
Please register or login to post a comment