Showing
10 changed files
with
84 additions
and
27 deletions
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | -const freeMailModel = require('../models/free-mail'); | 3 | +const freeMailModel = require('../models/free-mail'), |
4 | + headerModel = require('../../../doraemon/models/header'); | ||
5 | + | ||
4 | 6 | ||
5 | exports.freeMailIndex = (req, res) => { | 7 | exports.freeMailIndex = (req, res) => { |
6 | 8 | ||
7 | res.render('free-mail/index', { | 9 | res.render('free-mail/index', { |
8 | page: 'free-mail-index', | 10 | page: 'free-mail-index', |
9 | - localCss: true | 11 | + localCss: true, |
12 | + title: '免邮权益', | ||
13 | + pageHeader: headerModel.setNav({ | ||
14 | + navTitle: '免邮权益' | ||
15 | + }) | ||
10 | }); | 16 | }); |
11 | }; | 17 | }; |
12 | 18 | ||
@@ -17,6 +23,10 @@ exports.freeMailList = (req, res, next) => { | @@ -17,6 +23,10 @@ exports.freeMailList = (req, res, next) => { | ||
17 | res.render('free-mail/list', { | 23 | res.render('free-mail/list', { |
18 | page: 'free-mail-list', | 24 | page: 'free-mail-list', |
19 | localCss: true, | 25 | localCss: true, |
26 | + title: '免邮权益', | ||
27 | + pageHeader: headerModel.setNav({ | ||
28 | + navTitle: '免邮权益' | ||
29 | + }), | ||
20 | listData: result | 30 | listData: result |
21 | }); | 31 | }); |
22 | }).catch(next); | 32 | }).catch(next); |
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <span class="item-title">领取时间</span> | 11 | <span class="item-title">领取时间</span> |
12 | </div> | 12 | </div> |
13 | <div class="item-right"> | 13 | <div class="item-right"> |
14 | - <span><b class="color">每月均可领取,</b>领取之日起至当月月底有效,过期不补偿,领取后请尽快使用</span> | 14 | + <span><b class="color">每月均可领取,</b>领取之日起至当月月底有效,过期不补偿,领取后请尽快使用!每月仅可领取一次</span> |
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | 17 | ||
@@ -33,13 +33,17 @@ | @@ -33,13 +33,17 @@ | ||
33 | </div> | 33 | </div> |
34 | <div class="item-right"> | 34 | <div class="item-right"> |
35 | <span> | 35 | <span> |
36 | - 运费券下单时账户自动扣减相应金额运费,<b class="color">可与优惠券叠加使用,</b>如后期产生退货,运费券不退回。 | 36 | + 下单时默认选择使用账户内运费券扣减相应金额运费,<b class="color">可与优惠券叠加使用,</b>如订单提交后产生拒收、取消(商品出库后)、退款、退货等行为,使用的运费券不予返还。 |
37 | </span> | 37 | </span> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
41 | </div> | 41 | </div> |
42 | 42 | ||
43 | - <div class="pop-up"> | 43 | + <div class="tip-up"> |
44 | + <div class="back-g"></div> | ||
45 | + <span class="close">×</span> | ||
46 | + <div class="pop-up"> | ||
47 | + </div> | ||
44 | </div> | 48 | </div> |
45 | </div> | 49 | </div> |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <div class="coupon-item"> | 8 | <div class="coupon-item"> |
9 | <div class="item-left"> | 9 | <div class="item-left"> |
10 | <span class="name">{{couponName}}</span> | 10 | <span class="name">{{couponName}}</span> |
11 | - <span class="time">{{startTime}}-{{endTime}}</span> | 11 | + <span class="time">有效期:{{startTime}}-{{endTime}}</span> |
12 | </div> | 12 | </div> |
13 | <div class="item-right"> | 13 | <div class="item-right"> |
14 | <span class="amount">{{amount}}</span> | 14 | <span class="amount">{{amount}}</span> |
@@ -37,10 +37,13 @@ class FreeMailIndexController extends Controller { | @@ -37,10 +37,13 @@ class FreeMailIndexController extends Controller { | ||
37 | } | 37 | } |
38 | } else if (result.code === 419) { | 38 | } else if (result.code === 419) { |
39 | $('.pop-up').html('<div class="details"><span></span>' + result.message + '</div>').show(); | 39 | $('.pop-up').html('<div class="details"><span></span>' + result.message + '</div>').show(); |
40 | + $('.tip-up').show(); | ||
40 | } else if (result.code === 418) { | 41 | } else if (result.code === 418) { |
41 | - $('.pop-up').html('<div class="big">本月已领取过<br>下月再来哦~</div>').show(); | 42 | + $('.pop-up').html('<div class="big">本月已领取过<br>下月再来哦~</div>'); |
43 | + $('.tip-up').show(); | ||
42 | } else { | 44 | } else { |
43 | $('.pop-up').html(result.message).show(); | 45 | $('.pop-up').html(result.message).show(); |
46 | + $('.tip-up').show(); | ||
44 | } | 47 | } |
45 | 48 | ||
46 | this.receiveView.popHide(); | 49 | this.receiveView.popHide(); |
@@ -4,11 +4,13 @@ import { | @@ -4,11 +4,13 @@ import { | ||
4 | 4 | ||
5 | class IndexView extends View { | 5 | class IndexView extends View { |
6 | constructor() { | 6 | constructor() { |
7 | - super('.top-banner'); | 7 | + super('.free-mail-index-page'); |
8 | 8 | ||
9 | this.receiveBtn = $('.receive-btn'); | 9 | this.receiveBtn = $('.receive-btn'); |
10 | + this.tipClose = $('.close'); | ||
10 | 11 | ||
11 | - this.on('touchend touchcancel', 'span', this.btnClick.bind(this)); | 12 | + this.on('touchend touchcancel', '.receive-btn', this.btnClick.bind(this)); |
13 | + this.on('touchend touchcancel', '.close', this.tipClickHide.bind(this)); | ||
12 | } | 14 | } |
13 | 15 | ||
14 | /** | 16 | /** |
@@ -23,11 +25,15 @@ class IndexView extends View { | @@ -23,11 +25,15 @@ class IndexView extends View { | ||
23 | */ | 25 | */ |
24 | popHide() { | 26 | popHide() { |
25 | setTimeout(function() { | 27 | setTimeout(function() { |
26 | - if ($('.pop-up').css('display') === 'block') { | ||
27 | - $('.pop-up').hide(); | 28 | + if ($('.tip-up').css('display') === 'block') { |
29 | + $('.tip-up').hide(); | ||
28 | } | 30 | } |
29 | }, 2000); | 31 | }, 2000); |
30 | } | 32 | } |
33 | + | ||
34 | + tipClickHide() { | ||
35 | + $('.tip-up').hide(); | ||
36 | + } | ||
31 | } | 37 | } |
32 | 38 | ||
33 | module.exports = { | 39 | module.exports = { |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | .instructions { | 19 | .instructions { |
20 | background: #c70e0e; | 20 | background: #c70e0e; |
21 | width: 100%; | 21 | width: 100%; |
22 | - padding: 30px 25px 40px; | 22 | + padding: 35px 25px 40px; |
23 | font-family: "SourceHanSansCN"; | 23 | font-family: "SourceHanSansCN"; |
24 | 24 | ||
25 | .instructions-detail { | 25 | .instructions-detail { |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | height: 100%; | 27 | height: 100%; |
28 | background: #fff; | 28 | background: #fff; |
29 | border-radius: 15px; | 29 | border-radius: 15px; |
30 | - padding: 32px 45px 0; | 30 | + padding: 34px 45px 0; |
31 | } | 31 | } |
32 | 32 | ||
33 | .title { | 33 | .title { |
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | background-image: resolve("activity/free-mail/title.png"); | 36 | background-image: resolve("activity/free-mail/title.png"); |
37 | background-size: 100%; | 37 | background-size: 100%; |
38 | background-repeat: no-repeat; | 38 | background-repeat: no-repeat; |
39 | - margin: 0 133px 35px; | 39 | + margin: 0 134px 35px; |
40 | } | 40 | } |
41 | 41 | ||
42 | .color { | 42 | .color { |
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | 46 | ||
47 | .detail-item { | 47 | .detail-item { |
48 | width: 100%; | 48 | width: 100%; |
49 | - margin-bottom: 30px; | 49 | + margin-bottom: 40px; |
50 | font-weight: 700; | 50 | font-weight: 700; |
51 | position: relative; | 51 | position: relative; |
52 | 52 | ||
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | position: absolute; | 56 | position: absolute; |
57 | top: 50%; | 57 | top: 50%; |
58 | transform: translate(-50%, -50%); | 58 | transform: translate(-50%, -50%); |
59 | - margin-left: 20px; | 59 | + margin-left: 30px; |
60 | 60 | ||
61 | .item-title { | 61 | .item-title { |
62 | font-size: 15px; | 62 | font-size: 15px; |
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | .item-right { | 68 | .item-right { |
69 | font-size: 20px; | 69 | font-size: 20px; |
70 | line-height: 36px; | 70 | line-height: 36px; |
71 | - margin-left: 85px; | 71 | + margin-left: 95px; |
72 | 72 | ||
73 | a { | 73 | a { |
74 | border-bottom: 2px solid #c70e0e; | 74 | border-bottom: 2px solid #c70e0e; |
@@ -107,6 +107,38 @@ | @@ -107,6 +107,38 @@ | ||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | + .tip-up { | ||
111 | + display: none; | ||
112 | + } | ||
113 | + | ||
114 | + .back-g { | ||
115 | + width: 100%; | ||
116 | + height: 100%; | ||
117 | + position: absolute; | ||
118 | + left: 0; | ||
119 | + right: 0; | ||
120 | + top: 0; | ||
121 | + bottom: 0; | ||
122 | + background: #000; | ||
123 | + opacity: 0.65; | ||
124 | + } | ||
125 | + | ||
126 | + .close { | ||
127 | + display: block; | ||
128 | + float: right; | ||
129 | + width: 30px; | ||
130 | + height: 30px; | ||
131 | + border-radius: 30px; | ||
132 | + background-color: #373b3a; | ||
133 | + color: #fff; | ||
134 | + position: fixed; | ||
135 | + text-align: center; | ||
136 | + top: 344px; | ||
137 | + left: 75%; | ||
138 | + z-index: 101; | ||
139 | + line-height: 30px; | ||
140 | + } | ||
141 | + | ||
110 | .pop-up { | 142 | .pop-up { |
111 | position: fixed; | 143 | position: fixed; |
112 | text-align: center; | 144 | text-align: center; |
@@ -123,7 +155,6 @@ | @@ -123,7 +155,6 @@ | ||
123 | z-index: 100; | 155 | z-index: 100; |
124 | box-sizing: border-box; | 156 | box-sizing: border-box; |
125 | border-radius: 42px; | 157 | border-radius: 42px; |
126 | - display: none; | ||
127 | 158 | ||
128 | .details { | 159 | .details { |
129 | padding-top: 5px; | 160 | padding-top: 5px; |
1 | .free-mail-list-page { | 1 | .free-mail-list-page { |
2 | .top-banner { | 2 | .top-banner { |
3 | width: 100%; | 3 | width: 100%; |
4 | - height: 245px; | 4 | + height: 350px; |
5 | background-image: resolve("activity/free-mail/list-banner.png"); | 5 | background-image: resolve("activity/free-mail/list-banner.png"); |
6 | background-repeat: no-repeat; | 6 | background-repeat: no-repeat; |
7 | background-size: 100%; | 7 | background-size: 100%; |
8 | - margin-bottom: 15px; | 8 | + margin-bottom: 25px; |
9 | 9 | ||
10 | .coupon-name { | 10 | .coupon-name { |
11 | display: inline-block; | 11 | display: inline-block; |
@@ -15,22 +15,21 @@ | @@ -15,22 +15,21 @@ | ||
15 | transform: rotate(-9.5deg); | 15 | transform: rotate(-9.5deg); |
16 | margin: 40px 0 0 186px; | 16 | margin: 40px 0 0 186px; |
17 | font-weight: 700; | 17 | font-weight: 700; |
18 | + padding-top: 50px; | ||
18 | } | 19 | } |
19 | } | 20 | } |
20 | 21 | ||
21 | .coupon-list { | 22 | .coupon-list { |
22 | - padding: 0 35px; | 23 | + padding: 0 25px 150px; |
23 | color: #fff; | 24 | color: #fff; |
24 | - max-height: 452px; | ||
25 | - overflow-y: scroll; | ||
26 | 25 | ||
27 | .coupon-item { | 26 | .coupon-item { |
28 | - width: 570px; | ||
29 | - height: 135px; | 27 | + width: 597px; |
28 | + height: 142px; | ||
30 | background-image: resolve("activity/free-mail/coupon.png"); | 29 | background-image: resolve("activity/free-mail/coupon.png"); |
31 | background-size: 100%; | 30 | background-size: 100%; |
32 | background-repeat: no-repeat; | 31 | background-repeat: no-repeat; |
33 | - margin-bottom: 10px; | 32 | + margin-bottom: 14px; |
34 | } | 33 | } |
35 | 34 | ||
36 | .item-left { | 35 | .item-left { |
@@ -49,6 +48,8 @@ | @@ -49,6 +48,8 @@ | ||
49 | overflow: hidden; | 48 | overflow: hidden; |
50 | white-space: nowrap; | 49 | white-space: nowrap; |
51 | text-overflow: ellipsis; | 50 | text-overflow: ellipsis; |
51 | + padding-top: 10px; | ||
52 | + width: 100%; | ||
52 | } | 53 | } |
53 | 54 | ||
54 | .time { | 55 | .time { |
@@ -66,10 +67,12 @@ | @@ -66,10 +67,12 @@ | ||
66 | } | 67 | } |
67 | 68 | ||
68 | .receive-btn { | 69 | .receive-btn { |
69 | - height: 116px; | 70 | + height: 158px; |
70 | width: 100%; | 71 | width: 100%; |
71 | background-image: resolve("activity/free-mail/list-btn.png"); | 72 | background-image: resolve("activity/free-mail/list-btn.png"); |
72 | background-size: 100%; | 73 | background-size: 100%; |
73 | background-repeat: no-repeat; | 74 | background-repeat: no-repeat; |
75 | + position: fixed; | ||
76 | + bottom: 0; | ||
74 | } | 77 | } |
75 | } | 78 | } |
-
Please register or login to post a comment