Authored by 梁志锋

update

... ... @@ -21,6 +21,8 @@ var requestFrame,
$logotrans = $('.home-header .logo'),
isen = true;
var noResult = '<p class="no-result">未找到相关搜索结果</p>';
require('./maybe-like');
lazyLoad($('img.lazy'));
... ... @@ -139,12 +141,6 @@ $('.category-swiper').each(function (i, index) {
}
});
//关闭头部下载浮层
$('.header-download').on('tap', '.close-btn', function () {
$(this).parent().remove();
});
//logo动画
requestFrame = (function () {
var tempFunc = null,
... ...
... ... @@ -13,7 +13,7 @@ var winH = $(window).height(),
$goodList = $('#goods-list'),
loading = false,
page = 0,
gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
gender = null,
kidsType = $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
lifestyleType = $('.mobile-wrap').hasClass('lifestyle-wrap') ? true : false,
num,
... ... @@ -29,7 +29,9 @@ if (kidsType) {
} else if (lifestyleType) {
url = '/product/recom/maylikelife';
} else {
gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
url = '/product/recom/maylike?gender=' + gender;
boygirl_flag = true;
}
$curNav = $navList.children('.focus');
... ... @@ -75,6 +77,27 @@ $(window).scroll(function () {
success: function(data) {
if (data === ' ') {
loading = true;
alert('haha');
if (gender) {
var url;
if (gender === '1,3') {
url = '/boys/bottomBanner';
} else {
url = '/girls/bottomBanner';
}
$.ajax({
type: 'GET',
url: url,
success: function(data) {
$('#load-more-img').show();
$('#load-more-img a').attr('url', data[0].banner[0].url);
$('#load-more-img a > img').attr('src', data[0].banner[0].img);
},
error: function() {
}
});
}
return;
}
$goodList.append(data);
... ...
... ... @@ -18,7 +18,8 @@ var $goodsContainer = $('#goods-container'),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
var winH = $(window).height();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
... ... @@ -173,8 +174,7 @@ function search(opt) {
url: '/product/newsale/selectNewSale',
data: setting,
success: function(data) {
var noResult = '<p class="no-result">未找到相关搜索结果</p>',
$container;
var $container;
switch (navType) {
case 'newest':
... ...
... ... @@ -18,7 +18,8 @@ var $goodsContainer = $('#goods-container'),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
var winH = $(window).height();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
//默认筛选条件
var defaultOpt = {
... ... @@ -200,8 +201,7 @@ function search(opt) {
url: '/product/newsale/selectNewSale',
data: setting,
success: function(data) {
var noResult = '<p class="no-result">未找到相关搜索结果</p>',
$container;
var $container;
switch (navType) {
case 'today':
... ...
... ... @@ -53,4 +53,15 @@
}
}
}
}
.load-more-img {
padding-left: 0;
height: 200rem / $pxConvertRem;
overflow: hidden;
img {
display: block;
width: 100%;
height: 100%;
}
}
\ No newline at end of file
... ...