|
@@ -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
|
}); |