| | |
| | | AppConfigManage.setUserRegionUrl(HDLLinkPMUser.getInstance().getUserRegionUrl()); |
| | | //判断AccessToken是否null |
| | | if (!TextUtils.isEmpty(HDLLinkPMUser.getInstance().getAccessToken())) { |
| | | // showLoading(); |
| | | HdlResidenceLogic.getInstance().getResidenceIdList("", "", new CloudCallBeak<List<HouseIdBean>>() { |
| | | @Override |
| | | public void onSuccess(List<HouseIdBean> obj) { |
| | | // hideLoading(); |
| | | HdlResidenceLogic.getInstance().setHouseIdList(obj); |
| | | |
| | | Intent intent = new Intent(); |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //安装商跳转界面 |
| | | intent.setClass(StartActivity.this, BPowerStationActivity.class); |
| | | } else { |
| | | //C端用户跳转界面 |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //安装商跳转界面 |
| | | Intent intent = new Intent(); |
| | | intent.setClass(StartActivity.this, BPowerStationActivity.class); |
| | | openActivity(intent); |
| | | } else { |
| | | //C端用户跳转界面 |
| | | showLoading(); |
| | | HdlResidenceLogic.getInstance().getResidenceIdList("", "", new CloudCallBeak<List<HouseIdBean>>() { |
| | | @Override |
| | | public void onSuccess(List<HouseIdBean> obj) { |
| | | hideLoading(); |
| | | HdlResidenceLogic.getInstance().setHouseIdList(obj); |
| | | Intent intent = new Intent(); |
| | | intent.setClass(StartActivity.this, CPowerStationActivity.class); |
| | | |
| | | openActivity(intent); |
| | | } |
| | | openActivity(intent); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | // hideLoading(); |
| | | Intent intent = new Intent(); |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | //安装商跳转界面 |
| | | intent.setClass(StartActivity.this, BPowerStationActivity.class); |
| | | } else { |
| | | //C端用户跳转界面 |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | hideLoading(); |
| | | Intent intent = new Intent(); |
| | | intent.setClass(StartActivity.this, CPowerStationActivity.class); |
| | | openActivity(intent); |
| | | } |
| | | openActivity(intent); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } else { |
| | | Intent intent = new Intent(); |
| | | intent.setClass(this, LoginActivity.class); |