Authored by weiqingting

解决YBW-2991问题

@@ -95,14 +95,19 @@ module.exports = function(data) { @@ -95,14 +95,19 @@ module.exports = function(data) {
95 var load = new InfiniteLoad({ 95 var load = new InfiniteLoad({
96 offset: { 96 offset: {
97 height: function() { 97 height: function() {
98 - return parseFloat($container.offset().top) + parseFloat($container.height()); 98 + return parseFloat($container.offset().top) + parseFloat($container.height())-200;
99 } 99 }
100 } 100 }
101 }); 101 });
102 var options; 102 var options;
103 var url = data.url; 103 var url = data.url;
  104 + var firstCount = data.firstCount;
  105 + var pageCount=data.pageCount;
104 106
105 delete data.url; 107 delete data.url;
  108 + delete data.firstCount;
  109 + delete data.pageCount;
  110 +
106 111
107 112
108 load.on('after', function(p) { 113 load.on('after', function(p) {
@@ -111,6 +116,8 @@ module.exports = function(data) { @@ -111,6 +116,8 @@ module.exports = function(data) {
111 pageIndex: p.index 116 pageIndex: p.index
112 }); 117 });
113 118
  119 + data.pageCount = (data.pageIndex == 1) ? firstCount : pageCount;
  120 +
114 options = { 121 options = {
115 type: 'POST', 122 type: 'POST',
116 url: url, 123 url: url,
@@ -24,7 +24,8 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) { @@ -24,7 +24,8 @@ if ($.inArray(homePage, ['boys','girls','kids','lifestyle']) > -1) {
24 require('../common/new-arrivls')({ 24 require('../common/new-arrivls')({
25 type: homePage, 25 type: homePage,
26 url: '/common/getNewArrival', 26 url: '/common/getNewArrival',
27 - pageCount: homePage === 'boys' ? '15' : '20' 27 + firstCount: homePage === ('boys' || 'lifestyle') ? '25' : '20',
  28 + pageCount: homePage === ('boys' || 'lifestyle') ? '15' : '12'
28 }); 29 });
29 } 30 }
30 31