From 50ad482974a7e838d11360a84e9e8ff3f7974ab2 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期六, 12 十月 2024 09:34:01 +0800 Subject: [PATCH] 金茂问题修复 --- HDL_ON/DAL/Server/HttpUtil.cs | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index cd66d30..a74c247 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -19,14 +19,12 @@ /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - const string APP_KEY = "HDL-HOME-APP"; - const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; - + public const string APP_KEY = "HDL-HOME-APP"; + public 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 APP_KEY = "HDL-HOME-APP-TEST"; + //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm //const string APP_KEY = "CPEVRLRT"; @@ -176,6 +174,7 @@ urlHead = OnAppConfig.Instance.RequestHttpsHost; } string requestFullUrl = urlHead + apiPath; + //string requestFullUrl = "https://gateway-hotel-test.hdlcontrol.com" + apiPath; RestClient client = new RestClient(requestFullUrl); @@ -253,7 +252,7 @@ } else { - HDL_ON.Utlis.WriteLine($"鎺ュ彛寮傚父:{requestFullUrl} \r\n"+response.Content); + MainPage.Log("Error", $"鎺ュ彛寮傚父:{requestFullUrl} \r\n" + response.Content); if(response.Content!= null) { try @@ -272,7 +271,7 @@ } catch (Exception ex) { - HDL_ON.Utlis.WriteLine(ex.Message); + MainPage.Log("Error", $"鎺ュ彛寮傚父x锛歿ex.StackTrace}"); return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR ,message = Language.StringByID(StringId.FailedRequestServer) }; } @@ -332,7 +331,7 @@ UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; UserInfo.Current.AccessToken = revertData.accessToken; UserInfo.Current.RefreshToken = revertData.refreshToken; - UserInfo.Current.LastTime = DateTime.Now; + UserInfo.Current.ValidToken = true; UserInfo.Current.SaveUserInfo(); #if __IOS__ var sdm = new SiriKit.SceneDateManager(); @@ -341,9 +340,9 @@ #endif return true; } - else if (revertObj.Code == StateCode.PasswrodError) + else //if (revertObj.Code == StateCode.PasswrodError) { - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; } return false; } -- Gitblit v1.8.0