Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
918f6962
authored
2023-06-02 10:19:54 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:router
1 parent
971be918
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
src/utils/request.js
src/utils/request.js
View file @
918f696
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-06-02 10:
07:55
* @LastEditTime: 2023-06-02 10:
18:32
*/
import
axios
from
'axios'
import
Router
from
'@/router'
import
Cookies
from
'js-cookie'
import
{
Message
}
from
'element-ui'
import
{
endLoadingSubCount
}
from
'./requestLoading'
...
...
@@ -78,14 +80,13 @@ service.interceptors.response.use(
}
else
{
Cookies
.
remove
(
'token'
)
}
if
(
window
.
_config
.
casEnable
)
{
window
.
location
.
href
=
window
.
_config
.
casBaseURL
+
'/logout?service='
+
encodeURIComponent
(
locationUrl
);
}
else
{
r
outer
.
replace
({
R
outer
.
replace
({
path
:
'/login'
,
query
:
{
redirect
:
r
outer
.
currentRoute
.
value
.
fullPath
redirect
:
R
outer
.
currentRoute
.
value
.
fullPath
}
})
return
false
...
...
Please
register
or
sign in
to post a comment