From b6fdafae7a4d67ea44bbf8cc27563bca3244de4e Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 24 七月 2023 09:19:01 +0800 Subject: [PATCH] 群控更新bug修复 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index d5cd85e..496722f 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -12,6 +12,7 @@ using HDL_ON.Entity; using HDL_ON.UI; using HDL_ON.DAL.Server; +using HDL_ON; namespace HDL_ON.DAL.Mqtt { @@ -110,6 +111,7 @@ { MqttInfoConfig.Current.IfGetMqttInfoSuccess = false; } + Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false; await DisConnectRemoteMqttClient(s); } @@ -159,7 +161,7 @@ StartCloudMqtt(); } - static bool isSubscribeSuccess; + public static bool isSubscribeSuccess; /// <summary> /// 璁㈤槄涓婚 /// </summary> @@ -261,8 +263,8 @@ #endregion - Utlis.WriteLine("寮�濮嬭闃咃紒"); - var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { + Utlis.WriteLine("寮�濮嬭闃咃紒"); + var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { pirStatus,pirStudy, appDeviceRefresh,appHomeRefresh,appRoomRefresh,residenceChange, topicFilterPush2, topicAlinkStatus ,mqttkeyChange, @@ -683,7 +685,7 @@ } catch (Exception ex) { - Utlis.WriteLine($"error:" + ex.Message); + Utlis.WriteLine($"mqtt杩炴帴寮傚父 error:" + ex.Message); //mqtt杩炴帴寮傚父锛屾竻绌烘湰鍦癿qtt淇℃伅锛屽彲鑳介渶瑕侀噸鏂拌幏鍙栵細wxr MqttInfoConfig.Current.Refresh(); } @@ -877,6 +879,7 @@ //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾� switch (UserInfo.Current.userMobileInfo) { + case "18316672920": case "15626203746": case "464027401@qq.com": return; @@ -1186,7 +1189,7 @@ } catch (Exception ex) { - Console.WriteLine(ex.Message); + MainPage.Log(ex.Message); } return reData; } -- Gitblit v1.8.0