Merge branch 'feature/registerYas'
Showing
6 changed files
with
47 additions
and
3 deletions
@@ -12,3 +12,27 @@ exports.wechatShare = (req, res, next) => { | @@ -12,3 +12,27 @@ exports.wechatShare = (req, res, next) => { | ||
12 | res.jsonp(result); | 12 | res.jsonp(result); |
13 | }).catch(next); | 13 | }).catch(next); |
14 | }; | 14 | }; |
15 | + | ||
16 | +/** | ||
17 | + * 活动页<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> | ||
18 | + * <xiaoxiao.hao@yoho.cn> | ||
19 | + * 2016/07/13 | ||
20 | + */ | ||
21 | + | ||
22 | +// 活动页保存相应cookie的值 | ||
23 | +exports.feature = (req, res) => { | ||
24 | + let mktCode = req.query.mkt_code || false; | ||
25 | + | ||
26 | + // 下载浮层,下载按钮会用到该参数 | ||
27 | + if (mktCode) { | ||
28 | + res.cookie('mkt_code', mktCode, { | ||
29 | + domain: '.yohobuy.com', | ||
30 | + path: '/' | ||
31 | + }); | ||
32 | + res.cookie('unionTypeYas', mktCode, { | ||
33 | + path: '/' | ||
34 | + }); | ||
35 | + } | ||
36 | + | ||
37 | + res.json({mktCode: mktCode}); | ||
38 | +}; |
@@ -116,4 +116,7 @@ router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck) | @@ -116,4 +116,7 @@ router.get('/vip-day1028/crazy-luck', vipDay1028.beforeIn, vipDay1028.crazyLuck) | ||
116 | router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin); | 116 | router.post('/vip-day1028/signin.json', vipDay1028.beforeIn, vipDay1028.signin); |
117 | router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent); | 117 | router.post('/vip-day1028/isStudent', vipDay1028.beforeIn, vipDay1028.checkIsStudent); |
118 | 118 | ||
119 | +// 获取活动页传来的参数 | ||
120 | +router.get('/wechat/1111', wechat.feature); | ||
121 | + | ||
119 | module.exports = router; | 122 | module.exports = router; |
@@ -127,6 +127,8 @@ var singleDay = { | @@ -127,6 +127,8 @@ var singleDay = { | ||
127 | $swiperTab.on('click', function() { | 127 | $swiperTab.on('click', function() { |
128 | var index = $(this).index(); | 128 | var index = $(this).index(); |
129 | 129 | ||
130 | + $('body').scrollTop(0); | ||
131 | + | ||
130 | $swiperTab.removeClass('active').eq(index).addClass('active'); | 132 | $swiperTab.removeClass('active').eq(index).addClass('active'); |
131 | 133 | ||
132 | if (self.$productTab.eq(index).find('li').length > 0) { | 134 | if (self.$productTab.eq(index).find('li').length > 0) { |
@@ -14,6 +14,8 @@ var tip = require('../../plugin/tip'); | @@ -14,6 +14,8 @@ var tip = require('../../plugin/tip'); | ||
14 | var trim = $.trim; | 14 | var trim = $.trim; |
15 | var showErrTip = tip.show; | 15 | var showErrTip = tip.show; |
16 | 16 | ||
17 | +require('../../common'); | ||
18 | + | ||
17 | api.bindEyesEvt({ | 19 | api.bindEyesEvt({ |
18 | status: 'open' // 默认眼睛打开 | 20 | status: 'open' // 默认眼睛打开 |
19 | }); | 21 | }); |
@@ -49,6 +51,16 @@ $btnSure.on('touchstart', function() { | @@ -49,6 +51,16 @@ $btnSure.on('touchstart', function() { | ||
49 | var res = data.data; | 51 | var res = data.data; |
50 | 52 | ||
51 | if (data.code === 200) { | 53 | if (data.code === 200) { |
54 | + // 统计代码:用于统计从哪个渠道注册成功的 | ||
55 | + if (window._yas && window._yas.sendCustomInfo) { | ||
56 | + window._yas.sendCustomInfo({ | ||
57 | + op: 'YB_REGISTER_SUCCESS_L', | ||
58 | + param: JSON.stringify({ | ||
59 | + C_ID: window._ChannelVary[window.cookie('_Channel')] || 1, | ||
60 | + UNION_TYPE: window.queryString.union_type || window.cookie('unionTypeYas') || false | ||
61 | + }) | ||
62 | + }, true); | ||
63 | + } | ||
52 | showErrTip('注册成功'); | 64 | showErrTip('注册成功'); |
53 | 65 | ||
54 | location.href = res.href; | 66 | location.href = res.href; |
@@ -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