正在查看: 鲸鱼借条 v4.1.2 应用的 J0ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 鲸鱼借条 v4.1.2 应用的 J0ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yuxianghua.ui.activitys;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnClick;
import com.base.commonlibrary.base.BaseResult;
import com.base.commonlibrary.base.baserx.RxHelper;
import com.base.commonlibrary.base.baserx.RxSchedulers;
import com.base.commonlibrary.control.IPermissionResultListener;
import com.base.commonlibrary.utils.MD5Utils;
import com.base.commonlibrary.utils.RSAUtils;
import com.base.commonlibrary.views.TitleLayout;
import com.google.gson.Gson;
import com.yuxianghua.mjyp.app.api.Api;
import com.yuxianghua.mjyp.app.api.AppConfig;
import com.yuxianghua.mjyp.app.base.BaseBindActivity;
import com.yuxianghua.mjyp.app.base.RxSubscriber;
import com.yuxianghua.ui.bean.AuthBean;
import com.yuxianghua.ui.bean.EncForm;
import com.yuxianghua.ui.views.SureAndCancelDialog;
import java.util.UUID;
import rx.Subscriber;
import yhgjgdf.ijnhjfyd.ikbujfjfnjkif.R;
public class J0ACT extends BaseBindActivity {
@BindView(R.id.btn_ok)
TextView btnOk;
@BindView(R.id.idno)
TextView idno;
@BindView(R.id.iv_guo)
ImageView ivGuo;
@BindView(R.id.iv_ren)
ImageView ivRen;
@BindView(R.id.ll_idno)
LinearLayout llIdno;
@BindView(R.id.ll_name)
LinearLayout llName;
@BindView(R.id.name)
TextView name;
@BindView(R.id.ren_btn)
TextView renBtn;
@BindView(R.id.ren_guo)
TextView renGuo;
@BindView(R.id.rl_content)
LinearLayout rlContent;
@BindView(R.id.rl_guo)
RelativeLayout rlGuo;
@BindView(R.id.rl_ren)
RelativeLayout rlRen;
@BindView(R.id.rl_text)
RelativeLayout rlText;
private SureAndCancelDialog sureAndCancelDialog;
@BindView(R.id.tip)
TextView tip;
@BindView(R.id.tip_idno)
TextView tipIdno;
@BindView(R.id.tip_name)
TextView tipName;
@BindView(R.id.tip_ren)
TextView tipRen;
@BindView(R.id.title)
TitleLayout title;
@Override
protected boolean canLoadMore() {
return false;
}
@Override
public int getLayoutId() {
return R.layout.activity_info_id_card;
}
@Override
public void initPresenter() {
}
@Override
protected void loadMore() {
}
@Override
protected void refresh() {
}
@Override
public void initView(Bundle bundle) {
this.title.setOnBackButtonClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
J0ACT.this.onBackPressed();
}
});
}
@OnClick({R.id.rl_ren, R.id.rl_guo, R.id.btn_ok})
protected void onClick(View view) {
int id = view.getId();
if (id == R.id.btn_ok) {
this.btnOk.setEnabled(false);
realAuthEnc();
} else if (id == R.id.rl_guo || id == R.id.rl_ren) {
permissionRequest(getResources().getString(R.string.need_some_permission), new String[]{"android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE", "android.permission.CAMERA"}, 18888, new IPermissionResultListener() {
@Override
public void onPermissionFaild() {
}
@Override
public void onPermissionSuccess() {
J0ACT.this.checkRealAuthCount();
}
});
}
}
protected void realAuthEnc() {
final String charSequence = this.idno.getText().toString();
final String charSequence2 = this.name.getText().toString();
String json = new Gson().toJson(new AuthBean(charSequence, charSequence2));
long currentTimeMillis = System.currentTimeMillis();
String uuid = UUID.randomUUID().toString();
String str = json + "@" + uuid + "@" + currentTimeMillis;
String encrypt = RSAUtils.getInstance().encrypt(str + "@" + MD5Utils.md5(str, AppConfig.md5key));
StringBuilder sb = new StringBuilder();
sb.append(currentTimeMillis);
sb.append("");
this.mRxManager.add(Api.getDefault().realAuth(new EncForm(encrypt, uuid, sb.toString())).compose(RxSchedulers.io_main()).subscribe((Subscriber<? super R>) new RxSubscriber<BaseResult>(this.mContext, true) {
@Override
public void _onNext(BaseResult baseResult) {
if (baseResult.getCode() == 200) {
J0ACT j0act = J0ACT.this;
j0act.showShortToast(j0act.getResources().getString(R.string.commit_success));
Intent intent = new Intent();
intent.putExtra("idCard", charSequence);
intent.putExtra("realName", charSequence2);
J0ACT.this.setResult(1003, intent);
J0ACT.this.finish();
} else {
J0ACT.this.showShortToast(baseResult.getMessage());
}
J0ACT.this.btnOk.setEnabled(true);
}
@Override
protected void _onError(String str2) {
J0ACT.this.showShortToast(str2);
J0ACT.this.btnOk.setEnabled(true);
}
}));
}
protected void checkRealAuthCount() {
this.mRxManager.add(Api.getDefault().checkRealAuthCount().compose(RxHelper.handleResult()).subscribe((Subscriber<? super R>) new RxSubscriber<String>(this.mContext, true) {
@Override
public void _onNext(String str) {
if (str != null) {
return;
}
J0ACT j0act = J0ACT.this;
j0act.showShortToast(j0act.getResources().getString(R.string.order_num_null));
}
@Override
protected void _onError(String str) {
J0ACT.this.showShortToast(str);
}
}));
}
@Override
public void onBackPressed() {
SureAndCancelDialog sureAndCancelDialog = this.sureAndCancelDialog;
if (sureAndCancelDialog != null && sureAndCancelDialog.isShow()) {
this.sureAndCancelDialog.dismiss();
}
if (this.sureAndCancelDialog == null) {
SureAndCancelDialog sureAndCancelDialog2 = new SureAndCancelDialog(this.mContext, R.layout.dialog_tip);
this.sureAndCancelDialog = sureAndCancelDialog2;
((TextView) sureAndCancelDialog2.getView(R.id.content)).setText(getResources().getString(R.string.cash_hander_leve));
this.sureAndCancelDialog.setOnClickCancel(new SureAndCancelDialog.onClickCancel() {
@Override
public final void onClickCancel() {
J0ACT.this.lambda$onBackPressed$0$J0ACT();
}
});
this.sureAndCancelDialog.setOnClickSure(new SureAndCancelDialog.onClickSure() {
@Override
public final void onClickSure() {
J0ACT.this.lambda$onBackPressed$1$J0ACT();
}
});
}
this.sureAndCancelDialog.show();
}
public void lambda$onBackPressed$0$J0ACT() {
this.sureAndCancelDialog.dismiss();
}
public void lambda$onBackPressed$1$J0ACT() {
this.sureAndCancelDialog.dismiss();
finish();
}
}