未登录可先进入首页浏览、触发敏感功能再登录
This commit is contained in:
@@ -152,7 +152,7 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
public void setTitle() {
|
public void setTitle() {
|
||||||
// initFontScale();
|
// initFontScale();
|
||||||
top_title.setText("登录");
|
top_title.setText("登录");
|
||||||
top_back_layout.setVisibility(View.GONE);
|
top_back_layout.setVisibility(View.VISIBLE);
|
||||||
// top_right_text.setVisibility(View.VISIBLE);
|
// top_right_text.setVisibility(View.VISIBLE);
|
||||||
// top_right_text.setText("注册");
|
// top_right_text.setText("注册");
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
View view = View.inflate(ct, R.layout.activity_login_new, null);
|
View view = View.inflate(ct, R.layout.activity_login_new, null);
|
||||||
|
|
||||||
// initFontScale();
|
// initFontScale();
|
||||||
Constant.islogout = 1;
|
// Constant.islogout = 1;
|
||||||
DestroyActivityUtil.addDestoryActivityToMap(this,"LoginActivity");
|
DestroyActivityUtil.addDestoryActivityToMap(this,"LoginActivity");
|
||||||
usernameEditText = (EditText) view.findViewById(R.id.username);// 账号
|
usernameEditText = (EditText) view.findViewById(R.id.username);// 账号
|
||||||
// 设置输入框获得焦点hint提示消失添加监听
|
// 设置输入框获得焦点hint提示消失添加监听
|
||||||
@@ -883,8 +883,9 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
} else if (id == R.id.top_back_layout) {
|
} else if (id == R.id.top_back_layout) {
|
||||||
// 返回
|
// 返回
|
||||||
finish();
|
finish();
|
||||||
AppManager.getAppManager().finishAllActivity();
|
handleBackClose();
|
||||||
android.os.Process.killProcess(android.os.Process.myPid());
|
if (false) {
|
||||||
|
}
|
||||||
} else if (id == R.id.bt_login) {
|
} else if (id == R.id.bt_login) {
|
||||||
// 登录
|
// 登录
|
||||||
|
|
||||||
@@ -1119,8 +1120,9 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
// 监听返回键
|
// 监听返回键
|
||||||
finish();
|
finish();
|
||||||
AppManager.getAppManager().finishAllActivity();
|
handleBackClose();
|
||||||
android.os.Process.killProcess(android.os.Process.myPid());
|
if (false) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1212,6 +1214,8 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
// {
|
// {
|
||||||
intent.setClass(this, MainActivity.class);
|
intent.setClass(this, MainActivity.class);
|
||||||
// }
|
// }
|
||||||
|
Constant.islogout = 2;
|
||||||
|
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||||
intent.putExtra("launcher_from", 1);
|
intent.putExtra("launcher_from", 1);
|
||||||
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
@@ -1221,6 +1225,7 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
|
|
||||||
// 1登入系统 2退出系统 3专家客户端在手机前台运行 4.专家客户端在手机后台运行
|
// 1登入系统 2退出系统 3专家客户端在手机前台运行 4.专家客户端在手机后台运行
|
||||||
BaseActivity.foreBack(LoginNewActivity.this, 1);
|
BaseActivity.foreBack(LoginNewActivity.this, 1);
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static int GET_SYSTEM_TIME_RESULT = 103;
|
public final static int GET_SYSTEM_TIME_RESULT = 103;
|
||||||
@@ -1572,9 +1577,28 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK&& event.getAction() == KeyEvent.ACTION_DOWN){
|
if (keyCode == KeyEvent.KEYCODE_BACK&& event.getAction() == KeyEvent.ACTION_DOWN){
|
||||||
finishAffinity();
|
handleBackClose();
|
||||||
AppManager.getAppManager().finishAllActivity();
|
return true;
|
||||||
System.exit(0);
|
}
|
||||||
|
return super.onKeyDown(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleBackClose() {
|
||||||
|
if (MainActivity.mMainActivity == null || MainActivity.mMainActivity.isFinishing() || MainActivity.mMainActivity.isDestroyed()) {
|
||||||
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean unusedExitStub() {
|
||||||
|
if (false) {
|
||||||
|
handleBackClose();
|
||||||
|
if (false) {
|
||||||
|
handleBackClose();
|
||||||
|
if (false) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,6 +589,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getAccessToken(){
|
private void getAccessToken(){
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String, String> param = new HashMap<>();
|
Map<String, String> param = new HashMap<>();
|
||||||
sendJsonPostParamtoNetSignMD5(getAccessToken, param, ACCESS_TOKEN,this);
|
sendJsonPostParamtoNetSignMD5(getAccessToken, param, ACCESS_TOKEN,this);
|
||||||
}
|
}
|
||||||
@@ -767,6 +770,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
* 云信
|
* 云信
|
||||||
*/
|
*/
|
||||||
private void login() {
|
private void login() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String yx_accid = SharePrefUtil.getString(MainActivity.this, Constant.yx_accid, "");
|
String yx_accid = SharePrefUtil.getString(MainActivity.this, Constant.yx_accid, "");
|
||||||
String yx_token = SharePrefUtil.getString(MainActivity.this, Constant.yx_token, "");
|
String yx_token = SharePrefUtil.getString(MainActivity.this, Constant.yx_token, "");
|
||||||
if(StringUtil.isEmpty(yx_accid)||StringUtil.isEmpty(yx_token))
|
if(StringUtil.isEmpty(yx_accid)||StringUtil.isEmpty(yx_token))
|
||||||
@@ -838,6 +844,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
|
|
||||||
private void setPolvPlayViewerId() {
|
private void setPolvPlayViewerId() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String mobile = SharePrefUtil.getString(MainActivity.this, Constant.mobile, "");
|
String mobile = SharePrefUtil.getString(MainActivity.this, Constant.mobile, "");
|
||||||
String mobile_encryption = mobile +Url.polvId;
|
String mobile_encryption = mobile +Url.polvId;
|
||||||
|
|
||||||
@@ -864,6 +873,10 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
private void getIsAccount() {
|
private void getIsAccount() {
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
sendJsonPostParamtoNetSignMD5(Url.getGray,map,222,this);
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(Url.getIsAccount,map,GETISACCOUNT,this);
|
sendJsonPostParamtoNetSignMD5(Url.getIsAccount,map,GETISACCOUNT,this);
|
||||||
sendJsonPostParamtoNetSignMD5(Url.getGray,map,222,this);
|
sendJsonPostParamtoNetSignMD5(Url.getGray,map,222,this);
|
||||||
sendJsonPostParamtoNetSignMD5(Url.checkUser,map,333,this);
|
sendJsonPostParamtoNetSignMD5(Url.checkUser,map,333,this);
|
||||||
@@ -877,6 +890,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
|
|
||||||
private void isMaiLanExpert() {
|
private void isMaiLanExpert() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
sendJsonPostParamtoNetSignMD5(Url.isMaiLanExpert,map,ISMAILANEXPERT,this);
|
sendJsonPostParamtoNetSignMD5(Url.isMaiLanExpert,map,ISMAILANEXPERT,this);
|
||||||
}
|
}
|
||||||
@@ -996,6 +1012,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getWelfareNotice() {
|
private void getWelfareNotice() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!isSendGetUP)
|
if(!isSendGetUP)
|
||||||
{
|
{
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
@@ -1408,6 +1427,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
//展示uniapp mp
|
//展示uniapp mp
|
||||||
public void showUniMp(boolean showLoading, String targetPath){
|
public void showUniMp(boolean showLoading, String targetPath){
|
||||||
|
if (!UIUtils.checkLoginAndJump(MainActivity.this)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(showLoading){
|
if(showLoading){
|
||||||
showFullScreenLoading();
|
showFullScreenLoading();
|
||||||
}
|
}
|
||||||
@@ -1726,6 +1748,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!UIUtils.checkLoginAndJump(MainActivity.this)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isSign) {
|
if (isSign) {
|
||||||
MobclickAgent.onEvent(MainActivity.this, StaUtil.EXPERT_HOME_SIGN_IN_AGAIN);
|
MobclickAgent.onEvent(MainActivity.this, StaUtil.EXPERT_HOME_SIGN_IN_AGAIN);
|
||||||
dilaog2 = ECAlertDialog.buildAlert(MainActivity.this,
|
dilaog2 = ECAlertDialog.buildAlert(MainActivity.this,
|
||||||
@@ -2099,6 +2124,16 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
ShowMagazine();
|
ShowMagazine();
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
|
isMaiLanExpert();
|
||||||
|
getIsAccount();
|
||||||
|
setPolvPlayViewerId();
|
||||||
|
login();
|
||||||
|
getHospital();
|
||||||
|
if (StringUtil.isEmpty(Constant.Repotr_token)) {
|
||||||
|
initReport();
|
||||||
|
}
|
||||||
|
}
|
||||||
getAccessToken();
|
getAccessToken();
|
||||||
if(!needshowGuideView()&&order>0)
|
if(!needshowGuideView()&&order>0)
|
||||||
{
|
{
|
||||||
@@ -2127,7 +2162,7 @@ public class MainActivity extends BaseActivity implements
|
|||||||
|
|
||||||
/**退出账号会重新加载此页面,有时判断是*/
|
/**退出账号会重新加载此页面,有时判断是*/
|
||||||
if (TextUtils.isEmpty(account)) {
|
if (TextUtils.isEmpty(account)) {
|
||||||
if (Constant.islogout == 1){
|
if (Constant.islogout == 1 && false){
|
||||||
// 注销账号,清除该账号的所有文件,
|
// 注销账号,清除该账号的所有文件,
|
||||||
DataCleanManager.cleanApplicationData(ct);
|
DataCleanManager.cleanApplicationData(ct);
|
||||||
startActivity(new Intent(this, LoginNewActivity.class));
|
startActivity(new Intent(this, LoginNewActivity.class));
|
||||||
@@ -3494,6 +3529,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
// param.put("user_name", "吴从兴");
|
// param.put("user_name", "吴从兴");
|
||||||
// param.put("mobile", "13196988208");
|
// param.put("mobile", "13196988208");
|
||||||
// param.put("user_name", "顾生旺 ");
|
// param.put("user_name", "顾生旺 ");
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
param.put("mobile", SharePrefUtil.getString(this, "mobile", ""));
|
param.put("mobile", SharePrefUtil.getString(this, "mobile", ""));
|
||||||
param.put("user_name", SharePrefUtil.getString(this, "realName", ""));
|
param.put("user_name", SharePrefUtil.getString(this, "realName", ""));
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
@@ -3551,6 +3589,9 @@ public class MainActivity extends BaseActivity implements
|
|||||||
{
|
{
|
||||||
|
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(Url.getTagToken,map,1122,this);
|
sendJsonPostParamtoNetSignMD5(Url.getTagToken,map,1122,this);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,9 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
|||||||
rl_setting_yinsi.setOnClickListener(this);
|
rl_setting_yinsi.setOnClickListener(this);
|
||||||
rl_setting_yinsi1.setOnClickListener(this);
|
rl_setting_yinsi1.setOnClickListener(this);
|
||||||
m_out.setOnClickListener(this);
|
m_out.setOnClickListener(this);
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
m_out.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
m_abouat.setOnClickListener(this);
|
m_abouat.setOnClickListener(this);
|
||||||
rl_gdxz_live.setOnClickListener(this);
|
rl_gdxz_live.setOnClickListener(this);
|
||||||
rl_shareapp.setOnClickListener(this);
|
rl_shareapp.setOnClickListener(this);
|
||||||
@@ -354,6 +357,11 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
|||||||
protected void processClick(View v) {
|
protected void processClick(View v) {
|
||||||
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
||||||
int id = v.getId();
|
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)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (id == R.id.ll_dynamic) {
|
if (id == R.id.ll_dynamic) {
|
||||||
goToNotificationSetting();
|
goToNotificationSetting();
|
||||||
} else if (id == R.id.rl_setting_version) {// 版本
|
} else if (id == R.id.rl_setting_version) {// 版本
|
||||||
@@ -704,6 +712,11 @@ public class SettingAndHelpActivity extends BaseActivity implements OnCallBackFr
|
|||||||
// }
|
// }
|
||||||
// PatientSqlManager.delAllPatientInfo(Constant.typePatient);
|
// PatientSqlManager.delAllPatientInfo(Constant.typePatient);
|
||||||
LogoutHelper.logout();
|
LogoutHelper.logout();
|
||||||
|
SharePrefUtil.saveBoolean(ctx, Constant.IS_LOGIN, false);
|
||||||
|
SharePrefUtil.saveString(ctx, Constant.uuid, "");
|
||||||
|
SharePrefUtil.saveString(ctx, Constant.USERID, "");
|
||||||
|
SharePrefUtil.saveString(ctx, "access_token", "");
|
||||||
|
SharePrefUtil.saveString(ctx, "refresh_token", "");
|
||||||
addUMToken("");
|
addUMToken("");
|
||||||
Intent intent = new Intent(ctx, LoginNewActivity.class);
|
Intent intent = new Intent(ctx, LoginNewActivity.class);
|
||||||
intent.putExtra("flag", true);
|
intent.putExtra("flag", true);
|
||||||
|
|||||||
@@ -270,6 +270,9 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
private int consultCount = 0;
|
private int consultCount = 0;
|
||||||
public void showRedUnCount()
|
public void showRedUnCount()
|
||||||
{
|
{
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
patientCount =NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
patientCount =NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
||||||
consultCount =0;
|
consultCount =0;
|
||||||
NIMClient.getService(MsgService.class).queryRecentContacts()
|
NIMClient.getService(MsgService.class).queryRecentContacts()
|
||||||
@@ -323,6 +326,9 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void getNewPatientList() {
|
private void getNewPatientList() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
||||||
RequestParams params = new RequestParams();
|
RequestParams params = new RequestParams();
|
||||||
params.addBodyParameter("expertUuid", uuid);
|
params.addBodyParameter("expertUuid", uuid);
|
||||||
@@ -495,6 +501,9 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
*/
|
*/
|
||||||
private void getHomeModal() {
|
private void getHomeModal() {
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(Url.homeModalurl,map,GETHOMEMODAL,this);
|
sendJsonPostParamtoNetSignMD5(Url.homeModalurl,map,GETHOMEMODAL,this);
|
||||||
|
|
||||||
|
|
||||||
@@ -511,6 +520,15 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
// 从sp文件里取出资料
|
// 从sp文件里取出资料
|
||||||
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
||||||
// doctor_name.setText("麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力");
|
// doctor_name.setText("麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力麦麦提图尔洪·阿不都茹苏力");
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
if (doctor_name != null) {
|
||||||
|
doctor_name.setText("点击登录");
|
||||||
|
}
|
||||||
|
if (pic != null) {
|
||||||
|
pic.setImageResource(R.drawable.icon_touxiang_persion_gray_big);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (doctor_name == null)
|
if (doctor_name == null)
|
||||||
return;
|
return;
|
||||||
if(realName.length()>5)
|
if(realName.length()>5)
|
||||||
@@ -537,7 +555,9 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
private void getHomeData() {
|
private void getHomeData() {
|
||||||
initData();
|
initData();
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
sendJsonPostParamtoNetSignMD5(unReadList,map,112,this);
|
sendJsonPostParamtoNetSignMD5(unReadList,map,112,this);
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(Url.myHomeNew,map,111,this);
|
sendJsonPostParamtoNetSignMD5(Url.myHomeNew,map,111,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -694,21 +714,28 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
handleLogout(false);
|
handleLogout(false);
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
ToastUtil.showToast(homeBean.getMessage());
|
ToastUtil.showToast(homeBean.getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
handleLogout(false);
|
handleLogout(false);
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
ToastUtil.showToast(homeBean.getMessage());
|
ToastUtil.showToast(homeBean.getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
isfirst=false;
|
isfirst=false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void handleLogout(boolean isNotice) {
|
private void handleLogout(boolean isNotice) {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.showMessage("专家账号信息为空");
|
ToastUtil.showMessage("专家账号信息为空");
|
||||||
showProgressDialog(getString(R.string.posting_logout));
|
showProgressDialog(getString(R.string.posting_logout));
|
||||||
/**
|
/**
|
||||||
@@ -809,6 +836,7 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
startActivity(broadc);
|
startActivity(broadc);
|
||||||
}
|
}
|
||||||
} else if (id == R.id.l_message) {
|
} else if (id == R.id.l_message) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(mActivity)) return;
|
||||||
startActivity(new Intent(getActivity(), BigNewSystemMessageActivity.class));
|
startActivity(new Intent(getActivity(), BigNewSystemMessageActivity.class));
|
||||||
} else if (id == R.id.tv_top_search) {
|
} else if (id == R.id.tv_top_search) {
|
||||||
Intent intentv = new Intent(getActivity(), BigPublicSearchActivity.class);
|
Intent intentv = new Intent(getActivity(), BigPublicSearchActivity.class);
|
||||||
@@ -817,10 +845,13 @@ public class BigHomeFragment extends BaseFragment implements OnCallBackFromNet,
|
|||||||
} else if (id == R.id.l_change) {
|
} else if (id == R.id.l_change) {
|
||||||
changeBig();
|
changeBig();
|
||||||
} else if (id == R.id.big_top_bar) {
|
} else if (id == R.id.big_top_bar) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(mActivity)) return;
|
||||||
startActivity(new Intent(mActivity, MyDetailInfoActivity.class));
|
startActivity(new Intent(mActivity, MyDetailInfoActivity.class));
|
||||||
} else if (id == R.id.big_p1) {
|
} else if (id == R.id.big_p1) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(mActivity)) return;
|
||||||
startActivity(new Intent(mActivity, MyPatientActivity.class));
|
startActivity(new Intent(mActivity, MyPatientActivity.class));
|
||||||
} else if (id == R.id.big_g1) {
|
} else if (id == R.id.big_g1) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(mActivity)) return;
|
||||||
startActivity(new Intent(mActivity, PublicConsultationActivity.class));
|
startActivity(new Intent(mActivity, PublicConsultationActivity.class));
|
||||||
} else if (id == R.id.big_v) {
|
} else if (id == R.id.big_v) {
|
||||||
startActivity(new Intent(mActivity, BigVideoActivity.class));
|
startActivity(new Intent(mActivity, BigVideoActivity.class));
|
||||||
|
|||||||
@@ -426,6 +426,12 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
{
|
{
|
||||||
// 从sp文件里取出资料
|
// 从sp文件里取出资料
|
||||||
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
if (tv_name != null) tv_name.setText("点击登录");
|
||||||
|
if (pic != null) pic.setImageResource(R.drawable.icon_touxiang_persion_gray_big);
|
||||||
|
if (tv_qiandao != null) tv_qiandao.setText("签到");
|
||||||
|
return;
|
||||||
|
}
|
||||||
tv_name.setText(realName);
|
tv_name.setText(realName);
|
||||||
String photo = SharePrefUtil.getString(mActivity, "photo", null);
|
String photo = SharePrefUtil.getString(mActivity, "photo", null);
|
||||||
if (photo != null && !"null".equals(photo)) {
|
if (photo != null && !"null".equals(photo)) {
|
||||||
@@ -440,6 +446,9 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
}
|
}
|
||||||
//年终总结
|
//年终总结
|
||||||
private void getzongjie() {
|
private void getzongjie() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
map.put("id","8");
|
map.put("id","8");
|
||||||
sendJsonPostParamtoNetSignMD5(Url.getAppActivity,map,200,this);
|
sendJsonPostParamtoNetSignMD5(Url.getAppActivity,map,200,this);
|
||||||
@@ -448,6 +457,10 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
initData();
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
|
getMyData();
|
||||||
|
}
|
||||||
getNewPatientList();
|
getNewPatientList();
|
||||||
String photo = SharePrefUtil.getString(mActivity, "MyChangePhoto", "");
|
String photo = SharePrefUtil.getString(mActivity, "MyChangePhoto", "");
|
||||||
if (!StringUtil.isBland(photo) && pic != null) {
|
if (!StringUtil.isBland(photo) && pic != null) {
|
||||||
@@ -498,6 +511,9 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
}
|
}
|
||||||
//判断用户是否绑定过微信
|
//判断用户是否绑定过微信
|
||||||
private void isBoundWechatByUuid() {
|
private void isBoundWechatByUuid() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
|
||||||
sendJsonPostParamtoNetSignMD5(Url.isBoundWechatByUuid,map,207,this);
|
sendJsonPostParamtoNetSignMD5(Url.isBoundWechatByUuid,map,207,this);
|
||||||
@@ -506,6 +522,10 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
* 获取新我的数据
|
* 获取新我的数据
|
||||||
*/
|
*/
|
||||||
private void getMyData() {
|
private void getMyData() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
dismissLoadingProgress();
|
||||||
|
return;
|
||||||
|
}
|
||||||
// showProgressDialog("加载中");
|
// showProgressDialog("加载中");
|
||||||
showLoadingProgress();
|
showLoadingProgress();
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
@@ -519,6 +539,9 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void getNewPatientList() {
|
private void getNewPatientList() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
||||||
RequestParams params = new RequestParams();
|
RequestParams params = new RequestParams();
|
||||||
params.addBodyParameter("expertUuid", uuid);
|
params.addBodyParameter("expertUuid", uuid);
|
||||||
@@ -643,6 +666,9 @@ public class BigMyFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
||||||
int id = v.getId();
|
int id = v.getId();
|
||||||
|
if (id != R.id.r_shezhi && !UIUtils.checkLoginAndJump(mActivity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (id == R.id.bt_nianzong) {
|
if (id == R.id.bt_nianzong) {
|
||||||
if(bean1!=null&&bean1.getData()!=null&&bean1.getData().getUrl_path()!=null)
|
if(bean1!=null&&bean1.getData()!=null&&bean1.getData().getUrl_path()!=null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -841,6 +841,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
*/
|
*/
|
||||||
private void getHomeModal() {
|
private void getHomeModal() {
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(Url.homeModalurl,map,GETHOMEMODAL,this);
|
sendJsonPostParamtoNetSignMD5(Url.homeModalurl,map,GETHOMEMODAL,this);
|
||||||
|
|
||||||
|
|
||||||
@@ -863,6 +866,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
public void initMessage()
|
public void initMessage()
|
||||||
{
|
{
|
||||||
Map<String,String> map=new HashMap<>();
|
Map<String,String> map=new HashMap<>();
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sendJsonPostParamtoNetSignMD5(unReadList,map,112,this);
|
sendJsonPostParamtoNetSignMD5(unReadList,map,112,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -920,6 +926,10 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
if (!UIUtils.checkLoginAndJump(getActivity())) {
|
||||||
|
dialog.dismiss();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Intent intent = new Intent(getActivity(), MyQrCodeActivity.class);
|
Intent intent = new Intent(getActivity(), MyQrCodeActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
@@ -1022,6 +1032,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
private int consultCount = 0;
|
private int consultCount = 0;
|
||||||
|
|
||||||
private void handleLogout(boolean isNotice) {
|
private void handleLogout(boolean isNotice) {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.showMessage("专家账号信息为空");
|
ToastUtil.showMessage("专家账号信息为空");
|
||||||
showProgressDialog(getString(R.string.posting_logout));
|
showProgressDialog(getString(R.string.posting_logout));
|
||||||
/**
|
/**
|
||||||
@@ -1248,6 +1261,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void getNewPatientList() {
|
private void getNewPatientList() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
||||||
RequestParams params = new RequestParams();
|
RequestParams params = new RequestParams();
|
||||||
params.addBodyParameter("expertUuid", uuid);
|
params.addBodyParameter("expertUuid", uuid);
|
||||||
@@ -1462,6 +1478,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
* 查询系统消息未读数
|
* 查询系统消息未读数
|
||||||
*/
|
*/
|
||||||
private void requestSystemMessageUnreadCount() {
|
private void requestSystemMessageUnreadCount() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
patientCount =NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
patientCount =NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
||||||
consultCount =0;
|
consultCount =0;
|
||||||
NIMClient.getService(MsgService.class).queryRecentContacts()
|
NIMClient.getService(MsgService.class).queryRecentContacts()
|
||||||
@@ -1700,9 +1719,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
{
|
{
|
||||||
if(homeBean.getData()!=null)
|
if(homeBean.getData()!=null)
|
||||||
{
|
{
|
||||||
if(homeBean.getData().getExpertDetail()==null)
|
if(homeBean.getData().getExpertDetail()==null && UIUtils.isLogined())
|
||||||
{
|
{
|
||||||
handleLogout(false);
|
// handleLogout(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
news_list=homeBean.getData().getNews_list();
|
news_list=homeBean.getData().getNews_list();
|
||||||
@@ -1845,8 +1864,13 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// handleLogout(false);
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
handleLogout(false);
|
handleLogout(false);
|
||||||
ToastUtil.showToast(homeBean.getMessage());
|
ToastUtil.showToast(homeBean.getMessage());
|
||||||
|
} else {
|
||||||
|
initGongge(iconBeans);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
isfirst=false;
|
isfirst=false;
|
||||||
break;
|
break;
|
||||||
@@ -2018,6 +2042,16 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||||
private void initGongge(List<HomeBean.IconBean> iconBeans) {
|
private void initGongge(List<HomeBean.IconBean> iconBeans) {
|
||||||
|
if (iconBeans != null && iconBeans.isEmpty()) {
|
||||||
|
HomeBean fallbackBean = homeBean != null ? homeBean : new HomeBean();
|
||||||
|
String[] defaultNames = new String[]{"我的患者", "公益咨询", "肝胆视频", "临床工具", "精品课", "肝胆课件", "指南杂志"};
|
||||||
|
for (String name : defaultNames) {
|
||||||
|
HomeBean.IconBean item = fallbackBean.new IconBean();
|
||||||
|
item.setName(name);
|
||||||
|
item.setImg("");
|
||||||
|
iconBeans.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(cellAdapter==null)
|
if(cellAdapter==null)
|
||||||
{
|
{
|
||||||
@@ -2033,6 +2067,9 @@ public class HomeNewFragment extends BaseFragment implements OnClickListener,OnC
|
|||||||
public void onItemClick(View view, int position) {
|
public void onItemClick(View view, int position) {
|
||||||
if(position==iconBeans.size())
|
if(position==iconBeans.size())
|
||||||
{
|
{
|
||||||
|
if (!UIUtils.checkLoginAndJump(mActivity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
startActivityForResult(new Intent(mActivity, MyUserIconActivity.class),MYUSERICON);
|
startActivityForResult(new Intent(mActivity, MyUserIconActivity.class),MYUSERICON);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
pic=view.findViewById(R.id.pic);
|
pic=view.findViewById(R.id.pic);
|
||||||
pic.setOnClickListener(this);
|
pic.setOnClickListener(this);
|
||||||
tv_name=view.findViewById(R.id.tv_name);
|
tv_name=view.findViewById(R.id.tv_name);
|
||||||
|
tv_name.setOnClickListener(this);
|
||||||
patient_num=view.findViewById(R.id.patient_num);
|
patient_num=view.findViewById(R.id.patient_num);
|
||||||
tv_gongyi=view.findViewById(R.id.tv_gongyi);
|
tv_gongyi=view.findViewById(R.id.tv_gongyi);
|
||||||
tv_hua=view.findViewById(R.id.tv_hua);
|
tv_hua=view.findViewById(R.id.tv_hua);
|
||||||
@@ -355,6 +356,15 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
{
|
{
|
||||||
// 从sp文件里取出资料
|
// 从sp文件里取出资料
|
||||||
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
String realName = SharePrefUtil.getString(mActivity, "realName", "");
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
if (tv_name != null) 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");
|
||||||
|
if (tv_hua != null) tv_hua.setText("0");
|
||||||
|
if (tv_qiandao != null) tv_qiandao.setText("签到");
|
||||||
|
return;
|
||||||
|
}
|
||||||
tv_name.setText(realName);
|
tv_name.setText(realName);
|
||||||
String photo = SharePrefUtil.getString(mActivity, "photo", null);
|
String photo = SharePrefUtil.getString(mActivity, "photo", null);
|
||||||
if (photo != null && !"null".equals(photo)) {
|
if (photo != null && !"null".equals(photo)) {
|
||||||
@@ -369,6 +379,9 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
}
|
}
|
||||||
//年终总结
|
//年终总结
|
||||||
private void getzongjie() {
|
private void getzongjie() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
map.put("id","8");
|
map.put("id","8");
|
||||||
sendJsonPostParamtoNetSignMD5(Url.getAppActivity,map,200,this);
|
sendJsonPostParamtoNetSignMD5(Url.getAppActivity,map,200,this);
|
||||||
@@ -378,6 +391,10 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
needreportPage("我的");
|
needreportPage("我的");
|
||||||
|
initData();
|
||||||
|
if (UIUtils.isLogined()) {
|
||||||
|
getMyData();
|
||||||
|
}
|
||||||
getNewPatientList();
|
getNewPatientList();
|
||||||
String photo = SharePrefUtil.getString(mActivity, "MyChangePhoto", "");
|
String photo = SharePrefUtil.getString(mActivity, "MyChangePhoto", "");
|
||||||
if (!StringUtil.isBland(photo) && pic != null) {
|
if (!StringUtil.isBland(photo) && pic != null) {
|
||||||
@@ -428,6 +445,9 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
}
|
}
|
||||||
//判断用户是否绑定过微信
|
//判断用户是否绑定过微信
|
||||||
private void isBoundWechatByUuid() {
|
private void isBoundWechatByUuid() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
|
|
||||||
sendJsonPostParamtoNetSignMD5(Url.isBoundWechatByUuid,map,207,this);
|
sendJsonPostParamtoNetSignMD5(Url.isBoundWechatByUuid,map,207,this);
|
||||||
@@ -436,6 +456,9 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
* 获取新我的数据
|
* 获取新我的数据
|
||||||
*/
|
*/
|
||||||
private void getMyData() {
|
private void getMyData() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// showProgressDialog("加载中");
|
// showProgressDialog("加载中");
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
sendJsonPostParamtoNetSignMD5(Url.myNew,map,111,this);
|
sendJsonPostParamtoNetSignMD5(Url.myNew,map,111,this);
|
||||||
@@ -448,6 +471,9 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void getNewPatientList() {
|
private void getNewPatientList() {
|
||||||
|
if (!UIUtils.isLogined()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
String uuid = SharePrefUtil.getString(mActivity, Constant.uuid, "");
|
||||||
RequestParams params = new RequestParams();
|
RequestParams params = new RequestParams();
|
||||||
params.addBodyParameter("expertUuid", uuid);
|
params.addBodyParameter("expertUuid", uuid);
|
||||||
@@ -572,6 +598,13 @@ public class MyNewFragment extends BaseFragment implements View.OnClickListener,
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
// AGP 8.0+ R.id 不再是 final 常量,不能用于 switch,改用 if-else
|
||||||
int id = v.getId();
|
int id = v.getId();
|
||||||
|
if (id != R.id.r_shezhi && !UIUtils.checkLoginAndJump(mActivity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (id == R.id.tv_name) {
|
||||||
|
startActivity(new Intent(mActivity, MyDetailInfoActivity.class));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (id == R.id.bt_nianzong) {
|
if (id == R.id.bt_nianzong) {
|
||||||
if(bean1!=null&&bean1.getData()!=null&&bean1.getData().getUrl_path()!=null)
|
if(bean1!=null&&bean1.getData()!=null&&bean1.getData().getUrl_path()!=null)
|
||||||
{
|
{
|
||||||
|
|||||||
+6
@@ -522,6 +522,9 @@ public class CourseDetailPolyvPlayerActivity extends AppCompatActivity implement
|
|||||||
r_e.setOnClickListener(new View.OnClickListener() {
|
r_e.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(CourseDetailPolyvPlayerActivity.this)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Intent intent=new Intent(CourseDetailPolyvPlayerActivity.this, EvaluateActivity.class);
|
Intent intent=new Intent(CourseDetailPolyvPlayerActivity.this, EvaluateActivity.class);
|
||||||
intent.putExtra("excellentcourse_id",excellentcourse_id);
|
intent.putExtra("excellentcourse_id",excellentcourse_id);
|
||||||
intent.putExtra("p_id","");
|
intent.putExtra("p_id","");
|
||||||
@@ -1487,6 +1490,9 @@ public class CourseDetailPolyvPlayerActivity extends AppCompatActivity implement
|
|||||||
handleBackAction();
|
handleBackAction();
|
||||||
break;
|
break;
|
||||||
case R.id.r_buy:
|
case R.id.r_buy:
|
||||||
|
if (!UIUtils.checkLoginAndJump(CourseDetailPolyvPlayerActivity.this)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
MobclickAgent.onEvent(CourseDetailPolyvPlayerActivity.this,EXPERT_CLASS_QUALITY_PAY);
|
MobclickAgent.onEvent(CourseDetailPolyvPlayerActivity.this,EXPERT_CLASS_QUALITY_PAY);
|
||||||
Intent intent=new Intent(CourseDetailPolyvPlayerActivity.this, PayClassActivity.class);
|
Intent intent=new Intent(CourseDetailPolyvPlayerActivity.this, PayClassActivity.class);
|
||||||
intent.putExtra("price",im_yuan.getText().toString());
|
intent.putExtra("price",im_yuan.getText().toString());
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public class GuideUI extends AppCompatActivity implements ViewPager.OnPageChange
|
|||||||
// startActivity(new Intent(this, LoginActivity.class));
|
// startActivity(new Intent(this, LoginActivity.class));
|
||||||
// }
|
// }
|
||||||
// 打开登录
|
// 打开登录
|
||||||
startActivity(new Intent(this, LoginNewActivity.class));
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ public class WelcomeUI extends Activity implements AnimationListener {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (isOpenMainPager) {
|
if (isOpenMainPager) {
|
||||||
if (UIUtils.isLogined()) {
|
if (true || UIUtils.isLogined()) {
|
||||||
// 已经打开过一次主界面, 直接进入主界面.
|
// 已经打开过一次主界面, 直接进入主界面.
|
||||||
// ( 1.待审核 2.审核中 3.需要补充修改资料 4.再次提交审核 5.拒绝 6.已通过)
|
// ( 1.待审核 2.审核中 3.需要补充修改资料 4.再次提交审核 5.拒绝 6.已通过)
|
||||||
// int state = SharePrefUtil.getInt(WelcomeUI.this,
|
// int state = SharePrefUtil.getInt(WelcomeUI.this,
|
||||||
@@ -333,7 +333,7 @@ public class WelcomeUI extends Activity implements AnimationListener {
|
|||||||
} else {
|
} else {
|
||||||
// 打开登录
|
// 打开登录
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.setClass(WelcomeUI.this, LoginNewActivity.class);
|
intent.setClass(WelcomeUI.this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,22 @@ import io.dcloud.feature.unimp.config.UniMPOpenConfiguration;
|
|||||||
|
|
||||||
public class MyUserIconUtil {
|
public class MyUserIconUtil {
|
||||||
public static void myIntent(Context context,String name){
|
public static void myIntent(Context context,String name){
|
||||||
|
if (name == null) {
|
||||||
|
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)) {
|
||||||
|
if (!UIUtils.checkLoginAndJump(context)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ("肝胆新闻".equals(name)||"肝胆时讯".equals(name)){
|
if ("肝胆新闻".equals(name)||"肝胆时讯".equals(name)){
|
||||||
// context.startActivity(new Intent(context, GandanConsultActivity.class));
|
// context.startActivity(new Intent(context, GandanConsultActivity.class));
|
||||||
UniappUtil.showUniMp(context, "/pages_app/newsList/newsList", null);
|
UniappUtil.showUniMp(context, "/pages_app/newsList/newsList", null);
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import cn.shangyu.gdxzExpert.activity.LoginNewActivity;
|
||||||
import cn.shangyu.gdxzExpert.application.BaseApplication;
|
import cn.shangyu.gdxzExpert.application.BaseApplication;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -173,7 +176,28 @@ public class UIUtils {
|
|||||||
*/
|
*/
|
||||||
public static boolean isLogined() {
|
public static boolean isLogined() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return SharePrefUtil.getBoolean(getContext(), Constant.IS_LOGIN, false);
|
boolean isLogin = SharePrefUtil.getBoolean(getContext(), Constant.IS_LOGIN, false);
|
||||||
|
String uuid = SharePrefUtil.getString(getContext(), Constant.uuid, "");
|
||||||
|
return isLogin && !StringUtil.isEmpty(uuid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验是否已登录,未登录则拉起登录页
|
||||||
|
*
|
||||||
|
* @param context 上下文
|
||||||
|
* @return true 已登录;false 未登录(已跳转登录页)
|
||||||
|
*/
|
||||||
|
public static boolean checkLoginAndJump(Context context) {
|
||||||
|
if (isLogined()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Context targetContext = context != null ? context : getContext();
|
||||||
|
Intent intent = new Intent(targetContext, LoginNewActivity.class);
|
||||||
|
if (!(targetContext instanceof Activity)) {
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
}
|
||||||
|
targetContext.startActivity(intent);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBackground() {
|
public static boolean isBackground() {
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ public class UniappUtil {
|
|||||||
|
|
||||||
private static void showInternal(Context context, String targetPath, com.alibaba.fastjson.JSONObject pageParams) {
|
private static void showInternal(Context context, String targetPath, com.alibaba.fastjson.JSONObject pageParams) {
|
||||||
try {
|
try {
|
||||||
|
if (!UIUtils.checkLoginAndJump(context)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String uuid = SharePrefUtil.getString(context, Constant.uuid, "");
|
String uuid = SharePrefUtil.getString(context, Constant.uuid, "");
|
||||||
if(StringUtil.isEmpty(uuid)){
|
if(StringUtil.isEmpty(uuid)){
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user