3
This commit is contained in:
@@ -429,8 +429,8 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
if (!UIUtils.isLogined()) {
|
if (!UIUtils.isLogined()) {
|
||||||
if (tv_name != null) {
|
if (tv_name != null) {
|
||||||
if (UIUtils.isAccountLogined()) {
|
if (UIUtils.isAccountLogined()) {
|
||||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
String mobile = StringUtil.maskMobile(SharePrefUtil.getString(mActivity, Constant.mobile, ""));
|
||||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? StringUtil.maskMobile(realName) : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||||
} else {
|
} else {
|
||||||
@@ -443,8 +443,8 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!UIUtils.isDoctorVerified()) {
|
if (!UIUtils.isDoctorVerified()) {
|
||||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
String mobile = StringUtil.maskMobile(SharePrefUtil.getString(mActivity, Constant.mobile, ""));
|
||||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? StringUtil.maskMobile(realName) : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -359,8 +359,8 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
if (!UIUtils.isLogined()) {
|
if (!UIUtils.isLogined()) {
|
||||||
if (tv_name != null) {
|
if (tv_name != null) {
|
||||||
if (UIUtils.isAccountLogined()) {
|
if (UIUtils.isAccountLogined()) {
|
||||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
String mobile = StringUtil.maskMobile(SharePrefUtil.getString(mActivity, Constant.mobile, ""));
|
||||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? StringUtil.maskMobile(realName) : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||||
} else {
|
} else {
|
||||||
@@ -376,8 +376,8 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!UIUtils.isDoctorVerified()) {
|
if (!UIUtils.isDoctorVerified()) {
|
||||||
String mobile = SharePrefUtil.getString(mActivity, Constant.mobile, "");
|
String mobile = StringUtil.maskMobile(SharePrefUtil.getString(mActivity, Constant.mobile, ""));
|
||||||
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? realName : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
String display = (!StringUtil.isEmpty(realName) && !"null".equals(realName)) ? StringUtil.maskMobile(realName) : (!StringUtil.isEmpty(mobile) ? mobile : "已登录");
|
||||||
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
int st = SharePrefUtil.getInt(mActivity, "state", 0);
|
||||||
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
tv_name.setText(display + (st == 2 ? "(审核中)" : "(去完善资料)"));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -534,7 +534,21 @@ public class StringUtil {
|
|||||||
firstParam = false;
|
firstParam = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryString.toString();
|
return queryString.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号中间 4 位脱敏(如 138****1234)
|
||||||
|
*/
|
||||||
|
public static String maskMobile(String mobile) {
|
||||||
|
if (isEmpty(mobile)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String trimmed = mobile.trim();
|
||||||
|
if (trimmed.length() == 11) {
|
||||||
|
return trimmed.substring(0, 3) + "****" + trimmed.substring(7);
|
||||||
|
}
|
||||||
|
return trimmed;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user