...
|
...
|
@@ -459,20 +459,7 @@ var brandsData, |
|
|
|
|
|
loading.showLoadingMask();
|
|
|
|
|
|
//热门品牌滑动
|
|
|
hotBrandsSwiper = new Swiper('.brands-swiper', {
|
|
|
grabCursor: true,
|
|
|
slidesPerView: 'auto',
|
|
|
wrapperClass: 'brands-list',
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
pagination: '.swiper-pagination .pagination-inner'
|
|
|
});
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
$('.yoho-header').css({
|
...
|
...
|
@@ -488,6 +475,22 @@ $('.yoho-header').css({ |
|
|
|
|
|
$('.hide-when-loading').show();
|
|
|
loading.hideLoadingMask();
|
|
|
|
|
|
//banner滑动
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
pagination: '.swiper-pagination .pagination-inner'
|
|
|
});
|
|
|
|
|
|
//热门品牌滑动
|
|
|
hotBrandsSwiper = new Swiper('.brands-swiper', {
|
|
|
grabCursor: true,
|
|
|
slidesPerView: 'auto',
|
|
|
wrapperClass: 'brands-list',
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
})();
|
|
|
|
|
|
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
|
...
|
...
|
@@ -1889,17 +1892,25 @@ module.exports = function(specificGender) { |
|
|
if (kidsType) {
|
|
|
url = '/product/recom/maylikekids';
|
|
|
} else if (lifestyleType) {
|
|
|
url = '/product/recom/maylikelife';
|
|
|
|
|
|
//有货币页面加载男生首页的数据
|
|
|
url = specificGender === 'lifestyle' ? '/product/recom/maylike?gender=1,3' : '/product/recom/maylikelife';
|
|
|
} else {
|
|
|
gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
|
|
|
'1,3' : '2,3',
|
|
|
url = '/product/recom/maylike?gender=' + gender;
|
|
|
}
|
|
|
|
|
|
//以防cookie异常,强制加载男首
|
|
|
if (specificGender === 'boys') {
|
|
|
url = '/product/recom/maylike?gender=1,3';
|
|
|
}
|
|
|
|
|
|
$curNav = $navList.children('.focus');
|
|
|
|
|
|
if (lifestyleType) {
|
|
|
navHammer = new Hammer($navList[0]);
|
|
|
navHammer = $navList[0] ? new Hammer($navList[0]) : undefined;
|
|
|
if (navHammer) {
|
|
|
navHammer.on('tap', function(e) {
|
|
|
var $this = $(e.target).closest('li'),
|
|
|
$goods = $('.goods-list'),
|
...
|
...
|
@@ -1925,6 +1936,7 @@ module.exports = function(specificGender) { |
|
|
e.srcEvent.stopPropagation();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
loading.init($('.maybe-like'));
|
|
|
|
...
|
...
|
@@ -5526,15 +5538,28 @@ function changeSizeChosed(newSizeIndex) { |
|
|
$curSizeBlock.removeClass('chosed');
|
|
|
sizes = $sizeRowList.eq(newSizeIndex).children();
|
|
|
for (i = 0; i < sizes.length; i++) {
|
|
|
if ($(sizes[i]).data('name') === $curSizeBlock.data('name')) {
|
|
|
if ($(sizes[i]).data('id') === $curSizeBlock.data('id')) {
|
|
|
$curSizeBlock = $(sizes[i]);
|
|
|
queryString = '#' + $curSizeBlock.data('name');
|
|
|
queryString = '#' + $curSizeBlock.data('id');
|
|
|
curColorIndex = $(queryString).data('index');
|
|
|
$curSizeBlock.addClass('chosed');
|
|
|
return $curSizeBlock.data('num');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$curSizeBlock.addClass('chosed');
|
|
|
return $curSizeBlock.data('num');
|
|
|
//特殊处理: 老的选中尺码在新选中的颜色对应尺码中不存在,需要下述1,2,3
|
|
|
// 1.重置尺码选择的标志变量.
|
|
|
$curSizeBlock = null;
|
|
|
hasChooseSize = false;
|
|
|
|
|
|
// 2.当前颜色行隐藏
|
|
|
$colorRowList.eq(curColorIndex).addClass('hide');
|
|
|
|
|
|
// 3.目标颜色行第一行显示
|
|
|
$colorRowList.eq(0).removeClass('hide');
|
|
|
curColorIndex = 0;
|
|
|
|
|
|
return -1;
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
...
|
...
|
@@ -5612,7 +5637,15 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
|
|
|
// 颜色块切换勾选样式
|
|
|
$this.siblings('.chosed').removeClass('chosed');
|
|
|
|
|
|
// 特殊处理
|
|
|
if (-1 === curGoodNum) {
|
|
|
$curColorBlock = $($colorRowList.eq(0).children().get(index));
|
|
|
$curColorBlock.addClass('chosed');
|
|
|
} else {
|
|
|
$this.toggleClass('chosed');
|
|
|
}
|
|
|
|
|
|
$('#good-num').val(1);
|
|
|
|
|
|
// 设置按钮的样式和文字
|
...
|
...
|
@@ -5645,7 +5678,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() { |
|
|
} else {
|
|
|
hasChooseSize = true;
|
|
|
|
|
|
index = $('#' + $this.data('name')).data('index') - 1;
|
|
|
index = $('#' + $this.data('id')).data('index') - 1;
|
|
|
|
|
|
// 颜色当前行隐藏
|
|
|
$colorRowList.eq(curColorIndex).addClass('hide');
|
...
|
...
|
@@ -8815,7 +8848,7 @@ define("js/me/currency-new", ["jquery","hammer","lazyload"], function(require, e |
|
|
*/
|
|
|
|
|
|
function getGender() {
|
|
|
return window.cookie('_Channel');
|
|
|
return window.cookie('_Channel') || 'boys';
|
|
|
}
|
|
|
|
|
|
require("js/home/maybe-like")(getGender());
|
...
|
...
|
|