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
7865fd43
Commit
7865fd43
authored
Mar 24, 2022
by
陈思聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 阿里接口支持Post请求
parent
1c4a46c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
+24
-1
igirl-channel/app/base/api/impl/action/tradetransfer.js
+11
-1
igirl-channel/app/base/utils/aliyunClient.js
+13
-0
No files found.
igirl-channel/app/base/api/impl/action/tradetransfer.js
View file @
7865fd43
...
...
@@ -94,9 +94,19 @@ class TradetransferAPI extends APIBase {
async
aliclienttransfer
(
p
,
obj
)
{
console
.
log
(
"----------------sssssssssssssssssss-------------------------------------------"
)
console
.
log
(
p
.
actionBody
)
console
.
log
(
p
.
method
)
if
(
p
.
actionBody
)
{
console
.
log
(
p
.
actionBody
)
var
rtn
=
await
this
.
aliclient
.
reqbyget
(
p
.
actionBody
)
var
rtn
=
null
;
try
{
if
(
p
.
method
==
'POST'
){
rtn
=
await
this
.
aliclient
.
reqbypost
(
p
.
actionBody
)
}
else
{
rtn
=
await
this
.
aliclient
.
reqbyget
(
p
.
actionBody
)
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
console
.
log
(
"after call ali......................................form igirl-channel..."
)
console
.
log
(
rtn
)
return
rtn
;
...
...
igirl-channel/app/base/utils/aliyunClient.js
View file @
7865fd43
...
...
@@ -48,6 +48,19 @@ class aliyunClient {
});
}
async
reqbypost
(
obj
,
cbk
)
{
var
self
=
this
;
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
return
self
.
aliclient
.
request
(
action
,
reqbody
,
{
timeout
:
3000
,
// default 3000 ms
formatAction
:
true
,
// default true, format the action to Action
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
method
:
'POST'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
});
}
// async getCreateOrderNum() {
// var createOrderNum = await this.getUidStr(5, 36);//====================订单号生成
...
...
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