From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 20 五月 2024 13:47:38 +0800
Subject: [PATCH] 优化离线数据

---
 HDL_ON/DAL/Server/HttpUtil.cs |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 2ef648a..ae59520 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,10 +18,16 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
-        const string APP_KEY = "HDL-HOME-APP-TEST";
-        const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        const string APP_KEY = "HDL-HOME-APP";
+        const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
+
+
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //const string APP_KEY = "HDL-HOME-APP-TEST";
+        //const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+
+
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
         //const string APP_KEY = "CPEVRLRT";
         //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";
@@ -207,8 +213,13 @@
                         request.AddUrlSegment(data.Key, data.Value.ToString());
                     }
                 }
-
                 IRestResponse response = client.Execute(request);
+                HDL_ON.Utlis.WriteLine("鍙戦��", requestFullUrl, response.Request.Body?.Value.ToString());
+                if(apiPath == NewAPI.API_POST_Login)
+                {
+                    var ddd = Newtonsoft.Json.JsonConvert.SerializeObject(response);
+                    //Console.WriteLine(ddd);
+                }
                 if (response.StatusCode == HttpStatusCode.OK)
                 {
                     try
@@ -226,7 +237,7 @@
                             revertObj.Data = "";
                         }
                         //*****涓�浜涘垽绌哄鐞�*****************
-
+                        HDL_ON.Utlis.WriteLine("鎺ユ敹", requestFullUrl, response.Content);
                         return revertObj;
                     }
                     catch (Exception ex)
@@ -301,7 +312,7 @@
         /// 鍒锋柊  Token
         /// </summary>
         /// <returns></returns>
-        static bool RefreshToken()
+        static bool RefreshToken(bool canRefresh = true)
         {
             try
             {
@@ -318,12 +329,12 @@
                     UserInfo.Current.RefreshToken = revertData.refreshToken;
                     UserInfo.Current.LastTime = DateTime.Now;
                     UserInfo.Current.SaveUserInfo();
-                    return true;
 #if __IOS__
                     var sdm = new SiriKit.SceneDateManager();
                     sdm.AccessToken = UserInfo.Current.LoginTokenString;
                     sdm.RefreshToken = UserInfo.Current.RefreshToken;
 #endif
+                    return true;
                 }
                 else if (revertObj.Code == StateCode.PasswrodError)
                 {
@@ -537,7 +548,7 @@
 
         }
 
-        #endregion
+#endregion
 
         #region **********绛惧悕鏍¢獙**********
 

--
Gitblit v1.8.0