|
@@ -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 = '';
|
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,
|
|
@@ -49,6 +50,13 @@ module.exports = function(specificGender) { |
|
@@ -49,6 +50,13 @@ module.exports = function(specificGender) { |
49
|
url = '/product/recom/maylike?gender=' + gender;
|
50
|
url = '/product/recom/maylike?gender=' + gender;
|
50
|
}
|
51
|
}
|
51
|
|
52
|
|
|
|
53
|
+ // 首页男生和女生,推荐位ID,埋点
|
|
|
54
|
+ if (window.location.pathname === '/boys') {
|
|
|
55
|
+ RECPOSE = 110001;
|
|
|
56
|
+ } else if (window.location.pathname === '/girls') {
|
|
|
57
|
+ RECPOSE = 110002;
|
|
|
58
|
+ }
|
|
|
59
|
+
|
52
|
$curNav = $navList.children('.focus');
|
60
|
$curNav = $navList.children('.focus');
|
53
|
|
61
|
|
54
|
if (lifestyleType) {
|
62
|
if (lifestyleType) {
|
|
@@ -99,6 +107,7 @@ module.exports = function(specificGender) { |
|
@@ -99,6 +107,7 @@ module.exports = function(specificGender) { |
99
|
page: page + 1
|
107
|
page: page + 1
|
100
|
},
|
108
|
},
|
101
|
success: function(data) {
|
109
|
success: function(data) {
|
|
|
110
|
+ var PRDID = [];
|
102
|
|
111
|
|
103
|
if (data === ' ') {
|
112
|
if (data === ' ') {
|
104
|
loading.hideLoadingMask();
|
113
|
loading.hideLoadingMask();
|
|
@@ -158,6 +167,21 @@ module.exports = function(specificGender) { |
|
@@ -158,6 +167,21 @@ module.exports = function(specificGender) { |
158
|
|
167
|
|
159
|
$title[0].mlellipsis(2);
|
168
|
$title[0].mlellipsis(2);
|
160
|
});
|
169
|
});
|
|
|
170
|
+
|
|
|
171
|
+ // 为您优选埋点 start
|
|
|
172
|
+ PRDID = [];
|
|
|
173
|
+ $(data).closest('.good-info').each(function() {
|
|
|
174
|
+ PRDID.push($(this).data('id'));
|
|
|
175
|
+ });
|
|
|
176
|
+ window.givePoint({
|
|
|
177
|
+ REC_POSE: RECPOSE,
|
|
|
178
|
+ PRD_ID: PRDID.join(','),
|
|
|
179
|
+ PRD_NUM: $(data).closest('.good-info').length,
|
|
|
180
|
+ ACTION_ID: 0,
|
|
|
181
|
+ page_num: page
|
|
|
182
|
+ });
|
|
|
183
|
+
|
|
|
184
|
+ // 为您优选埋点 end
|
161
|
},
|
185
|
},
|
162
|
error: function() {
|
186
|
error: function() {
|
163
|
tip.show('网络断开连接了~');
|
187
|
tip.show('网络断开连接了~');
|
|
@@ -186,4 +210,21 @@ module.exports = function(specificGender) { |
|
@@ -186,4 +210,21 @@ module.exports = function(specificGender) { |
186
|
$(window).scroll(function() {
|
210
|
$(window).scroll(function() {
|
187
|
window.requestAnimationFrame(scrollHandler);
|
211
|
window.requestAnimationFrame(scrollHandler);
|
188
|
});
|
212
|
});
|
|
|
213
|
+
|
|
|
214
|
+ // 为您优选埋点
|
|
|
215
|
+ $('.maybe-like .goods-list').on('click', 'a', function() {
|
|
|
216
|
+
|
|
|
217
|
+ var pageNum = 50;
|
|
|
218
|
+
|
|
|
219
|
+ index = $(this).closest('.good-info').index() + 1;
|
|
|
220
|
+
|
|
|
221
|
+ window.givePoint({
|
|
|
222
|
+ REC_POSE: RECPOSE,
|
|
|
223
|
+ PRD_ID: $(this).closest('.good-info').data('id'),
|
|
|
224
|
+ PRD_NUM: index % pageNum === 0 ? pageNum : index % pageNum,
|
|
|
225
|
+ ACTION_ID: 1,
|
|
|
226
|
+ page_num: Math.ceil(index / pageNum)
|
|
|
227
|
+ });
|
|
|
228
|
+ return true;
|
|
|
229
|
+ });
|
189
|
}; |
230
|
}; |