diff --git a/pages/control/index.vue b/pages/control/index.vue index 719559c..b8b18af 100644 --- a/pages/control/index.vue +++ b/pages/control/index.vue @@ -382,7 +382,27 @@ export default { } }) }, + testFunction() { + uni.showModal({ + title: '操作提示:', + content: '确定' + (status === 1 ? "运行" : "暂停") + '【' + this.selectedText + '】设备?', + cancelText: '取消', + confirmText: '确定', + success: (res) => { + if (res.confirm) { + // 组装消息 + this.message = JSON.stringify({[type]: status}) + // 控制设备 + this.publishMessage(); + // 设备回执 + this.deviceType = type; + //todo + // this.testAuto(type); + } + } + }) + }, makeSpecialData(msgData, tag) { const div10 = (v) => (v == null ? null : Math.round((Number(v)/10)*10)/10);