From 72e397e4550177496288503ab15d74ba077c5b78 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 15 八月 2023 15:14:27 +0800
Subject: [PATCH] 2023年08月15日15:14:20
---
HDL_ON/DAL/Server/HttpServerRequest.cs | 490 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 460 insertions(+), 30 deletions(-)
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 7c113da..ffb4986 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -80,6 +80,30 @@
return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_ArmSensorHistoricalData, requestJson);
}
/// <summary>
+ /// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="pageSize"></param>
+ /// <param name="pageNo"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetVideoDoorlockHistory(string deviceId, string pageSize, string pageNo)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("pageSize", pageSize);
+ d.Add("pageNo", pageNo);
+
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_ArmSensorHistoricalData, requestJson);
+ }
+
+
+
+
+
+
+ /// <summary>
/// 璇诲彇鏈�杩戜竴涓湀鐨勬暟鎹�
/// </summary>
/// <returns></returns>
@@ -697,6 +721,34 @@
}
}
/// <summary>
+ /// 鑾峰彇浣忓畢浜や粯閾炬帴
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew GetHouseDeliveryUrl()
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ var jsonString = HttpUtil.GetSignRequestJson(d);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.APi_Post_GetHoserDeliverUrl, jsonString);
+ return revertObj;
+ }
+ /// <summary>
+ /// 浣忓畢浜や粯鍥炴粴
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew RollBack()
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("communityId", DB_ResidenceData.Instance.CurrentRegion.communityId);
+ d.Add("flowRecordContent", "onPro浜や粯鍥炴粴");
+ d.Add("projectFlowRecordActionEnum", "DELIVERY_ROLLBACK");
+ var jsonString = HttpUtil.GetSignRequestJson(d);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.APi_Post_UpdateProjectDebugStatus, jsonString);
+ return revertObj;
+ }
+
+ /// <summary>
/// 鑾峰彇缃戝叧淇℃伅
/// </summary>
public string GetGatewayInfo()
@@ -1042,6 +1094,22 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_UpdateFace, requestJson);
}
+ /// <summary>
+ /// 瀹跺涵鎴愬憳缁戝畾璐﹀彿
+ /// </summary>
+ /// <param name="childId"></param>
+ /// <param name="faceUrl"></param>
+ /// <returns></returns>
+ public ResponsePackNew SubChildBindAccount(string childId, string account)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("childId", childId);
+ d.Add("account", account);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_BindAccount, requestJson);
+ }
+
/// <summary>
/// 淇敼浣忓畢璋冭瘯鏉冮檺
@@ -1465,6 +1533,8 @@
/// </summary>
public void GetCityWeatherInfo(string lon, string lat)
{
+ if (lon == "0" || lat == "0")
+ return;
MainPage.cityInfo.lon = lon;
MainPage.cityInfo.lat = lat;
@@ -1510,6 +1580,7 @@
MainPage.cityInfo.lowestTemperature = jt.GetValue("lowestTemperature").ToString();
MainPage.cityInfo.highestTemperature = jt.GetValue("highestTemperature").ToString();
MainPage.CityWeatherAction?.Invoke();
+ HDL_ON.UI.HomePage.LoadEvent_RefreshAir();
break;
}
catch (Exception ex)
@@ -1517,16 +1588,8 @@
MainPage.Log($"get weather error : {ex.Message}");
}
}
- System.Threading.Thread.Sleep(1000);
+ System.Threading.Thread.Sleep(5000);
}
- Shared.Application.RunOnMainThread(() =>
- {
- try
- {
- HDL_ON.UI.HomePage.LoadEvent_RefreshAir();
- }
- catch { }
- });
});
}
///// <summary>
@@ -2387,7 +2450,7 @@
#endregion
-#region Kaede --鍦烘櫙鍔熻兘--------------------------
+ #region Kaede --鍦烘櫙鍔熻兘--------------------------
/// <summary>
/// 鑾峰彇鍦烘櫙鍒楄〃
/// 鎴块棿ID鍙┖锛岄粯璁ゆ煡璇綇瀹呬笅鎵�鏈夋埧闂�
@@ -2519,9 +2582,9 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectScene, requestJson).Code;
}
-#endregion
+ #endregion
-#region Kaede --鎴块棿鍔熻兘--------------------------
+ #region Kaede --鎴块棿鍔熻兘--------------------------
/// <summary>
/// 鑾峰彇鎴块棿鍒楄〃
/// </summary>
@@ -2596,10 +2659,10 @@
return pack;
}
-#endregion
+ #endregion
-#region Kaede -- 瀹夐槻鎺ュ彛____________________________
+ #region Kaede -- 瀹夐槻鎺ュ彛____________________________
/// <summary>
/// 鑾峰彇瀹夐槻鍒楄〃
/// </summary>
@@ -2763,10 +2826,10 @@
return pack;
}
-#endregion
+ #endregion
-#region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
+ #region Kaede --绗笁鏂瑰搧鐗屽姛鑳�--------------------------
/// <summary>
/// 鑾峰彇绗笁鏂瑰搧鐗屽垪琛�
/// </summary>
@@ -2796,13 +2859,11 @@
/// <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;
}
@@ -2878,9 +2939,9 @@
return pack;
}
-#endregion
+ #endregion
-#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
+ #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
/// <summary>
/// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
/// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
@@ -2893,10 +2954,10 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
}
-#endregion
+ #endregion
-#region 鈻� 鍙瀵硅_________________________
+ #region 鈻� 鍙瀵硅_________________________
/// <summary>
/// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋�
/// </summary>
@@ -3014,9 +3075,383 @@
//IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
return listSortLog;
}
+ /// <summary>
+ /// 鑾峰彇闂ㄩ攣涓存椂瀵嗙爜
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDoorTempPassword(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetTempPasswrod, requestJson);
+ }
+ /// <summary>
+ /// 鍒涘缓闂ㄩ攣涓存椂瀵嗙爜
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew CreateDoorTempPassword(string deviceId,string beginTime,string endTime)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("beginTime", beginTime);
+ d.Add("endTime", endTime);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CreateTempPasswrod, requestJson);
+ }
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣涓存椂瀵嗙爜
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew DelDoorTempPassword(string deviceId, string pwdId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("pwdId", pwdId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DelTempPasswrod, requestJson);
+ }
-#endregion
-#region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
+
+ #region 瑙嗛闂ㄩ攣 2023-07-07 16:47:20
+ /// <summary>
+ /// 鑾峰彇钀ょ煶闂ㄩ攣鐢ㄦ埛鍒楄〃
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDoorlockUserList(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorlockUserList, requestJson);
+ }
+
+ /// <summary>
+ /// 淇敼闂ㄩ攣鐢ㄦ埛澶囨敞
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew EditDoorlockUserName(string deviceId,string lockUserIndex,string remarkName)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ d.Add("remarkName", remarkName);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_setDoorUserRemark, requestJson);
+ }
+
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鏁板瓧瀵嗙爜
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="lockUserIndex"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteDoorlockUserNumberPassword(string deviceId, string lockUserIndex)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_NumberPassword, requestJson);
+ }
+
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鍗″瘑鐮�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="lockUserIndex"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteDoorlockUserCardPassword(string deviceId, string lockUserIndex)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteCardPassword, requestJson);
+ }
+
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛鎸囩汗瀵嗙爜
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="lockUserIndex"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteDoorlockUserFingerPassword(string deviceId, string lockUserIndex)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFingerPassword, requestJson);
+ }
+
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛浜鸿劯瀵嗙爜
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="lockUserIndex"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteDoorlockUserFacePassword(string deviceId, string lockUserIndex)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteFacePassword, requestJson);
+ }
+
+
+ /// <summary>
+ /// 鍒犻櫎闂ㄩ攣鐢ㄦ埛
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="lockUserIndex"></param>
+ /// <returns></returns>
+ public ResponsePackNew DeleteDoorlockUser(string deviceId, string lockUserIndex)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("lockUserIndex", lockUserIndex);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteDoorlockUser_DeleteUser, requestJson);
+ }
+
+ /// <summary>
+ /// 鏌ヨ鎸夐敭涓ゆ寮�闂�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDoubleClickOpenDoorSwitch(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoubleClickOpenDoorSwitch, requestJson);
+ }
+ /// <summary>
+ /// 璁剧疆鎸夐敭涓ゆ寮�闂�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="enabled">鎸夐敭涓ゆ寮�闂ㄥ紑鍏� 0-鍏抽棴,1娆℃寜閿紑闂� 1-寮�鍚紝2娆℃寜閿紑闂�</param>
+ /// <returns></returns>
+ public ResponsePackNew SetDoubleClickOpenDoorSwitch(string deviceId,int enabled)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("enabled", enabled);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoubleClickOpenDoorSwitch, requestJson);
+ }
+
+ /// <summary>
+ /// 鏌ヨ绔ラ攣寮�鍏�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetChildLockSwitch(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetChildLockSwitch, requestJson);
+ }
+ /// <summary>
+ /// 璁剧疆绔ラ攣寮�鍏�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="enabled">绔ラ攣寮�鍏� 0-鍏抽棴 1-寮�鍚�</param>
+ /// <returns></returns>
+ public ResponsePackNew SetChildLockSwitch(string deviceId, int enabled)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("enabled", enabled);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetChildLockSwitch, requestJson);
+ }
+
+
+ /// <summary>
+ /// 鏌ヨ鍙嶉攣閰嶇疆
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetAntiLockCfg(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetAntiLockCfg, requestJson);
+ }
+ /// <summary>
+ /// 璁剧疆鍙嶉攣閰嶇疆
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="enabled"></param>
+ /// <returns></returns>
+ public ResponsePackNew SetAntiLockCfg(string deviceId, bool enabled)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("enabled", enabled);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetAntiLockCfg, requestJson);
+ }
+
+
+ /// <summary>
+ /// 鏌ヨ甯冩挙闃茬姸鎬�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDefenceStatus(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDefenceStatus, requestJson);
+ }
+ /// <summary>
+ /// 璁剧疆甯冩挙闃茬姸鎬�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="armStatus">甯冮槻鐘舵�� disarmed-鎾ら槻 armed-宸插竷闃�</param>
+ /// <param name="defenceMode">甯冮槻妯″紡 global-鍏ㄥ眬 atHome-鍦ㄥ outDoor-澶栧嚭 sleep-鐫$湢</param>
+ /// <returns></returns>
+ public ResponsePackNew SetDefenceStatus(string deviceId, bool defance)//,string defenceMode)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ if(defance)
+ d.Add("armStatus", "armed");
+ else
+ d.Add("armStatus", "disarmed");
+ d.Add("defenceMode", "global");
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDefenceStatus, requestJson);
+ }
+
+ /// <summary>
+ /// 鏌ヨ浜鸿劯寮�閿侀厤缃�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetFaceUnlockCfg(string deviceId)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetFaceRecognitionUnlockCfg, requestJson);
+ }
+ /// <summary>
+ /// 璁剧疆浜鸿劯寮�閿侀厤缃�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="enabled"></param>
+ /// <param name="mode">瑙i攣鏂瑰紡 0-鑷姩 1-鎵嬪姩</param>
+ /// <returns></returns>
+ public ResponsePackNew SetFaceUnlockCfg(string deviceId, bool enabled,int mode)
+ {
+ Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("enabled", enabled);
+ d.Add("mode", mode);//瑙i攣鏂瑰紡 0-鑷姩 1-鎵嬪姩
+ d.Add("sensitivity", 0);//鐏垫晱搴� 0-楂� 1-浣�
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetFaceRecognitionUnlockCfg, requestJson);
+ }
+
+ /// <summary>
+ /// 鏌ヨ闂ㄩ攣绯荤粺澹伴煶
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDoorLockSystemSound(string deviceId)
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorLockSystemSound, requestJson);
+ }
+
+ /// <summary>
+ /// 璁剧疆闂ㄩ攣绯荤粺澹伴煶
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="sound"></param>
+ /// <returns></returns>
+ public ResponsePackNew SetDoorLockSystemSound(string deviceId,int sound)
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("sound", sound);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoorLockSystemSound, requestJson);
+ }
+
+ /// <summary>
+ /// 鏌ヨ闂ㄩ搩鎻愮ず闊�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <returns></returns>
+ public ResponsePackNew GetDoorBellTone(string deviceId)
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDoorBellTone, requestJson);
+ }
+
+ /// <summary>
+ /// 璁剧疆闂ㄩ搩鎻愮ず闊�
+ /// </summary>
+ /// <param name="deviceId"></param>
+ /// <param name="volume"></param>
+ /// <returns></returns>
+ public ResponsePackNew SetDoorBellTone(string deviceId, int volume)
+ {
+ var d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("deviceId", deviceId);
+ d.Add("volume", volume);
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetDoorBellTone, requestJson);
+ }
+
+
+
+
+ #endregion
+
+ #endregion
+
+ #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
/// <summary>
/// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃
/// </summary>
@@ -3080,7 +3515,7 @@
var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson);
}
-#endregion
+ #endregion
/// <summary>
/// 缁戝畾source闈㈡澘
@@ -3141,11 +3576,6 @@
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetCustomerInfo, requestJson);
}
-
-
-
-
-
#region 鍏変紡鍌ㄨ兘
--
Gitblit v1.8.0