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
e9260028
Commit
e9260028
authored
Nov 03, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
res
parent
bf011d7d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
31 deletions
+102
-31
center-channel/app/base/api/impl/icp/consultation.js
+15
-8
center-channel/app/base/api/impl/icp/feedback.js
+9
-8
center-channel/app/base/api/impl/icp/order.js
+16
-8
center-channel/app/base/service/impl/common/signSve.js
+7
-5
center-channel/app/front/entry/public/apidoc/README.md
+4
-2
center-channel/app/front/entry/public/apidoc/platform/baiduIcp.md
+51
-0
No files found.
center-channel/app/base/api/impl/icp/consultation.js
View file @
e9260028
...
@@ -19,19 +19,20 @@ class Consultation extends APIBase {
...
@@ -19,19 +19,20 @@ class Consultation extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
@@ -50,6 +51,12 @@ class Consultation extends APIBase {
...
@@ -50,6 +51,12 @@ class Consultation extends APIBase {
if
(
!
pobj
.
consultType
)
{
if
(
!
pobj
.
consultType
)
{
return
self
.
getResultFail
(
"consultType不能为空"
);
return
self
.
getResultFail
(
"consultType不能为空"
);
}
}
if
(
pobj
.
consultType
==
"ICP"
)
{
pobj
.
consultType
=
"5"
;
}
if
(
pobj
.
consultType
==
"EDI"
)
{
pobj
.
consultType
=
"7"
;
}
pobj
.
type
=
pobj
.
consultType
;
pobj
.
type
=
pobj
.
consultType
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
action_type
=
"submitIcpNeed"
;
pobj
.
action_type
=
"submitIcpNeed"
;
...
...
center-channel/app/base/api/impl/icp/feedback.js
View file @
e9260028
...
@@ -19,19 +19,20 @@ class Feedback extends APIBase {
...
@@ -19,19 +19,20 @@ class Feedback extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
...
center-channel/app/base/api/impl/icp/order.js
View file @
e9260028
...
@@ -19,19 +19,20 @@ class Order extends APIBase {
...
@@ -19,19 +19,20 @@ class Order extends APIBase {
}
}
getResultSuccess
(
requestId
)
{
getResultSuccess
(
requestId
)
{
return
{
return
{
"
requestId"
:
requestId
,
"
status"
:
0
,
"
success"
:
true
,
"
msg"
:
"success"
,
"
errorMsg"
:
""
,
"
data"
:
null
,
"
errorCode"
:
"ok"
"
requestId"
:
requestId
}
}
;
}
}
getResultFail
(
errmsg
)
{
getResultFail
(
errmsg
)
{
var
self
=
this
;
var
self
=
this
;
return
{
return
{
"status"
:
-
1
,
"msg"
:
errmsg
,
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"data"
:
null
,
"errorMsg"
:
errmsg
,
"bizmsg"
:
"empty"
"errorCode"
:
"ok"
};
};
}
}
...
@@ -57,6 +58,13 @@ class Order extends APIBase {
...
@@ -57,6 +58,13 @@ class Order extends APIBase {
}
}
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
if
(
pobj
.
isDirectBuy
==
1
&&
!
pobj
.
consultType
)
{
return
self
.
getResultFail
(
"直接下单consultType不能为空"
);
return
self
.
getResultFail
(
"直接下单consultType不能为空"
);
}
else
{
if
(
pobj
.
consultType
==
"ICP"
)
{
pobj
.
consultType
=
"5"
;
}
if
(
pobj
.
consultType
==
"EDI"
)
{
pobj
.
consultType
=
"7"
;
}
}
}
pobj
.
action_type
=
"icpOrderStatus"
;
pobj
.
action_type
=
"icpOrderStatus"
;
var
param
=
{
var
param
=
{
...
...
center-channel/app/base/service/impl/common/signSve.js
View file @
e9260028
...
@@ -103,11 +103,13 @@ class SignService{
...
@@ -103,11 +103,13 @@ class SignService{
module
.
exports
=
SignService
;
module
.
exports
=
SignService
;
// var task = new SignService();
// var task = new SignService();
// var obj = {
// var obj = {
// "bizId":"ICP202010221032hhvcUV2",
// "intentionBizId": "TRE-nmnHtEoTjeEtest",
// "isDirectBuy":"0",
// "phone": "13126673246",
// "orderNo":"ICPO20201022103hhvcUV2"
// "userName": "",
// ,"sign": "4F598C56E565628107B5A9A851D4B6A4"
// "description": "111111",
// };
// "area": "BEIJING",
// "consultType": "EDI"
// };
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// task.createSign(obj,"7cbb892450174167b5c7e01we4716t51").then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!");
// });
// });
center-channel/app/front/entry/public/apidoc/README.md
View file @
e9260028
...
@@ -67,4 +67,6 @@
...
@@ -67,4 +67,6 @@
1
[
需求相关接口
](
doc/api/platform/opNeed.md
)
1
[
需求相关接口
](
doc/api/platform/opNeed.md
)
## 21. 诊断运营端相关接口
## 21. 诊断运营端相关接口
1
[
诊断运营端相关接口
](
doc/api/appDesc/diagnosisneedbusDesc.md
)
1
[
诊断运营端相关接口
](
doc/api/appDesc/diagnosisneedbusDesc.md
)
\ No newline at end of file
## 22. 百度ICP对接相关接口
1
[
ICP订单接口
](
doc/api/platform/baiduIcp.md
)
\ No newline at end of file
center-channel/app/front/entry/public/apidoc/platform/baiduIcp.md
0 → 100644
View file @
e9260028
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
接口调用说明
](
#interfaceDesc
)
1.
[
同步需求给服务商
](
#consultationsubmit
)
## **<a name="interfaceDesc"> 接口调用说明</a>**
[
返回到目录
](
#menu
)
##### 接口描述
统一的接口调用,调用其他接口参考此示例
#### sign签名规则
所有请求参数(去除sign参数)首字符进行ASCII正序排序,对排序后的参数值进行签名,如:area=1&consultType=5&description=需求测试_001&intentionBizIdI=20200320201737000001&phone=13800138000&userName=李四
其中参数值拼接后最后在加上key,key为获取的密钥信息,拼接后字符串:
area=1&consultType=5&description=需求测试_001&intentionBizIdI=20200320201737000001&phone=13800138000&userName=李四&key=7cbb892450174167b5c7e01we4716t51
之后对拼接的字符串进行md5加密就得到sign值
## **<a name="consultationsubmit"> 同步需求给服务商</a>**
[
返回到目录
](
#menu
)
##### 接⼝描述
合作方⽤户提交服务咨询后(需求订单),调⽤服务商接⼝提交服务咨询信息
##### URL
[
/api/icp/consultation/submit
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加appkey的值
#### 请求参数
#### 参数示例
```
javascript
{
"intentionBizId"
:
"zhuangbingceshi008"
,
"phone"
:
"13075556693"
,
"userName"
:
"庄冰"
,
"description"
:
"1111111111111222"
,
"area"
:
"1"
,
"consultType"
:
5
,
"sign"
:
"2713C75F75B0713E525EEB39BB7D5BD3"
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
// 0为成功,否则失败
"msg"
:
"success"
,
"data"
:
null
,
"requestId"
:
"a277fb799d9f4dda9053fb8830f9d252"
}
```
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