3
This commit is contained in:
@@ -378,115 +378,112 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
// 获取审核状态值
|
||||
Intent intent = getIntent();
|
||||
// ( 1.待审核 2.审核中 3.需要补充修改资料 4.再次提交审核 5.拒绝
|
||||
// 6.已通过)//修改,0,1,3,4,5需要提交资料,6是通过,2其他不允许提交
|
||||
state = intent.getIntExtra("state", SharePrefUtil.getInt(ct, "state", 0));
|
||||
// 获取审核状态值
|
||||
Intent intent = getIntent();
|
||||
// ( 1.待审核 2.审核中 3.需要补充修改资料 4.再次提交审核 5.拒绝
|
||||
// 6.已通过)//修改,0,1,3,4,5需要提交资料,6是通过,2其他不允许提交
|
||||
state = intent.getIntExtra("state", SharePrefUtil.getInt(ct, "state", 0));
|
||||
String checkInfo = intent.getStringExtra("checkInfo");
|
||||
if (TextUtils.isEmpty(checkInfo)) {
|
||||
checkInfo = SharePrefUtil.getString(ct, "checkInfo", "");
|
||||
}
|
||||
userName = intent.getStringExtra("phone");
|
||||
LogUtil.i("审核信息==" + state);
|
||||
// 根据状态进行显示规则,与提示用户
|
||||
if(11 == state||10 == state ||9 == state)//hcp登陆可编辑
|
||||
{
|
||||
tv_showCheckInfo.setVisibility(View.GONE);
|
||||
tv_showCheckInfo.setText("请完善资料");
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
|
||||
}
|
||||
else if (0 == state || 1 == state) {// 0,3,5需要提交资料
|
||||
tv_showCheckInfo.setVisibility(View.GONE);
|
||||
tv_showCheckInfo.setText("请完善资料");
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
// 根据不同用户名获取相应的资料
|
||||
String mobile = SharePrefUtil.getString(ct,
|
||||
Constant.SP_IS_FIRST_NAME, Constant.mobile, "");// 登录的手机号
|
||||
get(mobile);
|
||||
|
||||
} else if (3 == state || 4 == state || 5 == state) {// 3,5需要提交资料//7
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
String text = "您的资料未通过审核,请修改完善后重新提交。";
|
||||
if (!TextUtils.isEmpty(checkInfo)) {
|
||||
text = checkInfo;
|
||||
}
|
||||
tv_showCheckInfo.setText(text);
|
||||
showAlertTips(text);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
|
||||
} else if (6 == state) {// 通过
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
tv_showCheckInfo.setText("您的资料已经通过了审核,将会自动进入应用");
|
||||
setInfoClick(false);
|
||||
submit_myinfo.setVisibility(View.GONE);
|
||||
submit_myinfo.setEnabled(false);
|
||||
ToastUtil.showToast("您的资料已经通过了审核,将会自动进入应用");
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
// 注册成功跳转
|
||||
Intent i = new Intent();
|
||||
// if(BigModule())
|
||||
// {
|
||||
// i.setClass(this, BigMainActivity.class);
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
i.setClass(this, MainActivity.class);
|
||||
// }
|
||||
i.putExtra("launcher_from", 1);
|
||||
startActivity(i);
|
||||
// 保存登陆
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (7 == state){//2018.12.21改,checkInfo = undefind继续追踪,暂不出现弹窗处理
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
}else {
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
tv_showCheckInfo.setText("肝胆相照将尽快对您的资料进行审核,请耐心等待。");
|
||||
setInfoClick(false);
|
||||
submit_myinfo.setVisibility(View.GONE);
|
||||
submit_myinfo.setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// showAlertTips(tv_showCheckInfo.getText().toString());
|
||||
|
||||
// 下面是获取列表
|
||||
// getList(hospitalListUrl);// 获取医院列表
|
||||
getList(officeListUrl);// 获取科室列表
|
||||
getList(positionListUrl);// 获取职称列表
|
||||
getList(diseaseUrl);// 获取专长
|
||||
|
||||
// 取出定位的数据
|
||||
lon = SharePrefUtil.getString(ct, Constant.LON, "116.3");
|
||||
lat = SharePrefUtil.getString(ct, Constant.LAT, "39.9");
|
||||
String province = SharePrefUtil.getString(ct, Constant.PROVINCE, "北京市");
|
||||
String city = SharePrefUtil.getString(ct, Constant.CITY, "北京市");
|
||||
String district = SharePrefUtil.getString(ct, Constant.DISTRICT, "东城区");
|
||||
LogUtil.i("lon=" + lon + "lat=" + lat + "province=" + province
|
||||
+ "city=" + city + "district=" + district);
|
||||
// 设置默认选中城市
|
||||
setSelectedCity(province, city, district);
|
||||
// 执行检出城市
|
||||
new InitAreaTask().execute();
|
||||
|
||||
}
|
||||
userName = intent.getStringExtra("phone");
|
||||
LogUtil.i("审核信息==" + state);
|
||||
applyStateUI(state, checkInfo);
|
||||
|
||||
// 向服务端同步最新审核状态(防止用户在已登录状态下后台已完成审核但本地 state 未更新)
|
||||
UIUtils.refreshDoctorStateIfNeeded(ct, new UIUtils.OnDoctorStateRefreshListener() {
|
||||
@Override
|
||||
public void onStateRefreshed(int newState, String newCheckInfo) {
|
||||
if (isFinishing() || newState <= 0 || newState == state) {
|
||||
return;
|
||||
}
|
||||
state = newState;
|
||||
applyStateUI(newState, newCheckInfo);
|
||||
}
|
||||
});
|
||||
|
||||
// showAlertTips(tv_showCheckInfo.getText().toString());
|
||||
|
||||
// 下面是获取列表
|
||||
// getList(hospitalListUrl);// 获取医院列表
|
||||
getList(officeListUrl);// 获取科室列表
|
||||
getList(positionListUrl);// 获取职称列表
|
||||
getList(diseaseUrl);// 获取专长
|
||||
|
||||
// 取出定位的数据
|
||||
lon = SharePrefUtil.getString(ct, Constant.LON, "116.3");
|
||||
lat = SharePrefUtil.getString(ct, Constant.LAT, "39.9");
|
||||
String province = SharePrefUtil.getString(ct, Constant.PROVINCE, "北京市");
|
||||
String city = SharePrefUtil.getString(ct, Constant.CITY, "北京市");
|
||||
String district = SharePrefUtil.getString(ct, Constant.DISTRICT, "东城区");
|
||||
LogUtil.i("lon=" + lon + "lat=" + lat + "province=" + province
|
||||
+ "city=" + city + "district=" + district);
|
||||
// 设置默认选中城市
|
||||
setSelectedCity(province, city, district);
|
||||
// 执行检出城市
|
||||
new InitAreaTask().execute();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据审核状态更新界面展示与可编辑状态
|
||||
*/
|
||||
private void applyStateUI(int currentState, String checkInfo) {
|
||||
if (11 == currentState || 10 == currentState || 9 == currentState) {// hcp登陆可编辑
|
||||
tv_showCheckInfo.setVisibility(View.GONE);
|
||||
tv_showCheckInfo.setText("请完善资料");
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
} else if (0 == currentState || 1 == currentState) {// 0,3,5需要提交资料
|
||||
tv_showCheckInfo.setVisibility(View.GONE);
|
||||
tv_showCheckInfo.setText("请完善资料");
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
// 根据不同用户名获取相应的资料
|
||||
String mobile = SharePrefUtil.getString(ct,
|
||||
Constant.SP_IS_FIRST_NAME, Constant.mobile, "");// 登录的手机号
|
||||
get(mobile);
|
||||
} else if (3 == currentState || 4 == currentState || 5 == currentState) {// 3,5需要提交资料//7
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
String text = "您的资料未通过审核,请修改完善后重新提交。";
|
||||
if (!TextUtils.isEmpty(checkInfo)) {
|
||||
text = checkInfo;
|
||||
}
|
||||
tv_showCheckInfo.setText(text);
|
||||
showAlertTips(text);
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
} else if (6 == currentState) {// 通过
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
tv_showCheckInfo.setText("您的资料已经通过了审核,将会自动进入应用");
|
||||
setInfoClick(false);
|
||||
submit_myinfo.setVisibility(View.GONE);
|
||||
submit_myinfo.setEnabled(false);
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
SharePrefUtil.saveInt(ct, "state", 6);
|
||||
ToastUtil.showToast("您的资料已经通过了审核");
|
||||
Intent i = new Intent(this, MainActivity.class);
|
||||
i.putExtra("launcher_from", 1);
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(i);
|
||||
finish();
|
||||
} else if (7 == currentState) {// 2018.12.21改,checkInfo = undefind继续追踪,暂不出现弹窗处理
|
||||
setInfoClick(true);
|
||||
submit_myinfo.setVisibility(View.VISIBLE);
|
||||
submit_myinfo.setEnabled(true);
|
||||
} else {
|
||||
tv_showCheckInfo.setVisibility(View.VISIBLE);
|
||||
tv_showCheckInfo.setText("肝胆相照将尽快对您的资料进行审核,请耐心等待。");
|
||||
setInfoClick(false);
|
||||
submit_myinfo.setVisibility(View.GONE);
|
||||
submit_myinfo.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user