Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
ems3.3
Commits
2599f047
Commit
2599f047
authored
Jan 12, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
requestjs
parent
1da0fc3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+11
-10
request.js
src/utils/request.js
+3
-3
No files found.
src/components/RightContent/AvatarDropdown.jsx
View file @
2599f047
...
...
@@ -24,7 +24,6 @@ const loginOut = async () => {
if
(
window
.
location
.
pathname
!==
'/user/login'
&&
!
redirect
)
{
localStorage
.
clear
();
// history.replace(logoutRedirectUrl);
window
.
location
.
href
=
logoutRedirectUrl
;
}
};
...
...
@@ -106,6 +105,7 @@ const AvatarDropdown = ({ menu }) => {
[
setInitialState
],
);
const
loadings
=
(
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Spin
size=
"small"
...
...
@@ -115,6 +115,7 @@ const AvatarDropdown = ({ menu }) => {
}
}
/>
</
span
>
</
HeaderDropdown
>
);
if
(
!
initialState
)
{
...
...
src/utils/request.js
View file @
2599f047
...
...
@@ -32,9 +32,9 @@ const errorHandler = (error) => {
if
(
response
&&
response
.
status
)
{
const
errorText
=
codeMessage
[
response
.
status
]
||
response
.
statusText
;
const
{
status
,
url
}
=
response
;
if
(
status
==
'401'
||
status
==
'302'
)
{
window
.
location
.
href
=
'/'
;
}
//
if (status == '401' || status == '302') {
//
window.location.href = '/';
//
}
}
else
if
(
!
response
)
{
notification
.
error
({
description
:
'您的网络发生异常,无法连接服务器'
,
...
...
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