mac
2024-10-24 661fe3a7bf3a4c4f4200106540982268b260b4a1
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -180,10 +180,7 @@
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_ADD: {
                        String url = getKeyValue("url", getKeyValue("data", data));
                        //EventBus事件分发
                        HdlCommonLogic.getInstance().postEventBusSticky(
                                HDLUniMP.UNI_EVENT_REPLY_HOME_ADD,
                                HDLUniMP.UNI_EVENT_REPLY_HOME_ADD,
                                url);
                        HdlCommonLogic.getInstance().postEventBusSticky(HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, HDLUniMP.UNI_EVENT_REPLY_HOME_ADD, url);
                        if (callback != null) {
                            uniSuccessCallback(type, null, callback);
@@ -200,10 +197,7 @@
                    //创建电站
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION: {
                        //EventBus事件分发
                        HdlCommonLogic.getInstance().postEventBus(
                                HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL,
                                HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION,
                                getKeyValue("data", data));
                        HdlCommonLogic.getInstance().postEventBus(HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL, HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION, getKeyValue("data", data));
                        if (callback != null) {
                            uniSuccessCallback(type, null, callback);
                        }
@@ -238,10 +232,7 @@
                    //住宅【电站】编辑
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT: {
                        //EventBus事件分发
                        HdlCommonLogic.getInstance().postEventBus(
                                HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL,
                                HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT,
                                getKeyValue("data", data));
                        HdlCommonLogic.getInstance().postEventBus(HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL, HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT, getKeyValue("data", data));
                        if (callback != null) {
                            uniSuccessCallback(type, null, callback);
                        }
@@ -696,6 +687,32 @@
                    }
                    break;
                    //link进行密码验证
                    case HDLUniMP.UNI_EVENT_REPLY_OTHER_Password_verifiy: {
                        String password = getKeyValue("password", getKeyValue("data", data));
                        String mac = getKeyValue("mac", getKeyValue("data", data));
                        String requestUrl = TopicApi.DELETING_GATEWAY_password_verifiy;
                        JsonObject json = new JsonObject();
                        json.addProperty("password", password);
                        json.addProperty("mac", mac);
                        TcpClient.getInstance().sendDataToLinkGateway(mac, true, requestUrl, json, "", new HDLLinkCallBack() {
                            @Override
                            public void onSuccess(String msg) {
                                if (callback != null) {
                                    uniSuccessCallback(type, msg, callback);
                                }
                            }
                            @Override
                            public void onError(HDLLinkException e) {
                                if (callback != null) {
                                    uniCallbackData(type, null, e.getCode(), e.getMsg(), callback);
                                }
                            }
                        });
                    }
                    break;
                }
            }