|
@@ -18,8 +18,7 @@ var bannerSwiper, |
|
@@ -18,8 +18,7 @@ var bannerSwiper, |
18
|
scH,
|
18
|
scH,
|
19
|
$nav1 = $('#pos-nav'),
|
19
|
$nav1 = $('#pos-nav'),
|
20
|
$nav2 = $('#pos-list'),
|
20
|
$nav2 = $('#pos-list'),
|
21
|
- sTop,
|
|
|
22
|
- toTop = false;
|
21
|
+ sTop;
|
23
|
|
22
|
|
24
|
var tip = require('../plugin/tip'),
|
23
|
var tip = require('../plugin/tip'),
|
25
|
filter = require('../plugin/filter'),
|
24
|
filter = require('../plugin/filter'),
|
|
@@ -240,8 +239,7 @@ function getPageGoods(info) { |
|
@@ -240,8 +239,7 @@ function getPageGoods(info) { |
240
|
nav = navInfo[navType];
|
239
|
nav = navInfo[navType];
|
241
|
|
240
|
|
242
|
// 不需要重新加载并且数据请求结束
|
241
|
// 不需要重新加载并且数据请求结束
|
243
|
- if (nav.end && toTop) {
|
|
|
244
|
- toTop = false;
|
242
|
+ if (nav.end) {
|
245
|
return;
|
243
|
return;
|
246
|
}
|
244
|
}
|
247
|
|
245
|
|
|
@@ -255,7 +253,9 @@ function getPageGoods(info) { |
|
@@ -255,7 +253,9 @@ function getPageGoods(info) { |
255
|
url: info.url,
|
253
|
url: info.url,
|
256
|
data: info.data,
|
254
|
data: info.data,
|
257
|
success: function(data) {
|
255
|
success: function(data) {
|
258
|
- nav.end = true;
|
256
|
+ if (data === '' || (data.list && data.list.length <= 0)) {
|
|
|
257
|
+ nav.end = true;
|
|
|
258
|
+ }
|
259
|
info.callBack(data);
|
259
|
info.callBack(data);
|
260
|
},
|
260
|
},
|
261
|
error: function() {
|
261
|
error: function() {
|
|
@@ -364,11 +364,9 @@ function tabChange(dom, index) { |
|
@@ -364,11 +364,9 @@ function tabChange(dom, index) { |
364
|
$(main).hide();
|
364
|
$(main).hide();
|
365
|
$('#' + activeTab).fadeIn();
|
365
|
$('#' + activeTab).fadeIn();
|
366
|
if (activeTab === 'new-arrival') {
|
366
|
if (activeTab === 'new-arrival') {
|
367
|
- toTop = true;
|
|
|
368
|
newData(isPos ? scrollToNav1 : function() {});
|
367
|
newData(isPos ? scrollToNav1 : function() {});
|
369
|
viewType = 2;
|
368
|
viewType = 2;
|
370
|
} else if (activeTab === 'popularity') {
|
369
|
} else if (activeTab === 'popularity') {
|
371
|
- toTop = true;
|
|
|
372
|
hotData(isPos ? scrollToNav1 : function() {});
|
370
|
hotData(isPos ? scrollToNav1 : function() {});
|
373
|
viewType = 3;
|
371
|
viewType = 3;
|
374
|
} else if (activeTab === 'home-page') {
|
372
|
} else if (activeTab === 'home-page') {
|