...
|
...
|
@@ -79,6 +79,8 @@ function loadData($parent, url, page) { |
|
|
page: page
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var $loadingMask = $parent.closest('.fav-type').find('.fav-content-loading');
|
|
|
|
|
|
if (url === 'favBrand') {
|
|
|
$brandLoadMore.addClass('hide');
|
|
|
} else {
|
...
|
...
|
@@ -86,9 +88,16 @@ function loadData($parent, url, page) { |
|
|
}
|
|
|
|
|
|
if (data === ' ') {
|
|
|
$parent.closest('.fav-type').find('.fav-content-loading').addClass('hide');
|
|
|
$loadingMask.addClass('hide');
|
|
|
$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
|
|
|
} else if (data === 'end') {
|
|
|
|
|
|
//处理data等于end时如果loadingMask存在且没有hide样式的情况
|
|
|
if ($loadingMask && !$loadingMask.hasClass('hide')) {
|
|
|
$loadingMask.addClass('hide');
|
|
|
$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
|
|
|
}
|
|
|
|
|
|
$parent.closest('.fav-type').find('.fav-load-background')
|
|
|
.removeClass('fav-load-background').html('没有更多了');
|
|
|
|
...
|
...
|
@@ -97,7 +106,9 @@ function loadData($parent, url, page) { |
|
|
lockId = true;
|
|
|
} else if (data.length > 10) {
|
|
|
$parent.append(data);
|
|
|
$parent.closest('.fav-type').find('.fav-content-loading').remove();
|
|
|
|
|
|
//如果有数据loadingMask会被remove掉
|
|
|
$loadingMask.remove();
|
|
|
if (url === 'favBrand') {
|
|
|
initSwiper(data);//如果是收藏品牌需要初始化swiper
|
|
|
|
...
|
...
|
|