Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
9d45dc13
Commit
9d45dc13
authored
Feb 10, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
bd8eaaad
e39a50a7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
2 deletions
+125
-2
center-channel/app/base/api/impl/action/policy.js
+43
-0
center-channel/app/base/service/impl/policy/policySve.js
+15
-0
center-channel/app/front/entry/public/apidoc/README.md
+4
-2
center-channel/app/front/entry/public/apidoc/platform/policy.md
+63
-0
No files found.
center-channel/app/base/api/impl/action/policy.js
0 → 100644
View file @
9d45dc13
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
class
PolicyAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
policySve
=
system
.
getObject
(
"service.policy.policySve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionProcess
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_process
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
// sy
case
"test"
:
//测试
opResult
=
system
.
getResultSuccess
(
null
,
"测试成功"
);
break
;
case
"policyQuery"
:
//政策检索
opResult
=
await
this
.
policySve
.
policyQuery
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
PolicyAPI
;
\ No newline at end of file
center-channel/app/base/service/impl/policy/policySve.js
0 → 100644
View file @
9d45dc13
const
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PolicyService
{
constructor
()
{
this
.
centerOrderUrl
=
settings
.
centerOrderUrl
();
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
};
async
policyQuery
(
pobj
)
{
var
url
=
this
.
centerOrderUrl
+
"action/policy/springBoard"
;
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
return
data
;
}
}
module
.
exports
=
PolicyService
;
center-channel/app/front/entry/public/apidoc/README.md
View file @
9d45dc13
...
...
@@ -32,4 +32,6 @@
1
[
产品中心接口
](
doc/api/platform/product.md
)
## 8. 订单中心相关接口
1
[
订单中心接口
](
doc/api/platform/order.md
)
\ No newline at end of file
1
[
订单中心接口
](
doc/api/platform/order.md
)
## 9. 政策相关接口
1
[
政策接口
](
doc/api/platform/policy.md
)
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/platform/policy.md
0 → 100644
View file @
9d45dc13
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
政策检索
](
#policyQuery
)
## **<a name="policyQuery"> 政策检索</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/action/policy/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:policyQuery
```
javascript
{
"actionType"
:
"policyQuery"
,
"actionBody"
:
{
"policyName"
:
"北京市"
,
"policyProvince"
:
"北京市"
,
"policyCity"
:
"北京市"
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:{
"rlzy"
:[
{
"policyType"
:
"rlzy"
,
"policyTypeName"
:
"人力资源"
,
"policyDate"
:
"2020-02-05T14:14:24.000Z"
,
"policyContent"
:
null
,
"policyCity"
:
"北京市"
,
"policyProvince"
:
"北京市"
,
"policyLinkUrl"
:
"http://www.beijing.gov.cn/zhengce/zhengcefagui/202002/t20200206_1625493.html"
,
"policySource"
:
"京政办发〔2020〕7号"
,
"policyName"
:
"北京市人民政府办公厅关于应对新型冠状病毒感染的肺炎疫情影响促进中小微企业持续健康发展的若干措施
北京市人民政府办公厅关于应对新型冠状病毒感染的肺炎疫情影响促进中小微企业持续健康发展的若干措施"
,
"policyNo"
:
"bj001"
}
],
"fzbt"
:[
],
"jrdk"
:[
],
"zdfc"
:[
],
"ssjm"
:[
]
},
"requestId"
:
"2c1ebf037aed4b30aa8e497c7a151a8e"
}
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment