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