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
9c3f2a33
Commit
9c3f2a33
authored
Nov 03, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
99dcadf4
47810bfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
center-channel/app/config/routes/api.js
+8
-0
center-channel/app/config/settings.js
+2
-2
No files found.
center-channel/app/config/routes/api.js
View file @
9c3f2a33
...
...
@@ -410,6 +410,13 @@ module.exports = function (app) {
res
.
end
(
JSON
.
stringify
(
result
));
return
;
}
var
sign
=
req
.
headers
[
"sign"
]
||
""
;
if
(
!
sign
)
{
result
.
msg
=
"req headers sign can not be empty"
;
result
.
data
=
null
;
res
.
end
(
JSON
.
stringify
(
result
));
return
;
}
//1.通过appkey 获取appInfo
var
appRes
=
await
signSve
.
getAppInfoByAppKey
(
appkey
);
if
(
!
appRes
||
appRes
.
status
!=
0
){
...
...
@@ -420,6 +427,7 @@ module.exports = function (app) {
}
var
appInfo
=
appRes
.
data
;
//2.通过appsecret 验签
req
.
body
.
sign
=
sign
;
var
signParams
=
req
.
body
;
var
verifyRes
=
await
signSve
.
verifySign
(
req
.
body
,
appInfo
.
uapp_secret
);
if
(
verifyRes
&&
verifyRes
.
status
==
0
){
...
...
center-channel/app/config/settings.js
View file @
9c3f2a33
...
...
@@ -239,14 +239,14 @@ var settings = {
if
(
this
.
env
==
"dev"
)
{
return
"https://oauth2.e.360.cn/site/token"
// 360测试环境
}
else
{
return
""
//
return
"
https://oauth2.e.360.cn/site/token
"
//
}
},
requestUrl360
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://180.163.239.98:38085/"
// 360测试环境
}
else
{
return
""
//
return
"
http://180.163.239.98:38085/
"
//
}
},
aliUappId
:
function
()
{
...
...
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