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, 18 insertions(+), 11 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 3ca2243..ae59520 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -4,11 +4,9 @@ using System.Net; using System.Security.Cryptography; using System.Text; -using Foundation; using HDL_ON.Entity; using RestSharp; using Shared; -using SiriKit; namespace HDL_ON.DAL.Server { @@ -21,13 +19,18 @@ /// 鍏叡鍩熷悕灏辫繎瑙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"; + const string APP_KEY = "HDL-HOME-APP"; + const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; - //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//寮�鍙戠幆澧� - //const string APP_KEY = "CPEVRLRT";//寮�鍙戠幆澧傾PP_KEY - //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";//寮�鍙戠幆澧僑ECRET_KEY + + //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"; /// <summary> /// RegionMark /// </summary> @@ -212,6 +215,11 @@ } 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 @@ -304,7 +312,7 @@ /// 鍒锋柊 Token /// </summary> /// <returns></returns> - static bool RefreshToken() + static bool RefreshToken(bool canRefresh = true) { try { @@ -325,7 +333,6 @@ var sdm = new SiriKit.SceneDateManager(); sdm.AccessToken = UserInfo.Current.LoginTokenString; sdm.RefreshToken = UserInfo.Current.RefreshToken; - //var sss = NSUserDefaultsHelper.DataSuite.StringForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken); #endif return true; } @@ -541,7 +548,7 @@ } - #endregion +#endregion #region **********绛惧悕鏍¢獙********** -- Gitblit v1.8.0