From 30fe13dac2c264d83822ae6a99223291fcf53bd3 Mon Sep 17 00:00:00 2001 From: 18796357645 <674126018@qq.com> Date: Sat, 19 Jul 2025 18:39:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=8B=E5=A5=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deviceBind/index.vue | 18 ++- pages/deviceManage/index.vue | 283 +++++++++++++++++++---------------- 2 files changed, 169 insertions(+), 132 deletions(-) diff --git a/pages/deviceBind/index.vue b/pages/deviceBind/index.vue index 64961fc..4a0a648 100644 --- a/pages/deviceBind/index.vue +++ b/pages/deviceBind/index.vue @@ -136,10 +136,20 @@ export default { showCancel: false // 不显示取消按钮(可选) }); // console.log('res', res); - - if (res.statusCode === 200) { - uni.showToast({ title: "绑定成功" }); - } + if (res.statusCode === 200) { + uni.showToast({ + title: "绑定成功", + icon: "success", // 可选,增加成功图标 + duration: 1500 // 1.5秒后自动关闭 + }); + + // 1.5秒后跳转到设备页面 + setTimeout(() => { + uni.navigateTo({ + url: "/pages/device/index" + }); + }, 1500); + } } catch (error) { console.error("设备绑定失败:", error); uni.showToast({ title: "设备绑定失败", icon: "none" }); diff --git a/pages/deviceManage/index.vue b/pages/deviceManage/index.vue index e198533..32d53cf 100644 --- a/pages/deviceManage/index.vue +++ b/pages/deviceManage/index.vue @@ -16,7 +16,7 @@ + @click="getVideoImg('video')"> 获取视频 @@ -24,11 +24,6 @@ - - - - @@ -38,23 +33,23 @@ + @loadedmetadata="isMediaLoading = false" @error="isMediaLoading = false"> + @error="isMediaLoading = false"> 设备状态 + @click="deviceType = 1">设备状态 设备日志 + @click="deviceType = 2">设备日志 设备控制 + @click="deviceType = 3">设备控制 @@ -66,21 +61,21 @@ {{ field.label }} - - +