更新mqtt

This commit is contained in:
微微一笑
2025-08-14 17:04:12 +08:00
parent 9bac0995a3
commit 106320bfd5
8 changed files with 8826 additions and 3169 deletions

View File

@ -177,6 +177,10 @@ class MqttClient {
};
}
isConnected() {
return this.client && this.client.isConnected();
}
connect(onConnectCallback) {
if (this.client && this.client.isConnected()) {
console.log('MQTT客户端已连接。');