Merge remote-tracking branch 'remotes/origin/feature/givePoint'
Showing
1 changed file
with
28 additions
and
10 deletions
@@ -99,10 +99,21 @@ function pageChange(self, $ul, page, itemWith, curPage, num) { | @@ -99,10 +99,21 @@ function pageChange(self, $ul, page, itemWith, curPage, num) { | ||
99 | --rcCurPage; | 99 | --rcCurPage; |
100 | } | 100 | } |
101 | 101 | ||
102 | + PRDID = []; | ||
103 | + $rcUl.find('li').each(function(index) { | ||
104 | + if (PRDID.length >= 6) { | ||
105 | + return false; | ||
106 | + } | ||
107 | + | ||
108 | + if (index >= (rcCurPage - 1) * 6) { | ||
109 | + PRDID.push($(this).find('a').data('id')); | ||
110 | + } | ||
111 | + }); | ||
112 | + | ||
102 | window.givePoint({ | 113 | window.givePoint({ |
103 | 'REC_POSE': 120004, | 114 | 'REC_POSE': 120004, |
104 | - 'PRD_ID': PRDID.slice((rcCurPage - 1) * 6, (rcCurPage - 1) * rcCurPage + 6).join(','), | ||
105 | - 'PRD_NUM': $rcUl.find('li').length, | 115 | + 'PRD_ID': PRDID.join(','), |
116 | + 'PRD_NUM': PRDID.length, | ||
106 | 'ACTION_ID': 0, | 117 | 'ACTION_ID': 0, |
107 | 'page_num': rcCurPage | 118 | 'page_num': rcCurPage |
108 | }); | 119 | }); |
@@ -111,20 +122,27 @@ function pageChange(self, $ul, page, itemWith, curPage, num) { | @@ -111,20 +122,27 @@ function pageChange(self, $ul, page, itemWith, curPage, num) { | ||
111 | } | 122 | } |
112 | }); | 123 | }); |
113 | 124 | ||
114 | - //为您优选埋点 start | ||
115 | - setTimeout(function() { | ||
116 | - $rcUl.find('li').each(function() { | ||
117 | - PRDID.push($(this).find('a').data('id')); | ||
118 | - }); | 125 | + //为您优选埋点 start |
126 | + setTimeout(function() { | ||
127 | + PRDID = []; | ||
128 | + $rcUl.find('li').each(function(index) { | ||
129 | + if (PRDID.length >= 6) { | ||
130 | + return false; | ||
131 | + } | ||
132 | + | ||
133 | + if (index >= 0) { | ||
134 | + PRDID.push($(this).find('a').data('id')); | ||
135 | + } | ||
136 | + }); | ||
119 | 137 | ||
120 | window.givePoint({ | 138 | window.givePoint({ |
121 | 'REC_POSE': 120004, | 139 | 'REC_POSE': 120004, |
122 | - 'PRD_ID': PRDID.slice(0, 6).join(','), | ||
123 | - 'PRD_NUM': $rcUl.find('li').length, | 140 | + 'PRD_ID': PRDID.join(','), |
141 | + 'PRD_NUM': PRDID.length, | ||
124 | 'ACTION_ID': 0, | 142 | 'ACTION_ID': 0, |
125 | 'page_num': 1 | 143 | 'page_num': 1 |
126 | }); | 144 | }); |
127 | - }, 3000); | 145 | + }, 3000); |
128 | 146 | ||
129 | $rcUl.find('li a').bind('click', function() { | 147 | $rcUl.find('li a').bind('click', function() { |
130 | var index = $(this).closest('li').index() + 1; | 148 | var index = $(this).closest('li').index() + 1; |
-
Please register or login to post a comment