Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1d28ec2f
authored
Sep 21, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加全局拦截,登录失效重新刷新一下页面
1 parent
b8a3b5ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
src/utils/http/checkStatus.js
src/utils/http/checkStatus.js
View file @
1d28ec2
...
@@ -45,8 +45,13 @@ export function checkStatus(status, msg) {
...
@@ -45,8 +45,13 @@ export function checkStatus(status, msg) {
break
;
break
;
case
603
:
case
603
:
error
(
'未登录或登录已过期,请重新登录'
);
error
(
'未登录或登录已过期,请重新登录'
);
store
.
dispatch
(
'app/setToken'
,
''
);
localStorage
.
removeItem
(
'token'
);
localStorage
.
removeItem
(
'token'
);
localStorage
.
removeItem
(
'userInfo'
);
localStorage
.
removeItem
(
'breadcrumb'
);
store
.
dispatch
(
'app/setToken'
,
''
);
setTimeout
(()
=>
{
window
.
location
.
reload
();
},
10
)
break
;
break
;
case
505
:
case
505
:
error
(
'http版本不支持该请求!'
);
error
(
'http版本不支持该请求!'
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment