From 43c70fc6de6ac0710c5e89b591c2d141c4e1ff93 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 03 一月 2024 16:45:32 +0800
Subject: [PATCH] 版本信息更新

---
 HDL_ON/Common/ApiUtlis.cs |   50 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index a29ffb9..96f5c7d 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -104,6 +104,19 @@
                 code = Ins.HttpRequest.RefreshToken();
                 if (code != StateCode.SUCCESS)
                 {
+                    if (waitPage != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            try
+                            {
+                                waitPage.Hide();
+                                waitPage.RemoveFromParent();
+                                waitPage = null;
+                            }
+                            catch { }
+                        });
+                    }
                     MainPage.Log($"鍒锋柊token澶辫触");
                     return;
                 }
@@ -112,6 +125,19 @@
                 code = Ins.HttpRequest.GetHomePager();
                 if (code != StateCode.SUCCESS)
                 {
+                    if (waitPage != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            try
+                            {
+                                waitPage.Hide();
+                                waitPage.RemoveFromParent();
+                                waitPage = null;
+                            }
+                            catch { }
+                        });
+                    }
                     MainPage.Log($"鍒锋柊浣忓畢淇℃伅澶辫触");
                     return;
                 }
@@ -120,6 +146,19 @@
                 code = Ins.HttpRequest.GetUserInfo();
                 if (code != StateCode.SUCCESS)
                 {
+                    if (waitPage != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            try
+                            {
+                                waitPage.Hide();
+                                waitPage.RemoveFromParent();
+                                waitPage = null;
+                            }
+                            catch { }
+                        });
+                    }
                     MainPage.Log($"鍒锋柊涓汉淇℃伅澶辫触");
                     return;
                 }
@@ -178,7 +217,7 @@
                                 FunctionList.List.ClearDatas();
                                 //MainPage.Log($"============璁惧============寮�濮�" + FunctionList.List.Functions.Count);
                                 //MainPage.Log($"璇诲彇璁惧淇℃伅鎴愬姛");
-                                //MainPage.Log($"sid鍒楄〃鑾峰彇====" + deviceResult.Data.ToString());
+                                MainPage.Log($"sid鍒楄〃鑾峰彇====\r\n" , deviceResult.Data.ToString());
                                 var deviceList = JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString());
                                 if (deviceList == null)
                                 {
@@ -368,6 +407,7 @@
                         }
 
 
+                        //======================缇ゆ帶====================
                         if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
                         {
                             var pack = Ins.HttpRequest.GetGroupControlList();
@@ -400,6 +440,7 @@
                                                 }
                                                 readSidList.Clear();
                                             }
+                                            //FunctionList.List.Functions.AddRange(FunctionList.List.groupControls);
                                         }
                                         if (readSidList.Count > 0)
                                         {
@@ -494,11 +535,12 @@
 
                         //======================瀹夐槻====================
                         GetSecurityList();
+
+                        //===================璇诲彇閫昏緫鍒楄〃==========================
+                        Logic.LogicList.Clear();//涓婚〉涓嬫媺寮哄埗鍒锋柊鑷姩鍖栧垪琛�
+                        MainView.GetLogicList();//璇诲彇鑷姩鍖栧垪琛�
                     })
                     { IsBackground = true }.Start();
-
-                    //===================璇诲彇閫昏緫鍒楄〃==========================
-                    Logic.LogicList.Clear();//涓婚〉涓嬫媺寮哄埗鍒锋柊鑷姩鍖栧垪琛�
 
                     //======================娉ㄥ唽鎺ㄩ��====================
                     httpRequest.RegisteredPush();

--
Gitblit v1.8.0