code review by fei.hong: do add guang info page more goods link params
Showing
5 changed files
with
13 additions
and
2 deletions
@@ -6915,6 +6915,8 @@ function loadData($parent, url, page) { | @@ -6915,6 +6915,8 @@ function loadData($parent, url, page) { | ||
6915 | page: page | 6915 | page: page |
6916 | }, | 6916 | }, |
6917 | success: function(data) { | 6917 | success: function(data) { |
6918 | + var $loadingMask = $parent.closest('.fav-type').find('.fav-content-loading'); | ||
6919 | + | ||
6918 | if (url === 'favBrand') { | 6920 | if (url === 'favBrand') { |
6919 | $brandLoadMore.addClass('hide'); | 6921 | $brandLoadMore.addClass('hide'); |
6920 | } else { | 6922 | } else { |
@@ -6922,9 +6924,16 @@ function loadData($parent, url, page) { | @@ -6922,9 +6924,16 @@ function loadData($parent, url, page) { | ||
6922 | } | 6924 | } |
6923 | 6925 | ||
6924 | if (data === ' ') { | 6926 | if (data === ' ') { |
6925 | - $parent.closest('.fav-type').find('.fav-content-loading').addClass('hide'); | 6927 | + $loadingMask.addClass('hide'); |
6926 | $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); | 6928 | $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); |
6927 | } else if (data === 'end') { | 6929 | } else if (data === 'end') { |
6930 | + | ||
6931 | + //处理data等于end时如果loadingMask存在且没有hide样式的情况 | ||
6932 | + if ($loadingMask && !$loadingMask.hasClass('hide')) { | ||
6933 | + $loadingMask.addClass('hide'); | ||
6934 | + $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); | ||
6935 | + } | ||
6936 | + | ||
6928 | $parent.closest('.fav-type').find('.fav-load-background') | 6937 | $parent.closest('.fav-type').find('.fav-load-background') |
6929 | .removeClass('fav-load-background').html('没有更多了'); | 6938 | .removeClass('fav-load-background').html('没有更多了'); |
6930 | 6939 | ||
@@ -6933,7 +6942,9 @@ function loadData($parent, url, page) { | @@ -6933,7 +6942,9 @@ function loadData($parent, url, page) { | ||
6933 | lockId = true; | 6942 | lockId = true; |
6934 | } else if (data.length > 10) { | 6943 | } else if (data.length > 10) { |
6935 | $parent.append(data); | 6944 | $parent.append(data); |
6936 | - $parent.closest('.fav-type').find('.fav-content-loading').remove(); | 6945 | + |
6946 | + //如果有数据loadingMask会被remove掉 | ||
6947 | + $loadingMask.remove(); | ||
6937 | if (url === 'favBrand') { | 6948 | if (url === 'favBrand') { |
6938 | initSwiper(data);//如果是收藏品牌需要初始化swiper | 6949 | initSwiper(data);//如果是收藏品牌需要初始化swiper |
6939 | 6950 |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
-
Please register or login to post a comment