From c05a93ddb0714a310a31574aaf030e677d9a07b6 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 06 一月 2023 17:43:31 +0800 Subject: [PATCH] 增加多网关绑定支持 --- Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 55 insertions(+), 1 deletions(-) diff --git a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs index ed0d04e..4735acc 100644 --- a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs +++ b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs @@ -292,6 +292,26 @@ return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UpdateMemberInfo, requestJson); } + /// <summary> + /// 鏍囪2.0骞冲彴鏁版嵁 + /// </summary> + /// <returns></returns> + public bool Mark (string newHomeId) + { + Dictionary<string, object> dic = new Dictionary<string, object> (); + dic.Add ("homeId", newHomeId); + dic.Add ("mark", true); + var requestJson = HttpUtil.GetSignRequestJson (dic); + var revertObj = HttpUtil.RequestHttpsPost (NewAPI.API_Post_Mark, requestJson); + if (revertObj != null) { + if (revertObj.Code == "0") { + UserConfig.Instance.CurrentRegion.indiaIsAsyncDeviceMark = true; + return true; + } + } + return false; + } + ///// <summary> ///// 鏇存柊鐢ㄦ埛澶村儚 ///// </summary> @@ -427,7 +447,8 @@ isBindGateway = mHome.isBindGateway, regionUrl = mHome.regionUrl, debugStaffUserId = mHome.debugStaffUserId, - debugPerm = mHome.debugPerm + debugPerm = mHome.debugPerm, + indiaIsAsyncDeviceMark = mHome.indiaIsAsyncDeviceMark }; } @@ -1003,6 +1024,21 @@ } #endregion + /// <summary> + /// 鐢宠璁惧瀵嗛挜 + /// </summary> + /// <param name="mac"></param> + /// <returns></returns> + public ResponsePackNew ApplyDeviceSecret (string mac) + { + Dictionary<string, object> d = new Dictionary<string, object> (); + d.Add ("supplier", "HDL"); + d.Add ("mac", mac); + d.Add ("spk", "BUSUDPGATEWAY"); + var requestJson = HttpUtil.GetSignRequestJson (d); + return HttpUtil.RequestHttpsPostFroHome (NewAPI.Api_Post_ApplyDeviceSecret, requestJson); + } + //#region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� ///// <summary> ///// 鑾峰彇璁惧鍒楄〃 @@ -1395,5 +1431,23 @@ //} //#endregion + + /// <summary> + /// 淇敼璁惧澶囨敞 + /// </summary> + /// <param name="deviceId"></param> + /// <param name="homeId"></param> + /// <param name="name"></param> + /// <returns></returns> + public ResponsePackNew EditDeviceName (string deviceId,string homeId,string name) + { + var d = new Dictionary<string, object> (); + d.Add ("deviceId", deviceId); + d.Add ("homeId", homeId); + d.Add ("name", name); + var requestJson = HttpUtil.GetSignRequestJson (d); + var pack = HttpUtil.RequestHttpsPostFroHome (NewAPI.Api_Post_EditDeviceName, requestJson); + return pack; + } } } \ No newline at end of file -- Gitblit v1.8.0