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
040c18cd
Commit
040c18cd
authored
Nov 13, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: appcode
parent
c80a3219
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
center-manage/app/config/routes/api.js
+27
-1
No files found.
center-manage/app/config/routes/api.js
View file @
040c18cd
...
...
@@ -28,6 +28,25 @@ module.exports = function (app) {
console
.
log
(
cooktoken
)
let
tv
=
cooktoken
let
sourceUser
=
System
.
verify
(
tv
,
settings
.
publickey
())
// { id: '5f8faf05787b88000a2e178b',
// name: '张华',
// employee: '5f8faf05787b88000a2e178c',
// phone: 'd1htypf8Sme3fvcXP20R+w==',
// orgid: '5bcfe95cb0a01f0009284bc3',
// roles: [ '员工', '资质宝业务员', '资质宝交付员' ],
// platform: '8cdf558c8645c7031f164dc23a55a28f',
// unionid: '',
// jti: 'gaBQQKKO6ZLNXNfA',
// exp: 1605083401,
// iat: 1604478601
// }
/**
* TODO:
* 1. 建立 磐农角色
* 2. 建立组织结构 获取 磐农组织结构路径
* 3. 获取角色id 设置
*/
let
openid
=
sourceUser
.
employee
let
userName
=
openid
let
nickName
=
sourceUser
.
name
...
...
@@ -90,8 +109,15 @@ module.exports = function (app) {
app
.
post
(
"/entService/*"
,
async
function
(
req
,
res
,
next
)
{
try
{
let
channel
;
const
APPCODENUM
=
{
ali
:
"ali"
,
baidu
:
"baidu"
,
baiduqifu
:
"baidu"
,
zc360
:
"zc360"
,
pannong
:
"pannong"
}
const
appcode
=
req
.
headers
&&
req
.
headers
.
appcode
;
let
sourceHost
=
appcode
||
"aliCloud
"
;
let
sourceHost
=
APPCODENUM
[
appcode
]
||
"ali
"
;
if
(
sourceHost
in
channelCache
)
{
channel
=
channelCache
[
sourceHost
];
}
else
{
...
...
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