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 }} - - +