From 553d47e277f537eaf85865a8b808a88ae9dce5eb Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 30 十月 2023 10:18:24 +0800
Subject: [PATCH] 2.3版本
---
HDL_ON/Common/ApiUtlis.cs | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index e0a8a6a..c04aa5a 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)
{
--
Gitblit v1.8.0