导航菜单

页面标题

页面副标题

新暖心缘 v8.1.1 - GoldNotEnoughActivity.java 源代码

正在查看: 新暖心缘 v8.1.1 应用的 GoldNotEnoughActivity.java JAVA 源代码文件

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


package com.luanxingyuan.app.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.OnClick;
import com.faceunity.wrapper.faceunity;
import com.luanxingyuan.app.base.BaseActivity;
import com.luanxingyuan.app.base.BaseListResponse;
import com.luanxingyuan.app.bean.ChargeListBean;
import com.luanxingyuan.app.bean.PayOptionBean;
import com.luanxingyuan.app.util.ParamUtil;
import com.luanxingyuan.app.util.ToastUtil;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import k6.t;

public class GoldNotEnoughActivity extends BaseActivity {
    private static final int SDK_AUTH_FLAG = 2;
    private static final int SDK_PAY_FLAG = 1;
    private PayOptionBean mDefaultBean;

    @BindView
    ImageView mDefaultCheckIv;

    @BindView
    ImageView mDefaultIv;

    @BindView
    TextView mDefaultNameTv;

    @BindView
    RelativeLayout mDefaultRl;
    private t mVipMoneyRecyclerAdapter;
    private IWXAPI mWxApi;

    class a extends r6.a<BaseListResponse<PayOptionBean>> {
        a() {
        }

        public void onResponse(BaseListResponse<PayOptionBean> baseListResponse, int i8) {
            List<PayOptionBean> list;
            if (GoldNotEnoughActivity.this.isFinishing() || baseListResponse == null || baseListResponse.m_istatus != 1 || (list = baseListResponse.m_object) == null || list.size() <= 0) {
                return;
            }
            Iterator<PayOptionBean> it = list.iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                PayOptionBean next = it.next();
                if (next.isdefault == 1) {
                    GoldNotEnoughActivity.this.mDefaultBean = next;
                    list.remove(next);
                    break;
                }
            }
            if (GoldNotEnoughActivity.this.mDefaultBean == null) {
                GoldNotEnoughActivity.this.mDefaultBean = list.get(0);
            }
            if (GoldNotEnoughActivity.this.mDefaultBean != null) {
                GoldNotEnoughActivity goldNotEnoughActivity = GoldNotEnoughActivity.this;
                o6.i.i(goldNotEnoughActivity, goldNotEnoughActivity.mDefaultBean.payIcon, GoldNotEnoughActivity.this.mDefaultIv);
                GoldNotEnoughActivity goldNotEnoughActivity2 = GoldNotEnoughActivity.this;
                goldNotEnoughActivity2.mDefaultNameTv.setText(goldNotEnoughActivity2.mDefaultBean.payName);
                GoldNotEnoughActivity.this.mDefaultRl.setVisibility(0);
                GoldNotEnoughActivity.this.mDefaultCheckIv.setSelected(true);
                GoldNotEnoughActivity goldNotEnoughActivity3 = GoldNotEnoughActivity.this;
                goldNotEnoughActivity3.getChargeList(goldNotEnoughActivity3.mDefaultBean.payType);
            }
        }
    }

    class b extends r6.a<BaseListResponse<ChargeListBean>> {
        b() {
        }

        public void onResponse(BaseListResponse<ChargeListBean> baseListResponse, int i8) {
            List<ChargeListBean> list;
            if (GoldNotEnoughActivity.this.isFinishing() || baseListResponse == null || baseListResponse.m_istatus != 1 || (list = baseListResponse.m_object) == null || list.size() <= 0) {
                return;
            }
            GoldNotEnoughActivity.this.dealBean(list);
        }
    }

    public void dealBean(List<ChargeListBean> list) {
        ArrayList arrayList = new ArrayList();
        if (list.size() > 2) {
            ChargeListBean chargeListBean = list.get(0);
            chargeListBean.isSelected = true;
            arrayList.add(chargeListBean);
            arrayList.add(list.get(1));
        }
        this.mVipMoneyRecyclerAdapter.c(arrayList);
    }

    public void getChargeList(int i8) {
        HashMap hashMap = new HashMap();
        hashMap.put("userId", getUserId());
        hashMap.put("t_end_type", String.valueOf(i8));
        x7.a.h().c(m6.a.k0()).e("param", ParamUtil.getParam(hashMap)).f().c(new b());
    }

    private void getChargeOption() {
        HashMap hashMap = new HashMap();
        hashMap.put("userId", getUserId());
        x7.a.h().c(m6.a.b0()).e("param", ParamUtil.getParam(hashMap)).f().c(new a());
    }

    private void initStart() {
        RecyclerView recyclerView = (RecyclerView) findViewById(2131296562);
        recyclerView.setLayoutManager(new GridLayoutManager(this.mContext, 2));
        t tVar = new t(this.mContext);
        this.mVipMoneyRecyclerAdapter = tVar;
        recyclerView.setAdapter(tVar);
    }

    @Override
    protected View getContentView() {
        return inflate(2131492921);
    }

    @OnClick
    public void onClick(View view) {
        switch (view.getId()) {
            case 2131296470:
                if (this.mDefaultBean != null) {
                    ChargeListBean b8 = this.mVipMoneyRecyclerAdapter.b();
                    if (b8 != null) {
                        BaseActivity baseActivity = this.mContext;
                        int i8 = b8.t_id;
                        PayOptionBean payOptionBean = this.mDefaultBean;
                        PayChooserActivity.t(baseActivity, i8, payOptionBean.payType, payOptionBean.payName, b8.t_money, payOptionBean.t_id, false);
                        break;
                    } else {
                        ToastUtil.showToast(this.mContext, 2131821160);
                        break;
                    }
                } else {
                    ToastUtil.showToast(this.mContext, 2131821162);
                    break;
                }
            case 2131296708:
                Intent intent = new Intent(getApplicationContext(), (Class<?>) InviteEarnActivity.class);
                if (!(this.mContext instanceof Activity)) {
                    intent.addFlags(faceunity.FUAITYPE_HUMAN_PROCESSOR_DETECT);
                }
                startActivity(intent);
                break;
            case 2131296955:
                Intent intent2 = new Intent(getApplicationContext(), (Class<?>) ChargeActivity.class);
                if (!(this.mContext instanceof Activity)) {
                    intent2.addFlags(faceunity.FUAITYPE_HUMAN_PROCESSOR_DETECT);
                }
                startActivity(intent2);
                break;
            case 2131297349:
                finish();
                break;
            case 2131297398:
                Intent intent3 = new Intent(getApplicationContext(), (Class<?>) VipCenterActivity.class);
                if (!(this.mContext instanceof Activity)) {
                    intent3.addFlags(faceunity.FUAITYPE_HUMAN_PROCESSOR_DETECT);
                }
                startActivity(intent3);
                break;
        }
    }

    @Override
    protected void onContentAdded() {
        IWXAPI createWXAPI = WXAPIFactory.createWXAPI(this.mContext, "wx592dcebca0f03440", true);
        this.mWxApi = createWXAPI;
        createWXAPI.registerApp("wx592dcebca0f03440");
        needHeader(false);
        initStart();
        getChargeOption();
    }

    @Override
    protected boolean supportFullScreen() {
        return true;
    }
}