Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
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
张伯涛
tea-resources-web
Commits
868afd64
Commit
868afd64
authored
Jun 28, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释log
parent
52ea4378
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
App.vue
src/App.vue
+3
-3
No files found.
src/App.vue
View file @
868afd64
...
@@ -30,18 +30,18 @@ export default {
...
@@ -30,18 +30,18 @@ export default {
},
},
// 重置定时器
// 重置定时器
resetTimer
()
{
resetTimer
()
{
console
.
log
(
'重置定时器重置定时器重置定时器'
)
//
console.log('重置定时器重置定时器重置定时器')
clearTimeout
(
this
.
timeout
)
clearTimeout
(
this
.
timeout
)
this
.
startTimer
()
this
.
startTimer
()
},
},
/** 启动定时器*/
/** 启动定时器*/
startTimer
()
{
startTimer
()
{
console
.
log
(
'启动定时器启动定时器启动定时器'
,
this
.
$route
.
path
)
//
console.log('启动定时器启动定时器启动定时器', this.$route.path)
if
(
this
.
$route
.
path
!==
'/login'
)
{
if
(
this
.
$route
.
path
!==
'/login'
)
{
// 启动一个30分钟的定时器
// 启动一个30分钟的定时器
this
.
timeout
=
setTimeout
(()
=>
{
this
.
timeout
=
setTimeout
(()
=>
{
// 超时处理逻辑,例如清空token并退出登录
// 超时处理逻辑,例如清空token并退出登录
console
.
log
(
'退出退出'
)
//
console.log('退出退出')
handleLogout
().
then
(
res
=>
{
handleLogout
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'退出成功!'
)
this
.
$message
.
success
(
'退出成功!'
)
...
...
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