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
7100ae0b
Commit
7100ae0b
authored
Jun 13, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
04e5c26e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
icp-deliver/app/base/api/api.base.js
+3
-3
icp-deliver/app/base/controller/ctl.base.js
+1
-1
No files found.
icp-deliver/app/base/api/api.base.js
View file @
7100ae0b
...
...
@@ -19,9 +19,9 @@ class APIBase{
if
(
!
req
.
xctx
.
appkey
){
return
[
-
200
,
"请求头缺少应用x-app-key"
]
}
else
{
let
app
=
await
this
.
cacheManager
[
"AppCache"
].
cache
(
req
.
xctx
.
appkey
);
req
.
xctx
.
appid
=
app
.
id
;
pobj
.
app_id
=
app
.
id
;
//传递参数对象里注入app_id
//
let app=await this.cacheManager["AppCache"].cache(req.xctx.appkey);
//
req.xctx.appid=app.id;
//
pobj.app_id=app.id;//传递参数对象里注入app_id
}
//平台注册时,companyid,companykey都为空
//自由注册时,companykey不能为空
...
...
icp-deliver/app/base/controller/ctl.base.js
View file @
7100ae0b
...
...
@@ -65,7 +65,7 @@ class CtlBase {
// if(!req.xctx.companyid && !req.xctx.companykey){
// return [-200,"请求头缺少应用x-app-key"]
// }
if
(
!
req
.
xctx
.
companyid
&&
req
.
xctx
.
fromcompanykey
&&
req
.
xctx
.
fromcompanykey
!=
"null"
)
{
if
(
!
req
.
xctx
.
companyid
&&
req
.
xctx
.
fromcompanykey
&&
req
.
xctx
.
fromcompanykey
!=
"null"
&&
req
.
xctx
.
fromcompanykey
!=
"undefined"
)
{
let
comptmp
=
await
this
.
cacheManager
[
"CompanyCache"
].
cache
(
req
.
xctx
.
fromcompanykey
);
req
.
xctx
.
companyid
=
comptmp
.
id
;
}
...
...
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