From c56363d75952fe55cfa273a663e990ea7eb90c67 Mon Sep 17 00:00:00 2001 From: lzp <1747191978@qq.com> Date: Thu, 19 Jun 2025 12:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=A6=BB=E5=BC=80=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=AE=9A=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index a2e8023..362a101 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -407,13 +407,16 @@ export default { this.handleLogin(); }, onShow() { + console.log("this.falt", this.falt); + if (this.falt) { this.getAttributes(this.deviceId); // 根据设备id查找设备信息 } }, - // 页面卸载时清除定时器 - onUnload() { - clearTimeout(this.timer); + // 离开页面清除定时器 + onHide() { + console.log("页面即将卸载2"); + clearTimeout(this.timer); // 清除定时器 }, };