From cf3d4880046912f8b46c9e54769986a179faa26c Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 08 四月 2021 18:01:13 +0800 Subject: [PATCH] 2021-04-08 1.更新音箱功能 --- HDL_ON/DAL/Server/HttpServerRequest.cs | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 144 insertions(+), 1 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 63a7ec2..b23c8ad 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -480,6 +480,7 @@ IsOthreShare = mHome.IsOtherShare, accountType = mHome.accountType, isRemoteControl = mHome.isRemoteControl, + isBindGateway = mHome.isBindGateway, longitude = mHome.longitude, latitude = mHome.latitude, deliverstatus = mHome.deliverstatus, @@ -491,7 +492,14 @@ Address = mHome.homeAddress, isAllowCreateScene = mHome.isAllowCreateScene, }; - UserInfo.Current.regionList.Add(home); + if (home.isBindGateway) + { + UserInfo.Current.regionList.Add(home); + } + } + if(UserInfo.Current.regionList.Count== 0) + { + return "null"; } //-------濡傛灉璐﹀彿鏄娆$櫥褰� if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) @@ -920,6 +928,9 @@ { try { + //鍏堟竻绌烘帹閫両D锛岄伩鍏嶄娇鐢ㄧ紦瀛樼殑PushId涓哄叾瀹冭处鍙风殑鎯呭喌锛屽鑷存煡璇㈠埌鍏跺畠璐﹀彿鐨勬帹閫佽褰� + OnAppConfig.Instance.PushId = ""; + string deviceType = PhoneDeviceType.Android.ToString(); #if __IOS__ deviceType = PhoneDeviceType.IOS.ToString(); @@ -1781,6 +1792,56 @@ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); } /// <summary> + /// 鑾峰彇鎸囧畾绗笁鏂瑰搧鐗岀殑缁戝畾杩囩殑璁惧鍒楄〃 + /// </summary> + /// <param name="productPlatform"></param> + /// <param name="productBrand"></param> + /// <returns></returns> + public ResponsePackNew Get3TyBrandBindDeviceList(string productPlatform, string productBrand) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("productPlatform", productPlatform); + d.Add("productBrand", productBrand); + d.Add("networkConfig", true); + + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); + } + /// <summary> + /// 鑾峰彇鎸囧畾绗笁鏂瑰搧鐗岀殑璁惧鍒楄〃 + /// </summary> + /// <param name="productPlatform"></param> + /// <param name="productBrand"></param> + /// <returns></returns> + public ResponsePackNew Get3TyBrandDeviceList(string productPlatform,string productBrand) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("categoryType", 1); + d.Add("productPlatform", productPlatform); + d.Add("productBrand", productBrand); + d.Add("networkConfig", true); + + + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson); + } + + /// <summary> + /// 鑾峰彇璁惧璇︽儏 + /// </summary> + /// <returns></returns> + public ResponsePackNew GetDeviceInfo(string functionId) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("deviceIds", new List<string>() { functionId }); + + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieInfoList, requestJson); + } + + /// <summary> /// 鑾峰彇璁惧璇︽儏鍒楄〃 /// </summary> /// <returns></returns> @@ -2160,5 +2221,87 @@ #endregion + #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________ + /// <summary> + /// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙� + /// </summary> + public ResponsePackNew EZGetChildToken() + { + Dictionary<string, object> d = new Dictionary<string, object>(); + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson); + } + #endregion + + + #region 鈻� 鍙瀵硅_________________________ + /// <summary> + /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃 + /// </summary> + /// <returns></returns> + public ResponsePackNew CheckFlVideo() + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + var requestJson = HttpUtil.GetSignRequestJson(d); + var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson); + return pack; + } + #endregion + + #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________ + /// <summary> + /// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃 + /// </summary> + /// <returns></returns> + public ResponsePackNew GetSpeakerList() + { + var requestJson = HttpUtil.GetSignRequestJson(new GetSpeakerObj + { + homeId = DB_ResidenceData.Instance.CurrentRegion.RegionID, + }); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_List_Get, requestJson); + } + + /// <summary> + /// 缂栬緫闊崇鎺堟潈澶囨敞 + /// </summary> + /// <returns></returns> + public ResponsePackNew UpdateSpeakerRemark(UpdateSpeakerRemarkObj remarkObj) + { + var requestJson = HttpUtil.GetSignRequestJson(remarkObj); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_Remark_Update, requestJson); + } + + /// <summary> + /// 鑾峰彇闊崇鍒嗛厤鐨勮澶囧拰鍦烘櫙鍒楄〃 + /// </summary> + /// <param name="getType">0 鏄煡璇㈠叏閮� 1鏄煡璇㈣澶� 2鏄煡璇㈠満鏅�</param> + /// <param name="tokenId"></param> + /// <returns></returns> + public ResponsePackNew GetSpeakerDeviceList(int getType, string tokenId) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.RegionID); + d.Add("tokenId", tokenId); + if (getType > 0) + { + d.Add("isDevice", getType == 1); + } + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Get, requestJson); + } + + /// <summary> + /// 鏇存柊闊崇鎺у埗鐨勮澶囧拰鍦烘櫙鐩爣 + /// </summary> + /// <returns></returns> + public ResponsePackNew UpdateSpeakerDeviceList(UpdateSpeakerDeviceListObj updateSpeakerDeviceListObj) + { + var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson); + } + #endregion + } } \ No newline at end of file -- Gitblit v1.8.0