正在查看: EfectivoYa v2.3 应用的 FFLoanActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: EfectivoYa v2.3 应用的 FFLoanActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mxff.ffxxmm.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import c1.a;
import com.mxff.ffxxmm.R$color;
import com.mxff.ffxxmm.R$mipmap;
import com.mxff.ffxxmm.activity.FFLoanActivity;
import com.mxff.ffxxmm.adapter.FFProductDetailListAdapter;
import com.mxff.ffxxmm.databinding.FfActivityLoanBinding;
import com.mxff.ffxxmm.dialog.FFLoanSuccessDialogFragment;
import com.mxff.ffxxmm.model.response.FFProductBean;
import com.mxff.ffxxmm.model.response.FFQueryBean;
import com.mxff.ffxxmm.utils.FFPeeSpanUtils;
import com.mxff.ffxxmm.utils.e;
import com.mxff.ffxxmm.utils.k;
import com.mxff.ffxxmm.utils.l;
import com.mxff.ffxxmm.utils.n;
import com.mxff.ffxxmm.viewmodel.FFLoanViewModel;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Locale;
import kotlinx.coroutines.Observer;
import l1.d;
public class FFLoanActivity extends BaseActivity<FFLoanViewModel, FfActivityLoanBinding> {
private FFQueryBean f2072l;
private int f2073m = 0;
private boolean f2074n = false;
private FFProductBean f2075o;
private int f2076p;
private FFProductDetailListAdapter f2077q;
private void I() {
this.f2065i.tvLoan.setEnabled(this.f2074n && this.f2076p >= this.f2075o.getAmount());
}
private void J() {
this.f2065i.ivCheck.setImageResource(this.f2074n ? R$mipmap.ff_ic_loan_1 : R$mipmap.ff_ic_loan_2);
}
public void K(Boolean bool) {
this.f2065i.tvLoan.setEnabled(true);
if (bool.booleanValue()) {
T();
}
}
public void L(FFQueryBean fFQueryBean) {
ArrayList arrayList = new ArrayList();
arrayList.add(new d(a.a("Interés:"), "0.04%"));
arrayList.add(new d(a.a("IVA:"), com.mxff.ffxxmm.utils.a.a(this.f2075o.getAmount())));
arrayList.add(new d(a.a("Monto total a pagar"), e.a((long) com.mxff.ffxxmm.utils.a.b(this.f2075o.getAmount(), this.f2075o.getTerm()))));
arrayList.add(new d(a.a("Fecha de vencimiento"), n.a(this.f2075o.getTerm())));
arrayList.add(new d(a.a("Método de pago"), fFQueryBean.getBankType()));
arrayList.add(new d(a.a("Banco"), fFQueryBean.getBankName()));
arrayList.add(new d(a.a("Número de cuenta"), e.c(fFQueryBean.getBankAccount())));
this.f2077q.c(arrayList);
}
public void M(View view) {
finish();
}
public void N(View view) {
this.f2074n = !this.f2074n;
J();
I();
}
public void O(View view) {
l.c(this, "https://h5.efectivoya.mx/agreement.html?" + a.a("realName") + "=" + this.f2072l.getBankUserName() + "&" + a.a("bankNumber") + "=" + this.f2072l.getBankAccount() + "&" + a.a("phone") + "=" + com.mxff.ffxxmm.utils.d.f() + "&" + a.a("contractAmountTotal") + "=" + this.f2075o.getAmount() + "&" + a.a("interestRate") + "=" + (this.f2075o.getDailyRate() * 100.0d) + "&" + a.a("repaymentTotal") + "=" + com.mxff.ffxxmm.utils.a.b(this.f2075o.getAmount(), this.f2075o.getTerm()) + "&" + a.a("repayTime") + "=" + n.a(this.f2075o.getTerm()) + "&" + a.a("term") + "=" + n.a(this.f2075o.getTerm()));
}
public void P(View view) {
this.f2074n = !this.f2074n;
J();
I();
}
public void Q(View view) {
this.f2065i.tvLoan.setEnabled(false);
this.f2060a.e(this.f2075o);
}
public void R() {
startActivity(new Intent(this, (Class<?>) FFOrderListActivity.class));
finish();
}
public static void S(Context context, FFProductBean fFProductBean) {
Intent intent = new Intent(context, (Class<?>) FFLoanActivity.class);
intent.putExtra("fdfdsfds", (Serializable) fFProductBean);
context.startActivity(intent);
}
private void T() {
FFLoanSuccessDialogFragment fFLoanSuccessDialogFragment = new FFLoanSuccessDialogFragment();
fFLoanSuccessDialogFragment.setOnItemClickListener(new FFLoanSuccessDialogFragment.a() {
public final void a() {
FFLoanActivity.this.R();
}
});
fFLoanSuccessDialogFragment.show(getSupportFragmentManager(), "");
}
@Override
protected void l() {
super.l();
this.f2060a.c.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
FFLoanActivity.this.K((Boolean) obj);
}
});
this.f2060a.d.observe(this, new Observer() {
@Override
public final void onChanged(Object obj) {
FFLoanActivity.this.L((FFQueryBean) obj);
}
});
}
@Override
protected void r() {
this.f2060a.f();
}
@Override
protected void u(Bundle bundle) {
FFProductBean serializableExtra;
k.a(this.f2059k, a.a("Detalles de préstamo"), new View.OnClickListener() {
@Override
public final void onClick(View view) {
FFLoanActivity.this.M(view);
}
});
if (Build.VERSION.SDK_INT >= 33) {
serializableExtra = getIntent().getSerializableExtra("fdfdsfds", FFProductBean.class);
this.f2075o = serializableExtra;
} else {
this.f2075o = getIntent().getSerializableExtra("fdfdsfds");
}
FFQueryBean b2 = com.mxff.ffxxmm.utils.d.b();
this.f2072l = b2;
this.f2076p = b2.getTotalAmount() - com.mxff.ffxxmm.utils.d.d();
this.f2073m = this.f2072l.getTotalAmount() - com.mxff.ffxxmm.utils.d.d();
com.bumptech.glide.d.v(this).t(this.f2075o.getIcon()).p0(this.f2065i.ivProductIcon);
this.f2065i.tvProductName.setText(this.f2075o.getProductName());
this.f2065i.tvAmount.setText(e.a(this.f2075o.getAmount()));
this.f2065i.tvLoanTerm.setText(String.format(a.a("%d días"), Integer.valueOf(this.f2075o.getTerm())));
this.f2065i.tvLoanRate.setText(String.format(Locale.US, a.a("%.2f%% per día"), Double.valueOf(this.f2075o.getDailyRate() * 100.0d)));
this.f2065i.tvLoanTip.setText("1 minuto");
this.f2065i.tvLoan.setText(a.a("Solicitar el préstamo"));
FFPeeSpanUtils.j(this.f2065i.tvPrimary).a(a.a("He leído y acepto el '")).e(ContextCompat.getColor(this, R$color.ffColorGrey99), false, new View.OnClickListener() {
@Override
public final void onClick(View view) {
FFLoanActivity.this.N(view);
}
}).a(a.a("Acuerdo de préstamo")).e(ContextCompat.getColor(this, R$color.ffColorOrangeFF), false, new View.OnClickListener() {
@Override
public final void onClick(View view) {
FFLoanActivity.this.O(view);
}
}).a(a.a("'")).d();
this.f2065i.llPrimary.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
FFLoanActivity.this.P(view);
}
});
this.f2065i.tvLoan.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
FFLoanActivity.this.Q(view);
}
});
this.f2065i.rvProductDetail.setLayoutManager(new LinearLayoutManager(this));
RecyclerView.Adapter fFProductDetailListAdapter = new FFProductDetailListAdapter();
this.f2077q = fFProductDetailListAdapter;
this.f2065i.rvProductDetail.setAdapter(fFProductDetailListAdapter);
}
@Override
protected boolean z() {
return true;
}
}