| | |
| | | break; |
| | | //本地json资源文件获取 |
| | | case HDLUniMP.UNI_EVENT_REPLY_OTHER_GET_LOCAL_JSON: { |
| | | String url = getKeyValue("url", getKeyValue("data", data)); |
| | | String deviceModel = getKeyValue("deviceModel", getKeyValue("data", data)); |
| | | // String url = getKeyValue("url", getKeyValue("data", data)); |
| | | String fileName = getKeyValue("fileName", getKeyValue("data", data));//唯一标识 |
| | | String deviceType = getKeyValue("deviceType", getKeyValue("data", data));//设备类型 |
| | | String deviceModel = getKeyValue("deviceModel", getKeyValue("data", data));//设备模型 |
| | | String language = getKeyValue("language", getKeyValue("data", data)); |
| | | String json = HdlESLocalJsonLogic.getInstance().readHdlESLocalJson(url, deviceModel); |
| | | String json = HdlESLocalJsonLogic.getInstance().readHdlESLocalJson(fileName + ".json", deviceModel); |
| | | if (TextUtils.isEmpty(json)) { |
| | | //本地没有缓存 |
| | | HdlESLocalJsonLogic.getInstance().getHdlESLocalJson(url, deviceModel, new CloudCallBeak<String>() { |
| | | HdlESLocalJsonLogic.getInstance().getHdlESLocalJson(fileName, deviceType, deviceModel, new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String obj) { |
| | | // if (callback != null) { |
| | | // uniSuccessCallback(type, obj, callback); |
| | | // } |
| | | String s = HdlESLocalJsonLogic.getInstance().readHdlESLocalJson(url, deviceModel); |
| | | String s = HdlESLocalJsonLogic.getInstance().readHdlESLocalJson(fileName, deviceModel); |
| | | //本地缓存数据 |
| | | if (callback != null) { |
| | | try { |