From cce511a656806fa9459b15efc902da43a1f85786 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 04 一月 2022 14:41:31 +0800 Subject: [PATCH] 2022-01-04 1.更新 --- Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs | 78 ++++++++++++++++++++++++++++++++++---- 1 files changed, 69 insertions(+), 9 deletions(-) diff --git a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs index 996d34e..ed0d04e 100644 --- a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs +++ b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs @@ -150,7 +150,7 @@ requestObj.memberEmail = account; } var requestJson = HttpUtil.GetSignRequestJson(requestObj); - return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_Register, requestJson); + return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_Register, requestJson, "", "", HttpUtil.TIME_OUT_LONG); } /// <summary> @@ -358,14 +358,14 @@ #endregion #region * 浣忓畢閮ㄥ垎___________________________ - ///// <summary> - ///// 鑾峰彇浣忓畢鍒楄〃 - ///// </summary> - //public ResponsePackNew GetHomeList (HomeTypeEnum homeType = HomeTypeEnum.BUSPRO) - //{ - // var requestJson = HttpUtil.GetSignRequestJson (new GetHomeListObj () { homeType = homeType.ToString () }); - // return HttpUtil.RequestHttpsPost (NewAPI.API_POST_Gethomepager, requestJson); - //} + /// <summary> + /// 鑾峰彇浣忓畢鍒楄〃 + /// </summary> + public ResponsePackNew GetHomeList (HomeTypeEnum homeType = HomeTypeEnum.BUSPRO) + { + var requestJson = HttpUtil.GetSignRequestJson (new GetHomeListObj () { homeType = homeType.ToString () }); + return HttpUtil.RequestHttpsPost (NewAPI.API_POST_Gethomepager, requestJson); + } /// <summary> /// 鑾峰彇浣忓畢鍒楄〃 /// </summary> @@ -426,6 +426,8 @@ isRemoteControl = mHome.isRemoteControl, isBindGateway = mHome.isBindGateway, regionUrl = mHome.regionUrl, + debugStaffUserId = mHome.debugStaffUserId, + debugPerm = mHome.debugPerm }; } @@ -636,6 +638,53 @@ }); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson); } + #endregion + + #region 璋冭瘯浜哄憳绠$悊 + /// <summary> + /// 娣诲姞璋冭瘯浜哄憳 + /// </summary> + /// <param name="account">娣诲姞璋冭瘯浜哄憳璐﹀彿</param> + /// <returns></returns> + public ResponsePackNew AddDebugStaff (string account) + { + Dictionary<string, object> d = new Dictionary<string, object> (); + d.Add ("homeId", UserConfig.Instance.CurrentRegion.Id); + d.Add ("account", account); + + var requestJson = HttpUtil.GetSignRequestJson (d); + return HttpUtil.RequestHttpsPostFroHome (NewAPI.API_POST_DebugStaff_ADD, requestJson); + } + + /// <summary> + /// 鍒犻櫎璋冭瘯浜哄憳 + /// </summary> + /// <param name="account">娣诲姞璋冭瘯浜哄憳璐﹀彿</param> + /// <returns></returns> + public ResponsePackNew DelDebugStaff () + { + Dictionary<string, object> d = new Dictionary<string, object> (); + d.Add ("homeId", UserConfig.Instance.CurrentRegion.Id); + + var requestJson = HttpUtil.GetSignRequestJson (d); + return HttpUtil.RequestHttpsPostFroHome (NewAPI.API_POST_DebugStaff_DELETE, requestJson); + } + + /// <summary> + /// 娣诲姞璋冭瘯浜哄憳 + /// </summary> + /// <param name="account">娣诲姞璋冭瘯浜哄憳璐﹀彿</param> + /// <returns></returns> + public ResponsePackNew UpdateDebugPerm (bool debugPerm) + { + Dictionary<string, object> d = new Dictionary<string, object> (); + d.Add ("homeId", UserConfig.Instance.CurrentRegion.Id); + d.Add ("debugPerm", debugPerm); + + var requestJson = HttpUtil.GetSignRequestJson (d); + return HttpUtil.RequestHttpsPostFroHome (NewAPI.API_POST_DebugStaff_UPDATE, requestJson); + } + #endregion #region 鏂版暟鎹垎浜� @@ -915,6 +964,17 @@ } /// <summary> + /// 瑙i櫎闊崇缁戝畾 + /// </summary> + /// <returns></returns> + public ResponsePackNew UnbindSpeaker (string tokenId) + { + Dictionary<string, object> d = new Dictionary<string, object> (); + d.Add ("tokenId", tokenId); + var requestJson = HttpUtil.GetSignRequestJson (d); + return HttpUtil.RequestHttpsPostFroHome (NewAPI.API_POST_Speaker_Unbind, requestJson); + } + /// <summary> /// 鑾峰彇闊崇鍒嗛厤鐨勮澶囧拰鍦烘櫙鍒楄〃 /// </summary> /// <param name="getType">0 鏄煡璇㈠叏閮� 1鏄煡璇㈣澶� 2鏄煡璇㈠満鏅�</param> -- Gitblit v1.8.0