3
This commit is contained in:
@@ -402,7 +402,8 @@ public class BindNumberActivity extends BaseActivity implements OnCallBackFromNe
|
||||
intent.putExtra("state", state);
|
||||
startActivity(intent);
|
||||
closeProgressDialog();
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, false);
|
||||
Constant.islogout = 2;
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
this.finish();
|
||||
} else {
|
||||
getYunxin(objs);
|
||||
|
||||
@@ -798,7 +798,8 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
intent.putExtra("state", state);
|
||||
startActivity(intent);
|
||||
closeProgressDialog();
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, false);
|
||||
Constant.islogout = 2;
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
this.finish();
|
||||
} else {
|
||||
getYunxin(objs);
|
||||
|
||||
@@ -82,7 +82,8 @@ import cn.shangyu.gdxzExpert.widget.LoadingPage.ResultState;
|
||||
public class LoginSetInfoActivity extends BaseActivity implements
|
||||
OnItemClickListener {
|
||||
|
||||
private Button submit_myinfo;
|
||||
private Button submit_myinfo;
|
||||
private Button btn_skip_info;
|
||||
private TextView tv_showCheckInfo;
|
||||
private ImageView upload_certificateImg;
|
||||
private static final int TO_SELECT_PHOTO = 3;
|
||||
@@ -205,7 +206,11 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
ll_my_disease = (LinearLayout) view.findViewById(R.id.ll_my_disease);// 专长
|
||||
my_disease = (TextView) view.findViewById(R.id.my_disease);// 专长
|
||||
|
||||
submit_myinfo = (Button) view.findViewById(R.id.submit_myinfo);// 提交
|
||||
submit_myinfo = (Button) view.findViewById(R.id.submit_myinfo);// 提交
|
||||
btn_skip_info = (Button) view.findViewById(R.id.btn_skip_info);// 跳过
|
||||
if (btn_skip_info != null) {
|
||||
btn_skip_info.setOnClickListener(this);
|
||||
}
|
||||
tv_showCheckInfo = (TextView) view.findViewById(R.id.tv_showCheckInfo);// 回显审核状态
|
||||
|
||||
// my_photo.setOnClickListener(this);
|
||||
@@ -377,8 +382,11 @@ 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", 0);
|
||||
String checkInfo = intent.getStringExtra("checkInfo");
|
||||
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);
|
||||
// 根据状态进行显示规则,与提示用户
|
||||
@@ -596,6 +604,9 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
case R.id.ll_my_disease:// 专长
|
||||
showDiseasePop(my_disease);
|
||||
break;
|
||||
case R.id.btn_skip_info:// 跳过
|
||||
handleSkipOrBack(mobile);
|
||||
break;
|
||||
case R.id.submit_myinfo:// 提交
|
||||
submitInfo();
|
||||
break;
|
||||
@@ -607,8 +618,10 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
overridePendingTransition(R.anim.timepicker_anim_enter_bottom,
|
||||
R.anim.timepicker_anim_exit_bottom);
|
||||
break;
|
||||
case R.id.top_back_layout:// 返回
|
||||
Intent Login = new Intent(ct, LoginNewActivity.class);
|
||||
case R.id.top_back_layout:// 返回
|
||||
handleSkipOrBack(SharePrefUtil.getString(ct, Constant.SP_IS_FIRST_NAME, Constant.mobile, ""));
|
||||
if (ct != null) return;
|
||||
Intent Login = new Intent(ct, LoginNewActivity.class);
|
||||
// 注册后跳转到登录页面
|
||||
|
||||
Login.putExtra("phone", userName);
|
||||
@@ -626,6 +639,17 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
private void handleSkipOrBack(String mobile) {
|
||||
if (submit_myinfo != null && submit_myinfo.getVisibility() == View.VISIBLE && !StringUtil.isEmpty(mobile)) {
|
||||
save(mobile);
|
||||
}
|
||||
if (MainActivity.mMainActivity == null || MainActivity.mMainActivity.isFinishing() || MainActivity.mMainActivity.isDestroyed()) {
|
||||
Intent intent = new Intent(ct, MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
this.finish();
|
||||
}
|
||||
|
||||
// 返回键监听
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
@@ -636,6 +660,8 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
// finish();
|
||||
// AppManager.getAppManager().finishAllActivity();
|
||||
// android.os.Process.killProcess(android.os.Process.myPid());
|
||||
handleSkipOrBack(SharePrefUtil.getString(ct, Constant.SP_IS_FIRST_NAME, Constant.mobile, ""));
|
||||
if (ct != null) return;
|
||||
Intent Login = new Intent(ct, LoginNewActivity.class);
|
||||
// 注册后跳转到登录页面
|
||||
|
||||
@@ -1264,7 +1290,8 @@ public class LoginSetInfoActivity extends BaseActivity implements
|
||||
submit_myinfo.setEnabled(false);
|
||||
submit_myinfo.setVisibility(View.GONE);
|
||||
setInfoClick(false);
|
||||
SharePrefUtil.saveString(ct, Constant.realName, name);// 真实姓名
|
||||
SharePrefUtil.saveString(ct, Constant.realName, name);// 真实姓名
|
||||
SharePrefUtil.saveInt(ct, "state", 2);// 审核中
|
||||
} else {
|
||||
ToastUtil.showToast("提交失败,请重试" + bean.message);
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
||||
rl_setting_yinsi.setOnClickListener(this);
|
||||
rl_setting_yinsi1.setOnClickListener(this);
|
||||
m_out.setOnClickListener(this);
|
||||
if (!UIUtils.isLogined()) {
|
||||
if (!UIUtils.isAccountLogined()) {
|
||||
m_out.setVisibility(View.GONE);
|
||||
}
|
||||
m_abouat.setOnClickListener(this);
|
||||
@@ -359,7 +359,7 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
||||
int id = v.getId();
|
||||
if ((id == R.id.rl_setting_feedback || id == R.id.rl_setting_zhuxiao
|
||||
|| id == R.id.rl_setting_changepsw || id == R.id.rl_changenum
|
||||
|| id == R.id.rl_setting_bindwx) && !UIUtils.checkLoginAndJump(this)) {
|
||||
|| id == R.id.rl_setting_bindwx) && !UIUtils.checkAccountLoginAndJump(this)) {
|
||||
return;
|
||||
}
|
||||
if (id == R.id.ll_dynamic) {
|
||||
@@ -718,6 +718,8 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
||||
SharePrefUtil.saveString(ctx, "access_token", "");
|
||||
SharePrefUtil.saveString(ctx, "refresh_token", "");
|
||||
SharePrefUtil.saveString(ctx, Constant.realName, "");
|
||||
SharePrefUtil.saveInt(ctx, "state", 0);
|
||||
SharePrefUtil.saveString(ctx, "checkInfo", "");
|
||||
SharePrefUtil.saveString(ctx, "hospitalName", "");
|
||||
SharePrefUtil.saveString(ctx, Constant.photo, "");
|
||||
addUMToken("");
|
||||
|
||||
@@ -427,7 +427,16 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
||||
// 从sp文件里取出资料
|
||||
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
||||
if (!UIUtils.isLogined()) {
|
||||
if (tv_name != null) tv_name.setText("点击登录");
|
||||
if (tv_name != null) {
|
||||
if (UIUtils.isAccountLogined()) {
|
||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||
} else {
|
||||
tv_name.setText("点击登录");
|
||||
}
|
||||
}
|
||||
if (pic != null) pic.setImageResource(R.drawable.icon_touxiang_persion_gray_big);
|
||||
if (tv_qiandao != null) tv_qiandao.setText("签到");
|
||||
return;
|
||||
|
||||
@@ -357,7 +357,16 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
||||
// 从sp文件里取出资料
|
||||
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
||||
if (!UIUtils.isLogined()) {
|
||||
if (tv_name != null) tv_name.setText("点击登录");
|
||||
if (tv_name != null) {
|
||||
if (UIUtils.isAccountLogined()) {
|
||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||
} else {
|
||||
tv_name.setText("点击登录");
|
||||
}
|
||||
}
|
||||
if (pic != null) pic.setImageResource(R.drawable.icon_touxiang_persion_gray_big);
|
||||
if (patient_num != null) patient_num.setText("0");
|
||||
if (tv_gongyi != null) tv_gongyi.setText("0");
|
||||
|
||||
@@ -66,13 +66,18 @@ public class MyUserIconUtil {
|
||||
if (name == null) {
|
||||
return;
|
||||
}
|
||||
if ("更换手机号".equals(name) || name.contains("微信")) {
|
||||
if (!UIUtils.checkAccountLoginAndJump(context)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ("我的患者".equals(name) || "公益咨询".equals(name) || "患者审核".equals(name)
|
||||
|| "患者分组".equals(name) || "群发消息".equals(name) || "随访二维码".equals(name)
|
||||
|| "出诊计划".equals(name) || "我的视频".equals(name) || "我的课程".equals(name)
|
||||
|| "我的下载".equals(name) || "我的收藏".equals(name) || "我的账户".equals(name)
|
||||
|| "我的积分".equals(name) || "我的福利".equals(name) || "我的鲜花".equals(name)
|
||||
|| "课件明细".equals(name) || "课程明细".equals(name) || "积分商城".equals(name)
|
||||
|| "送心意".equals(name) || "更换手机号".equals(name) || name.contains("微信")
|
||||
|| "送心意".equals(name)
|
||||
|| "病例讨论".equals(name) || "病例交流".equals(name) || "病例荟萃".equals(name)
|
||||
|| "病例分享".equals(name) || "科研项目".equals(name) || "临床研究".equals(name)) {
|
||||
if (!UIUtils.checkLoginAndJump(context)) {
|
||||
|
||||
@@ -174,7 +174,44 @@ public class UIUtils {
|
||||
* @return
|
||||
* boolean
|
||||
*/
|
||||
public static boolean isLogined() {
|
||||
public static boolean isAccountLogined() {
|
||||
boolean isLogin = SharePrefUtil.getBoolean(getContext(), Constant.IS_LOGIN, false);
|
||||
String uuid = SharePrefUtil.getString(getContext(), Constant.uuid, "");
|
||||
return isLogin && !StringUtil.isEmpty(uuid);
|
||||
}
|
||||
|
||||
public static boolean isLogined() {
|
||||
return isAccountLogined() && SharePrefUtil.getInt(getContext(), "state", 0) == 6;
|
||||
}
|
||||
|
||||
public static boolean checkAccountLoginAndJump(Context context) {
|
||||
if (isAccountLogined()) {
|
||||
return true;
|
||||
}
|
||||
long now = System.currentTimeMillis();
|
||||
if (now - lastJumpLoginTime < 800) {
|
||||
return false;
|
||||
}
|
||||
lastJumpLoginTime = now;
|
||||
Context targetContext = context != null ? context : getContext();
|
||||
Intent intent;
|
||||
if (isAccountLogined()) {
|
||||
intent = new Intent(targetContext, cn.shangyu.gdxzExpert.activity.LoginSetInfoActivity.class);
|
||||
intent.putExtra("state", SharePrefUtil.getInt(getContext(), "state", 0));
|
||||
intent.putExtra("checkInfo", SharePrefUtil.getString(getContext(), "checkInfo", ""));
|
||||
intent.putExtra("phone", SharePrefUtil.getString(getContext(), Constant.mobile, ""));
|
||||
} else {
|
||||
intent = new Intent(targetContext, LoginNewActivity.class);
|
||||
}
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
if (!(targetContext instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
targetContext.startActivity(intent);
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean unusedOldIsLogined() {
|
||||
// TODO Auto-generated method stub
|
||||
boolean isLogin = SharePrefUtil.getBoolean(getContext(), Constant.IS_LOGIN, false);
|
||||
String uuid = SharePrefUtil.getString(getContext(), Constant.uuid, "");
|
||||
@@ -199,7 +236,15 @@ public class UIUtils {
|
||||
}
|
||||
lastJumpLoginTime = now;
|
||||
Context targetContext = context != null ? context : getContext();
|
||||
Intent intent = new Intent(targetContext, LoginNewActivity.class);
|
||||
Intent intent;
|
||||
if (isAccountLogined()) {
|
||||
intent = new Intent(targetContext, cn.shangyu.gdxzExpert.activity.LoginSetInfoActivity.class);
|
||||
intent.putExtra("state", SharePrefUtil.getInt(getContext(), "state", 0));
|
||||
intent.putExtra("checkInfo", SharePrefUtil.getString(getContext(), "checkInfo", ""));
|
||||
intent.putExtra("phone", SharePrefUtil.getString(getContext(), Constant.mobile, ""));
|
||||
} else {
|
||||
intent = new Intent(targetContext, LoginNewActivity.class);
|
||||
}
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
if (!(targetContext instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
@@ -221,7 +221,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:text="肝胆相照将尽快对您的资料进行审核,请耐心等待。"
|
||||
android:textColor="@color/red_btn_color_normal"
|
||||
@@ -232,7 +233,9 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="30dp"
|
||||
android:paddingLeft="25dp"
|
||||
android:paddingRight="25dp"
|
||||
@@ -243,11 +246,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/selector_btn"
|
||||
android:gravity="center"
|
||||
android:gravity="center"
|
||||
|
||||
android:padding="10dp"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="20sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_skip_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/bt_setting_bg"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="跳过"
|
||||
android:textColor="@color/top_title"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user