| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取住宅图片 |
| | | */ |
| | | public void getResidenceImage(String imageUrl, CloudCallBeak<List<HouseIdBean>> cloudCallBeak) { |
| | | String requestUrl = imageUrl; |
| | | JsonObject json = new JsonObject(); |
| | | List<HouseIdBean> list = new ArrayList<>(); |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), true, true, new BaseSuccessFailureCallBeak() { |
| | | @Override |
| | | public void onSuccess(HttpResponsePack httpResponsePack) { |
| | | if (httpResponsePack != null && httpResponsePack.getData() != null) { |
| | | Gson gson = new Gson(); |
| | | String jsonStr = gson.toJson(httpResponsePack.getData()); |
| | | HouseBeanClass houseInfoBeanClass = gson.fromJson(jsonStr, HouseBeanClass.class); |
| | | } else { |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onSuccess(list); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(Exception exception) { |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onFailure(exception); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 添加【住宅详情】到本地缓存 |
| | |
| | | */ |
| | | public Boolean switchHouse(String homeId) { |
| | | String oidHomeId = UserConfigManage.getInstance().getHomeId(); |
| | | |
| | | HdlFileLogic.getInstance().deleteDirectory(HdlFileLogic.getInstance().getCurrentHomeRootPath()); |
| | | UserConfigManage.getInstance().setHomeId(homeId); |
| | | HdlFileLogic.getInstance().createDirectory(); |
| | | |
| | | HdlThreadLogic.runThread(new Runnable() { |
| | | @Override |
| | | public void run() { |