From 0a7db7243a33a54d3733f60179185ee63599d397 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 24 十一月 2022 12:47:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wxr-app'

---
 AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java b/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
index e0bc9ad..d538b63 100644
--- a/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
+++ b/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
@@ -35,7 +35,11 @@
         Map<String, Object> map = paramsInit(paramsMap);
         JsonObject jsonResult = null;
         if (CONST.isHdlServer()) {
-            jsonResult = doPost(CONST.HOST + "/home-wisdom/imou/openapi/" + method, map, timeOut);
+            if(method.equals("bindDevice")){
+                jsonResult = doPost(CONST.HOST + "/home-wisdom/app/device/independentRegister", map, timeOut);
+            }else {
+                jsonResult = doPost(CONST.HOST + "/home-wisdom/imou/openapi/" + method, map, timeOut);
+            }
         } else {
             jsonResult = doPost(CONST.HOST + "/openapi/" + method, map, timeOut);
             if (jsonResult == null) {
@@ -68,10 +72,10 @@
 
     private static JsonObject doPost(String url, Map<String, Object> map, int timeOut) throws BusinessException {
         Gson gson = new Gson();
-        map.put("homeId", LCDeviceEngine.newInstance().getHomeId());
         String json;
         JsonObject jsonObject;
         if(CONST.isHdlServer()) {
+            map.put("homeId", LCDeviceEngine.newInstance().getHomeId());
             if (map.containsKey("params")) {
                 Map<String, Object> tempMap = (Map<String, Object>) map.get("params");
                 map.remove("params");

--
Gitblit v1.8.0