Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
02a704cf
Commit
02a704cf
authored
Feb 13, 2020
by
Junling Bu
Browse files
perf[litemall-admin]: 微优化通知查询机制
parent
995d2ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin/src/components/Notice/index.vue
View file @
02a704cf
...
...
@@ -17,7 +17,7 @@ export default {
}
},
mounted
()
{
this
.
timer
=
setInterval
(
this
.
checkNotice
,
1
0
*
1000
)
this
.
timer
=
setInterval
(
this
.
checkNotice
,
3
0
*
1000
)
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
...
...
@@ -30,6 +30,9 @@ export default {
this
.
$router
.
push
({
path
:
'
/profile/notice
'
})
},
checkNotice
()
{
if
(
this
.
hasNotice
)
{
return
}
nNotice
().
then
(
response
=>
{
this
.
hasNotice
=
response
.
data
.
data
>
0
})
...
...
Write
Preview
Supports
Markdown
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