...
|
...
|
@@ -19,7 +19,8 @@ module.exports = function(specificGender) { |
|
|
page = 0,
|
|
|
gender = null,
|
|
|
num,
|
|
|
url;
|
|
|
url,
|
|
|
RECPOSE = '';
|
|
|
|
|
|
// The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
|
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
...
|
...
|
@@ -49,6 +50,13 @@ module.exports = function(specificGender) { |
|
|
url = '/product/recom/maylike?gender=' + gender;
|
|
|
}
|
|
|
|
|
|
// 首页男生和女生,推荐位ID,埋点
|
|
|
if (window.location.pathname === '/boys') {
|
|
|
RECPOSE = 110001;
|
|
|
} else if (window.location.pathname === '/girls') {
|
|
|
RECPOSE = 110002;
|
|
|
}
|
|
|
|
|
|
$curNav = $navList.children('.focus');
|
|
|
|
|
|
if (lifestyleType) {
|
...
|
...
|
@@ -99,6 +107,7 @@ module.exports = function(specificGender) { |
|
|
page: page + 1
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var PRDID = [];
|
|
|
|
|
|
if (data === ' ') {
|
|
|
loading.hideLoadingMask();
|
...
|
...
|
@@ -158,6 +167,21 @@ module.exports = function(specificGender) { |
|
|
|
|
|
$title[0].mlellipsis(2);
|
|
|
});
|
|
|
|
|
|
// 为您优选埋点 start
|
|
|
PRDID = [];
|
|
|
$(data).closest('.good-info').each(function() {
|
|
|
PRDID.push($(this).data('id'));
|
|
|
});
|
|
|
window.givePoint({
|
|
|
REC_POSE: RECPOSE,
|
|
|
PRD_ID: PRDID.join(','),
|
|
|
PRD_NUM: $(data).closest('.good-info').length,
|
|
|
ACTION_ID: 0,
|
|
|
page_num: page
|
|
|
});
|
|
|
|
|
|
// 为您优选埋点 end
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
...
|
...
|
@@ -186,4 +210,21 @@ module.exports = function(specificGender) { |
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
|
|
|
// 为您优选埋点
|
|
|
$('.maybe-like .goods-list').on('click', 'a', function() {
|
|
|
|
|
|
var pageNum = 50;
|
|
|
|
|
|
index = $(this).closest('.good-info').index() + 1;
|
|
|
|
|
|
window.givePoint({
|
|
|
REC_POSE: RECPOSE,
|
|
|
PRD_ID: $(this).closest('.good-info').data('id'),
|
|
|
PRD_NUM: index % pageNum === 0 ? pageNum : index % pageNum,
|
|
|
ACTION_ID: 1,
|
|
|
page_num: Math.ceil(index / pageNum)
|
|
|
});
|
|
|
return true;
|
|
|
});
|
|
|
}; |
...
|
...
|
|