| | |
| | | var sss = Newtonsoft.Json.Linq.JObject.FromObject("sss"); |
| | | var xxx = homeJsonStr.GetValue("xxx").ToString(), |
| | | |
| | | |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("Id", fId); |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | |
| | | |
| | | */ |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("Id", fId); |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | */ |
| | | |
| | | |
| | | string severAddress = "https://global.hdlcontrol.com/ProposedProductionApi"; |
| | |
| | | /// <summary> |
| | | /// 获取传感器历史数据 |
| | | /// </summary> |
| | | /// <param name="qType">时间查询类型:hour=近24小时、week=近一周、month = 近一月 </param> |
| | | /// <param name="qType">时间查询类型:hour=近24小时、day_hour =某日24小时、week=近一周、month = 近一月、custom_month=某年某月 y/M、custom_year=某年 y</param> |
| | | /// <param name="deviceId">设备ID</param> |
| | | /// <param name="deviceKey">功能查询类型:pm25</param> |
| | | /// <param name="time">具体查询的日期,金茂温控器使用</param> |
| | |
| | | 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__ |
| | |
| | | } |
| | | else if (revertObj.Code == StateCode.PasswrodError) |
| | | { |
| | | UserInfo.Current.LastTime = DateTime.MinValue; |
| | | UserInfo.Current.ValidToken = false; |
| | | } |
| | | #if __IOS__ |
| | | else if (revertObj.Code == "10001") |
| | |
| | | if (canRefresh) |
| | | { |
| | | UserInfo.Current.RefreshToken = SiriKit.NSUserDefaultsHelper.DataSuite.StringForKey(SiriKit.NSUserDefaultsHelper.StorageKeys.GLOBAL_GRefreshToken); |
| | | //UserInfo.Current.AccessToken = SiriKit.NSUserDefaultsHelper.DataSuite.StringForKey(SiriKit.NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken); |
| | | RefreshToken(false); |
| | | } |
| | | } |