From 497f9c055412396b8f8c02283fe218ca56dbe702 Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Mon, 13 Jan 2025 09:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Index/Index.vue | 2 +- src/pages/Index/Regular/Running.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index d14e1ad..a009d62 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -373,7 +373,7 @@ onMounted(() => { // 开始检测 const checkInit = () => { const hasExecutedReset = sessionStorage.getItem('deviceResetFinished'); - if (hasExecutedReset === "false") { + if (!hasExecutedReset || hasExecutedReset === 'false') { showModal.value = true; } }; diff --git a/src/pages/Index/Regular/Running.vue b/src/pages/Index/Regular/Running.vue index d3d87b4..651cc86 100644 --- a/src/pages/Index/Regular/Running.vue +++ b/src/pages/Index/Regular/Running.vue @@ -1055,6 +1055,11 @@ onMounted(() => { startPolling() }) +onDeactivated(() => { + clearInterval(pollInterval) + stopPolling() +}) + onUnmounted(() => { clearInterval(pollInterval) stopPolling()