maybe-like loadmore js
Showing
1 changed file
with
8 additions
and
3 deletions
@@ -67,7 +67,8 @@ $('.goods-list').delegate('.good-islike', 'touchstart', function(e) { | @@ -67,7 +67,8 @@ $('.goods-list').delegate('.good-islike', 'touchstart', function(e) { | ||
67 | 67 | ||
68 | //srcoll to load more | 68 | //srcoll to load more |
69 | $(window).scroll(function() { | 69 | $(window).scroll(function() { |
70 | - var num; | 70 | + var num, |
71 | + ajaxUrl; | ||
71 | if (end || loading) { | 72 | if (end || loading) { |
72 | return; | 73 | return; |
73 | } | 74 | } |
@@ -78,11 +79,15 @@ $(window).scroll(function() { | @@ -78,11 +79,15 @@ $(window).scroll(function() { | ||
78 | 79 | ||
79 | loading = true; | 80 | loading = true; |
80 | num = $goodList.children('.good-info').length; | 81 | num = $goodList.children('.good-info').length; |
82 | + if ($('.mobile-wrap').hasClass('.boys-wrap')) { | ||
83 | + ajaxUrl = '/index/getmore'; | ||
84 | + } else { | ||
85 | + ajaxUrl = '/girl/getmore'; | ||
86 | + } | ||
81 | $.ajax({ | 87 | $.ajax({ |
82 | type: 'GET', | 88 | type: 'GET', |
83 | - url: '/goods/more', | 89 | + url: ajaxUrl, |
84 | data: { | 90 | data: { |
85 | - gender: 0, //性别 | ||
86 | page: page + 1 | 91 | page: page + 1 |
87 | } | 92 | } |
88 | }).then(function(data) { | 93 | }).then(function(data) { |
-
Please register or login to post a comment