From 5d5bc36596468e860c1e37a9b4c6be8cdf56d5da Mon Sep 17 00:00:00 2001 From: hongxilin <17663930442@163.com> Date: Wed, 29 Oct 2025 21:37:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?marketOverview=E5=BC=95=E5=85=A5tcp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/marketSituation/marketCondition.vue | 4 +- pages/marketSituation/marketOverview.vue | 268 +++++++++++++++++++++++++++++- 2 files changed, 269 insertions(+), 3 deletions(-) diff --git a/pages/marketSituation/marketCondition.vue b/pages/marketSituation/marketCondition.vue index 5c29c5e..d322372 100644 --- a/pages/marketSituation/marketCondition.vue +++ b/pages/marketSituation/marketCondition.vue @@ -413,7 +413,7 @@ const startTcp = () => { initTcpListeners(); connectTcp(); } catch (error) { - console.error("建立连接并设置监听:", error); + console.error("建立连接并设置监听出错:", error); uni.showToast({ title: "建立连接并设置监听", icon: "none", @@ -2202,7 +2202,7 @@ onLoad((options) => { // 保存定时器,用于页面卸载时清理 onUnmounted(() => { removeTcpListeners(); - disconnect(); + disconnectTcp(); if (timer) { console.log("卸载定时器"); clearInterval(timer); diff --git a/pages/marketSituation/marketOverview.vue b/pages/marketSituation/marketOverview.vue index fa68843..72ba052 100644 --- a/pages/marketSituation/marketOverview.vue +++ b/pages/marketSituation/marketOverview.vue @@ -46,7 +46,7 @@