From be95e839f40eb3ddf64706b60cba6dfcf4fad5e5 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 03 四月 2020 14:31:44 +0800
Subject: [PATCH] 2020-04-03 1.去掉登录前ping百度域名的网络监测。

---
 Crabtree/SmartHome/UI/SimpleControl/MainPage.cs |   45 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
index 809cae8..1c03c83 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
@@ -1,16 +1,14 @@
 
 using System;
-using Shared.IO;
-using Shared.Net;
 using System.Text;
 using System.Collections.Generic;
+using System.Net;
+using System.IO;
+using Shared.SimpleControl.Phone;
 // <summary>
 // 绋嬪簭涓诲叆鍙�
 // </summary>
 //using SystemConfiguration;
-using System.Net;
-using System.IO;
-using Shared.SimpleControl.Phone;
 namespace Shared.SimpleControl
 {
     /// <summary>
@@ -39,7 +37,7 @@
 
         //public static Button LogoButton = new Button ();
 
-        public static string RequestVersion = "20200112";
+        public static string RequestVersion = "20200402";
         public static UserInfo LoginUser;
         /// <summary>
         /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken)
@@ -53,6 +51,17 @@
                 }
             }
         }
+
+        ///// <summary>
+        ///// 鏄惁璐﹀彿鍦ㄥ叾瀹冭澶囩櫥褰曚簡
+        ///// </summary>
+        //public static bool IsOtherDevicesLogin = false;
+
+//#if __IOS__
+//        public static readonly string PhoneType = "iOS";
+//#else
+//         public static readonly string PhoneType = "Android";
+//#endif
 
         public static string SoftPadTitle = "Crabtree";
         public static string SoftTitle = "Crabtree";
@@ -128,10 +137,13 @@
                 } else {
                     Phone.UserHomePage.Init ();
 #if __IOS__
-                    //Loading.LodingBackgroundColor = 0x10777777;
+               //Loading.LodingBackgroundColor = 0x10777777;
+
 #else
-                    Loading.LodingBackgroundColor = SkinStyle.Current.MainColor;
+              //Loading.LodingBackgroundColor = SkinStyle.Current.MainColor;
 #endif
+                    Loading.TextColor = 0xFFA9A9A9;
+                    Loading.LodingBackgroundColor = SkinStyle.Current.MainColor;
                 }
             } catch (Exception ex) {
                 //new Alert ("Eorr", ex.Message, "Close").Show();
@@ -206,6 +218,9 @@
             //    }
             //}) { IsBackground = true }.Start ();
 
+            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, error) => {
+                return true;
+            };
 
             #region
             var webClient = new WebClient ();
@@ -249,7 +264,7 @@
             try {
                 return Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack> (responseString);
             } catch (Exception ex) {
-                Console.WriteLine (ex.ToString ());
+                Utlis.WriteLine (ex.ToString ());
                 return new ResponsePack () { StateCode = "Data exception" };
             }
             #endregion
@@ -267,9 +282,11 @@
         {
             ResponsePack revertObj = null;
             try {
-              
-            
 
+
+                ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, error) => {
+                    return true;
+                };
 
                 #region
                 var webClient = new WebClient ();
@@ -295,7 +312,7 @@
                 return bytes;
                 #endregion
             } catch (Exception ex) {
-                Console.WriteLine (ex.Message);
+                Utlis.WriteLine (ex.Message);
                 return null;
             } finally {
                 //requesTime = requesTime.AddDays(1);
@@ -351,5 +368,7 @@
                 MainPage.Loading.Hide ();
             });
         }
+
+     
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.8.0