Skip to content

Commit 9bd35fb

Browse files
authored
Update index.js
1 parent dada75a commit 9bd35fb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

node/koa/server/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ var config = require(path.resolve('plugins/read-config.js'));
55
var form = require(path.resolve('plugins/form.js'));
66
module.exports = function(a){
77
//获取第一页分页列表
8-
this.pagesList = function(pages, token){
8+
this.pagesList = function(pages,searchKey, token){
99
var options = {
1010
method : 'GET',
1111
timeout : 3000,
12-
uri : config()['rurl'] + '/project/lists/' + pages + '/8',
12+
uri : config()['rurl'] + '/project/lists/' + pages + '/8?searchKey='+searchKey,
1313
headers : {
1414
token : token
1515
}
@@ -28,23 +28,23 @@ module.exports = function(a){
2828
};
2929

3030
//分页列表
31-
this.pageSizes = function(token, page){
31+
this.pageSizes = function(token,searchKey, page){
3232
var options = {
3333
method : 'GET',
3434
timeout : 3000,
35-
uri : config()['rurl'] + '/project/lists/' + page + '/8',
35+
uri : config()['rurl'] + '/project/lists/' + page + '/8?searchKey='+searchKey,
3636
headers : {
3737
token : token
3838
}
3939
};
4040
return request(options);
4141
};
4242
//总页数
43-
this.sizes = function(token){
43+
this.sizes = function(searchKey,token){
4444
var options = {
4545
method : 'GET',
4646
timeout : 3000,
47-
uri : config()['rurl'] + '/project/count',
47+
uri : config()['rurl'] + '/project/count?searchKey='+searchKey,
4848
headers : {
4949
token : token
5050
}
@@ -102,4 +102,4 @@ module.exports = function(a){
102102
};
103103

104104
return this;
105-
}
105+
}

0 commit comments

Comments
 (0)