| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | // setStatusBarTranslucent(); |
| | | // setNotificationBarBackgroundColor(CustomColor.white); |
| | | getWindow().setStatusBarColor(getColor(R.color.text_FFFFFFFF)); |
| | | setStatusBarTextColor(); |
| | | |
| | | setStatusBarTranslucent(); |
| | | getWindow().setNavigationBarColor(getColor(R.color.text_FF000000)); |
| | | //初始化服务器域名(用户注册所在服务器域名地址) |
| | | 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); |