|
|
@@ -81,6 +81,8 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
if (JSONUtil.validate(result)) {
|
|
|
JSONObject resultObject = JSON.parseObject(result);
|
|
|
failMsg = JSONUtil.getText(resultObject, "exceptionInfo");
|
|
|
+ } else {
|
|
|
+ failMsg = result;
|
|
|
}
|
|
|
}
|
|
|
workCallback.onFail(request.getWhat(), failMsg);
|
|
|
@@ -139,6 +141,7 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
}
|
|
|
List<WorkMenuBean.ModuleListBean> localModuleList = localWorkMenuBean.getModuleList();
|
|
|
if (localModuleName.equals(cacheModuleName)) {
|
|
|
+ //本地模块存在,按本地模块更新缓存数据
|
|
|
isWorkMenuExist = true;
|
|
|
WorkMenuBean workMenuBean = new WorkMenuBean();
|
|
|
workMenuBean.setIsLocalModule(true);
|
|
|
@@ -154,6 +157,7 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
for (WorkMenuBean.ModuleListBean localModuleListBean : localModuleList) {
|
|
|
String localMenuIcon = localModuleListBean.getMenuIcon();
|
|
|
if (localMenuIcon.equals(cacheMenuIcon)) {
|
|
|
+ //本地应用存在,按本地应用更新缓存数据
|
|
|
isModuleListExist = true;
|
|
|
WorkMenuBean.ModuleListBean resultModuleListBean = new WorkMenuBean.ModuleListBean();
|
|
|
resultModuleListBean.setIsHide(cacheModuleListBean.isHide());
|
|
|
@@ -167,6 +171,7 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ //如果本地应用不存在,则直接添加
|
|
|
if (!isModuleListExist && !cacheModuleListBean.isLocalMenu()) {
|
|
|
resultModuleListBeans.add(cacheModuleListBean);
|
|
|
}
|
|
|
@@ -181,6 +186,7 @@ public class WorkPlatModel implements IWorkPlatModel {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ //本地文件中有缓存中不存在的模块,则将新增模块添加入模块列表最后一项
|
|
|
if (!isExist) {
|
|
|
resultModuleListBeans.add(localModuleListBean);
|
|
|
}
|