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 @@ - + 点击开门