Showing
2 changed files
with
10 additions
and
6 deletions
@@ -212,19 +212,21 @@ function loadMore($container, opt, url) { | @@ -212,19 +212,21 @@ function loadMore($container, opt, url) { | ||
212 | success: function(data) { | 212 | success: function(data) { |
213 | let $newItems; | 213 | let $newItems; |
214 | 214 | ||
215 | + $loading.addClass('hide'); | ||
216 | + | ||
215 | if (data === ' ') { | 217 | if (data === ' ') { |
216 | opt.end = true; | 218 | opt.end = true; |
217 | searching = false; | 219 | searching = false; |
218 | - | ||
219 | - // | ||
220 | - $loading.addClass('hide'); | ||
221 | $noMore.removeClass('hide'); | 220 | $noMore.removeClass('hide'); |
222 | - | ||
223 | return; | 221 | return; |
224 | } | 222 | } |
225 | 223 | ||
226 | let $data = $(data); | 224 | let $data = $(data); |
227 | 225 | ||
226 | + if ($data.length < 4) { | ||
227 | + $noMore.removeClass('hide'); | ||
228 | + } | ||
229 | + | ||
228 | productlistWith($data); | 230 | productlistWith($data); |
229 | $container.append($data); | 231 | $container.append($data); |
230 | 232 | ||
@@ -247,8 +249,6 @@ function loadMore($container, opt, url) { | @@ -247,8 +249,6 @@ function loadMore($container, opt, url) { | ||
247 | if (opt.page === 1) { | 249 | if (opt.page === 1) { |
248 | loading.hideLoadingMask(); | 250 | loading.hideLoadingMask(); |
249 | 251 | ||
250 | - $loading.removeClass('hide');// 显示空屏加载时hide的隐藏 | ||
251 | - | ||
252 | getDynamicData.getDynamicData(); | 252 | getDynamicData.getDynamicData(); |
253 | window.rePosFooter();// 插入内容后重新计算底部位置 | 253 | window.rePosFooter();// 插入内容后重新计算底部位置 |
254 | } | 254 | } |
-
Please register or login to post a comment