forked from ss1121/FKP-REST
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregion.js
More file actions
43 lines (37 loc) · 867 Bytes
/
region.js
File metadata and controls
43 lines (37 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var path = require('path')
var libs = require('../libs/libs')
var api = require('../apis/javaapi');
/**
* Module dependencies.
*/
var api = require('../apis/javaapi');
//加密
function *getRegion(code, secret) {
//方法类型
var mtd = this.method;
//取值参数
var postdata = {
"common": {
"session": "11",
"uid": 1
},
"content": [
{
"parent_id": "440000"
}
]
}
//更具传入参数,修正取值参数
var body = yield libs.$parse(this);
if(body){
if(body.parent_id){
postdata.content[0].parent_id = body.parent_id;
}
}
var address = yield api.pullApiData('region', postdata, 'post');
// console.log(address[1]);
return address[1];
}
module.exports = {
getRegion: getRegion
}