From 20a3fe0b51654170bd937633ba3e21d82149497e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E6=B5=A9=E8=8C=B9?= Date: Fri, 31 Oct 2025 18:24:56 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/environment/index.vue | 125 +++++++++--------- src/pages/index/index.vue | 219 ++++++++++++++++++++++++-------- src/utils/api.js | 9 ++ src/utils/sendMqtt.js | 20 +-- 4 files changed, 250 insertions(+), 123 deletions(-) diff --git a/src/pages/environment/index.vue b/src/pages/environment/index.vue index 4132873..3866bd3 100644 --- a/src/pages/environment/index.vue +++ b/src/pages/environment/index.vue @@ -7,68 +7,68 @@ - - - - - - - 🌡️ - 温度 - - - {{ temperature }}°C - - - - - - - + + + + + + + 🌡️ + 温度 - - - - - - 💧 - 湿度 - - - {{ humidity }}% - - - - - - - - - - - - - - - 洁净度 - - - {{ cleanliness > 0 ? cleanliness + 'μg/m³' : '-μg/m³' }} - - - - - - - + + {{ temperature }}°C + + + + + + + + + + + + 💧 + 湿度 + + + {{ humidity }}% + + + + + + + + + + + + + + + 洁净度 + + + {{ cleanliness > 0 ? cleanliness + 'μg/m³' : '-μg/m³' }} + + + + + + + + + @@ -385,6 +385,13 @@ export default { this.loadWsdSettings() // 注意:定时器在 onShow 中启动,避免重复启动 }, + navigateToParameterRecord() { + try { + uni.switchTab({ url: '/pages/parameter/index' }) + } catch (e) { + uni.showToast({ title: '页面跳转失败', icon: 'none' }) + } + }, // 首次进入系统时创建启动事件 async createStartupEventIfNeeded() { // 检查是否已经创建过启动事件 diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f98658b..c612162 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -16,15 +16,32 @@ 上动物联 - - - - + + + + + + 密码 + + + + + + + + @@ -37,84 +54,141 @@