| | |
| | | import java.util.List; |
| | | |
| | | |
| | | |
| | | /** |
| | | * App启动页(目的是为了让用户点击APP图标的时候有一个瞬间响应的交互体验。) |
| | | */ |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | // setStatusBarTranslucent(); |
| | | setNotificationBarBackgroundColor(CustomColor.white); |
| | | 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); |
| | |
| | | startActivity(intent); |
| | | finish(); |
| | | } |
| | | |
| | | @Override |
| | | protected void onDestroy() { |
| | | super.onDestroy(); |
| | | overridePendingTransition(0, 0); |
| | | } |
| | | |
| | | |
| | | |
| | | } |