Authored by 梁志锋

update

@@ -11,18 +11,17 @@ var $ = require('yoho.zepto'), @@ -11,18 +11,17 @@ var $ = require('yoho.zepto'),
11 trendTopicSwiper, 11 trendTopicSwiper,
12 goodsSwiper; 12 goodsSwiper;
13 13
14 -require('./maybe-like');  
15 -  
16 -var swiperClass;  
17 -  
18 var requestFrame, 14 var requestFrame,
19 thisFunc, 15 thisFunc,
20 start = 0, 16 start = 0,
21 i, 17 i,
  18 + swiperClass,
22 supportCss3, 19 supportCss3,
23 $logotrans = $('.home-header .logo'), 20 $logotrans = $('.home-header .logo'),
24 isen = true; 21 isen = true;
25 22
  23 +require('./maybe-like');
  24 +
26 lazyLoad($('img.lazy')); 25 lazyLoad($('img.lazy'));
27 26
28 //$('img:in-viewport').trigger('appear'); 27 //$('img:in-viewport').trigger('appear');
@@ -10,17 +10,14 @@ var $ = require('yoho.zepto'), @@ -10,17 +10,14 @@ var $ = require('yoho.zepto'),
10 10
11 var winH = $(window).height(), 11 var winH = $(window).height(),
12 loadMoreH = $('#load-more').height(), 12 loadMoreH = $('#load-more').height(),
  13 + $goodList = $('#goods-list'),
13 loading = false, 14 loading = false,
14 end = false, 15 end = false,
15 page = 0, 16 page = 0,
16 - gender = '', 17 + gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3',
17 num, 18 num,
18 res; 19 res;
19 20
20 -gender = $('.mobile-wrap').hasClass('boys-wrap') ? '1,3' : '2,3';  
21 -  
22 -var $goodList = $('#goods-list');  
23 -  
24 //srcoll to load more 21 //srcoll to load more
25 $(window).scroll(function () { 22 $(window).scroll(function () {
26 if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) { 23 if ($(window).scrollTop() + winH >= $(document).height() - loadMoreH) {
@@ -28,7 +25,7 @@ $(window).scroll(function () { @@ -28,7 +25,7 @@ $(window).scroll(function () {
28 num = $goodList.children('.good-info').length; 25 num = $goodList.children('.good-info').length;
29 $.ajax({ 26 $.ajax({
30 type: 'GET', 27 type: 'GET',
31 - url: '/product/recom/maylike?gender='+gender, 28 + url: '/product/recom/maylike?gender=' + gender,
32 data: { 29 data: {
33 page: page + 1 30 page: page + 1
34 }, 31 },
@@ -56,5 +53,4 @@ $(window).scroll(function () { @@ -56,5 +53,4 @@ $(window).scroll(function () {
56 }); 53 });
57 } 54 }
58 55
59 -  
60 }); 56 });