导航菜单

页面标题

页面副标题

EfectivoYa v2.3 - FragmtMine.java 源代码

正在查看: EfectivoYa v2.3 应用的 FragmtMine.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.cnhz.android.main.usercenter.view;

import android.app.ActivityOptions;
import android.content.Intent;
import android.graphics.result.ActivityResult;
import android.graphics.result.ActivityResultCallback;
import android.graphics.result.ActivityResultLauncher;
import android.graphics.result.contract.ActivityResultContracts;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ScrollView;
import androidx.exifinterface.media.ExifInterface;
import androidx.fragment.app.FragmentActivity;
import androidx.viewbinding.ViewBinding;
import com.cnhz.android.main.R$drawable;
import com.cnhz.android.main.R$id;
import com.cnhz.android.main.R$string;
import com.cnhz.android.main.base.FragmentBase;
import com.cnhz.android.main.databinding.FragmtMineBinding;
import com.cnhz.android.main.otherNet.view.ActivityOthers;
import com.cnhz.android.main.product.bean.CreditLimitInfoBean;
import com.cnhz.android.main.usercenter.bean.UserAccountStatusBean;
import com.cnhz.android.main.usercenter.bean.UserBankInfo;
import com.cnhz.android.main.view.activity.ActivityMain;
import com.cnhz.android.net.api.BaseResponse;
import com.kls.snip.core.InfoLib;
import com.mxff.ffxxmm.activity.FFLoginActivity;
import h0.a;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import m0.f;
import p0.b;

@Metadata(d1 = {"\u0000~\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004B\u0007¢\u0006\u0004\bP\u0010QJ\u0010\u0010\b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005H\u0002J\u0012\u0010\u000b\u001a\u00020\u00072\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0002J$\u0010\u0013\u001a\u00020\u00122\u0006\u0010\r\u001a\u00020\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000e2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0010H\u0016J\b\u0010\u0014\u001a\u00020\u0007H\u0016J\b\u0010\u0015\u001a\u00020\u0007H\u0016J\b\u0010\u0016\u001a\u00020\u0007H\u0016J\b\u0010\u0017\u001a\u00020\u0007H\u0016J\n\u0010\u0019\u001a\u0004\u0018\u00010\u0018H\u0016J\u001d\u0010\u001c\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u001a2\u0006\u0010\u001b\u001a\u00028\u0000H\u0016¢\u0006\u0004\b\u001c\u0010\u001dJ\u001d\u0010\u001e\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u001a2\u0006\u0010\u001b\u001a\u00028\u0000H\u0016¢\u0006\u0004\b\u001e\u0010\u001dJ\u001d\u0010\u001f\u001a\u00020\u0007\"\u0004\b\u0000\u0010\u001a2\u0006\u0010\u001b\u001a\u00028\u0000H\u0016¢\u0006\u0004\b\u001f\u0010\u001dR\"\u0010'\u001a\u00020 8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b!\u0010\"\u001a\u0004\b#\u0010$\"\u0004\b%\u0010&R\"\u0010/\u001a\u00020(8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b)\u0010*\u001a\u0004\b+\u0010,\"\u0004\b-\u0010.R\"\u00107\u001a\u0002008\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b1\u00102\u001a\u0004\b3\u00104\"\u0004\b5\u00106R\"\u0010?\u001a\u0002088\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b9\u0010:\u001a\u0004\b;\u0010<\"\u0004\b=\u0010>R\"\u0010G\u001a\u00020@8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bA\u0010B\u001a\u0004\bC\u0010D\"\u0004\bE\u0010FR%\u0010O\u001a\u0010\u0012\f\u0012\n J*\u0004\u0018\u00010I0I0H8\u0006¢\u0006\f\n\u0004\bK\u0010L\u001a\u0004\bM\u0010N¨\u0006R"}, d2 = {"Lcom/cnhz/android/main/usercenter/view/FragmtMine;", "Lcom/cnhz/android/main/base/FragmentBase;", "Lm0/b;", "Lh0/a;", "Lm0/f;", "", "isLogin", "", "m0", "Lcom/cnhz/android/main/product/bean/CreditLimitInfoBean;", "creditLimitInfoBean", "u0", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/os/Bundle;", "savedInstanceState", "Landroid/view/View;", "onCreateView", "d0", "e0", "onResume", "onPause", "Landroidx/viewbinding/ViewBinding;", "c0", ExifInterface.GPS_DIRECTION_TRUE, "t", "C", "(Ljava/lang/Object;)V", "p", "a", "Lcom/cnhz/android/main/databinding/FragmtMineBinding;", "b", "Lcom/cnhz/android/main/databinding/FragmtMineBinding;", "l0", "()Lcom/cnhz/android/main/databinding/FragmtMineBinding;", "t0", "(Lcom/cnhz/android/main/databinding/FragmtMineBinding;)V", "mViewBinding", "Lo0/a;", "e", "Lo0/a;", "k0", "()Lo0/a;", "s0", "(Lo0/a;)V", "mUseCenterPresenter", "Lj0/a;", "i", "Lj0/a;", "j0", "()Lj0/a;", "r0", "(Lj0/a;)V", "mProductPresenter", "", "j", "I", "getAccountStaus", "()I", "setAccountStaus", "(I)V", "accountStaus", "", "k", "Ljava/lang/String;", "getMobiel", "()Ljava/lang/String;", "setMobiel", "(Ljava/lang/String;)V", "mobiel", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "kotlin.jvm.PlatformType", "l", "Landroidx/activity/result/ActivityResultLauncher;", "getLogin", "()Landroidx/activity/result/ActivityResultLauncher;", "login", "<init>", "()V", "V2.3-20240823-003002-Production_release"}, k = 1, mv = {1, 8, 0})
public final class FragmtMine extends FragmentBase implements m0.b, h0.a, m0.f {

    public FragmtMineBinding mViewBinding;

    public o0.a mUseCenterPresenter;

    public j0.a mProductPresenter;

    private int accountStaus;

    private String mobiel = "";

    private final ActivityResultLauncher login;

    public static final class a implements ActivityMain.a {
        a() {
        }

        @Override
        public void a(boolean z2) {
            if (z2) {
                p0.b.f2612a.w("acq03_mine_wait_to_auth", "", 0L);
                InfoLib.INSTANCE.getInstance().e("80");
                FragmtMine.this.startActivity(new Intent(FragmtMine.this.getContext(), (Class<?>) ActivityAuth.class));
            }
        }
    }

    public FragmtMine() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            @Override
            public final void onActivityResult(Object obj) {
                FragmtMine.q0(FragmtMine.this, (ActivityResult) obj);
            }
        });
        Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…\n            }\n        })");
        this.login = registerForActivityResult;
    }

    private final void m0(boolean isLogin) {
        l0().TextVRemainNum.setText("$3,000");
        l0().TextVCreditLimitTip.setText("Hasta");
        l0().LayoutBtnNoLoginCredit.setVisibility(0);
        l0().LayoutTwoBtnsHadAuth.setVisibility(8);
        if (!isLogin) {
            p0.b.f2612a.w("acq01_mine_no_login", "", 0L);
            l0().progressBar.setProgress(0);
            l0().TextVRemainText.setVisibility(4);
            l0().TextVNoLoginCredit.setText(getString(R$string.tip_no_login));
            l0().TextVToLoginCredit.setText(getString(R$string.tip_to_login));
            l0().BtnGo.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    FragmtMine.n0(FragmtMine.this, view);
                }
            });
            return;
        }
        p0.b.f2612a.w("acq01_mine_login_no_auth", "", 0L);
        l0().progressBar.setProgress(0);
        l0().TextVRemainText.setVisibility(0);
        l0().TextVRemainText.setText(getString(R$string.tip_no_limint));
        l0().TextVNoLoginCredit.setText(getString(R$string.tip_no_auth));
        l0().TextVToLoginCredit.setText(getString(R$string.tip_to_auth_text));
        l0().BtnGo.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FragmtMine.o0(FragmtMine.this, view);
            }
        });
    }

    public static final void n0(FragmtMine fragmtMine, View view) {
        Intrinsics.checkNotNullParameter(fragmtMine, "this$0");
        p0.b.f2612a.w("acq03_mine_wait_to_login", "", 0L);
        fragmtMine.startActivity(new Intent(fragmtMine.getContext(), (Class<?>) FFLoginActivity.class), ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
    }

    public static final void o0(FragmtMine fragmtMine, View view) {
        Intrinsics.checkNotNullParameter(fragmtMine, "this$0");
        FragmentActivity activity = fragmtMine.getActivity();
        Intrinsics.d(activity, "null cannot be cast to non-null type com.cnhz.android.main.view.activity.ActivityMain");
        ((ActivityMain) activity).C(fragmtMine.new a());
    }

    public static final void p0(FragmtMine fragmtMine, View view) {
        Intrinsics.checkNotNullParameter(fragmtMine, "this$0");
        int id = view.getId();
        if (id == R$id.TextV_my_order) {
            Intent intent = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent.putExtra("StartFragmentType", 3);
            fragmtMine.startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.TextV_my_coupon) {
            Intent intent2 = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent2.putExtra("StartFragmentType", 1);
            fragmtMine.startActivity(intent2, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.Layout_rating) {
            fragmtMine.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://play.google.com/store/apps/details?id=" + fragmtMine.requireContext().getPackageName())));
            return;
        }
        if (id == R$id.Layout_private_procotol) {
            Intent intent3 = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent3.putExtra("StartFragmentType", 5);
            intent3.putExtra("ProtocolType", 5);
            fragmtMine.startActivity(intent3, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.Layout_feedback) {
            if (!p0.b.f2612a.r()) {
                fragmtMine.startActivity(new Intent(fragmtMine.requireContext(), (Class<?>) FFLoginActivity.class), ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
                return;
            }
            Intent intent4 = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent4.putExtra("StartFragmentType", 2);
            fragmtMine.startActivity(intent4, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.Layout_about_us) {
            Intent intent5 = new Intent(fragmtMine.requireActivity(), (Class<?>) ActivityOthers.class);
            intent5.putExtra("StartFragmentType", 5);
            intent5.putExtra("ProtocolType", 4);
            fragmtMine.startActivity(intent5, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.Layout_assistance) {
            Intent intent6 = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent6.putExtra("StartFragmentType", 5);
            intent6.putExtra("ProtocolType", 3);
            fragmtMine.startActivity(intent6, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
            return;
        }
        if (id == R$id.Layout_setting) {
            Intent intent7 = new Intent(fragmtMine.requireContext(), (Class<?>) ActivityOthers.class);
            intent7.putExtra("StartFragmentType", 4);
            fragmtMine.startActivity(intent7, ActivityOptions.makeSceneTransitionAnimation(fragmtMine.requireActivity(), new Pair[0]).toBundle());
        }
    }

    public static final void q0(FragmtMine fragmtMine, ActivityResult activityResult) {
        Intrinsics.checkNotNullParameter(fragmtMine, "this$0");
        if (activityResult == null || activityResult.getResultCode() != 102) {
            return;
        }
        fragmtMine.e0();
    }

    private final void u0(CreditLimitInfoBean creditLimitInfoBean) {
        FragmentActivity activity = getActivity();
        Intrinsics.d(activity, "null cannot be cast to non-null type com.cnhz.android.main.view.activity.ActivityMain");
        ((ActivityMain) activity).D(creditLimitInfoBean);
        if (creditLimitInfoBean != null) {
            if (creditLimitInfoBean.getShadow() != 20) {
                l0().TextVRemainText.setText(getString(R$string.tip_no_limint));
                return;
            }
            p0.b.f2612a.w("acq01_mine_credit_succ", "", 0L);
            l0().TextVRemainText.setText(getString(R$string.tip_total_credit_limit) + creditLimitInfoBean.getPrefers() + " \n" + getString(R$string.tip_used_credit_limit) + creditLimitInfoBean.getPlc());
            l0().TextVCreditLimitTip.setText(getString(R$string.tip_credit_limit_credited));
            l0().TextVRemainNum.setText("$" + creditLimitInfoBean.getSelling());
            l0().progressBar.setProgress((int) ((creditLimitInfoBean.getDangerous() * ((double) 100)) / creditLimitInfoBean.getAcademic()));
        }
    }

    @Override
    public void C(Object t2) {
        Object dataBean;
        if (t2 == null || !(t2 instanceof BaseResponse)) {
            return;
        }
        BaseResponse baseResponse = (BaseResponse) t2;
        if (baseResponse.getBuilding() == 200 && (dataBean = baseResponse.getDataBean(UserAccountStatusBean.class)) != null && (dataBean instanceof UserAccountStatusBean)) {
            v0.c.e(com.cnhz.android.main.base.a.f1299a.a(), "spkey_account_status", Integer.valueOf(((UserAccountStatusBean) dataBean).getSerbia()));
            if (p0.b.f2612a.q()) {
                l0().ImageVProfile.setImageResource(R$drawable.image_user_had_auth);
                l0().LayoutBtnNoLoginCredit.setVisibility(8);
                l0().LayoutTwoBtnsHadAuth.setVisibility(0);
                j0.a j02 = j0();
                if (j02 != null) {
                    j02.g();
                }
                o0.a k02 = k0();
                if (k02 != null) {
                    k02.y();
                }
            }
        }
    }

    @Override
    public void H(Object obj) {
        f.a.a(this, obj);
    }

    @Override
    public void R(Object obj) {
        f.a.b(this, obj);
    }

    @Override
    public void a(Object t2) {
        Object dataBean;
        a.C0026a.a(this, t2);
        if (t2 == null || !(t2 instanceof BaseResponse)) {
            return;
        }
        BaseResponse baseResponse = (BaseResponse) t2;
        if (baseResponse.getBuilding() != 200 || (dataBean = baseResponse.getDataBean(CreditLimitInfoBean.class)) == null) {
            return;
        }
        Intrinsics.d(dataBean, "null cannot be cast to non-null type com.cnhz.android.main.product.bean.CreditLimitInfoBean");
        u0((CreditLimitInfoBean) dataBean);
    }

    @Override
    public ViewBinding c0() {
        return l0();
    }

    @Override
    public void d0() {
        s0(new o0.a(getContext()));
        k0().J(this);
        r0(new j0.a(getContext()));
        j0().A(this);
        k0().X(this);
    }

    @Override
    public void e0() {
        l0().progressBar.setProgress(50);
        View.OnClickListener onClickListener = new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FragmtMine.p0(FragmtMine.this, view);
            }
        };
        l0().TextVMyCoupon.setOnClickListener(onClickListener);
        l0().TextVMyOrder.setOnClickListener(onClickListener);
        l0().LayoutRating.setOnClickListener(onClickListener);
        l0().LayoutPrivateProcotol.setOnClickListener(onClickListener);
        l0().LayoutFeedback.setOnClickListener(onClickListener);
        l0().LayoutAboutUs.setOnClickListener(onClickListener);
        l0().LayoutAssistance.setOnClickListener(onClickListener);
        l0().LayoutSetting.setOnClickListener(onClickListener);
    }

    public final j0.a j0() {
        j0.a aVar = this.mProductPresenter;
        if (aVar != null) {
            return aVar;
        }
        Intrinsics.t("mProductPresenter");
        return null;
    }

    public final o0.a k0() {
        o0.a aVar = this.mUseCenterPresenter;
        if (aVar != null) {
            return aVar;
        }
        Intrinsics.t("mUseCenterPresenter");
        return null;
    }

    public final FragmtMineBinding l0() {
        FragmtMineBinding fragmtMineBinding = this.mViewBinding;
        if (fragmtMineBinding != null) {
            return fragmtMineBinding;
        }
        Intrinsics.t("mViewBinding");
        return null;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        Intrinsics.checkNotNullParameter(inflater, "inflater");
        FragmtMineBinding inflate = FragmtMineBinding.inflate(inflater, container, false);
        Intrinsics.checkNotNullExpressionValue(inflate, "inflate(inflater, container, false)");
        t0(inflate);
        ScrollView root = l0().getRoot();
        Intrinsics.checkNotNullExpressionValue(root, "mViewBinding.root");
        return root;
    }

    @Override
    public void onPause() {
        super.onPause();
        b.a aVar = p0.b.f2612a;
        boolean r2 = aVar.r();
        boolean q2 = aVar.q();
        if (!r2) {
            aVar.w("acq01_mine_no_login", "", System.currentTimeMillis() - getFragmentStartTime());
        } else if (q2) {
            aVar.w("acq01_mine_credit_succ", "", System.currentTimeMillis() - getFragmentStartTime());
        } else {
            aVar.w("acq01_mine_login_no_auth", "", System.currentTimeMillis() - getFragmentStartTime());
        }
    }

    @Override
    public void onResume() {
        o0.a k02;
        super.onResume();
        b.a aVar = p0.b.f2612a;
        this.accountStaus = aVar.f();
        boolean r2 = aVar.r();
        boolean q2 = aVar.q();
        String d2 = v0.c.d(requireContext(), "spkey_user_mobile", "");
        Intrinsics.checkNotNullExpressionValue(d2, "getString(requireContext…ils.SPKEY_USER_MOBILE,\"\")");
        this.mobiel = d2;
        if (TextUtils.isEmpty(d2) || this.mobiel.length() <= 8) {
            l0().TextVTip3.setText(this.mobiel);
        } else {
            String substring = this.mobiel.substring(0, 2);
            Intrinsics.checkNotNullExpressionValue(substring, "this as java.lang.String…ing(startIndex, endIndex)");
            String substring2 = this.mobiel.substring(6);
            Intrinsics.checkNotNullExpressionValue(substring2, "this as java.lang.String).substring(startIndex)");
            l0().TextVTip3.setText(substring + "****" + substring2);
        }
        if (!r2 || !q2) {
            m0(r2);
            if (r2 && (k02 = k0()) != null) {
                k02.f();
            }
            l0().ImageVProfile.setImageResource(R$drawable.iamge_profile);
            return;
        }
        l0().LayoutBtnNoLoginCredit.setVisibility(8);
        l0().LayoutTwoBtnsHadAuth.setVisibility(0);
        l0().ImageVProfile.setImageResource(R$drawable.image_user_had_auth);
        FragmentActivity activity = getActivity();
        Intrinsics.d(activity, "null cannot be cast to non-null type com.cnhz.android.main.view.activity.ActivityMain");
        u0(((ActivityMain) activity).getMCreidtLimitInfo());
    }

    @Override
    public void p(Object t2) {
        Object dataBean;
        f.a.c(this, t2);
        if (t2 == null || !(t2 instanceof BaseResponse)) {
            return;
        }
        BaseResponse baseResponse = (BaseResponse) t2;
        if (baseResponse.getBuilding() != 200 || (dataBean = baseResponse.getDataBean(UserBankInfo.class)) == null) {
            return;
        }
        b.a aVar = p0.b.f2612a;
        Intrinsics.d(dataBean, "null cannot be cast to non-null type com.cnhz.android.main.usercenter.bean.UserBankInfo");
        aVar.v((UserBankInfo) dataBean);
    }

    @Override
    public void r(Object obj) {
        f.a.e(this, obj);
    }

    public final void r0(j0.a aVar) {
        Intrinsics.checkNotNullParameter(aVar, "<set-?>");
        this.mProductPresenter = aVar;
    }

    public final void s0(o0.a aVar) {
        Intrinsics.checkNotNullParameter(aVar, "<set-?>");
        this.mUseCenterPresenter = aVar;
    }

    public final void t0(FragmtMineBinding fragmtMineBinding) {
        Intrinsics.checkNotNullParameter(fragmtMineBinding, "<set-?>");
        this.mViewBinding = fragmtMineBinding;
    }

    @Override
    public void x(Object obj) {
        f.a.d(this, obj);
    }
}