| | |
| | | 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">解锁方式 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);//解锁方式 0-自动 1-手动 |
| | | d.Add("sensitivity", 0);//灵敏度 0-高 1-低 |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SetFaceRecognitionUnlockCfg, requestJson); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |