|
@@ -47,16 +47,20 @@ public abstract class BaseChatActivity extends BaseActivity implements
|
|
|
public void onResponse(ObjectResult<CertificationBean> result) {
|
|
|
CertificationBean certificationBean = result.getData();
|
|
|
if (result.getResultCode() == 1 && certificationBean!=null) {
|
|
|
- if (certificationBean.isCertification()){
|
|
|
- ToastUtil.showToast(getApplicationContext(), "实名认证已通过");
|
|
|
- PreferenceUtils.putString(getApplicationContext(), "isVerified", "true");
|
|
|
- }else {
|
|
|
- ToastUtil.showToast(getApplicationContext(), result.getResultMsg());
|
|
|
-
|
|
|
+ if (result.getResultCode() == 1 && result.getData()!=null) {
|
|
|
+ CertificationBean bean = result.getData();
|
|
|
+ if (bean.isCertification()){
|
|
|
+ ToastUtil.showToast(getApplicationContext() ,"实名认证已通过");
|
|
|
+ PreferenceUtils.putString(getApplicationContext(), "isVerified", "true");
|
|
|
+ }else {
|
|
|
+ if ( TextUtils.isEmpty(result.getResultMsg())){
|
|
|
+ ToastUtil.showToast(getApplicationContext(),"实名认证失败" );
|
|
|
+ }else {
|
|
|
+ ToastUtil.showToast(getApplicationContext(),result.getResultMsg() );
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- ToastUtil.showToast(BaseChatActivity.this, getApplicationContext().getString(R.string.success));
|
|
|
-
|
|
|
}else {
|
|
|
|
|
|
ToastUtil.showToast(BaseChatActivity.this, result.getResultMsg());
|