注释日志

master
lld 2025-12-26 17:18:00 +08:00
parent 5d170cb580
commit b15f58e90e
1 changed files with 9 additions and 9 deletions

View File

@ -551,11 +551,11 @@ export default {
confirmText: '确定', confirmText: '确定',
success: (res) =>{ success: (res) =>{
if (res.confirm) { if (res.confirm) {
console.info("操作功能:【"+type+"】,变更状态为:"+ status) // console.info(""+type+""+ status)
// // // //
this.message = JSON.stringify({[type]: status}) this.message = JSON.stringify({[type]: status})
console.info("指令:"+this.message+";大棚:"+this.publishTopic) // console.info(""+this.message+""+this.publishTopic)
// //
this.publishMessage(); this.publishMessage();
// //
@ -568,7 +568,7 @@ export default {
} }
} }
}) })
console.info(this.status) // console.info(this.status)
}, },
connectMqtt() { connectMqtt() {
const options = { const options = {
@ -616,7 +616,7 @@ export default {
}, },
publishMessage() { publishMessage() {
console.info("开始发布消息",this.connected,this.publishTopic,this.message) // console.info("",this.connected,this.publishTopic,this.message)
if (!this.connected || !this.publishTopic || !this.message) { if (!this.connected || !this.publishTopic || !this.message) {
uni.showToast({ uni.showToast({
title: '控制设备失败', title: '控制设备失败',
@ -655,7 +655,7 @@ export default {
// console.info(""+msgData) // console.info(""+msgData)
// 3. // 3.
if (msgData.prop && "suc" in msgData) { if (msgData.prop && "suc" in msgData) {
console.info("处理回执消息") // console.info("")
// 👉 // 👉
this.handleCommandAck(msgData,this.deviceType); this.handleCommandAck(msgData,this.deviceType);
} else { } else {
@ -669,7 +669,7 @@ export default {
// //
handleCommandAck(ackData,type) { handleCommandAck(ackData,type) {
console.info("回执消息11111"+ackData) // console.info("11111"+ackData)
// jm2ksuc // jm2ksuc
const commandField = Object.keys(ackData.prop)[0]; // "jm2k" const commandField = Object.keys(ackData.prop)[0]; // "jm2k"
const commandValue = ackData.prop[commandField]; // 0 const commandValue = ackData.prop[commandField]; // 0
@ -690,7 +690,7 @@ export default {
// //
handleOtherContent(msgData) { handleOtherContent(msgData) {
// //
console.log("收到其他内容:", msgData); // console.log("", msgData);
// 湿线 // 湿线
// //
@ -698,9 +698,9 @@ export default {
var arr=['jbk',"jbg","jm1k","jm1g","jm2k","jm2g","jm3k","jm3g"] var arr=['jbk',"jbg","jm1k","jm1g","jm2k","jm2g","jm3k","jm3g"]
const allKeysNumeric = Object.keys(msgData).some(key => arr.includes(key)); const allKeysNumeric = Object.keys(msgData).some(key => arr.includes(key));
if (allKeysNumeric) { if (allKeysNumeric) {
console.info(msgData) // console.info(msgData)
this.status={...msgData} this.status={...msgData}
console.info("imei: "+this.publishTopic+"copy: ",this.status) // console.info("imei: "+this.publishTopic+"copy: ",this.status)
} }