From 418b0d0a4002bc06ba3a55d1809fe46043f06c09 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 26 九月 2022 14:07:58 +0800
Subject: [PATCH] 光伏更新,金茂科技系统更新
---
HDL_ON/DAL/Server/HttpServerRequest.cs | 140 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 138 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 242ae06..6d90181 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>
@@ -536,7 +551,7 @@
{
foreach (var home in homeList)
{
- if (home.isBindGateway)
+ if (home.isBindGateway)//鏄惁缁戝畾缃戝叧
{
UserInfo.Current.regionList.Add(home);
//鏂扮粦瀹氱殑浣忓畢锛岀洿鎺ュ垏鎹㈠埌鏂颁綇瀹�
@@ -1399,7 +1414,7 @@
MainPage.cityInfo.weather = jt.GetValue("Weather").ToString();
MainPage.cityInfo.lowestTemperature = jt.GetValue("lowestTemperature").ToString();
MainPage.cityInfo.highestTemperature = jt.GetValue("highestTemperature").ToString();
-
+ MainPage.CityWeatherAction?.Invoke();
break;
}
catch (Exception ex)
@@ -2623,6 +2638,93 @@
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>
+ /// 瑙g粦绗笁鏂瑰钩鍙拌处鍙�
+ /// </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>
@@ -2883,5 +2985,39 @@
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;
+ }
+ /// <summary>
+ /// 鑾峰彇浣忓畢涓嬪厜浼忕粺璁$殑鏁版嵁
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew GetInverterStatisticsInfo()
+ {
+ 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_StatisticsInfo, requestJson);
+ return pack;
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.8.0