...
|
...
|
@@ -44,7 +44,6 @@ function initSwiper() { |
|
|
$swiperList = $('.swiper-container');
|
|
|
for (i = 0; i < $swiperList.length; i++) {
|
|
|
id = $swiperList.eq(i).attr('data-id');
|
|
|
console.log(id);
|
|
|
|
|
|
if (!!swiperObj[id]) {
|
|
|
swiperObj[id].destroy(true, true);
|
...
|
...
|
@@ -91,7 +90,7 @@ function loadData($parent, url, page) { |
|
|
|
|
|
} else if (data.length > 10) {
|
|
|
$parent.append(data);
|
|
|
|
|
|
$parent.closest('.fav-type').find('.fav-content-loading').remove();
|
|
|
if (url === 'favBrand') {
|
|
|
initSwiper();//如果是收藏品牌需要初始化swiper
|
|
|
|
...
|
...
|
@@ -142,6 +141,7 @@ favTabHammer.on('tap', function(e) { |
|
|
loadData($favProductList, 'favProduct', 1);
|
|
|
}
|
|
|
} else {
|
|
|
brandTab = true;
|
|
|
if ($favBrandList.find('div').length === 0 &&
|
|
|
$favBrandList.closest('.fav-type').find('.fav-null-box').hasClass('hide')) {
|
|
|
loadData($favBrandList, 'favBrand', 1);
|
...
|
...
|
@@ -211,12 +211,13 @@ $(document).scroll(function() { |
|
|
if ($(window).scrollTop() + winH >= $(document).height() - footerH) {
|
|
|
|
|
|
if (brandTab) {
|
|
|
console.log(1);
|
|
|
|
|
|
$brandLoadMore.filter('.hide').removeClass('hide');
|
|
|
|
|
|
if (!brandLockId) {
|
|
|
|
|
|
brandPageId++;
|
|
|
loadData($favBrandList, 'favBrand', brandPageId);
|
|
|
}
|
|
|
|
|
|
} else {
|
...
|
...
|
@@ -224,7 +225,6 @@ $(document).scroll(function() { |
|
|
$loadMore.filter('.hide').removeClass('hide');
|
|
|
|
|
|
if (!lockId) {
|
|
|
console.log(222);
|
|
|
pageId++;
|
|
|
loadData($favProductList, 'favProduct', pageId);
|
|
|
}
|
...
|
...
|
|