From e9e9ea0e5bf22953d5c0816d0a052bdd3acf92fc Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期五, 22 三月 2024 21:03:40 +0800 Subject: [PATCH] 2024年03月22日20:24:23 --- app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java index f9d9993..a49c88c 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java @@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON; import com.google.gson.Gson; +import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; import com.hdl.linkpm.sdk.core.exception.HDLException; import com.hdl.linkpm.sdk.device.bean.DeviceOidInfoBean; @@ -130,6 +131,14 @@ //鐢ㄦ埛澶村儚锛堟棫骞冲彴閫昏緫鏄ご鍍忓崟鐙幏鍙栦笅杞藉湴鍧�锛� case HDLUniMP.UNI_EVENT_REPLY_USER_IMAGE: { uniGetImageKey(mode_type, data, callback); + } + break; + //鐢ㄦ埛鏈湴缂撳瓨淇℃伅 + case HDLUniMP.UNI_EVENT_REPLY_USER_LOCAL_INFO: { + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty("user_name", UserConfigManage.getInstance().getUserName()); + jsonObject.addProperty("user_image_url", UserConfigManage.getInstance().getUserImageUrl()); + uniCallbackData(mode_type, jsonObject, callback); } break; } @@ -1361,6 +1370,7 @@ // com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray(data); try { String devices = getKeyValue("devices", getKeyValue("data", data)); + String homeId = UserConfigManage.getInstance().getHomeId(); //getKeyValue("homeId", getKeyValue("data", data)); Gson gson = new Gson(); Type typeOfT = new TypeToken<List<GatewayBean>>() { }.getType(); @@ -1369,7 +1379,6 @@ uniCallbackData(type, null, -100, HDLApp.getInstance().getString(R.string.The_gateway_cannot_be_found_locally), callback); return; } - String homeId = UserConfigManage.getInstance().getHomeId(); //璁板綍鏉℃暟 AtomicInteger atomicInteger = new AtomicInteger(0); final boolean[] is_boolean = {false}; -- Gitblit v1.8.0