* 生产环境 | * 生产环境 | ||||
*/ | */ | ||||
public static final String Urls = "https://qtzl.etcjz.cn"; | public static final String Urls = "https://qtzl.etcjz.cn"; | ||||
private String BaseUrl = "https://qtzl.etcjz.cn" + "/api/"; | |||||
// private String BaseUrl = "https://qtzl.etcjz.cn" + "/dev/api/"; //111中台地址 | |||||
// private String BaseUrl = "https://qtzl.etcjz.cn" + "/api/"; | |||||
private String BaseUrl = "https://qtzl.etcjz.cn" + "/dev/api/"; //111中台地址 | |||||
public static final String URL_DOWNLOAD_FILE = "https://qtzl.etcjz.cn/default-bucket/";//通行流水下载路径前缀 | public static final String URL_DOWNLOAD_FILE = "https://qtzl.etcjz.cn/default-bucket/";//通行流水下载路径前缀 | ||||
public static final String URL_APP_IMG = "https://qtzl.etcjz.cn";//APP图标路径前缀 | public static final String URL_APP_IMG = "https://qtzl.etcjz.cn";//APP图标路径前缀 | ||||
/** | /** | ||||
* 异地测试环境 | * 异地测试环境 | ||||
*/ | */ | ||||
// private String YDBaseUrl = "https://testydfw.etcjz.cn/";//异地测试环境 | |||||
private String YDBaseUrl = "https://testydfw.etcjz.cn/";//异地测试环境 | |||||
/** | /** | ||||
* 异地正式环境 | * 异地正式环境 | ||||
*/ | */ | ||||
private String YDBaseUrl = "https://ydfw.etcjz.cn/"; | |||||
// private String YDBaseUrl = "https://ydfw.etcjz.cn/"; | |||||
/** | /** | ||||
// linkedTreeMap.put("loginSource", Constants.LOGIN_SOURCE); | // linkedTreeMap.put("loginSource", Constants.LOGIN_SOURCE); | ||||
// linkedTreeMap.put("agentId",MyShared.getInstance().get(MyShared.AGENCYID,"")); | // linkedTreeMap.put("agentId",MyShared.getInstance().get(MyShared.AGENCYID,"")); | ||||
// linkedTreeMap.put("channelId",MyShared.getInstance().get(MyShared.CHANNELID,"")); | // linkedTreeMap.put("channelId",MyShared.getInstance().get(MyShared.CHANNELID,"")); | ||||
// linkedTreeMap.put("channelType","1"); | |||||
// linkedTreeMap.put("channelType","1"); PAYED ACTIVE | |||||
linkedTreeMap.put("openId",MyShared.getInstance().get(MyShared.YDOPENID,"")); | linkedTreeMap.put("openId",MyShared.getInstance().get(MyShared.YDOPENID,"")); | ||||
linkedTreeMap.put("accessToken", MyShared.getInstance().get(MyShared.YDACCESSTOKEN,"")+""); | linkedTreeMap.put("accessToken", MyShared.getInstance().get(MyShared.YDACCESSTOKEN,"")+""); | ||||
if (null==linkedTreeMap.get("filename")){ | if (null==linkedTreeMap.get("filename")){ |
Log.e("accesstokenaaaaaaa", "".equals(MyShared.getInstance().get(MyShared.YDTOKEN, "")) + | Log.e("accesstokenaaaaaaa", "".equals(MyShared.getInstance().get(MyShared.YDTOKEN, "")) + | ||||
"_" + MyShared.getInstance().get(MyShared.YDTOKEN, "")); | "_" + MyShared.getInstance().get(MyShared.YDTOKEN, "")); | ||||
if ("".equals(MyShared.getInstance().get(MyShared.YDTOKEN, ""))) { | if ("".equals(MyShared.getInstance().get(MyShared.YDTOKEN, ""))) { | ||||
getToken(); | |||||
// getToken(); | |||||
} | } | ||||
} | } | ||||
String type = ""; | String type = ""; | ||||
file1 = FileUtil.getSaveFile(getApplication()).getAbsolutePath(); | file1 = FileUtil.getSaveFile(getApplication()).getAbsolutePath(); | ||||
type = CameraActivity.CONTENT_TYPE_GENERAL; | type = CameraActivity.CONTENT_TYPE_GENERAL; | ||||
FileUtils.getInstance(this).uploadGeneralImageNewYD(true, type, file1, null, new FileUtils.OnChoosePicCallback() { | |||||
@Override | |||||
public void onSuccess(File file) { | |||||
HashMap<String,String> params = new HashMap<>(); | |||||
params.put("vehicleId",getIntent().getStringExtra("vehicleId")); | |||||
if (view == binding.image1) {//机动车登记证 | |||||
imgUrl1 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl1).into(binding.image1); | |||||
params.put("idType","3"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl1)); | |||||
}else if (view ==binding.image2){//道路运输证 | |||||
imgUrl2 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl2).into(binding.image2); | |||||
params.put("idType","4"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl2)); | |||||
}else if (view ==binding.image3){//车辆外观正面 | |||||
imgUrl3 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl3).into(binding.image3); | |||||
params.put("idType","5"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl3)); | |||||
}else if (view ==binding.image4){//车辆外观侧面 | |||||
imgUrl4 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl4).into(binding.image4); | |||||
params.put("idType","6"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl4)); | |||||
}else if (view ==binding.image5){//车辆前挡照片 | |||||
imgUrl5 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl5).into(binding.image5); | |||||
params.put("idType","7"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl5)); | |||||
} | |||||
params.put("filename", YdCode.YDCODE_CAR_PIC_UPLOAD); | |||||
MyRetrofit.ydNewInstance(YDPlatformNewlyStep1Activity.this,"",params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
if (view == binding.image1) {//机动车登记证 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl1).into(binding.image1); | |||||
}else if (view ==binding.image2){//道路运输证 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl2).into(binding.image2); | |||||
}else if (view ==binding.image3){//车辆外观正面 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl3).into(binding.image3); | |||||
}else if (view ==binding.image4){//车辆外观侧面 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl4).into(binding.image4); | |||||
}else if (view ==binding.image5){//车辆前挡照片 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl5).into(binding.image5); | |||||
} | |||||
} | |||||
}); | |||||
FileUtils.getInstance(this).uploadGeneralImageNewYD(true, type, file1, null, file -> { | |||||
HashMap<String,String> params = new HashMap<>(); | |||||
params.put("vehicleId",getIntent().getStringExtra("vehicleId")); | |||||
if (view == binding.image1) {//机动车登记证 | |||||
imgUrl1 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl1).into(binding.image1); | |||||
params.put("idType","3"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl1)); | |||||
}else if (view ==binding.image2){//道路运输证 | |||||
imgUrl2 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl2).into(binding.image2); | |||||
params.put("idType","4"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl2)); | |||||
}else if (view ==binding.image3){//车辆外观正面 | |||||
imgUrl3 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl3).into(binding.image3); | |||||
params.put("idType","5"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl3)); | |||||
}else if (view ==binding.image4){//车辆外观侧面 | |||||
imgUrl4 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl4).into(binding.image4); | |||||
params.put("idType","6"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl4)); | |||||
}else if (view ==binding.image5){//车辆前挡照片 | |||||
imgUrl5 = file.getAbsolutePath(); | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl5).into(binding.image5); | |||||
params.put("idType","7"); | |||||
params.put("imageStr", QRCode.imageToBase64(imgUrl5)); | |||||
} | } | ||||
params.put("filename", YdCode.YDCODE_CAR_PIC_UPLOAD); | |||||
MyRetrofit.ydNewInstance(YDPlatformNewlyStep1Activity.this,"",params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
if (view == binding.image1) {//机动车登记证 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl1).into(binding.image1); | |||||
}else if (view ==binding.image2){//道路运输证 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl2).into(binding.image2); | |||||
}else if (view ==binding.image3){//车辆外观正面 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl3).into(binding.image3); | |||||
}else if (view ==binding.image4){//车辆外观侧面 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl4).into(binding.image4); | |||||
}else if (view ==binding.image5){//车辆前挡照片 | |||||
Glide.with(YDPlatformNewlyStep1Activity.this).load(imgUrl5).into(binding.image5); | |||||
} | |||||
} | |||||
}); | |||||
}); | }); | ||||
} | } | ||||
LinkedTreeMap<String, Object> linkedTreeMap = JSONObject.parseObject(stringBody, LinkedTreeMap.class); | LinkedTreeMap<String, Object> linkedTreeMap = JSONObject.parseObject(stringBody, LinkedTreeMap.class); | ||||
// LinkedTreeMap<String, Object> linkedTreeMap2 = JSONObject.parseObject(linkedTreeMap.get("data") + "", LinkedTreeMap.class); | // LinkedTreeMap<String, Object> linkedTreeMap2 = JSONObject.parseObject(linkedTreeMap.get("data") + "", LinkedTreeMap.class); | ||||
if (linkedTreeMap != null && "50000".equals(linkedTreeMap.get("statusCode") + "")) {//token失效处理 | if (linkedTreeMap != null && "50000".equals(linkedTreeMap.get("statusCode") + "")) {//token失效处理 | ||||
HashMap<String,String> params = new HashMap<>(); | |||||
params.put("filename", YdCode.YDCODE_LOGIN); | |||||
params.put("account","14268812305"); | |||||
// params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||||
params.put("password", MD5Utils.ToMD5("14268812305wxnw@Aid_z982"));//正式 | |||||
MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | |||||
MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||||
} | |||||
}); | |||||
// Map<String, String> params = new HashMap<>(); | |||||
// MyRetrofit.newInstance(IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||||
// HashMap<String,String> params = new HashMap<>(); | |||||
// params.put("filename", YdCode.YDCODE_LOGIN); | |||||
// params.put("account","14268812305"); | |||||
//// params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||||
// params.put("password", MD5Utils.ToMD5("14268812305wxnw@Aid_z982"));//正式 | |||||
// MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | |||||
// @Override | // @Override | ||||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | // public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
// LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | // LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | ||||
// Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||||
// MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | // MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | ||||
// } | // } | ||||
// @Override | |||||
// public void onError() {} | |||||
// }); | // }); | ||||
Map<String, String> params = new HashMap<>(); | |||||
MyRetrofit.newInstance(IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class); | |||||
Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||||
MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||||
} | |||||
@Override | |||||
public void onError() {} | |||||
}); | |||||
}else if (linkedTreeMap != null && "4000".equals(linkedTreeMap.get("statusCode") + "")){ | }else if (linkedTreeMap != null && "4000".equals(linkedTreeMap.get("statusCode") + "")){ | ||||
Intent intent = new Intent(context, YDPlatformLoginActivity.class); | Intent intent = new Intent(context, YDPlatformLoginActivity.class); |
mLayoutCode = findViewById(R.id.layout_code); | mLayoutCode = findViewById(R.id.layout_code); | ||||
mTvRealAuth = findViewById(R.id.tv_smrz); | mTvRealAuth = findViewById(R.id.tv_smrz); | ||||
setOnClickListener(mForgetView, mCountdownView, mTvLoginCode, mCodeView, mCommitView, mGetCodeBtn,mTvRealAuth); | |||||
setOnClickListener(mForgetView, mCountdownView, mTvLoginCode, mCodeView, mCommitView, mGetCodeBtn, mTvRealAuth); | |||||
mPasswordView.setOnEditorActionListener(this); | mPasswordView.setOnEditorActionListener(this); | ||||
// HashMap<String,String> params = new HashMap<>(); | // HashMap<String,String> params = new HashMap<>(); | ||||
} | } | ||||
private void updateApp() { | private void updateApp() { | ||||
MyRetrofit.newInstance(this,IFCode.IFCODE148, new ResultBean.BizContent<>(), new MyRetrofit.ReturnResult() { | |||||
MyRetrofit.newInstance(this, IFCode.IFCODE148, new ResultBean.BizContent<>(), new MyRetrofit.ReturnResult() { | |||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
if (FileImageTool.compareVersion(bizContent.getVersion(), AppConfig.getVersionName()) == 1) { | if (FileImageTool.compareVersion(bizContent.getVersion(), AppConfig.getVersionName()) == 1) { | ||||
.show(); | .show(); | ||||
} | } | ||||
} | } | ||||
@Override | @Override | ||||
public void onError(Response<Result> resp) { | public void onError(Response<Result> resp) { | ||||
MyRetrofit.ReturnResult.super.onError(resp); | MyRetrofit.ReturnResult.super.onError(resp); | ||||
// mPhoneView.setText(getString(INTENT_KEY_IN_PHONE)); | // mPhoneView.setText(getString(INTENT_KEY_IN_PHONE)); | ||||
// mPasswordView.setText(getString(INTENT_KEY_IN_PASSWORD)); | // mPasswordView.setText(getString(INTENT_KEY_IN_PASSWORD)); | ||||
} | } | ||||
@Override | @Override | ||||
public void onRightClick(View view) { | public void onRightClick(View view) { | ||||
// 跳转到注册界面 | // 跳转到注册界面 | ||||
@SingleClick | @SingleClick | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
if (view==mTvRealAuth){//实名认证 | |||||
if (view == mTvRealAuth) {//实名认证 | |||||
jumpToPage(RealUserAuthenticationActivity.class); | jumpToPage(RealUserAuthenticationActivity.class); | ||||
} | } | ||||
if (view == mForgetView) {//忘记密码 | if (view == mForgetView) {//忘记密码 | ||||
MyShared.getInstance().put(MyShared.SERVICEHALLID, bizContent.serviceHallId); | MyShared.getInstance().put(MyShared.SERVICEHALLID, bizContent.serviceHallId); | ||||
MyShared.getInstance().put(MyShared.CHANNELID, bizContent.serviceHallId); | MyShared.getInstance().put(MyShared.CHANNELID, bizContent.serviceHallId); | ||||
MyShared.getInstance().put(MyShared.STAFFID, bizContent.getStaffId()); | MyShared.getInstance().put(MyShared.STAFFID, bizContent.getStaffId()); | ||||
if ("1".equals(bizContent.realNameAuthentication)){ | |||||
new MessageDialog.Builder(getActivity()) | |||||
// 内容必须要填写 | |||||
.setMessage("需要实名认证后才可登录") | |||||
// 确定按钮文本 | |||||
.setConfirm(getString(R.string.common_confirm)) | |||||
// 设置 null 表示不显示取消按钮 | |||||
.setCancel(getString(R.string.common_cancel)) | |||||
// 设置点击按钮后不关闭对话框 | |||||
//.setAutoDismiss(false) | |||||
.setListener(new MessageDialog.OnListener() { | |||||
@Override | |||||
public void onConfirm(BaseDialog dialog) { | |||||
Bundle bundle = new Bundle(); | |||||
bundle.putString("source","0");//0未实名跳转 1手机号更改跳转 | |||||
jumpToPage(RealUserAuthenticationActivity.class,bundle); | |||||
postDelayed(() -> { | |||||
mCommitView.showError(1000); | |||||
}, 1000); | |||||
} | |||||
@Override | |||||
public void onCancel(BaseDialog dialog) { | |||||
postDelayed(() -> { | |||||
mCommitView.showError(1000); | |||||
}, 1000); | |||||
} | |||||
}) | |||||
.show(); | |||||
}else { | |||||
MainActivity.start(getContext()); | |||||
finish(); | |||||
} | |||||
// Map<String, String> params = new HashMap<>(); | |||||
// MyRetrofit.newInstance(this,IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||||
// @Override | |||||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
// LinkedTreeMap<String,String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(),LinkedTreeMap.class);;; | |||||
// | |||||
// Log.e("okhttp","打印标题:" + linkedTreeMap.get("token") ); | |||||
// MyShared.getInstance().put(MyShared.YDTOKEN,linkedTreeMap.get("token")); | |||||
// // 跳转到首页 | |||||
// if ("1".equals(bizContent.realNameAuthentication)){ | |||||
// new MessageDialog.Builder(getActivity()) | |||||
// // 内容必须要填写 | |||||
// .setMessage("需要实名认证后才可登录") | |||||
// // 确定按钮文本 | |||||
// .setConfirm(getString(R.string.common_confirm)) | |||||
// // 设置 null 表示不显示取消按钮 | |||||
// .setCancel(getString(R.string.common_cancel)) | |||||
// // 设置点击按钮后不关闭对话框 | |||||
// //.setAutoDismiss(false) | |||||
// .setListener(new MessageDialog.OnListener() { | |||||
// if ("1".equals(bizContent.realNameAuthentication)){ | |||||
// new MessageDialog.Builder(getActivity()) | |||||
// // 内容必须要填写 | |||||
// .setMessage("需要实名认证后才可登录") | |||||
// // 确定按钮文本 | |||||
// .setConfirm(getString(R.string.common_confirm)) | |||||
// // 设置 null 表示不显示取消按钮 | |||||
// .setCancel(getString(R.string.common_cancel)) | |||||
// // 设置点击按钮后不关闭对话框 | |||||
// //.setAutoDismiss(false) | |||||
// .setListener(new MessageDialog.OnListener() { | |||||
// | // | ||||
// @Override | |||||
// public void onConfirm(BaseDialog dialog) { | |||||
// Bundle bundle = new Bundle(); | |||||
// bundle.putString("source","0");//0未实名跳转 1手机号更改跳转 | |||||
// jumpToPage(RealUserAuthenticationActivity.class,bundle); | |||||
// postDelayed(() -> { | |||||
// mCommitView.showError(1000); | |||||
// }, 1000); | |||||
// } | |||||
// | |||||
// @Override | |||||
// public void onCancel(BaseDialog dialog) { | |||||
// postDelayed(() -> { | |||||
// mCommitView.showError(1000); | |||||
// }, 1000); | |||||
// } | |||||
// }) | |||||
// .show(); | |||||
// }else { | |||||
// MainActivity.start(getContext()); | |||||
// finish(); | |||||
// } | |||||
// } | |||||
// @Override | |||||
// public void onConfirm(BaseDialog dialog) { | |||||
// Bundle bundle = new Bundle(); | |||||
// bundle.putString("source","0");//0未实名跳转 1手机号更改跳转 | |||||
// jumpToPage(RealUserAuthenticationActivity.class,bundle); | |||||
// postDelayed(() -> { | |||||
// mCommitView.showError(1000); | |||||
// }, 1000); | |||||
// } | |||||
// | // | ||||
// @Override | |||||
// public void onError() {} | |||||
// }); | |||||
// @Override | |||||
// public void onCancel(BaseDialog dialog) { | |||||
// postDelayed(() -> { | |||||
// mCommitView.showError(1000); | |||||
// }, 1000); | |||||
// } | |||||
// }) | |||||
// .show(); | |||||
// }else { | |||||
// MainActivity.start(getContext()); | |||||
// finish(); | |||||
// } | |||||
Map<String, String> params = new HashMap<>(); | |||||
MyRetrofit.newInstance(this, IFCode.IFCODETOKEN, params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
LinkedTreeMap<String, String> linkedTreeMap = JSONObject.parseObject(resultBean.getBizContent().toString(), LinkedTreeMap.class); | |||||
Log.e("okhttp", "打印标题:" + linkedTreeMap.get("token")); | |||||
MyShared.getInstance().put(MyShared.YDTOKEN, linkedTreeMap.get("token")); | |||||
// 跳转到首页 | |||||
if ("1".equals(bizContent.realNameAuthentication)) { | |||||
new MessageDialog.Builder(getActivity()) | |||||
// 内容必须要填写 | |||||
.setMessage("需要实名认证后才可登录") | |||||
// 确定按钮文本 | |||||
.setConfirm(getString(R.string.common_confirm)) | |||||
// 设置 null 表示不显示取消按钮 | |||||
.setCancel(getString(R.string.common_cancel)) | |||||
// 设置点击按钮后不关闭对话框 | |||||
//.setAutoDismiss(false) | |||||
.setListener(new MessageDialog.OnListener() { | |||||
@Override | |||||
public void onConfirm(BaseDialog dialog) { | |||||
Bundle bundle = new Bundle(); | |||||
bundle.putString("source", "0");//0未实名跳转 1手机号更改跳转 | |||||
jumpToPage(RealUserAuthenticationActivity.class, bundle); | |||||
postDelayed(() -> { | |||||
mCommitView.showError(1000); | |||||
}, 1000); | |||||
} | |||||
@Override | |||||
public void onCancel(BaseDialog dialog) { | |||||
postDelayed(() -> { | |||||
mCommitView.showError(1000); | |||||
}, 1000); | |||||
} | |||||
}) | |||||
.show(); | |||||
} else { | |||||
MainActivity.start(getContext()); | |||||
finish(); | |||||
} | |||||
} | |||||
@Override | |||||
public void onError() { | |||||
mCommitView.showError(1000); | |||||
} | |||||
}); | |||||
} | } | ||||
/* | /* | ||||
params.put("code", code); | params.put("code", code); | ||||
params.put("loginSource", Constants.LOGIN_SOURCE); | params.put("loginSource", Constants.LOGIN_SOURCE); | ||||
Log.e("registrationId", JPushInterface.getRegistrationID(getApplicationContext())); | Log.e("registrationId", JPushInterface.getRegistrationID(getApplicationContext())); | ||||
params.put("registrationId",JPushInterface.getRegistrationID(getApplicationContext())); | |||||
params.put("registrationId", JPushInterface.getRegistrationID(getApplicationContext())); | |||||
//MyRetrofit.newInstance(IFCode.IFCODE5, params, new MyRetrofit.ReturnResult() { | //MyRetrofit.newInstance(IFCode.IFCODE5, params, new MyRetrofit.ReturnResult() { | ||||
MyRetrofit.newInstance(this,IFCode.IFCODE1006, params, new MyRetrofit.ReturnResult() { | |||||
MyRetrofit.newInstance(this, IFCode.IFCODE1006, params, new MyRetrofit.ReturnResult() { | |||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
if ("0".equals(bizContent.needChangePasswordNow)){ | |||||
if ("0".equals(bizContent.needChangePasswordNow)) { | |||||
loginSuccess(bizContent); | loginSuccess(bizContent); | ||||
}else { | |||||
} else { | |||||
new MessageDialog.Builder(LoginActivity.this) | new MessageDialog.Builder(LoginActivity.this) | ||||
.setTitle("提示") | .setTitle("提示") | ||||
.setMessage("密码为初始密码,需要更改后才可登录") | .setMessage("密码为初始密码,需要更改后才可登录") | ||||
params.put("loginSource", Constants.LOGIN_SOURCE); | params.put("loginSource", Constants.LOGIN_SOURCE); | ||||
params.put("appId", "52030131"); //综合业务支撑平台使用 | params.put("appId", "52030131"); //综合业务支撑平台使用 | ||||
//MyRetrofit.newInstance(IFCode.IFCODE4, params, new MyRetrofit.ReturnResult() { | //MyRetrofit.newInstance(IFCode.IFCODE4, params, new MyRetrofit.ReturnResult() { | ||||
MyRetrofit.newInstance(this,IFCode.IFCODE1004, params, new MyRetrofit.ReturnResult() { | |||||
MyRetrofit.newInstance(this, IFCode.IFCODE1004, params, new MyRetrofit.ReturnResult() { | |||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
getLoginInfo(bizContent.getCode()); | getLoginInfo(bizContent.getCode()); | ||||
params.put("appId", "52030131"); | params.put("appId", "52030131"); | ||||
params.put("loginSource", Constants.LOGIN_SOURCE); | params.put("loginSource", Constants.LOGIN_SOURCE); | ||||
//MyRetrofit.newInstance(IFCode.IFCODE55, params, new MyRetrofit.ReturnResult() { | //MyRetrofit.newInstance(IFCode.IFCODE55, params, new MyRetrofit.ReturnResult() { | ||||
MyRetrofit.newInstance(this,IFCode.IFCODE1005, params, new MyRetrofit.ReturnResult() { | |||||
MyRetrofit.newInstance(this, IFCode.IFCODE1005, params, new MyRetrofit.ReturnResult() { | |||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
getLoginInfo(bizContent.getCode()); | getLoginInfo(bizContent.getCode()); | ||||
showDialog("发送中..."); | showDialog("发送中..."); | ||||
Map<String, String> params = new HashMap<>(); | Map<String, String> params = new HashMap<>(); | ||||
params.put("mobile", FunHelper.getText(mPhoneView)); | params.put("mobile", FunHelper.getText(mPhoneView)); | ||||
MyRetrofit.newInstance(this,IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() { | |||||
MyRetrofit.newInstance(this, IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() { | |||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
hideDialog(); | hideDialog(); |