|
@@ -15,10 +15,10 @@ var $navLi = $('#fav-tab > li'), |
|
@@ -15,10 +15,10 @@ var $navLi = $('#fav-tab > li'), |
15
|
swiperObj = {},
|
15
|
swiperObj = {},
|
16
|
favTabHammer,
|
16
|
favTabHammer,
|
17
|
favContentHammer,
|
17
|
favContentHammer,
|
18
|
- footerH = $('#yoho-footer').height(),
|
|
|
19
|
$loadMore = $('.fav-load-more'),
|
18
|
$loadMore = $('.fav-load-more'),
|
20
|
$brandLoadMore = $('.fav-brand-load-more'),
|
19
|
$brandLoadMore = $('.fav-brand-load-more'),
|
21
|
winH = $(window).height(),
|
20
|
winH = $(window).height(),
|
|
|
21
|
+ footerH = $('#yoho-footer').height(),
|
22
|
$favProductList = $('.fav-product-list'),
|
22
|
$favProductList = $('.fav-product-list'),
|
23
|
$favBrandList = $('.fav-brand-swiper-wrapper'),
|
23
|
$favBrandList = $('.fav-brand-swiper-wrapper'),
|
24
|
pageId = 1,
|
24
|
pageId = 1,
|
|
@@ -220,8 +220,8 @@ favContentHammer.on('tap', function(e) { |
|
@@ -220,8 +220,8 @@ favContentHammer.on('tap', function(e) { |
220
|
|
220
|
|
221
|
function scrollHandler() {
|
221
|
function scrollHandler() {
|
222
|
|
222
|
|
223
|
- if ($(window).scrollTop() + winH >= $(document).height() - footerH) {
|
|
|
224
|
-
|
223
|
+ //距离底部未1/4列表高度+底部高度的时候加载更多
|
|
|
224
|
+ if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $favBrandList.height() - footerH) {
|
225
|
if (brandTab) {
|
225
|
if (brandTab) {
|
226
|
$brandLoadMore.filter('.hide').removeClass('hide');
|
226
|
$brandLoadMore.filter('.hide').removeClass('hide');
|
227
|
|
227
|
|