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
efbfaf40
Commit
efbfaf40
authored
Mar 16, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加日志
parent
d162153b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
+0
-0
center-channel/app/base/utils/baiduClient.js
+6
-6
No files found.
center-channel/app/base/service/impl/common/baseCenterOrderSve.js
View file @
efbfaf40
This diff is collapsed.
Click to expand it.
center-channel/app/base/utils/baiduClient.js
View file @
efbfaf40
...
...
@@ -14,7 +14,7 @@ class baiduClient extends AppServiceBase {
//2020 1027 laolan 调用百度网关
async
baiduPost
(
path
,
actionBody
)
{
console
.
log
(
'actionBody++'
,
actionBody
)
console
.
log
(
'
baiduPost-
actionBody++'
,
actionBody
)
let
domain
=
this
.
baiduClientParams
.
domain
;
let
url
=
domain
+
path
;
let
version
=
"bce-auth-v1"
;
...
...
@@ -27,8 +27,8 @@ class baiduClient extends AppServiceBase {
let
extime
=
1800
;
let
canonicalHeaders
=
"host:"
+
this
.
baiduClientParams
.
host
;
//中间结果1:规范化请求和前缀字符串
var
canonicalRequest
=
null
var
pathParams
=
path
.
split
(
"?"
);
let
canonicalRequest
=
null
let
pathParams
=
path
.
split
(
"?"
);
if
(
pathParams
&&
pathParams
.
length
>
1
)
{
canonicalRequest
=
"POST"
+
"
\
n"
+
pathParams
[
0
]
+
"
\
n"
+
pathParams
[
1
]
+
"
\
n"
+
canonicalHeaders
;
}
else
{
...
...
@@ -48,17 +48,17 @@ class baiduClient extends AppServiceBase {
.
digest
(
'hex'
);
//最终结果:认证字符串 authorization
let
authorization
=
authStringPrefix
+
"/"
+
signedHeaders
+
"/"
+
signature
;
var
baiduObj
=
{
let
baiduObj
=
{
authorization
:
authorization
,
data
:
actionBody
}
var
rtn
=
await
this
.
execClient
.
execBaiduPost
(
baiduObj
,
url
);
let
rtn
=
await
this
.
execClient
.
execBaiduPost
(
baiduObj
,
url
);
this
.
execClientNew
.
execLogs
(
`baiduClient-baiduPost-result:url=
${
url
}
`
,
baiduObj
,
"center-channel-opBaiduClientPost"
,
rtn
,
null
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
this
.
execClientNew
.
execLogs
(
`baiduClient-opBaiduClientPost-result:url=
${
url
}
`
,
actionBody
,
"center-channel-opBaiduClientPost"
,
null
,
rtn
);
return
system
.
getResult
(
null
,
rtn
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
let
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
...
...
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