Authored by hf

fixes bug to home maylike first page do not show images

@@ -66,7 +66,8 @@ $(window).scroll(function () { @@ -66,7 +66,8 @@ $(window).scroll(function () {
66 return; 66 return;
67 } 67 }
68 loading = true; 68 loading = true;
69 - num = $goodList.children('.good-info').length; 69 +
  70 + //num = $goodList.find('.good-info').length;
70 $.ajax({ 71 $.ajax({
71 type: 'GET', 72 type: 'GET',
72 url: url, 73 url: url,
@@ -100,11 +101,16 @@ $(window).scroll(function () { @@ -100,11 +101,16 @@ $(window).scroll(function () {
100 return; 101 return;
101 } 102 }
102 103
103 - $goodList.append(data);  
104 num = $goodList.find('.good-info').length; 104 num = $goodList.find('.good-info').length;
105 105
106 - //lazyLoad  
107 - lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy')); 106 + $goodList.append(data);
  107 +
  108 + // 2015/10/31 fei.hong: 修复第一页分页不显示图片的问题
  109 + if (num === 0) {
  110 + lazyLoad($goodList.children('.good-info').find('img.lazy'));
  111 + } else {
  112 + lazyLoad($goodList.children('.good-info:gt(' + (num - 1) + ')').find('img.lazy'));
  113 + }
108 114
109 loading = false; 115 loading = false;
110 page++; 116 page++;