Authored by hf

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -12,29 +12,22 @@ var winH = $(window).height(),
loadMoreH = $('#load-more').height(),
$goodList = $('#goods-list'),
loading = false,
end = false,
page = 0,
gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
kidsType = $('.mobile-wrap').hasClass('kids-wrap') ? true : false,
num,
url,
res;
url;
///recom/maylikekids
if(kidsType){
if (kidsType) {
url = '/product/recom/maylikekids';
}
else
{
} else {
url = '/product/recom/maylike?gender=' + gender;
}
//srcoll to load more
$(window).scroll(function () {
if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
if (loading) {
return;
}
loading = true;
num = $goodList.children('.good-info').length;
$.ajax({
... ... @@ -44,15 +37,6 @@ $(window).scroll(function () {
page: page + 1
},
success: function(data) {
if (data === ' ') {
//opt.end = true;
loading = false;
$loading.addClass('hide');
$noMore.removeClass('hide');
return;
}
$goodList.append(data);
//lazyLoad
... ...
var $ = require('yoho.zepto'),
tip = require('../../plugin/tip'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
... ... @@ -11,12 +12,9 @@ var winH = $(window).height(),
loadMoreH = $('#load-more').height(),
$goodList = $('.goods-list'),
loading = false,
end = false,
page = 0,
index = 0,
num,
url,
res;
num;
var swiper;
... ... @@ -61,20 +59,18 @@ $(window).scroll(function () {
num = $goodList.children('.good-info').length;
$.ajax({
type: 'GET',
url: '/product/newsale/selectNewSale?dayLimit'+(index+1),
url: '/product/newsale/selectNewSale?dayLimit' + (index + 1),
data: {
page: page + 1
},
success: function(data) {
if (data === ' ') {
//opt.end = true;
loading = false;
$loading.addClass('hide');
$noMore.removeClass('hide');
return;
}
$goodList.append(data);
//lazyLoad
... ...