| | |
| | | deviceName = OnAppConfig.Instance.PhoneName, |
| | | deviceType = deviceType, |
| | | produce = isProduce, |
| | | |
| | | }; |
| | | mAddpushinfoObj.languageType = Utlis.GetPostLanguageType(); |
| | | |
| | | #if DEBUG |
| | | //List<string> communityCodes = new List<string>(); |
| | | //communityCodes.Add(""); |
| | | //mAddpushinfoObj.communityCodes = communityCodes; |
| | | #endif |
| | | |
| | | //var mAddpushinfoJson = Newtonsoft.Json.JsonConvert.SerializeObject(mAddpushinfoObj); |
| | | var mAddpushinfoJson = HttpUtil.GetSignRequestJson(mAddpushinfoObj); |
| | |
| | | /// <summary> |
| | | /// 查询推送信息列表 |
| | | /// </summary> |
| | | /// <param name="queryType">0全部 1分享与功能 2报警类 3系统信息</param> |
| | | /// <param name="queryType">0全部 1分享与功能 2报警类 3系统信息 4物业通知</param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew PushSerivceGetPushmessagelist(int queryType = 0) |
| | | { |
| | |
| | | { |
| | | pushType = PushType.Prompt.ToString(); |
| | | } |
| | | |
| | | else if (queryType == 4) |
| | | { |
| | | pushType = PushType.Notice.ToString(); |
| | | } |
| | | var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj() |
| | | { |
| | | pushId = OnAppConfig.Instance.PushId, |
| | | pushType = pushType, |
| | | homeId = DB_ResidenceData.Instance.CurrentRegion.id, |
| | | }); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson); |
| | | //2021-08-28 改为分页查询 |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist_Paging, requestJson); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="msgId"></param> |
| | | /// <returns></returns> |
| | | public bool PushSerivceDeleteMessage(string msgId) |
| | | public bool PushSerivceDeleteMessage(PushMsgIdObj mPushMsgIdObj) |
| | | { |
| | | if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false; |
| | | |
| | | if (mPushMsgIdObj == null) return false; |
| | | try |
| | | { |
| | | var requestJson = HttpUtil.GetSignRequestJson(new PushMsgIdObj() |
| | | { |
| | | msgId = msgId |
| | | }); |
| | | var requestJson = HttpUtil.GetSignRequestJson(mPushMsgIdObj); |
| | | |
| | | var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Deletepushinfo, requestJson); |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取物业公告详情 |
| | | /// </summary> |
| | | /// <param name="noticeId"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetPropertyNoticeDetails(string noticeId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("noticeId", noticeId); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_GetNoticeInfo, requestJson); |
| | | } |
| | | #endregion |
| | | |
| | | #region 检测更新 |
| | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 获取天气部分 |
| | | #region 获取天气部分 |
| | | /// <summary> |
| | | /// 获取指定经纬度的城市信息 |
| | | /// </summary> |
| | |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region 备份部分 |
| | | #region 备份部分 |
| | | ///// <summary> |
| | | ///// 获取住宅备份列表 |
| | | ///// </summary> |
| | |
| | | var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | var revertObj = RequestHttps("https://developer.hdlcontrol.com/api/UserBackupList", requestJson, true); |
| | | var jt = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(revertObj.ResponseData.ToString()); |
| | | #region 恢复房间数据 |
| | | #region 恢复房间数据 |
| | | |
| | | |
| | | GetBackupRoom(jt,loading); |
| | | #endregion |
| | | #endregion |
| | | |
| | | Application.RunOnMainThread(() => { |
| | | loading.Hide(); |
| | |
| | | } |
| | | */ |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region Kaede --设备功能—————————————————————————————————— |
| | | #region Kaede --设备功能—————————————————————————————————— |
| | | /// <summary> |
| | | /// 获取设备列表 |
| | | /// </summary> |
| | |
| | | /// <param name="productPlatform"></param> |
| | | /// <param name="productBrand"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew IndependentRegister3TyDevcie(string spk,string extDevId,string deviceName) |
| | | public ResponsePackNew IndependentRegister3TyDevcie(string spk,string extDevId,string deviceName,string pairCode = "") |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("spk", spk); |
| | | d.Add("extDevId", extDevId); |
| | | d.Add("name", deviceName); |
| | | d.Add("code", pairCode); |
| | | |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_IndependentRegister3TyDevcie, requestJson); |
| | |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectDevice, requestJson); |
| | | } |
| | | |
| | | #endregion |
| | | #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> |
| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("securitys", securityStates); |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | MainPage.Log($"api安防控制:{requestJson}"); |
| | | var pack = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Security_StatusSet, requestJson); |
| | | return pack; |
| | | } |
| | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region Kaede --第三方品牌功能-------------------------- |
| | | #region Kaede --第三方品牌功能-------------------------- |
| | | /// <summary> |
| | | /// 获取第三方品牌列表 |
| | | /// </summary> |
| | |
| | | return pack; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ■ 萤石云SDK相关接口_________________________ |
| | | #region ■ 萤石云SDK相关接口_________________________ |
| | | /// <summary> |
| | | /// 河东获取萤石云子账号token的接口 |
| | | /// 2021-07-07 新方案接口调整对接 |
| | | /// </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); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region ■ 可视对讲_________________________ |
| | | #region ■ 可视对讲_________________________ |
| | | /// <summary> |
| | | /// 检查住宅是否绑定丰林 |
| | | /// </summary> |
| | |
| | | var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson); |
| | | return pack; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ■ 门锁相关____________________________ |
| | | #region ■ 门锁相关____________________________ |
| | | |
| | | /// <summary> |
| | | /// 获取门锁历史记录(按日期降序) |
| | |
| | | return listSortLog; |
| | | } |
| | | |
| | | #endregion |
| | | #region ■ 音箱语言控制相关_________________________ |
| | | #endregion |
| | | #region ■ 音箱语言控制相关_________________________ |
| | | /// <summary> |
| | | /// 获取已授权的音箱列表 |
| | | /// </summary> |
| | |
| | | var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 人脸录入 |
| | | /// </summary> |
| | | /// <param name="imageBytes"></param> |
| | | /// <returns></returns> |
| | | public ResponsePackNew FaceSetting(string imageBytes) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("userFace", @"data:image/jpg;base64,"+imageBytes); |
| | | d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | |
| | | //MainPage.Log(imageBytes); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_InputUserFace, requestJson); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改住户人脸关闭状态 |
| | | /// 1:开启状态 2:关闭状态 |
| | | /// 3:清除人脸数据 |
| | | /// </summary> |
| | | public ResponsePackNew EditFaceFunction(int status) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("faceClose", status); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_SwitchFaceFunction, requestJson); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取住户详情 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetCustomerInfo() |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetCustomerInfo, requestJson); |
| | | } |
| | | } |
| | | } |