Showing
24 changed files
with
70 additions
and
17 deletions
@@ -7,8 +7,7 @@ const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model | @@ -7,8 +7,7 @@ const couponModel = require(`${mRoot}/coupon`); // 领取优惠券 model | ||
7 | exports.index = (req, res, next) => { | 7 | exports.index = (req, res, next) => { |
8 | var renderData = { | 8 | var renderData = { |
9 | module: 'activity', | 9 | module: 'activity', |
10 | - page: 'coupon', | ||
11 | - appDownLoadLink: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho' | 10 | + page: 'coupon' |
12 | }, | 11 | }, |
13 | ordercode = req.query.ordercode, | 12 | ordercode = req.query.ordercode, |
14 | uid = req.query.uid, | 13 | uid = req.query.uid, |
@@ -28,7 +27,6 @@ exports.index = (req, res, next) => { | @@ -28,7 +27,6 @@ exports.index = (req, res, next) => { | ||
28 | // 获取信息成功 | 27 | // 获取信息成功 |
29 | couponData.ordercode = ordercode; | 28 | couponData.ordercode = ordercode; |
30 | } | 29 | } |
31 | - couponData.appDownLoadLink = renderData.appDownLoadLink; | ||
32 | res.render('coupon', { | 30 | res.render('coupon', { |
33 | result: couponData, | 31 | result: couponData, |
34 | module: 'activity', | 32 | module: 'activity', |
@@ -99,4 +97,4 @@ exports.verify = (req, res, next) => { | @@ -99,4 +97,4 @@ exports.verify = (req, res, next) => { | ||
99 | result: couponData | 97 | result: couponData |
100 | }); | 98 | }); |
101 | }).catch(next); | 99 | }).catch(next); |
102 | -}; | 100 | +}; |
@@ -24,8 +24,9 @@ const getPageInfo = (pageInfo) => { | @@ -24,8 +24,9 @@ const getPageInfo = (pageInfo) => { | ||
24 | dest.wechatShare = true; | 24 | dest.wechatShare = true; |
25 | dest.secondScreenPic = pageInfo.data.secondScreenPic; | 25 | dest.secondScreenPic = pageInfo.data.secondScreenPic; |
26 | dest.activityEndPic = pageInfo.data.activityEndPic; | 26 | dest.activityEndPic = pageInfo.data.activityEndPic; |
27 | + dest.buttonLink = pageInfo.data.buttonLink; | ||
27 | 28 | ||
28 | - if (pageInfo.data.flag === 3 || pageInfo.data.flag === 4) { | 29 | + if (pageInfo.data.flag === 3 || pageInfo.data.flag === 4 || pageInfo.data.flag === 5) { |
29 | // flag为3 表示活动结束 , 4 表示未开始 | 30 | // flag为3 表示活动结束 , 4 表示未开始 |
30 | dest.bgImg = pageInfo.data.activityEndPic; | 31 | dest.bgImg = pageInfo.data.activityEndPic; |
31 | dest.ended = true; | 32 | dest.ended = true; |
@@ -116,4 +117,4 @@ exports.registerAndSendCoupon = (data) => { | @@ -116,4 +117,4 @@ exports.registerAndSendCoupon = (data) => { | ||
116 | return api.get('', verifyData).then(result => { | 117 | return api.get('', verifyData).then(result => { |
117 | return getUserStatus(result); | 118 | return getUserStatus(result); |
118 | }); // 所有数据返回一个 Promise,方便 Promise.all 调用 | 119 | }); // 所有数据返回一个 Promise,方便 Promise.all 调用 |
119 | -}; | 120 | +}; |
@@ -58,6 +58,7 @@ | @@ -58,6 +58,7 @@ | ||
58 | <input id="appurl" type="hidden" value="{{appUrl}}"> | 58 | <input id="appurl" type="hidden" value="{{appUrl}}"> |
59 | <input id="wapurl" type="hidden" value="{{wapUrl}}"> | 59 | <input id="wapurl" type="hidden" value="{{wapUrl}}"> |
60 | {{/ noLoginUrl}} | 60 | {{/ noLoginUrl}} |
61 | + {{> common/suspend-home}} | ||
61 | </div> | 62 | </div> |
62 | <div class="floor-mask"></div> | 63 | <div class="floor-mask"></div> |
63 | <div class="floor-message"> | 64 | <div class="floor-message"> |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <p>登录Yoho!Buy有货客户端即可使用</p> | 27 | <p>登录Yoho!Buy有货客户端即可使用</p> |
28 | 28 | ||
29 | <div class="use-coupon-btn"> | 29 | <div class="use-coupon-btn"> |
30 | - <a href="{{appDownLoadLink}}">马上去Yoho!Buy有货使用</a> | 30 | + <a href="{{buttonLink}}">马上去Yoho!Buy有货使用</a> |
31 | </div> | 31 | </div> |
32 | <span class="description"></span> | 32 | <span class="description"></span> |
33 | </div> | 33 | </div> |
@@ -174,4 +174,5 @@ | @@ -174,4 +174,5 @@ | ||
174 | <input id="shareTitle" type="hidden" value="{{shareTitle}}"> | 174 | <input id="shareTitle" type="hidden" value="{{shareTitle}}"> |
175 | <input id="shareDesc" type="hidden" value="{{shareDesc}}"> | 175 | <input id="shareDesc" type="hidden" value="{{shareDesc}}"> |
176 | {{/ guang}} | 176 | {{/ guang}} |
177 | + {{> common/suspend-home}} | ||
177 | </div> | 178 | </div> |
@@ -15,5 +15,5 @@ | @@ -15,5 +15,5 @@ | ||
15 | <div class="plusstar-resources"> | 15 | <div class="plusstar-resources"> |
16 | <!--资源位数据模板--> | 16 | <!--资源位数据模板--> |
17 | </div><!--/plusstar-resources--> | 17 | </div><!--/plusstar-resources--> |
18 | - | 18 | + {{> common/suspend-home}} |
19 | </div><!--/plusstar-page--> | 19 | </div><!--/plusstar-page--> |
@@ -175,6 +175,6 @@ | @@ -175,6 +175,6 @@ | ||
175 | {{#if showPannel}} | 175 | {{#if showPannel}} |
176 | <input type="hidden" id="showPannel" value="1"> | 176 | <input type="hidden" id="showPannel" value="1"> |
177 | {{/if}} | 177 | {{/if}} |
178 | - | 178 | + {{> common/suspend-home}} |
179 | </div> | 179 | </div> |
180 | {{/ result}} | 180 | {{/ result}} |
@@ -32,7 +32,8 @@ module.exports = () => { | @@ -32,7 +32,8 @@ module.exports = () => { | ||
32 | res.set('Access-Control-Allow-Origin', '*'); | 32 | res.set('Access-Control-Allow-Origin', '*'); |
33 | } | 33 | } |
34 | 34 | ||
35 | - res.locals.cartUrl = helpers.urlFormat('/cart/index/index'); | 35 | + res.locals.cartUrl = helpers.urlFormat('/cart/index/index'); // 悬挂购物车 |
36 | + res.locals.indexUrl = helpers.urlFormat('/?go=1'); // 悬挂首页 | ||
36 | res.locals.showHeader = true; | 37 | res.locals.showHeader = true; |
37 | 38 | ||
38 | next(); | 39 | next(); |
1 | +<div id="suspend-home" class="suspend-home hide"> | ||
2 | + <a href="{{@root.indexUrl}}"> | ||
3 | + <span class="iconfont"></span> | ||
4 | + </a> | ||
5 | +</div> | ||
6 | +<script type="text/javascript"> | ||
7 | + var isWechat = /micromessenger/i.test(navigator.userAgent || ''); | ||
8 | + if (isWechat) document.getElementById('suspend-home').classList.remove('hide'); | ||
9 | +</script> |
@@ -313,6 +313,11 @@ if (!orderInfo('addressId')) { | @@ -313,6 +313,11 @@ if (!orderInfo('addressId')) { | ||
313 | // 配送方式 发生改变 | 313 | // 配送方式 发生改变 |
314 | $('.delivery-id').on('touchend', 'li', function() { | 314 | $('.delivery-id').on('touchend', 'li', function() { |
315 | orderInfo('deliveryId', $(this).data('id')); | 315 | orderInfo('deliveryId', $(this).data('id')); |
316 | + | ||
317 | + // 实付金额发生变化,使用有货币为0 | ||
318 | + orderInfo('yohoCoin', 0); | ||
319 | + $('.coin').find('.checkbox').removeClass('icon-cb-radio').addClass('icon-radio'); | ||
320 | + | ||
316 | orderCompute(); | 321 | orderCompute(); |
317 | }); | 322 | }); |
318 | 323 |
@@ -617,7 +617,7 @@ | @@ -617,7 +617,7 @@ | ||
617 | 617 | ||
618 | .yoho-coin-help-dialog { | 618 | .yoho-coin-help-dialog { |
619 | position: fixed; | 619 | position: fixed; |
620 | - width: 450px; | 620 | + width: 540px; |
621 | height: 510px; | 621 | height: 510px; |
622 | background-color: #fff; | 622 | background-color: #fff; |
623 | z-index: 2; | 623 | z-index: 2; |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | height: 290px; | 27 | height: 290px; |
28 | width: 153px; | 28 | width: 153px; |
29 | margin-right: 26px; | 29 | margin-right: 26px; |
30 | - background: #ccc; | 30 | + background: #fff; |
31 | border-radius: 5px; | 31 | border-radius: 5px; |
32 | vertical-align: top; | 32 | vertical-align: top; |
33 | 33 | ||
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | 38 | ||
39 | .goods-info { | 39 | .goods-info { |
40 | position: relative; | 40 | position: relative; |
41 | - height: 168px; | 41 | + height: 84px; |
42 | width: 200%; | 42 | width: 200%; |
43 | background: #fff; | 43 | background: #fff; |
44 | padding: 24px 0 20px 20px; | 44 | padding: 24px 0 20px 20px; |
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | height: 290px; | 29 | height: 290px; |
30 | width: 153px; | 30 | width: 153px; |
31 | margin-right: 26px; | 31 | margin-right: 26px; |
32 | - background: #ccc; | 32 | + background: #fff; |
33 | border-radius: 5px; | 33 | border-radius: 5px; |
34 | vertical-align: top; | 34 | vertical-align: top; |
35 | 35 | ||
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | 40 | ||
41 | .goods-info { | 41 | .goods-info { |
42 | position: relative; | 42 | position: relative; |
43 | - height: 168px; | 43 | + height: 84px; |
44 | width: 200%; | 44 | width: 200%; |
45 | background: #fff; | 45 | background: #fff; |
46 | padding: 28px 0 20px 20px; | 46 | padding: 28px 0 20px 20px; |
public/scss/common/_suspend-home.css
0 → 100644
1 | +.suspend-home { | ||
2 | + position: fixed; | ||
3 | + right: 30px; | ||
4 | + bottom: 140px; | ||
5 | + z-index: 10; | ||
6 | + width: 88px; | ||
7 | + height: 88px; | ||
8 | + border-radius: 50%; | ||
9 | + background: rgba(0, 0, 0, 0.3); | ||
10 | + text-align: center; | ||
11 | + line-height: 88px; | ||
12 | + | ||
13 | + a { | ||
14 | + display: block; | ||
15 | + width: 100%; | ||
16 | + height: 100%; | ||
17 | + } | ||
18 | + | ||
19 | + .iconfont { | ||
20 | + color: #fff; | ||
21 | + font-size: 36px; | ||
22 | + } | ||
23 | +} |
-
Please register or login to post a comment