| | |
| | | { |
| | | var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<UserLoginRes>(revertObj.Data.ToString()); |
| | | UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; |
| | | UserInfo.Current.AccessToken = revertData.accessToken; |
| | | UserInfo.Current.RefreshToken = revertData.refreshToken; |
| | | UserInfo.Current.LastTime = DateTime.Now; |
| | | UserInfo.Current.SaveUserInfo(); |
| | |
| | | } |
| | | var requestJson = HttpUtil.GetSignRequestJson(requestObj); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_ForgetPwd, requestJson); |
| | | } |
| | | /// <summary> |
| | | /// 修改密码 |
| | | /// </summary> |
| | | /// <param name="loginPwd"></param> |
| | | /// <param name="loginNewPwd"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew UpdataPassword(string loginPwd,string loginNewPwd) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("loginPwd", loginPwd); |
| | | d.Add("loginNewPwd", loginNewPwd); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Update_Pwd, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取第三方品牌列表_Iot |
| | | /// </summary> |
| | | public ResponsePackNew Get3tyIotBrandList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetBrandList_Iot, requestJson); |
| | | |
| | | return pack; |
| | | } |
| | | /// <summary> |
| | | /// 搜索第三方设备_iot |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Search3tyIotDevice(string companyId) |
| | | { |
| | | |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("companyId", companyId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Search3tyIotDevice, requestJson); |
| | | |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 搜索第三方设备功能列表_iot |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Get3tyIotDeviceFunctionList(string companyId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("companyId", companyId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyIotFunction, requestJson); |
| | | return pack; |
| | | } |
| | | /// <summary> |
| | | /// 获取第三方平台支持的设备类型列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Get3tyIotSupportSpkList(string companyId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("companyId", companyId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyIotFunction, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置第三方设备绑定的住宅 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Set3tyIotFunctionToHouse(List<string> deviceIds,string homeId, string companyId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("deviceIds", deviceIds); |
| | | d.Add("homeId", homeId); |
| | | d.Add("companyId", companyId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Setting3tyIotFunctionToHouse, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 解绑第三方平台账号 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew Unbound3tyIotAccount(string companyId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("companyId", companyId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Unbound3tyIotAccount, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取绑定的第三方品牌列表 |
| | | /// </summary> |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetCustomerInfo, requestJson); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region 光伏储能 |
| | | /// <summary> |
| | | /// 获取住宅下逆变器列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetInverterList() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetInverter_List, requestJson); |
| | | return pack; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |