|
@@ -4,7 +4,7 @@ var $ = require('yoho.jquery'); |
|
@@ -4,7 +4,7 @@ var $ = require('yoho.jquery'); |
4
|
var Handlebars = require('yoho.handlebars');
|
4
|
var Handlebars = require('yoho.handlebars');
|
5
|
var InfiniteLoad = require('../common/infinite-load');
|
5
|
var InfiniteLoad = require('../common/infinite-load');
|
6
|
|
6
|
|
7
|
-module.exports=function(url,data){
|
7
|
+module.exports = function(url, data) {
|
8
|
var $container = $('#newarrivals ul');
|
8
|
var $container = $('#newarrivals ul');
|
9
|
var $load = $('.loading a');
|
9
|
var $load = $('.loading a');
|
10
|
var load = new InfiniteLoad({
|
10
|
var load = new InfiniteLoad({
|
|
@@ -14,11 +14,15 @@ module.exports=function(url,data){ |
|
@@ -14,11 +14,15 @@ module.exports=function(url,data){ |
14
|
}
|
14
|
}
|
15
|
}
|
15
|
}
|
16
|
});
|
16
|
});
|
|
|
17
|
+ var options;
|
17
|
|
18
|
|
18
|
load.on('after', function(p) {
|
19
|
load.on('after', function(p) {
|
19
|
|
20
|
|
20
|
- data=$.extend({},data,{pageIndex: p.index});
|
|
|
21
|
- var options = {
|
21
|
+ data = $.extend({}, data, {
|
|
|
22
|
+ pageIndex: p.index
|
|
|
23
|
+ });
|
|
|
24
|
+
|
|
|
25
|
+ options = {
|
22
|
type: 'POST',
|
26
|
type: 'POST',
|
23
|
url: url,
|
27
|
url: url,
|
24
|
data: data,
|
28
|
data: data,
|
|
@@ -72,7 +76,4 @@ module.exports=function(url,data){ |
|
@@ -72,7 +76,4 @@ module.exports=function(url,data){ |
72
|
});
|
76
|
});
|
73
|
|
77
|
|
74
|
load.init();
|
78
|
load.init();
|
75
|
-}
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
- |
79
|
+}; |