From ba275a7b58e56c61820ffccc86571447b2997e52 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 05 八月 2021 16:18:00 +0800
Subject: [PATCH] 2021-08-05 1.更新
---
HDL_ON/DAL/Server/HttpServerRequest.cs | 62 ++++++++++++++++++------------
1 files changed, 37 insertions(+), 25 deletions(-)
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index b059398..ceee580 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -482,7 +482,7 @@
/// <summary>
/// 鑾峰彇浣忓畢鍒楄〃
/// </summary>
- public string GetHomePager(HomeTypeEnum homeType = HomeTypeEnum.ALL)
+ public string GetHomePager(HomeTypeEnum homeType = HomeTypeEnum.ALL,string homeId = "")
{
var requestJson = HttpUtil.GetSignRequestJson(new GetHomeListObj() { homeType = homeType.ToString() });
var resultObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_Gethomepager, requestJson);
@@ -497,28 +497,17 @@
{
foreach (var home in homeList)
{
- //var home = new RegionInfoRes()
- //{
- // RegionID = mHome.Id,
- // Name = mHome.homeName,
- // IsOthreShare = mHome.IsOtherShare,
- // accountType = mHome.accountType,
- // isRemoteControl = mHome.isRemoteControl,
- // isBindGateway = mHome.isBindGateway,
- // longitude = mHome.longitude,
- // latitude = mHome.latitude,
- // deliverstatus = mHome.deliverstatus,
- // homeType = mHome.homeType,
- // regionUrl = mHome.regionUrl,
- // emqUrl = mHome.emqUrl,
- // homeRegionName = mHome.homeRegionName,
- // homeRegionId = mHome.homeRegionId,
- // Address = mHome.homeAddress,
- // isAllowCreateScene = mHome.isAllowCreateScene,
- //};
if (home.isBindGateway)
{
UserInfo.Current.regionList.Add(home);
+ //鏂扮粦瀹氱殑浣忓畢锛岀洿鎺ュ垏鎹㈠埌鏂颁綇瀹�
+ if (!string.IsNullOrEmpty(homeId))
+ {
+ if (homeId.Contains(home.id))
+ {
+ DB_ResidenceData.Instance.CurrentRegion = home;
+ }
+ }
}
}
if(UserInfo.Current.regionList.Count== 0)
@@ -738,6 +727,24 @@
return result != null && result.Code == StateCode.SUCCESS;
}
+ /// <summary>
+ /// 绠$悊鍛樻潈闄愯縼绉�
+ /// </summary>
+ /// <param name="i_childAccountId">鎴愬憳璐﹀彿id</param>
+ /// <returns></returns>
+ public bool AdminAuthorityMigration(string i_childAccountId)
+ {
+ var pra2 = new
+ {
+ homeId = DB_ResidenceData.Instance.CurrentRegion.id,
+ childAccountId = i_childAccountId
+ };
+ var requestJson = HttpUtil.GetSignRequestJson(pra2);
+ var result = HttpUtil.RequestHttpsPost(NewAPI.API_Post_AdminAuthorityMigration, requestJson);
+
+ return result != null && result.Code == StateCode.SUCCESS;
+ }
+
#region 鏂版暟鎹垎浜�
/// <summary>
/// 娣诲姞鍒嗕韩
@@ -927,8 +934,9 @@
Dictionary<string, object> d = new Dictionary<string, object>();
d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
d.Add("debugPerm", debugPerm);
- string jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d);
- return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_Post_Home_UpdateDebugPerm, jsonString);
+ var jsonString = HttpUtil.GetSignRequestJson(d,d);
+ var pack = HttpUtil.RequestHttpsPost(NewAPI.API_Post_Home_UpdateDebugPerm, jsonString);
+ return pack;
}
@@ -1055,7 +1063,8 @@
var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj()
{
pushId = OnAppConfig.Instance.PushId,
- pushType = pushType
+ pushType = pushType,
+ homeId = DB_ResidenceData.Instance.CurrentRegion.id,
});
return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson);
}
@@ -1950,7 +1959,7 @@
d.Add("actions", actionObjs);
var requestJson = HttpUtil.GetSignRequestJson(d);
- MainPage.Log($"{requestJson}");
+ MainPage.Log($"api鍔熻兘鎺у埗锛歿requestJson}");
return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlDevice, requestJson);
}
/// <summary>
@@ -2460,10 +2469,13 @@
#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
/// <summary>
/// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
+ /// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
/// </summary>
public ResponsePackNew EZGetChildToken()
{
Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("platform", "1");
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
}
@@ -2472,7 +2484,7 @@
#region 鈻� 鍙瀵硅_________________________
/// <summary>
- /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃
+ /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋�
/// </summary>
/// <returns></returns>
public ResponsePackNew CheckFlVideo()
--
Gitblit v1.8.0