...
|
...
|
@@ -18,8 +18,7 @@ var bannerSwiper, |
|
|
scH,
|
|
|
$nav1 = $('#pos-nav'),
|
|
|
$nav2 = $('#pos-list'),
|
|
|
sTop,
|
|
|
toTop = false;
|
|
|
sTop;
|
|
|
|
|
|
var tip = require('../plugin/tip'),
|
|
|
filter = require('../plugin/filter'),
|
...
|
...
|
@@ -240,8 +239,7 @@ function getPageGoods(info) { |
|
|
nav = navInfo[navType];
|
|
|
|
|
|
// 不需要重新加载并且数据请求结束
|
|
|
if (nav.end && toTop) {
|
|
|
toTop = false;
|
|
|
if (nav.end) {
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -255,7 +253,9 @@ function getPageGoods(info) { |
|
|
url: info.url,
|
|
|
data: info.data,
|
|
|
success: function(data) {
|
|
|
nav.end = true;
|
|
|
if (data === '' || (data.list && data.list.length <= 0)) {
|
|
|
nav.end = true;
|
|
|
}
|
|
|
info.callBack(data);
|
|
|
},
|
|
|
error: function() {
|
...
|
...
|
@@ -364,11 +364,9 @@ function tabChange(dom, index) { |
|
|
$(main).hide();
|
|
|
$('#' + activeTab).fadeIn();
|
|
|
if (activeTab === 'new-arrival') {
|
|
|
toTop = true;
|
|
|
newData(isPos ? scrollToNav1 : function() {});
|
|
|
viewType = 2;
|
|
|
} else if (activeTab === 'popularity') {
|
|
|
toTop = true;
|
|
|
hotData(isPos ? scrollToNav1 : function() {});
|
|
|
viewType = 3;
|
|
|
} else if (activeTab === 'home-page') {
|
...
|
...
|
|