|
@ -38,6 +38,10 @@ onMounted(() => { |
|
|
interval.value = setInterval( |
|
|
interval.value = setInterval( |
|
|
() => { |
|
|
() => { |
|
|
getUnreadCount() |
|
|
getUnreadCount() |
|
|
|
|
|
if(interval.value){ |
|
|
|
|
|
clearInterval(interval.value) |
|
|
|
|
|
interval.value = 0 |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
1000 * 60 * 2 |
|
|
1000 * 60 * 2 |
|
|
) |
|
|
) |
|
@ -45,6 +49,7 @@ onMounted(() => { |
|
|
onBeforeUnmount(() => { |
|
|
onBeforeUnmount(() => { |
|
|
if(interval.value){ |
|
|
if(interval.value){ |
|
|
clearInterval(interval.value) |
|
|
clearInterval(interval.value) |
|
|
|
|
|
interval.value = 0 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|