Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sys-sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
sys-sdk
Commits
14f3173e
Commit
14f3173e
authored
Nov 15, 2021
by
王苓芝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tenantId
parent
4e3ba6a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
http.js
lib/http.js
+4
-0
No files found.
lib/http.js
View file @
14f3173e
...
@@ -92,6 +92,7 @@ instance.interceptors.request.use(
...
@@ -92,6 +92,7 @@ instance.interceptors.request.use(
beforeRequest
(
config
.
headers
.
_loading
,
config
.
headers
.
_isLoading
);
beforeRequest
(
config
.
headers
.
_loading
,
config
.
headers
.
_isLoading
);
const
token
=
localStorage
.
get
(
'
token
'
);
const
token
=
localStorage
.
get
(
'
token
'
);
const
user
=
localStorage
.
get
(
'
user
'
);
const
user
=
localStorage
.
get
(
'
user
'
);
const
tenantId
=
localStorage
.
get
(
'
qg-tenant-id
'
);
if
(
user
)
{
if
(
user
)
{
config
.
headers
[
'
Account
'
]
=
user
.
account
;
config
.
headers
[
'
Account
'
]
=
user
.
account
;
config
.
headers
[
'
Account-Name
'
]
=
encodeURI
(
user
.
name
);
config
.
headers
[
'
Account-Name
'
]
=
encodeURI
(
user
.
name
);
...
@@ -101,6 +102,9 @@ instance.interceptors.request.use(
...
@@ -101,6 +102,9 @@ instance.interceptors.request.use(
config
.
headers
[
'
Access-Token
'
]
=
token
;
config
.
headers
[
'
Access-Token
'
]
=
token
;
config
.
headers
[
'
X-Requested-With
'
]
=
'
XMLHttpRequest
'
;
config
.
headers
[
'
X-Requested-With
'
]
=
'
XMLHttpRequest
'
;
}
}
if
(
tenantId
){
config
.
headers
[
'
qg-tenant-id
'
]
=
tenantId
;
}
let
rewriteMap
=
{};
let
rewriteMap
=
{};
...
...
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