From bf3d64379bdf4424394103b31531a25d30be85d8 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 10 十一月 2022 11:45:14 +0800
Subject: [PATCH] 机械手
---
HDL_ON/DAL/Server/HttpServerRequest.cs | 62 ++++++++++++++++++++++++++++---
1 files changed, 56 insertions(+), 6 deletions(-)
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 3a6d450..e39af1d 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();
@@ -204,8 +205,6 @@
}
#region 娉ㄥ唽銆佺櫥褰曢儴鍒�
-
-
/// <summary>
/// 閫氱敤 鍙戦�侀獙璇佺爜鏂规硶
/// </summary>
@@ -339,6 +338,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 +549,7 @@
{
foreach (var home in homeList)
{
- if (home.isBindGateway)
+ if (home.isBindGateway)//鏄惁缁戝畾缃戝叧
{
UserInfo.Current.regionList.Add(home);
//鏂扮粦瀹氱殑浣忓畢锛岀洿鎺ュ垏鎹㈠埌鏂颁綇瀹�
@@ -1358,6 +1371,9 @@
/// </summary>
public void GetCityWeatherInfo(string lon, string lat)
{
+ MainPage.cityInfo.lon = lon;
+ MainPage.cityInfo.lat = lat;
+
System.Threading.Tasks.Task.Run(() =>
{
while (true)
@@ -1399,7 +1415,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)
@@ -2682,10 +2698,10 @@
/// 璁剧疆绗笁鏂硅澶囩粦瀹氱殑浣忓畢
/// </summary>
/// <returns></returns>
- public ResponsePackNew Set3tyIotFunctionToHouse(string deviceId,string homeId, string companyId)
+ 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);
@@ -2970,5 +2986,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