...
|
...
|
@@ -18,7 +18,6 @@ var $ = require('jquery'), |
|
|
scH,
|
|
|
$nav1 = $('#pos-nav'),
|
|
|
$nav2 = $('#pos-list'),
|
|
|
$homePage = $('.discount-area'),
|
|
|
sTop;
|
|
|
|
|
|
var tip = require('../plugin/tip'),
|
...
|
...
|
@@ -111,15 +110,31 @@ if ($('.multi-browse').find('li').size() > 1) { |
|
|
}
|
|
|
|
|
|
function getPageGoods(info) {
|
|
|
var nav,navType;
|
|
|
|
|
|
if (searching) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
navType = info.data.type;
|
|
|
nav = navInfo[navType];
|
|
|
|
|
|
//不需要重新加载并且数据请求结束
|
|
|
if (nav.end) {
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
searching = true;
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: info.url,
|
|
|
data: info.data,
|
|
|
success: function(data) {
|
|
|
if (data === ' ') {
|
|
|
nav.end = true;
|
|
|
}
|
|
|
|
|
|
info.callBack(data);
|
|
|
},
|
|
|
error: function() {
|
...
|
...
|
@@ -661,11 +676,9 @@ function scrollHandler() { |
|
|
}
|
|
|
|
|
|
//srcoll to load more
|
|
|
if ($homePage.length > 0) {
|
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
}
|
|
|
$(window).scroll(function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
|
|
|
|
|
|
//初始请求最新第一页数据
|
...
|
...
|
|