...
|
...
|
@@ -19,7 +19,8 @@ module.exports = function(specificGender) { |
|
|
page = 0,
|
|
|
gender = null,
|
|
|
num,
|
|
|
url;
|
|
|
url,
|
|
|
RECPOSE = '110001';
|
|
|
|
|
|
//The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
|
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
...
|
...
|
@@ -48,11 +49,14 @@ module.exports = function(specificGender) { |
|
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
|
|
'1,3&rec_pos=100009' : '2,3&rec_pos=100009',
|
|
|
url = '/product/recom/maylike?gender=' + gender;
|
|
|
} else if (logisticType) { //物流页面
|
|
|
RECPOSE = 110009;
|
|
|
|
|
|
} else if (logisticType) { //物流页面
|
|
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
|
|
'1,3&rec_pos=100006' : '2,3&rec_pos=100006',
|
|
|
url = '/product/recom/maylike?gender=' + gender;
|
|
|
RECPOSE = 110006;
|
|
|
|
|
|
} else {
|
|
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
|
|
'1,3&rec_pos=100001' : '2,3&rec_pos=100002',
|
...
|
...
|
@@ -64,6 +68,13 @@ module.exports = function(specificGender) { |
|
|
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
|
|
|
}
|
|
|
|
|
|
//首页男生和女生,推荐位ID,埋点
|
|
|
if (window.location.pathname === '/boys') {
|
|
|
RECPOSE = 110001;
|
|
|
} else if (window.location.pathname === '/girls') {
|
|
|
RECPOSE = 110002;
|
|
|
}
|
|
|
|
|
|
$curNav = $navList.children('.focus');
|
|
|
|
|
|
if (lifestyleType) {
|
...
|
...
|
@@ -114,7 +125,7 @@ module.exports = function(specificGender) { |
|
|
page: page + 1
|
|
|
},
|
|
|
success: function(data) {
|
|
|
|
|
|
var PRDID = [];
|
|
|
if (data === ' ') {
|
|
|
searching = false;
|
|
|
loading.hideLoadingMask();
|
...
|
...
|
@@ -171,6 +182,19 @@ module.exports = function(specificGender) { |
|
|
|
|
|
$title[0].mlellipsis(2);
|
|
|
});
|
|
|
|
|
|
//为您优选埋点 start
|
|
|
$(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 + 1
|
|
|
});
|
|
|
//为您优选埋点 end
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开连接了~');
|
...
|
...
|
@@ -199,4 +223,18 @@ module.exports = function(specificGender) { |
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
|
|
|
//为您优选埋点 http://redmine.yoho.cn/issues/10116
|
|
|
$('.maybe-like .goods-list').on('click', 'a', function() {
|
|
|
var index = $(this).closest('.good-info').index() + 1,
|
|
|
pageNum = 50;
|
|
|
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;
|
|
|
});
|
|
|
}; |
...
|
...
|
|