From cd8cdf7eb281af3b7a5f2b61bd21f1aa0adf7524 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 17 十月 2022 11:51:29 +0800 Subject: [PATCH] 2022年10月17日11:51:16 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 02d3aaf..d8ad0ee 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -148,6 +148,7 @@ { 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(); @@ -339,6 +340,20 @@ } 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> @@ -1358,6 +1373,9 @@ /// </summary> public void GetCityWeatherInfo(string lon, string lat) { + MainPage.cityInfo.lon = lon; + MainPage.cityInfo.lat = lat; + System.Threading.Tasks.Task.Run(() => { while (true) @@ -2664,16 +2682,30 @@ 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(string deviceId,string homeId) + public ResponsePackNew Set3tyIotFunctionToHouse(List<string> deviceIds,string homeId, string companyId) { Dictionary<string, object> d = new Dictionary<string, object>(); - d.Add("deviceId", deviceId); + 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); @@ -2956,5 +2988,27 @@ 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 + } } \ No newline at end of file -- Gitblit v1.8.0