From 3a2cc1ddc5c5fb3f863eae478e13afb34d71e18f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E6=B5=A9=E8=8C=B9?= Date: Tue, 30 Sep 2025 00:54:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=96=B0=E5=A2=9E=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=B0=83=E7=94=A8MQTT=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 5 +- src/pages.json | 12 +- src/pages/environment/index.vue | 4 +- src/pages/index/index.vue | 244 ++++++++++++++++++++++++++------ src/utils/sendMqtt.js | 4 +- 5 files changed, 216 insertions(+), 53 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3c3147c..3ec2bdf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -114,7 +114,10 @@ page { overflow-y: auto; display: flex; flex-direction: column; - padding-bottom: 60px; + // padding-bottom: 60px + // #ifdef H5 + margin-bottom: 50px; + // #endif } /* 非tabbar页面内容区域 */ diff --git a/src/pages.json b/src/pages.json index 05d563f..b0bc4db 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,5 +1,11 @@ { "pages": [ + { + "path": "pages/index/index", + "style": { + "navigationStyle": "custom" + } + }, { "path": "pages/environment/index", "style": { @@ -35,12 +41,6 @@ "navigationStyle": "custom" } }, - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "移动式检修车间" - } - }, { "path": "pages/system/index", "style": { diff --git a/src/pages/environment/index.vue b/src/pages/environment/index.vue index dae543e..295c42b 100644 --- a/src/pages/environment/index.vue +++ b/src/pages/environment/index.vue @@ -111,14 +111,14 @@ 最后更新: {{ lastUpdate }} - + 温度控制: {{ temperatureRange.min }}°C - {{ temperatureRange.max }}°C 湿度控制: {{ humidityRange.min }}% - {{ humidityRange.max }}% diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 1c634b0..d458b3c 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,24 +1,46 @@ - diff --git a/src/utils/sendMqtt.js b/src/utils/sendMqtt.js index 0aa6b3e..8eacb9b 100644 --- a/src/utils/sendMqtt.js +++ b/src/utils/sendMqtt.js @@ -73,7 +73,7 @@ const createMqtt = () => { // 显示连接loading uni.showLoading({ title: 'MQTT连接中...', - mask: true + // mask: true }); client = mqtt.connect(mqtturl, options); @@ -242,7 +242,7 @@ const manualReconnect = () => { closeMqtt(); setTimeout(() => { createMqtt(); - }, 1000); + }, 300); }; export {