Showing
3 changed files
with
40 additions
and
8 deletions
@@ -49,11 +49,14 @@ module.exports = function(specificGender) { | @@ -49,11 +49,14 @@ module.exports = function(specificGender) { | ||
49 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? | 49 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? |
50 | '1,3&rec_pos=100009' : '2,3&rec_pos=100009', | 50 | '1,3&rec_pos=100009' : '2,3&rec_pos=100009', |
51 | url = '/product/recom/maylike?gender=' + gender; | 51 | url = '/product/recom/maylike?gender=' + gender; |
52 | - } else if (logisticType) { //物流页面 | 52 | + RECPOSE = 110009; |
53 | 53 | ||
54 | + } else if (logisticType) { //物流页面 | ||
54 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? | 55 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? |
55 | '1,3&rec_pos=100006' : '2,3&rec_pos=100006', | 56 | '1,3&rec_pos=100006' : '2,3&rec_pos=100006', |
56 | url = '/product/recom/maylike?gender=' + gender; | 57 | url = '/product/recom/maylike?gender=' + gender; |
58 | + RECPOSE = 110006; | ||
59 | + | ||
57 | } else { | 60 | } else { |
58 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? | 61 | gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? |
59 | '1,3&rec_pos=100001' : '2,3&rec_pos=100002', | 62 | '1,3&rec_pos=100001' : '2,3&rec_pos=100002', |
@@ -67,9 +70,9 @@ module.exports = function(specificGender) { | @@ -67,9 +70,9 @@ module.exports = function(specificGender) { | ||
67 | 70 | ||
68 | //首页男生和女生,推荐位ID,埋点 | 71 | //首页男生和女生,推荐位ID,埋点 |
69 | if (window.location.pathname === '/boys') { | 72 | if (window.location.pathname === '/boys') { |
70 | - RECPOSE = '110001'; | 73 | + RECPOSE = 110001; |
71 | } else if (window.location.pathname === '/girls') { | 74 | } else if (window.location.pathname === '/girls') { |
72 | - RECPOSE = '110002'; | 75 | + RECPOSE = 110002; |
73 | } | 76 | } |
74 | 77 | ||
75 | $curNav = $navList.children('.focus'); | 78 | $curNav = $navList.children('.focus'); |
@@ -232,6 +235,6 @@ module.exports = function(specificGender) { | @@ -232,6 +235,6 @@ module.exports = function(specificGender) { | ||
232 | 'ACTION_ID': 1, | 235 | 'ACTION_ID': 1, |
233 | 'page_num': Math.ceil(index / pageNum) | 236 | 'page_num': Math.ceil(index / pageNum) |
234 | }); | 237 | }); |
235 | - return false; | 238 | + return true; |
236 | }); | 239 | }); |
237 | }; | 240 | }; |
@@ -18,23 +18,23 @@ $.get('/product/recommend-for-you/cart').then(function(html) { | @@ -18,23 +18,23 @@ $.get('/product/recommend-for-you/cart').then(function(html) { | ||
18 | lazyLoad($('img.lazy')); | 18 | lazyLoad($('img.lazy')); |
19 | 19 | ||
20 | //为您优选埋点 http://redmine.yoho.cn/issues/10116 | 20 | //为您优选埋点 http://redmine.yoho.cn/issues/10116 |
21 | - $('.recommend-for-you .good-info').each(function() { | 21 | + $recommendForYou.find('.good-info').each(function() { |
22 | PRDID.push($(this).data('id')); | 22 | PRDID.push($(this).data('id')); |
23 | }); | 23 | }); |
24 | 24 | ||
25 | window.givePoint({ | 25 | window.givePoint({ |
26 | - 'REC_POSE': 110003, | 26 | + 'REC_POSE': 10003, |
27 | 'PRD_ID': PRDID.join(','), | 27 | 'PRD_ID': PRDID.join(','), |
28 | 'PRD_NUM': $('.recommend-for-you .good-info').length, | 28 | 'PRD_NUM': $('.recommend-for-you .good-info').length, |
29 | 'ACTION_ID': 0, | 29 | 'ACTION_ID': 0, |
30 | 'page_num': 1 | 30 | 'page_num': 1 |
31 | }); | 31 | }); |
32 | 32 | ||
33 | - $('.recommend-for-you .good-info').on('click', 'a', function() { | 33 | + $recommendForYou.find('.good-info').on('click', 'a', function() { |
34 | var index = $(this).closest('.good-info').index() + 1; | 34 | var index = $(this).closest('.good-info').index() + 1; |
35 | 35 | ||
36 | window.givePoint({ | 36 | window.givePoint({ |
37 | - 'REC_POSE': 110003, | 37 | + 'REC_POSE': 10003, |
38 | 'PRD_ID': $(this).closest('.good-info').data('id'), | 38 | 'PRD_ID': $(this).closest('.good-info').data('id'), |
39 | 'PRD_NUM': index, | 39 | 'PRD_NUM': index, |
40 | 'ACTION_ID': 1, | 40 | 'ACTION_ID': 1, |
@@ -12,9 +12,38 @@ var Swiper = require('yoho.iswiper'), | @@ -12,9 +12,38 @@ var Swiper = require('yoho.iswiper'), | ||
12 | var $recommendForYou = $('.recommend-for-you'); | 12 | var $recommendForYou = $('.recommend-for-you'); |
13 | 13 | ||
14 | $.get('/product/recommend-for-you/userCenter').then(function(html) { | 14 | $.get('/product/recommend-for-you/userCenter').then(function(html) { |
15 | + var PRDID = []; | ||
16 | + | ||
15 | $recommendForYou.html(html).show(); | 17 | $recommendForYou.html(html).show(); |
16 | lazyLoad($('img.lazy')); | 18 | lazyLoad($('img.lazy')); |
17 | 19 | ||
20 | + //为您优选埋点 http://redmine.yoho.cn/issues/10116 | ||
21 | + $recommendForYou.find('.good-info').each(function() { | ||
22 | + PRDID.push($(this).data('id')); | ||
23 | + }); | ||
24 | + | ||
25 | + window.givePoint({ | ||
26 | + 'REC_POSE': 110004, | ||
27 | + 'PRD_ID': PRDID.join(','), | ||
28 | + 'PRD_NUM': $('.recommend-for-you .good-info').length, | ||
29 | + 'ACTION_ID': 0, | ||
30 | + 'page_num': 1 | ||
31 | + }); | ||
32 | + | ||
33 | + $recommendForYou.find('.good-info').on('click', 'a', function() { | ||
34 | + var index = $(this).closest('.good-info').index() + 1; | ||
35 | + | ||
36 | + window.givePoint({ | ||
37 | + 'REC_POSE': 110004, | ||
38 | + 'PRD_ID': $(this).closest('.good-info').data('id'), | ||
39 | + 'PRD_NUM': index, | ||
40 | + 'ACTION_ID': 1, | ||
41 | + 'page_num': 1 | ||
42 | + }); | ||
43 | + | ||
44 | + return true; | ||
45 | + }); | ||
46 | + | ||
18 | }).fail(function() { | 47 | }).fail(function() { |
19 | $recommendForYou.hide(); | 48 | $recommendForYou.hide(); |
20 | }); | 49 | }); |
-
Please register or login to post a comment