wxr
2021-05-23 4d14154c36ac5692aadc036eed97fb9f1c410e2a
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -133,7 +133,7 @@
                {
                    try
                    {
                        System.Threading.Thread.Sleep(500);
                        System.Threading.Thread.Sleep(2000);
                        //进入后台不处理
                        if (MainPage.IsEnterBackground) continue;
                        if (MqttInfoConfig.Current.HomeGatewayInfo == null)
@@ -330,14 +330,14 @@
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.controldata = revString;
                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.PirMethod.controldata = revString;
                                }
                                //App订阅遥控器自学按键学习成功通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up")
                                {
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                    var revString = Encoding.UTF8.GetString(bytes);
                                    UI.UI2.PersonalCenter.PirDevice.Method.buttondata = revString;
                                    UI.UI2.PersonalCenter.PirDevice.PirMethod.buttondata = revString;
                                }
                                #region 数据更新推送主题
                                //appHomeRefresh:住宅数据刷新通知
@@ -485,6 +485,8 @@
                catch (Exception ex)
                {
                    Utlis.WriteLine($"error:" + ex.Message);
                    //mqtt连接异常,清空本地mqtt信息,可能需要重新获取:wxr
                    MqttInfoConfig.Current.Refresh();
                }
                finally
                {
@@ -626,6 +628,8 @@
                    //重新中心服务器获取参数标记
                    MqttInfoConfig.Current.IfGetMqttInfoSuccess = false;
                    Console.WriteLine("Connect error: " + ex.Message);
                    //mqtt连接异常,清空本地mqtt信息,可能需要重新获取:wxr
                    MqttInfoConfig.Current.Refresh();
                }
                finally
                {