From 6bc275e815326ffabf3a089774d14d197051e261 Mon Sep 17 00:00:00 2001 From: SelfRidicule Date: Thu, 22 Aug 2024 18:48:42 +0800 Subject: [PATCH] 1 --- miniprogram/pages/smartDevice/room/room.js | 10 ++++++++++ miniprogram/pages/smartDevice/room/room.wxml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/miniprogram/pages/smartDevice/room/room.js b/miniprogram/pages/smartDevice/room/room.js index a7c38fc..739bf17 100644 --- a/miniprogram/pages/smartDevice/room/room.js +++ b/miniprogram/pages/smartDevice/room/room.js @@ -278,6 +278,16 @@ Page({ }) }, + // 开门 + openLockDoor() { + let _this = this + let lockDoor = _this.data.lockDoor + // 调用设备接口 + _this.callApiByDevice({ + "deviceId": lockDoor.id, + }) + }, + // 调用设备接口 callApiByDevice(data) { callApiByDeviceIdRq(data).then(res => { diff --git a/miniprogram/pages/smartDevice/room/room.wxml b/miniprogram/pages/smartDevice/room/room.wxml index 11d21cd..c72f926 100644 --- a/miniprogram/pages/smartDevice/room/room.wxml +++ b/miniprogram/pages/smartDevice/room/room.wxml @@ -10,7 +10,7 @@ - + 点击开门