From 19b4abbebede2255b8d9f286105c7bf41d254429 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 29 十二月 2023 09:44:58 +0800 Subject: [PATCH] 金路备份 --- HDL_ON/DAL/Server/HttpUtil.cs | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index b659327..adef0f4 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -19,9 +19,11 @@ /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //const string APP_KEY = "DBVOCPDX"; + //const string SECRET_KEY = "DBVOCPENDBVOCPFD"; 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 = "DCCKGHAF"; + const string SECRET_KEY = "DCCKGHAVDCCKGHBL"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//寮�鍙戠幆澧� //const string APP_KEY = "CPEVRLRT";//寮�鍙戠幆澧傾PP_KEY @@ -210,6 +212,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 @@ -302,7 +309,7 @@ /// 鍒锋柊 Token /// </summary> /// <returns></returns> - static bool RefreshToken() + static bool RefreshToken(bool canRefresh = true) { try { @@ -319,12 +326,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) { @@ -538,7 +545,7 @@ } - #endregion +#endregion #region **********绛惧悕鏍¢獙********** -- Gitblit v1.8.0