wxr
2023-03-29 1820fafc5b982120f87c8045e832d85bbbb62f6b
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -323,10 +323,12 @@
        /// </summary>
        public static async Task StartCloudMqtt()
        {
            if (MainPage.InternetStatus == 0)
            //没有网络的状态下尝试一下连接mqtt ,安卓的网络状态变化监听有异常,修改底层麻烦
            if (MainPage.InternetStatus == 0 && MainPage.LinkHdlMqttCount > 1)
            {
                return;
            }
            MainPage.LinkHdlMqttCount++;
            if (!UserInfo.Current.IsLogin)
            {
@@ -444,8 +446,7 @@
                                }
                                #region 数据更新推送主题
                                //appHomeRefresh:住宅数据刷新通知
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up"
                                        || topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appDeviceRefresh/up")
                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up")
                                {
                                    MainPage.Log("住宅数据刷新通知");
                                    new HttpServerRequest().GetHomePager();
@@ -618,6 +619,10 @@
                        {
                            IfNeedReadAllDeviceStatus = true;
                            Control.Ins.GatewayOnline_Cloud = true;
                            if(MainPage.InternetStatus == 0)
                            {
                                MainPage.InternetStatus = 1;
                            }
                            Utlis.WriteLine($"============>Mqtt远程连接成功");
                            SendPushSignOut();
                        });