Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
map-property-screen
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzhaohui
map-property-screen
Commits
4a52ab71
Commit
4a52ab71
authored
Jan 29, 2024
by
leidahong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token过期提示
parent
5b2c91d6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
request.js
src/utils/request.js
+3
-4
screenHeader.vue
src/view/components/screenHeader.vue
+1
-1
No files found.
src/utils/request.js
View file @
4a52ab71
import
axios
from
"axios"
;
import
{
getToken
,
removeToken
}
from
"@/utils/auth"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
useRouter
}
from
"vue-router"
import
{
router
}
from
"@/router/router"
;
const
router
=
new
useRouter
()
axios
.
defaults
.
headers
.
post
[
"Content-Type"
]
=
"application/json;charset=utf-8"
;
//是否重新登录
...
...
@@ -43,8 +42,8 @@ service.interceptors.response.use(
)
.
then
(()
=>
{
isRelogin
.
show
=
false
;
removeToken
()
router
.
replace
(
'/login'
)
router
.
push
(
"/login"
);
})
.
catch
(()
=>
{
isRelogin
.
show
=
false
;
...
...
src/view/components/screenHeader.vue
View file @
4a52ab71
...
...
@@ -39,7 +39,7 @@ function getNowTime() {
}
let
router
=
new
useRouter
();
function
logout
()
{
ElMessageBox
.
confirm
(
"确定退出登录吗?"
,
"提示"
,
{
ElMessageBox
.
confirm
(
"确定退出登录吗?"
,
"
系统
提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
...
...
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