|
@@ -19,7 +19,8 @@ module.exports = function(specificGender) { |
|
@@ -19,7 +19,8 @@ module.exports = function(specificGender) { |
19
|
page = 0,
|
19
|
page = 0,
|
20
|
gender = null,
|
20
|
gender = null,
|
21
|
num,
|
21
|
num,
|
22
|
- url;
|
22
|
+ url,
|
|
|
23
|
+ RECPOSE = '110001';
|
23
|
|
24
|
|
24
|
//The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
25
|
//The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
25
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
26
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
|
@@ -64,6 +65,13 @@ module.exports = function(specificGender) { |
|
@@ -64,6 +65,13 @@ module.exports = function(specificGender) { |
64
|
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
|
65
|
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
|
65
|
}
|
66
|
}
|
66
|
|
67
|
|
|
|
68
|
+ //首页男生和女生,推荐位ID,埋点
|
|
|
69
|
+ if (window.location.pathname === '/boys') {
|
|
|
70
|
+ RECPOSE = '110001';
|
|
|
71
|
+ } else if (window.location.pathname === '/girls') {
|
|
|
72
|
+ RECPOSE = '110002';
|
|
|
73
|
+ }
|
|
|
74
|
+
|
67
|
$curNav = $navList.children('.focus');
|
75
|
$curNav = $navList.children('.focus');
|
68
|
|
76
|
|
69
|
if (lifestyleType) {
|
77
|
if (lifestyleType) {
|
|
@@ -114,7 +122,7 @@ module.exports = function(specificGender) { |
|
@@ -114,7 +122,7 @@ module.exports = function(specificGender) { |
114
|
page: page + 1
|
122
|
page: page + 1
|
115
|
},
|
123
|
},
|
116
|
success: function(data) {
|
124
|
success: function(data) {
|
117
|
-
|
125
|
+ var PRDID = [];
|
118
|
if (data === ' ') {
|
126
|
if (data === ' ') {
|
119
|
searching = false;
|
127
|
searching = false;
|
120
|
loading.hideLoadingMask();
|
128
|
loading.hideLoadingMask();
|
|
@@ -171,6 +179,19 @@ module.exports = function(specificGender) { |
|
@@ -171,6 +179,19 @@ module.exports = function(specificGender) { |
171
|
|
179
|
|
172
|
$title[0].mlellipsis(2);
|
180
|
$title[0].mlellipsis(2);
|
173
|
});
|
181
|
});
|
|
|
182
|
+
|
|
|
183
|
+ //为您优选埋点 start
|
|
|
184
|
+ $(data).closest('.good-info').each(function() {
|
|
|
185
|
+ PRDID.push($(this).data('id'));
|
|
|
186
|
+ });
|
|
|
187
|
+ window.givePoint({
|
|
|
188
|
+ 'REC_POSE': RECPOSE,
|
|
|
189
|
+ 'PRD_ID': PRDID.join(','),
|
|
|
190
|
+ 'PRD_NUM': $(data).closest('.good-info').length,
|
|
|
191
|
+ 'ACTION_ID': 0,
|
|
|
192
|
+ 'page_num': page + 1
|
|
|
193
|
+ });
|
|
|
194
|
+ //为您优选埋点 end
|
174
|
},
|
195
|
},
|
175
|
error: function() {
|
196
|
error: function() {
|
176
|
tip.show('网络断开连接了~');
|
197
|
tip.show('网络断开连接了~');
|
|
@@ -199,4 +220,18 @@ module.exports = function(specificGender) { |
|
@@ -199,4 +220,18 @@ module.exports = function(specificGender) { |
199
|
$(window).scroll(function() {
|
220
|
$(window).scroll(function() {
|
200
|
window.requestAnimationFrame(scrollHandler);
|
221
|
window.requestAnimationFrame(scrollHandler);
|
201
|
});
|
222
|
});
|
|
|
223
|
+
|
|
|
224
|
+ //为您优选埋点 http://redmine.yoho.cn/issues/10116
|
|
|
225
|
+ $('.maybe-like .goods-list').on('click', 'a', function() {
|
|
|
226
|
+ var index = $(this).closest('.good-info').index() + 1,
|
|
|
227
|
+ pageNum = 50;
|
|
|
228
|
+ window.givePoint({
|
|
|
229
|
+ 'REC_POSE': RECPOSE,
|
|
|
230
|
+ 'PRD_ID': $(this).closest('.good-info').data('id'),
|
|
|
231
|
+ 'PRD_NUM': index % pageNum === 0 ? pageNum : index % pageNum,
|
|
|
232
|
+ 'ACTION_ID': 1,
|
|
|
233
|
+ 'page_num': Math.ceil(index / pageNum)
|
|
|
234
|
+ });
|
|
|
235
|
+ return false;
|
|
|
236
|
+ });
|
202
|
}; |
237
|
}; |