Showing
3 changed files
with
30 additions
and
2 deletions
apps/activity/controllers/feature.js
0 → 100644
1 | +/** | ||
2 | + * 活动页<http://feature.yoho.cn/1101/1101ITEMBOY/index.html?title=%E7%94%B7%E7%94%9F%E5%88%86%E4%BC%9A%E5%9C%BA&share_id=814&mkt_code=1011111#a_01> | ||
3 | + * <xiaoxiao.hao@yoho.cn> | ||
4 | + * 2016/07/13 | ||
5 | + */ | ||
6 | +'use strict'; | ||
7 | + | ||
8 | +// 活动页保存相应cookie的值 | ||
9 | +exports.index = (req, res, next) => { | ||
10 | + let mktCode = req.query.mkt_code || false; | ||
11 | + | ||
12 | + // 下载浮层,下载按钮会用到该参数 | ||
13 | + if (mktCode) { | ||
14 | + res.cookie('unionTypeYas', mktCode, { | ||
15 | + domain: 'm.yohobuy.com', | ||
16 | + path: '/' | ||
17 | + }); | ||
18 | + } | ||
19 | + | ||
20 | + res.json({mktCode: mktCode}); | ||
21 | +}; |
@@ -15,6 +15,7 @@ const wechat = require(`${cRoot}/wechat`); | @@ -15,6 +15,7 @@ const wechat = require(`${cRoot}/wechat`); | ||
15 | const student = require(`${cRoot}/student`); | 15 | const student = require(`${cRoot}/student`); |
16 | const live = require(`${cRoot}/live`); | 16 | const live = require(`${cRoot}/live`); |
17 | const invite = require(`${cRoot}/invite`); | 17 | const invite = require(`${cRoot}/invite`); |
18 | +const feature = require(`${cRoot}/feature`); | ||
18 | 19 | ||
19 | const couponFloor = require(`${cRoot}/coupon-floor`); | 20 | const couponFloor = require(`${cRoot}/coupon-floor`); |
20 | const vipDay = require(`${cRoot}/vipDay`); | 21 | const vipDay = require(`${cRoot}/vipDay`); |
@@ -116,4 +117,7 @@ router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck) | @@ -116,4 +117,7 @@ router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck) | ||
116 | router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin); | 117 | router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin); |
117 | router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent); | 118 | router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent); |
118 | 119 | ||
120 | +// 获取活动页传来的参数 | ||
121 | +router.get('/feature/index', feature.index); | ||
122 | + | ||
119 | module.exports = router; | 123 | module.exports = router; |
@@ -199,7 +199,7 @@ function getPageGoods(info) { | @@ -199,7 +199,7 @@ function getPageGoods(info) { | ||
199 | url: info.url, | 199 | url: info.url, |
200 | data: info.data, | 200 | data: info.data, |
201 | success: function(data) { | 201 | success: function(data) { |
202 | - if (data === ' ') { | 202 | + if (data === '') { |
203 | nav.end = true; | 203 | nav.end = true; |
204 | } | 204 | } |
205 | 205 | ||
@@ -325,6 +325,7 @@ var theY; | @@ -325,6 +325,7 @@ var theY; | ||
325 | */ | 325 | */ |
326 | function reNav1Pos() { | 326 | function reNav1Pos() { |
327 | var sTop = theY ? theY : 0; | 327 | var sTop = theY ? theY : 0; |
328 | + | ||
328 | if (sTop < imgH + main1oH + nav1H) { | 329 | if (sTop < imgH + main1oH + nav1H) { |
329 | if ($nav1.hasClass('hide')) { | 330 | if ($nav1.hasClass('hide')) { |
330 | $nav1.removeClass('hide'); | 331 | $nav1.removeClass('hide'); |
@@ -385,6 +386,7 @@ function scrollHandler() { | @@ -385,6 +386,7 @@ function scrollHandler() { | ||
385 | if (sTop + winH * 2 > scH) { | 386 | if (sTop + winH * 2 > scH) { |
386 | scrollCall = function() { | 387 | scrollCall = function() { |
387 | var translate = 'translate3d(0, ' + (-scH) + 'px, 0)'; | 388 | var translate = 'translate3d(0, ' + (-scH) + 'px, 0)'; |
389 | + | ||
388 | $nav1.css({ | 390 | $nav1.css({ |
389 | transform: translate, | 391 | transform: translate, |
390 | '-moz-transform': translate, | 392 | '-moz-transform': translate, |
@@ -681,7 +683,7 @@ function search(opt) { | @@ -681,7 +683,7 @@ function search(opt) { | ||
681 | break; | 683 | break; |
682 | } | 684 | } |
683 | 685 | ||
684 | - if (data === ' ') { | 686 | + if (data === '') { |
685 | nav.end = true; | 687 | nav.end = true; |
686 | 688 | ||
687 | if (nav.reload) { | 689 | if (nav.reload) { |
@@ -929,6 +931,7 @@ $nav2.on('touchstart', 'li', function(e) { | @@ -929,6 +931,7 @@ $nav2.on('touchstart', 'li', function(e) { | ||
929 | 931 | ||
930 | $('.shop-foot-wrapper .buriedpoint').click(function() { | 932 | $('.shop-foot-wrapper .buriedpoint').click(function() { |
931 | var subGroup = $(this).find('.sub-group'); | 933 | var subGroup = $(this).find('.sub-group'); |
934 | + | ||
932 | if (subGroup.hasClass('hide')) { | 935 | if (subGroup.hasClass('hide')) { |
933 | subGroup.removeClass('hide'); | 936 | subGroup.removeClass('hide'); |
934 | } else { | 937 | } else { |
-
Please register or login to post a comment