Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
17225ef3
authored
Oct 25, 2024
by
preschooler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修复退出登录后依旧在轮询消息未读数,导致反复弹窗。
parent
a31bafbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
src/layout/components/Message/src/Message.vue
+7
-1
No files found.
src/layout/components/Message/src/Message.vue
View file @
17225ef3
<
script
lang=
"ts"
setup
>
import
{
formatDate
}
from
'@/utils/formatTime'
import
*
as
NotifyMessageApi
from
'@/api/system/notify/message'
import
{
useUserStoreWithOut
}
from
'@/store/modules/user'
defineOptions
({
name
:
'Message'
})
const
{
push
}
=
useRouter
()
const
userStore
=
useUserStoreWithOut
()
const
activeName
=
ref
(
'notice'
)
const
unreadCount
=
ref
(
0
)
// 未读消息数量
const
list
=
ref
<
any
[]
>
([])
// 消息列表
...
...
@@ -37,7 +39,11 @@ onMounted(() => {
// 轮询刷新小红点
setInterval
(
()
=>
{
getUnreadCount
()
if
(
userStore
.
getIsSetUser
)
{
getUnreadCount
()
}
else
{
unreadCount
.
value
=
0
}
},
1000
*
60
*
2
)
...
...
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