From 58d4fc80a710ea6e1d350e913ed09b75953c6e7a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 26 七月 2023 10:01:08 +0800
Subject: [PATCH] 修改组播搜索,印度佬的网络有问题
---
Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 58 ++++++++++++++++++++++++++++++++++------------------------
1 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
index f4fd122..9fa905b 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
@@ -35,11 +35,15 @@
}
return loading;
}
- }
+ }
//public static Button LogoButton = new Button ();
- public static string CodeIDString = "20191223";
+ public static string CodeIDString = "20230202";
+ /// <summary>
+ /// 缃戝叧鐘舵��
+ /// </summary>
+ public static string GatewayStatus = "";
public static UserInfo LoginUser;
@@ -108,11 +112,14 @@
//Pad.UserHomePage.Init ();
} else {
Phone.UserHomePage.Init ();
-#if __IOS__
- //Loading.LodingBackgroundColor = 0x10777777;
-#else
+ //#if __IOS__
+ // //Loading.LodingBackgroundColor = 0x10777777;
+ //#else
+ // Loading.LodingBackgroundColor = SkinStyle.Current.MainColor;
+ //#endif
+
+ Loading.TextColor = 0xFFA9A9A9;
Loading.LodingBackgroundColor = SkinStyle.Current.MainColor;
-#endif
}
} catch (Exception ex) {
//new Alert ("Eorr", ex.Message, "Close").Show();
@@ -163,7 +170,7 @@
/// <param name="methodType">璇锋眰鏂规硶.</param>
/// <param name="dataStringJson">璇锋眰鐨勫弬鏁�.</param>
/// <param name="needHeaders">鏄惁闇�瑕佸寘澶�.</param>
- public static ResponsePack RequestHttps (string methodType, string dataStringJson, bool needHeaders = true, bool needTip = true)
+ public static ResponsePack RequestHttps (string methodType, string dataStringJson, bool needHeaders = true, bool needTip = true,string urlHead = "")
{
ResponsePack revertObj = null;
try {
@@ -173,27 +180,30 @@
MainPage.Loading.Hide ();
});
}
- new System.Threading.Thread (() => {
- requesTime = DateTime.Now;
- isShowLoading = true;
- while (isShowLoading) {
- System.Threading.Thread.Sleep (1000);
- if (requesTime == DateTime.MinValue) {
- break;
- }
- if (requesTime.AddSeconds (30) < DateTime.Now) {
- Application.RunOnMainThread (Loading.Hide);
- isShowLoading = false;
- }
- }
- }) { IsBackground = true }.Start ();
+ //new System.Threading.Thread (() => {
+ // requesTime = DateTime.Now;
+ // isShowLoading = true;
+ // while (isShowLoading) {
+ // System.Threading.Thread.Sleep (1000);
+ // if (requesTime == DateTime.MinValue) {
+ // break;
+ // }
+ // if (requesTime.AddSeconds (30) < DateTime.Now) {
+ // Application.RunOnMainThread (Loading.Hide);
+ // isShowLoading = false;
+ // }
+ // }
+ //}) { IsBackground = true }.Start ();
#region
- string urlHead = $"{"https://homeautomation.havells.com"}/WebApi/";
- string url = urlHead + methodType;
-
var webClient = new WebClient ();
+ if (urlHead == "") {
+ urlHead = "https://homeautomation.havells.com/WebApi/";
+ } else {
+ webClient.Headers.Add ("CONTENT-TYPE", "application/json");
+ }
+ string url = urlHead + methodType;
if (needHeaders && LoginUser != null) {/* 濡傛灉涓嶉渶瑕侀獙璇乀oken鍙互涓嶇敤浼犲叆 */
webClient.Headers.Add ("Authorization", LoginUser.LoginTokenString);
}
--
Gitblit v1.8.0