| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </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"; |
| | |
| | | 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 |
| | |
| | | revertObj.Data = ""; |
| | | } |
| | | //*****一些判空处理***************** |
| | | |
| | | HDL_ON.Utlis.WriteLine("接收", requestFullUrl, response.Content); |
| | | return revertObj; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// 刷新 Token |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | static bool RefreshToken() |
| | | static bool RefreshToken(bool canRefresh = true) |
| | | { |
| | | try |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region **********签名校验********** |
| | | |