From d53e6af2c5f17838fa79659614b15a2a1f383399 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 31 三月 2023 10:04:58 +0800
Subject: [PATCH] 1

---
 Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs
index ebb7f1c..4735acc 100644
--- a/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs
+++ b/Crabtree/SmartHome/HDL/Common/HttpUtil/HttpServerRequest.cs
@@ -305,10 +305,8 @@
             var revertObj = HttpUtil.RequestHttpsPost (NewAPI.API_Post_Mark, requestJson);
             if (revertObj != null) {
                 if (revertObj.Code == "0") {
-                    if (revertObj.Data.ToString () == "true") {
                         UserConfig.Instance.CurrentRegion.indiaIsAsyncDeviceMark = true;
                         return true;
-                    }
                 }
             }
             return false;
@@ -1026,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>
         ///// 鑾峰彇璁惧鍒楄〃
@@ -1418,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