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
92613d99
Commit
92613d99
authored
May 19, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
e202d16f
cf72ac3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
center-channel/app/config/routes/api.js
+13
-16
No files found.
center-channel/app/config/routes/api.js
View file @
92613d99
...
@@ -12,6 +12,19 @@ const settings = require("../../config/settings");
...
@@ -12,6 +12,19 @@ const settings = require("../../config/settings");
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
//-----------------------新的模式---------web---------开始
//-----------------------新的模式---------web---------开始
//手动获取签名sign方法
app
.
use
(
'/op/sign/creatSign'
,
async
function
(
req
,
res
)
{
if
(
!
req
.
body
.
key
)
{
return
res
.
end
({
code
:
-
200
,
message
:
"缺少加签秘钥key参数"
});
}
if
(
!
req
.
body
.
obj
)
{
return
res
.
end
({
code
:
-
200
,
message
:
"缺少obj参数"
});
}
let
obj
=
req
.
body
.
obj
;
let
key
=
req
.
body
.
key
;
let
result
=
await
signSve
.
createSign
(
obj
,
key
);
return
res
.
end
(
JSON
.
stringify
(
result
));
});
app
.
use
(
'/tlpay/aliPayNotify'
,
async
function
(
req
,
res
)
{
//钉钉接入的搁浅
app
.
use
(
'/tlpay/aliPayNotify'
,
async
function
(
req
,
res
)
{
//钉钉接入的搁浅
try
{
try
{
var
client_ip
=
system
.
get_client_ip
(
req
);
var
client_ip
=
system
.
get_client_ip
(
req
);
...
@@ -393,22 +406,6 @@ module.exports = function (app) {
...
@@ -393,22 +406,6 @@ module.exports = function (app) {
//-----------------------新的模式---------api---------开始
//-----------------------新的模式---------api---------开始
//手动获取签名sign方法
app
.
use
(
"/op/sign/creatSign"
,
async
function
(
req
,
res
)
{
if
(
!
req
.
body
.
key
)
{
res
.
end
({
code
:
-
200
,
message
:
"缺少加签秘钥key参数"
});
return
;
}
if
(
!
req
.
body
.
obj
)
{
res
.
end
({
code
:
-
200
,
message
:
"缺少obj参数"
});
return
;
}
let
obj
=
req
.
body
.
obj
;
let
key
=
req
.
body
.
key
;
let
result
=
await
signSve
.
createSign
(
obj
,
key
);
res
.
end
(
JSON
.
stringify
(
result
));
return
;
});
app
.
all
(
"/api/*"
,
async
function
(
req
,
res
,
next
)
{
app
.
all
(
"/api/*"
,
async
function
(
req
,
res
,
next
)
{
let
result
=
system
.
getResult
(
null
,
"req method must is post"
);
let
result
=
system
.
getResult
(
null
,
"req method must is post"
);
if
(
req
.
method
!=
"POST"
)
{
if
(
req
.
method
!=
"POST"
)
{
...
...
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