mac
2023-10-09 e10685706d2bacf0da27b8393c04a1f7a4df2bad
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -57,7 +57,7 @@
        return sHdlUniLogic;
    }
    //region ******【原生】和【小程序】通讯的方法 onOtherUniMPEventReceive();openUniMP();sendUni();******
    //region ******【原生】和【小程序】通讯的3个方法名 onOtherUniMPEventReceive();openUniMP();sendUni();******
    /**
     * 原生接收到uni发来的数据
@@ -77,8 +77,9 @@
            if (HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL.equals(event)) {
                //住宅模块
                switch (type) {
                    //创建电站
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION: {
                        //创建
                        //EventBus事件分发
                        BaseEventBus baseEventBus = new BaseEventBus();
                        baseEventBus.setType(ConstantManage.EVENTBUS_POST_HOME_CREATED);
@@ -88,6 +89,10 @@
                    break;
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_DETAILS: {
                        //详情
                    }
                    break;
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE: {
                        //关闭详情页
                    }
                    break;
@@ -162,8 +167,9 @@
                        });
                    }
                    break;
                    //获取逆变器列表
                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST: {
                        //获取网关设备列表
                        HdlDeviceLogic.getInstance().getLocalGatewayList(new CloudCallBeak<Boolean>() {
                            @Override
                            public void onSuccess(Boolean obj) {
@@ -186,10 +192,10 @@
                    }
                    break;
                    //获取oid列表
                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_OID: {
                        //添加设备到云端
                        String mac = getKeyValue("mac", getKeyValue("data", data));
                        //获取oid列表
                        HdlDeviceLogic.getInstance().getGatewayOidList(mac, new LinkCallBack<List<OidBean>>() {
                            @Override
                            public void onSuccess(List<OidBean> list) {
@@ -200,7 +206,7 @@
                            @Override
                            public void onError(HDLLinkException e) {
                                uniCallbackData(null, -2, e.getMessage(), callback);
                                uniCallbackData(null, -2, e.getMsg(), callback);
                            }
                        });
                    }
@@ -222,12 +228,10 @@
                            }
                        });
                    }
                    //设备时间编辑
                    break;
                    //设备时间编辑
                    case HDLUniMP.UNI_EVENT_REPLY_DEVICE_TIME_EDIT: {
                        //添加设备到云端
                        String mac = getKeyValue("mac", getKeyValue("data", data));
                        //获取oid列表
                        HdlDeviceLogic.getInstance().getGatewayOidList(mac, new LinkCallBack<List<OidBean>>() {
                            @Override
                            public void onSuccess(List<OidBean> obj) {
@@ -248,22 +252,23 @@
                WifiUtils wifiUtils = new WifiUtils(HDLApp.getInstance());
                //wifi模块
                switch (type) {
                    //获取wifi列表
                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_LIST: {
                        //获取wifi列表
                        if (callback != null) {
                            uniCallbackData(wifiUtils.getScanResult(), callback);
                        }
                    }
                    break;
                    //当前wifi详情
                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_INFO: {
                        //当前wifi详情
                        if (callback != null) {
                            uniCallbackData(wifiUtils.getCurrentConnectWifiInfo(), callback);
                        }
                    }
                    break;
                    //wifi连接
                    case HDLUniMP.UNI_EVENT_REPLY_WIFI_CONNECT: {
                        //wifi连接
                    }
                    break;