设备控制
parent
b68548ddd2
commit
528caef3a5
|
|
@ -456,14 +456,16 @@ export default {
|
|||
confirmText: '确定',
|
||||
success: (res) =>{
|
||||
console.info("操作功能:【"+type+"】,变更状态为:"+ status)
|
||||
// 链接mqtt
|
||||
this.connectMqtt()
|
||||
if (!this.connected) {
|
||||
// 链接mqtt
|
||||
this.connectMqtt()
|
||||
}
|
||||
// 组装消息
|
||||
this.message = JSON.stringify({[type]: status})
|
||||
console.info("指令:"+this.message)
|
||||
// 控制设备
|
||||
this.publishMessage();
|
||||
// // 设备回执
|
||||
// 设备回执
|
||||
this.ackMessage(type);
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue