| | |
| | | var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); |
| | | if (homeList == null || homeList.Count == 0) |
| | | { |
| | | if (DB_ResidenceData.Instance.CurrentRegion.id != "") |
| | | if (DB_ResidenceData.Instance.CurrentRegion!=null && DB_ResidenceData.Instance.CurrentRegion.id != "") |
| | | { |
| | | Shared.Application.RunOnMainThread(() =>StringId |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | MainPage.GoUserPage(false); |
| | | }); |
| | |
| | | return ""; |
| | | } |
| | | } |
| | | /// <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> |
| | |
| | | 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> |
| | | /// 修改住宅调试权限 |
| | |
| | | MainPage.Log($"get weather error : {ex.Message}"); |
| | | } |
| | | } |
| | | System.Threading.Thread.Sleep(1000); |
| | | System.Threading.Thread.Sleep(5000); |
| | | } |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region Kaede --场景功能-------------------------- |
| | | #region Kaede --场景功能-------------------------- |
| | | /// <summary> |
| | | /// 获取场景列表 |
| | | /// 房间ID可空,默认查询住宅下所有房间 |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectScene, requestJson).Code; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region Kaede --房间功能-------------------------- |
| | | #region Kaede --房间功能-------------------------- |
| | | /// <summary> |
| | | /// 获取房间列表 |
| | | /// </summary> |
| | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region Kaede -- 安防接口____________________________ |
| | | #region Kaede -- 安防接口____________________________ |
| | | /// <summary> |
| | | /// 获取安防列表 |
| | | /// </summary> |
| | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region Kaede --第三方品牌功能-------------------------- |
| | | #region Kaede --第三方品牌功能-------------------------- |
| | | /// <summary> |
| | | /// 获取第三方品牌列表 |
| | | /// </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; |
| | | } |
| | | |
| | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ■ 萤石云SDK相关接口_________________________ |
| | | #region ■ 萤石云SDK相关接口_________________________ |
| | | /// <summary> |
| | | /// 河东获取萤石云子账号token的接口 |
| | | /// 2021-07-07 新方案接口调整对接 |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region ■ 可视对讲_________________________ |
| | | #region ■ 可视对讲_________________________ |
| | | /// <summary> |
| | | /// 检查住宅是否绑定丰林 |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | /// <summary> |
| | | /// 获取第三方注册的id |
| | | /// </summary> |
| | | /// <param homeId="homeId">住宅id</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetExtUserId(string homeId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", homeId); |
| | | |
| | | #region ■ 门锁相关____________________________ |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetExtUserId, requestJson); |
| | | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 门锁相关____________________________ |
| | | |
| | | /// <summary> |
| | | /// 获取门锁历史记录(按日期降序) |
| | |
| | | } |
| | | |
| | | #endregion |
| | | #region ■ 音箱语言控制相关_________________________ |
| | | |
| | | #region ■ 音箱语言控制相关_________________________ |
| | | /// <summary> |
| | | /// 获取已授权的音箱列表 |
| | | /// </summary> |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 绑定source面板 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region 光伏储能 |
| | | /// <summary> |
| | | /// 获取住宅下逆变器列表 |
| | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson); |
| | | return pack; |
| | | } |
| | | /// <summary> |
| | | /// 获取群控详情 |
| | | /// </summary> |
| | | public ResponsePackNew GetGroupControInfo(string userDeviceGroupControlIds) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | var ids = new List<string>() |
| | | { |
| | | userDeviceGroupControlIds, |
| | | }; |
| | | d.Add("userDeviceGroupControlIds", ids); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlInfos, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取群控详情 |
| | | /// </summary> |
| | | public ResponsePackNew GetGroupControInfo(List<string> ids) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userDeviceGroupControlIds", ids); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlInfos, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加群控列表 |
| | | /// </summary> |
| | | /// <param name="spk"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew AddGroupControl(List<GroupControl> groupControls) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | |
| | | d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | d.Add("infos", groupControls); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetGroupControlListByHome, requestJson); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_AddGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 添加群控列表 |
| | | /// </summary> |
| | | public ResponsePackNew DelGroupControl(string groupControlId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DeleteGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 编辑群控列表 |
| | | /// </summary> |
| | | /// <param name="spk"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew EditGroupControl(List<GroupControl> groupControls) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | //d.Add("gatewayId", DB_ResidenceData.Instance.HomeGateway.gatewayId); |
| | | d.Add("infos", groupControls); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_UpdateGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 群控控制 |
| | | /// </summary> |
| | | public ResponsePackNew ControlGroupControl(string userDeviceGroupControlId, Dictionary<string, object> pair) |
| | | { |
| | | var d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userDeviceGroupControlId", userDeviceGroupControlId); |
| | | List<Dictionary<string, object>> dd = new List<Dictionary<string, object>>(); |
| | | dd.Add(pair); |
| | | d.Add("status",dd); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 收藏群控 |
| | | /// </summary> |
| | | public ResponsePackNew CollectGroupControl(string groupControlId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CollectGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 取消收藏群控 |
| | | /// </summary> |
| | | public ResponsePackNew CancelCollectGroupControl(string groupControlId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("userDeviceGroupControlIds", new List<string>() { groupControlId }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectGroupControl, requestJson); |
| | | return pack; |
| | | } |
| | | |