|
@@ -40,7 +40,7 @@ |
|
@@ -40,7 +40,7 @@ |
40
|
|
40
|
|
41
|
// // ajax url
|
41
|
// // ajax url
|
42
|
// if (kidsType) {
|
42
|
// if (kidsType) {
|
43
|
-
|
43
|
+
|
44
|
// url = '/product/recom/maylikekids';
|
44
|
// url = '/product/recom/maylikekids';
|
45
|
// } else if (lifestyleType) {
|
45
|
// } else if (lifestyleType) {
|
46
|
|
46
|
|
|
@@ -270,7 +270,7 @@ module.exports = function(specificGender) { |
|
@@ -270,7 +270,7 @@ module.exports = function(specificGender) { |
270
|
url,
|
270
|
url,
|
271
|
RECPOSE = '110001';
|
271
|
RECPOSE = '110001';
|
272
|
|
272
|
|
273
|
- //The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
273
|
+ // The kidsType can be specified by the parameter. Add by @ZhaoBiao
|
274
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
274
|
var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
|
275
|
lifestyleType = specificGender === 'lifestyle' ||
|
275
|
lifestyleType = specificGender === 'lifestyle' ||
|
276
|
$('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false,
|
276
|
$('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false,
|
|
@@ -284,13 +284,13 @@ module.exports = function(specificGender) { |
|
@@ -284,13 +284,13 @@ module.exports = function(specificGender) { |
284
|
|
284
|
|
285
|
ellipsis.init();
|
285
|
ellipsis.init();
|
286
|
|
286
|
|
287
|
- //ajax url
|
287
|
+ // ajax url
|
288
|
if (kidsType) {
|
288
|
if (kidsType) {
|
289
|
-
|
289
|
+
|
290
|
url = '/product/recom/maylikekids';
|
290
|
url = '/product/recom/maylikekids';
|
291
|
} else if (lifestyleType) {
|
291
|
} else if (lifestyleType) {
|
292
|
|
292
|
|
293
|
- //有货币页面加载男生首页的数据
|
293
|
+ // 有货币页面加载男生首页的数据
|
294
|
url = specificGender === 'lifestyle' ? '/product/recom/maylike?gender=1,3&rec_pos=100001' : '/product/recom/maylikelife';
|
294
|
url = specificGender === 'lifestyle' ? '/product/recom/maylike?gender=1,3&rec_pos=100001' : '/product/recom/maylikelife';
|
295
|
} else if (yohoCoinType) {
|
295
|
} else if (yohoCoinType) {
|
296
|
|
296
|
|
|
@@ -299,7 +299,7 @@ module.exports = function(specificGender) { |
|
@@ -299,7 +299,7 @@ module.exports = function(specificGender) { |
299
|
url = '/product/recom/maylike?gender=' + gender;
|
299
|
url = '/product/recom/maylike?gender=' + gender;
|
300
|
RECPOSE = 110009;
|
300
|
RECPOSE = 110009;
|
301
|
|
301
|
|
302
|
- } else if (logisticType) { //物流页面
|
302
|
+ } else if (logisticType) { // 物流页面
|
303
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
303
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
304
|
'1,3&rec_pos=100006' : '2,3&rec_pos=100006',
|
304
|
'1,3&rec_pos=100006' : '2,3&rec_pos=100006',
|
305
|
url = '/product/recom/maylike?gender=' + gender;
|
305
|
url = '/product/recom/maylike?gender=' + gender;
|
|
@@ -311,12 +311,12 @@ module.exports = function(specificGender) { |
|
@@ -311,12 +311,12 @@ module.exports = function(specificGender) { |
311
|
url = '/product/recom/maylike?gender=' + gender;
|
311
|
url = '/product/recom/maylike?gender=' + gender;
|
312
|
}
|
312
|
}
|
313
|
|
313
|
|
314
|
- //日韩馆-你可能喜欢的
|
314
|
+ // 日韩馆-你可能喜欢的
|
315
|
if ($('.mobile-wrap').hasClass('yoho-channel-page')) {
|
315
|
if ($('.mobile-wrap').hasClass('yoho-channel-page')) {
|
316
|
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
|
316
|
url = '/product/recom/newPreference?template_id=' + $.queryString().template_id;
|
317
|
}
|
317
|
}
|
318
|
|
318
|
|
319
|
- //首页男生和女生,推荐位ID,埋点
|
319
|
+ // 首页男生和女生,推荐位ID,埋点
|
320
|
if (window.location.pathname === '/boys') {
|
320
|
if (window.location.pathname === '/boys') {
|
321
|
RECPOSE = 110001;
|
321
|
RECPOSE = 110001;
|
322
|
} else if (window.location.pathname === '/girls') {
|
322
|
} else if (window.location.pathname === '/girls') {
|
|
@@ -349,7 +349,7 @@ module.exports = function(specificGender) { |
|
@@ -349,7 +349,7 @@ module.exports = function(specificGender) { |
349
|
|
349
|
|
350
|
$curNav = $this;
|
350
|
$curNav = $this;
|
351
|
|
351
|
|
352
|
- $(document).trigger('scroll'); //Trigger lazyLoad
|
352
|
+ $(document).trigger('scroll'); // Trigger lazyLoad
|
353
|
e.srcEvent.stopPropagation();
|
353
|
e.srcEvent.stopPropagation();
|
354
|
});
|
354
|
});
|
355
|
}
|
355
|
}
|
|
@@ -365,7 +365,7 @@ module.exports = function(specificGender) { |
|
@@ -365,7 +365,7 @@ module.exports = function(specificGender) { |
365
|
|
365
|
|
366
|
loading.showLoadingMask();
|
366
|
loading.showLoadingMask();
|
367
|
|
367
|
|
368
|
- //num = $goodList.find('.good-info').length;
|
368
|
+ // num = $goodList.find('.good-info').length;
|
369
|
$.ajax({
|
369
|
$.ajax({
|
370
|
type: 'GET',
|
370
|
type: 'GET',
|
371
|
url: url,
|
371
|
url: url,
|
|
@@ -403,7 +403,7 @@ module.exports = function(specificGender) { |
|
@@ -403,7 +403,7 @@ module.exports = function(specificGender) { |
403
|
return;
|
403
|
return;
|
404
|
}
|
404
|
}
|
405
|
|
405
|
|
406
|
- //加载到数据后,去除bottom样式,使得footer能够随着页面长度的增加改变位置
|
406
|
+ // 加载到数据后,去除bottom样式,使得footer能够随着页面长度的增加改变位置
|
407
|
if (data.length > 1) {
|
407
|
if (data.length > 1) {
|
408
|
$footer ? null : $footer = $('#yoho-footer');
|
408
|
$footer ? null : $footer = $('#yoho-footer');
|
409
|
$footer.hasClass('bottom') ? $footer.removeClass('bottom') : null;
|
409
|
$footer.hasClass('bottom') ? $footer.removeClass('bottom') : null;
|
|
@@ -431,7 +431,7 @@ module.exports = function(specificGender) { |
|
@@ -431,7 +431,7 @@ module.exports = function(specificGender) { |
431
|
$title[0].mlellipsis(2);
|
431
|
$title[0].mlellipsis(2);
|
432
|
});
|
432
|
});
|
433
|
|
433
|
|
434
|
- //为您优选埋点 start
|
434
|
+ // 为您优选埋点 start
|
435
|
$(data).closest('.good-info').each(function() {
|
435
|
$(data).closest('.good-info').each(function() {
|
436
|
PRDID.push($(this).data('id'));
|
436
|
PRDID.push($(this).data('id'));
|
437
|
});
|
437
|
});
|
|
@@ -442,7 +442,8 @@ module.exports = function(specificGender) { |
|
@@ -442,7 +442,8 @@ module.exports = function(specificGender) { |
442
|
'ACTION_ID': 0,
|
442
|
'ACTION_ID': 0,
|
443
|
'page_num': RECPOSE === 110009 ? 1 : page
|
443
|
'page_num': RECPOSE === 110009 ? 1 : page
|
444
|
});
|
444
|
});
|
445
|
- //为您优选埋点 end
|
445
|
+
|
|
|
446
|
+ // 为您优选埋点 end
|
446
|
},
|
447
|
},
|
447
|
error: function() {
|
448
|
error: function() {
|
448
|
tip.show('网络断开连接了~');
|
449
|
tip.show('网络断开连接了~');
|
|
@@ -467,12 +468,12 @@ module.exports = function(specificGender) { |
|
@@ -467,12 +468,12 @@ module.exports = function(specificGender) { |
467
|
search();
|
468
|
search();
|
468
|
}
|
469
|
}
|
469
|
|
470
|
|
470
|
- //srcoll to load more
|
471
|
+ // srcoll to load more
|
471
|
$(window).scroll(function() {
|
472
|
$(window).scroll(function() {
|
472
|
window.requestAnimationFrame(scrollHandler);
|
473
|
window.requestAnimationFrame(scrollHandler);
|
473
|
});
|
474
|
});
|
474
|
|
475
|
|
475
|
- //为您优选埋点 http://redmine.yoho.cn/issues/10116
|
476
|
+ // 为您优选埋点 http://redmine.yoho.cn/issues/10116
|
476
|
$('.maybe-like .goods-list').on('click', 'a', function() {
|
477
|
$('.maybe-like .goods-list').on('click', 'a', function() {
|
477
|
var index = $(this).closest('.good-info').index() + 1,
|
478
|
var index = $(this).closest('.good-info').index() + 1,
|
478
|
pageNum = 50;
|
479
|
pageNum = 50;
|