OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046

以下内容为反编译后的 GameMallAdapter.java 源代码,内容仅作参考


package com.excelliance.kxqp.gs.ui.game_mall;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.excean.bytedancebi.bean.BiEventContent;
import com.excean.bytedancebi.bean.BiEventLoginAccount;
import com.excean.bytedancebi.bean.BiEventPurchaseGoods;
import com.excean.bytedancebi.bean.PageDes;
import com.excean.bytedancebi.viewtracker.ExRelativeLayout;
import com.excean.bytedancebi.viewtracker.ViewTrackerRxBus;
import com.excean.bytedancebi.viewtracker.ViewTrackerUtil;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.bean.CouponBean;
import com.excelliance.kxqp.bean.WXconfig;
import com.excelliance.kxqp.gs.adapter.h;
import com.excelliance.kxqp.gs.appstore.common.ViewHolder;
import com.excelliance.kxqp.gs.base.BaseMultiRecyclerAdapter;
import com.excelliance.kxqp.gs.base.GSBaseActivity;
import com.excelliance.kxqp.gs.bean.AccountOrderInfo;
import com.excelliance.kxqp.gs.bean.GoodsBean;
import com.excelliance.kxqp.gs.bean.PayChannelItem;
import com.excelliance.kxqp.gs.bean.PayChannelList;
import com.excelliance.kxqp.gs.bean.RiotAccountPriceBean;
import com.excelliance.kxqp.gs.bean.VipGoodsBean;
import com.excelliance.kxqp.gs.dialog.f;
import com.excelliance.kxqp.gs.dialog.z;
import com.excelliance.kxqp.gs.g.aa;
import com.excelliance.kxqp.gs.g.t;
import com.excelliance.kxqp.gs.j.b;
import com.excelliance.kxqp.gs.launch.LaunchViewModel;
import com.excelliance.kxqp.gs.listener.h;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.GameMallVipActivity;
import com.excelliance.kxqp.gs.ui.gaccount.GAccountActivity;
import com.excelliance.kxqp.gs.ui.gaccount.GGAccBean;
import com.excelliance.kxqp.gs.ui.game_mall.a.c;
import com.excelliance.kxqp.gs.ui.game_mall.a.d;
import com.excelliance.kxqp.gs.ui.game_mall.fragment.GameMallFragment;
import com.excelliance.kxqp.gs.ui.gameaccount.BuyGameAccountActivity;
import com.excelliance.kxqp.gs.ui.gameaccount.GameAccountActivity;
import com.excelliance.kxqp.gs.ui.medal.a.e;
import com.excelliance.kxqp.gs.ui.pay.VipFragment;
import com.excelliance.kxqp.gs.ui.pay.a;
import com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.be;
import com.excelliance.kxqp.gs.util.bf;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.bz;
import com.excelliance.kxqp.gs.util.cg;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.gs.util.s;
import com.excelliance.kxqp.gs.util.w;
import com.excelliance.kxqp.gs.view.StoreBannerLayout;
import com.excelliance.kxqp.gs.view.zmbanner.Banner;
import com.excelliance.kxqp.gs.view.zmbanner.c;
import com.excelliance.kxqp.gs.view.zmbanner.e;
import com.excelliance.kxqp.gs.vip.VipIncomeUploadUtil;
import com.excelliance.kxqp.gs.zhifu.c;
import com.excelliance.kxqp.task.model.ResponseData;
import com.excelliance.kxqp.task.model.YLBuyStatusResult;
import com.excelliance.kxqp.task.model.request.PayRequestData;
import com.excelliance.kxqp.util.af;
import com.excelliance.kxqp.util.ai;
import com.excelliance.kxqp.util.p;
import com.excelliance.kxqp.util.r;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.umeng.union.UMUnionConstants;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;

public class GameMallAdapter extends BaseMultiRecyclerAdapter<c> implements View.OnClickListener, h.b, h.c, c.a {
    private Banner A;
    private f B;
    private GGAccBean C;
    private RiotAccountPriceBean D;
    private String E;
    private ViewTrackerRxBus F;
    private int G;
    private LaunchViewModel H;
    private com.excelliance.kxqp.gs.ui.game_mall.a.a I;
    private c.InterfaceC0490c J;
    private b.InterfaceC0243b K;

    protected io.reactivex.b.a f9343a;
    protected boolean c;
    private com.excelliance.kxqp.gs.zhifu.c m;
    private com.excelliance.kxqp.gs.j.b n;
    private Dialog o;
    private b p;
    private volatile AccountOrderInfo q;
    private volatile AccountOrderInfo r;
    private volatile AccountOrderInfo s;
    private String t;
    private boolean u;
    private boolean v;
    private boolean w;
    private boolean x;
    private GameMallFragment y;
    private Activity z;

    @Override
    public void showProgress(String str) {
    }

    @Override
    public void updateView() {
    }

    public void a(ViewTrackerRxBus viewTrackerRxBus) {
        this.F = viewTrackerRxBus;
    }

    public void a(boolean z) {
        Log.d("GameMallAdapter", "setVisible visible:" + z);
        this.c = z;
    }

    public void a(io.reactivex.b.a aVar) {
        this.f9343a = aVar;
    }

    public void a(LaunchViewModel launchViewModel) {
        this.H = launchViewModel;
    }

    public GameMallAdapter(Context context, List<com.excelliance.kxqp.gs.ui.game_mall.a.c> list, GameMallFragment gameMallFragment) {
        super(context, list, new a());
        this.u = false;
        this.v = false;
        this.w = false;
        this.x = false;
        this.J = new c.InterfaceC0490c() {
            @Override
            public void a(long j, String str) {
                az.d("GameMallAdapter", "callbackPrepraId oderId " + j + " merOrderId:" + str + " mGoogleOderInfo:" + GameMallAdapter.this.q);
                if (GameMallAdapter.this.q != null) {
                    GameMallAdapter.this.q.oderInfo = str;
                }
                if (GameMallAdapter.this.r != null) {
                    GameMallAdapter.this.r.oderInfo = str;
                }
                if (GameMallAdapter.this.s != null) {
                    GameMallAdapter.this.s.oderInfo = str;
                }
            }

            @Override
            public void a(long j, int i) {
                az.d("GameMallAdapter", "callbackOderStatus oderId " + j + " Status:" + i + " mGoogleOderInfo:" + GameMallAdapter.this.q);
                if (GameMallAdapter.this.q != null) {
                    GameMallAdapter.this.q.status = i;
                }
                if (GameMallAdapter.this.r != null) {
                    GameMallAdapter.this.r.status = i;
                }
                if (GameMallAdapter.this.s != null) {
                    GameMallAdapter.this.s.status = i;
                }
            }

            @Override
            public void a(long j) {
                az.d("GameMallAdapter", "callbackOderId oderId " + j + " mGoogleOderInfo:" + GameMallAdapter.this.q);
                if (GameMallAdapter.this.q != null) {
                    GameMallAdapter.this.q.oderId = j;
                }
                if (GameMallAdapter.this.r != null) {
                    GameMallAdapter.this.r.oderId = j;
                }
                if (GameMallAdapter.this.s != null) {
                    GameMallAdapter.this.s.oderId = j;
                }
            }

            @Override
            public void a(int i) {
                az.d("GameMallAdapter", "unifyPayButtonCallBack status:" + i + " mGoogleOderInfo:" + GameMallAdapter.this.q);
                if (GameMallAdapter.this.q != null && i == com.excelliance.kxqp.gs.sdk.a.b.f8108a) {
                    GameMallAdapter.this.q();
                    GameMallAdapter.this.q.uploadServer = false;
                }
                if (GameMallAdapter.this.r != null && i == com.excelliance.kxqp.gs.sdk.a.b.f8108a) {
                    GameMallAdapter.this.q();
                    GameMallAdapter.this.r.uploadServer = false;
                }
                if (GameMallAdapter.this.s == null || i != com.excelliance.kxqp.gs.sdk.a.b.f8108a) {
                    return;
                }
                GameMallAdapter.this.s.uploadServer = false;
            }
        };
        this.K = new b.InterfaceC0243b() {
            @Override
            public void a(int i, int i2, int i3) {
                az.d("GameMallAdapter", "result = " + i);
                if (i == com.excelliance.kxqp.gs.sdk.a.b.f8108a) {
                    if (TextUtils.equals(GameMallAdapter.this.t, "google_payment")) {
                        if (com.excelliance.kxqp.gs.util.b.cb(GameMallAdapter.this.f)) {
                            GameMallAdapter.this.f.sendBroadcast(new Intent(GameMallAdapter.this.f.getPackageName() + "LoginGAGetVipActivity.google_account_buy_success"));
                        }
                        Intent intent = new Intent(GameMallAdapter.this.f, (Class<?>) GAccountActivity.class);
                        intent.putExtra("src", 101);
                        intent.putExtra("purchased_success", true);
                        intent.putExtra("show_dialog", true);
                        GameMallAdapter.this.f.startActivity(intent);
                        GameMallAdapter.this.f.sendBroadcast(new Intent(GameMallAdapter.this.f.getPackageName() + "GAccountFragment.google_account_buy_success"));
                    }
                    GameMallAdapter.this.a(i, i2);
                    if (i3 == 6 && GameMallAdapter.this.s != null && GameMallAdapter.this.n != null) {
                        GoodsBean b2 = GameMallAdapter.this.n.b();
                        if (b2 instanceof VipGoodsBean) {
                            VipGoodsBean vipGoodsBean = (VipGoodsBean) b2;
                            vipGoodsBean.actualPrice = GameMallAdapter.this.n.d();
                            vipGoodsBean.isRebuy = GameMallAdapter.this.G;
                            GameMallAdapter.this.a(GameMallAdapter.this.f, i2, vipGoodsBean);
                            GameMallAdapter.this.G = 1;
                        }
                    }
                    GameMallAdapter.this.d();
                    GameMallAdapter.this.p();
                    return;
                }
                if (i == com.excelliance.kxqp.gs.sdk.a.b.f8109b) {
                    GameMallAdapter.this.a(i, i2);
                    if (i3 == 6 && GameMallAdapter.this.s != null && GameMallAdapter.this.n != null) {
                        GoodsBean b3 = GameMallAdapter.this.n.b();
                        if (b3 instanceof VipGoodsBean) {
                            VipGoodsBean vipGoodsBean2 = (VipGoodsBean) b3;
                            vipGoodsBean2.actualPrice = GameMallAdapter.this.n.d();
                            GameMallAdapter.this.a(com.excelliance.kxqp.gs.sdk.a.b.f8109b, vipGoodsBean2.price, vipGoodsBean2.title, vipGoodsBean2.isRebuy, 1, "会员", i2, vipGoodsBean2.actualPrice);
                        }
                    }
                    GameMallAdapter.this.d();
                    GameMallAdapter.this.p();
                    return;
                }
                if (i == com.excelliance.kxqp.gs.sdk.a.b.c) {
                    GameMallAdapter.this.a(i, i2);
                    if (i3 == 6 && GameMallAdapter.this.s != null && GameMallAdapter.this.n != null) {
                        GoodsBean b4 = GameMallAdapter.this.n.b();
                        if (b4 instanceof VipGoodsBean) {
                            VipGoodsBean vipGoodsBean3 = (VipGoodsBean) b4;
                            vipGoodsBean3.actualPrice = GameMallAdapter.this.n.d();
                            GameMallAdapter.this.a(com.excelliance.kxqp.gs.sdk.a.b.c, vipGoodsBean3.price, vipGoodsBean3.title, vipGoodsBean3.isRebuy, 1, "会员", i2, vipGoodsBean3.actualPrice);
                        }
                    }
                    GameMallAdapter.this.d();
                    GameMallAdapter.this.p();
                }
            }
        };
        this.m = new com.excelliance.kxqp.gs.zhifu.c(this.f, this);
        this.m.a(getClass().getSimpleName());
        this.n = new com.excelliance.kxqp.gs.j.b(this.f, 3);
        this.n.a(this.K);
        this.n.a(this.J);
        this.n.b("GameMallFragment");
        this.n.a((com.excelliance.kxqp.gs.j.b) this);
        this.y = gameMallFragment;
        this.z = (Activity) context;
    }

    @Override
    protected void b(ViewHolder viewHolder, int i) {
        int itemViewType = viewHolder.getItemViewType();
        com.excelliance.kxqp.gs.ui.game_mall.a.c c = c(i);
        if (itemViewType == R.layout.game_mall_banner) {
            List<d> list = c.c;
            RelativeLayout relativeLayout = (RelativeLayout) viewHolder.a(R.id.banner_layout);
            ((StoreBannerLayout) viewHolder.a(R.id.store_banner_layout)).f12088a = 0.29761904f;
            if (list == null || list.size() <= 0) {
                relativeLayout.setVisibility(8);
                return;
            }
            int a2 = p.a(this.f, 12.0f);
            relativeLayout.setPadding(a2, a2, a2, 0);
            relativeLayout.setVisibility(0);
            this.A = (Banner) viewHolder.a(R.id.banner);
            this.A.a(this.f);
            if (s.a(this.A.getRealItemList())) {
                this.A.getIndicatorLayout().setPadding(0, 0, 0, p.a(this.f, 41.0f));
                this.A.a(new e() {
                    @Override
                    public void a(int i2) {
                        List<c.a> itemList = GameMallAdapter.this.A.getItemList();
                        if (s.a(itemList)) {
                            return;
                        }
                        c.a aVar = itemList.get(i2);
                        az.d("GameMallAdapter", "start banner item:" + aVar);
                        CommonWebViewActivity.startActivity(GameMallAdapter.this.f, aVar.c);
                        com.excelliance.kxqp.gs.g.c.a().a(aVar);
                    }
                });
                ArrayList arrayList = new ArrayList();
                for (d dVar : list) {
                    c.a aVar = new c.a();
                    aVar.f12387b = dVar.f9383a;
                    aVar.c = dVar.f9384b;
                    aVar.r = this.f3763b.firstPage;
                    aVar.k = 3;
                    arrayList.add(aVar);
                }
                PageDes copy = this.f3763b.copy();
                copy.secondArea = UMUnionConstants.NOTIFICATION_CHANNEL_ID;
                this.A.a(arrayList).f(3).g(6).a(R.drawable.indicator_white_radius).b(R.drawable.indicator_black_radius).c(p.a(this.f, 5.0f)).d(p.a(this.f, 5.0f)).e(p.a(this.f, 5.0f)).a(0.3f).a(true).a(copy).a(this.f9343a).b(this.c).a(this.F).a(new com.excelliance.kxqp.gs.h.a(8)).a();
                return;
            }
            this.A.b();
            return;
        }
        if (itemViewType == R.layout.game_mall_recharge_layout) {
            List<com.excelliance.kxqp.gs.ui.game_mall.a.e> list2 = c.d;
            if (list2 == null || list2.size() <= 0) {
                return;
            }
            RecyclerView recyclerView = (RecyclerView) viewHolder.a(R.id.recycler_view);
            recyclerView.setLayoutManager(new GridLayoutManager(this.f, 4));
            RechargeAdapter rechargeAdapter = new RechargeAdapter(this.f, list2);
            rechargeAdapter.b(false);
            PageDes copy2 = this.f3763b.copy();
            copy2.secondArea = copy2.firstPage;
            rechargeAdapter.a(copy2);
            rechargeAdapter.a(this.f9343a);
            rechargeAdapter.a(this.F);
            rechargeAdapter.a(this.c);
            recyclerView.setAdapter(rechargeAdapter);
            recyclerView.setFocusableInTouchMode(false);
            TextView textView = (TextView) viewHolder.a(R.id.recharge_entrance_title);
            if (textView != null) {
                if (by.a(this.f, "sp_customization").b("game", true).booleanValue()) {
                    textView.setText(R.string.recommend_for_you_game_props_and_charge);
                    return;
                } else {
                    textView.setText(R.string.game_props_and_charge);
                    return;
                }
            }
            return;
        }
        if (itemViewType == R.layout.game_mall_vip_layout) {
            View a3 = viewHolder.a(R.id.vip_parent_layout);
            if (com.excelliance.kxqp.gs.util.b.cF(this.f)) {
                a3.setVisibility(8);
                View a4 = viewHolder.a(R.id.to_vip_purchased_detailed_page);
                a4.setVisibility(0);
                a4.setTag(0);
                a4.setOnClickListener(this);
                ((TextView) viewHolder.a(R.id.ourplay_tv)).setText(String.format("(%s)", this.f.getString(R.string.space)));
                return;
            }
            a3.setVisibility(0);
            List<com.excelliance.kxqp.gs.ui.game_mall.a.f> list3 = c.f9381a;
            if (list3 == null || list3.size() <= 0) {
                return;
            }
            LinearLayout linearLayout = (LinearLayout) viewHolder.a(R.id.purchase_vip_layout);
            linearLayout.removeAllViews();
            for (final com.excelliance.kxqp.gs.ui.game_mall.a.f fVar : list3) {
                View inflate = LayoutInflater.from(this.f).inflate(R.layout.game_mall_purchase_item, (ViewGroup) linearLayout, false);
                ((TextView) inflate.findViewById(R.id.item_tv)).setText(fVar.e);
                TextView textView2 = (TextView) inflate.findViewById(R.id.item_price);
                textView2.setText(String.format("¥%s", fVar.f));
                if (com.excelliance.kxqp.gs.util.b.cE(this.f) || com.excean.ab_builder.c.a.c(this.f)) {
                    textView2.setTextColor(this.f.getResources().getColor(R.color.notice_content));
                    textView2.setTextSize(10.0f);
                    TextView textView3 = (TextView) inflate.findViewById(R.id.price_every_month);
                    if (!TextUtils.isEmpty(fVar.i) && !TextUtils.isEmpty(fVar.j)) {
                        textView3.setVisibility(0);
                        textView3.setText(String.format("¥ %s/%s", fVar.i, fVar.j));
                    } else {
                        textView3.setVisibility(8);
                    }
                }
                ((TextView) inflate.findViewById(R.id.purchase_btn)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, null, "主页", GameMallAdapter.this.b(fVar.g, fVar.h), "开通VIP", "会员", fVar.e, fVar.f, "1", fVar.f);
                        if (TextUtils.equals(fVar.c, "1")) {
                            GameMallAdapter.this.e();
                            return;
                        }
                        VipGoodsBean vipGoodsBean = new VipGoodsBean();
                        vipGoodsBean.id = fVar.d;
                        vipGoodsBean.price = fVar.f;
                        vipGoodsBean.title = fVar.e;
                        try {
                            vipGoodsBean.length = Integer.parseInt(fVar.g);
                        } catch (Exception e) {
                            e.printStackTrace();
                            vipGoodsBean.length = 0;
                        }
                        vipGoodsBean.unit = fVar.h;
                        if (GameMallAdapter.this.G != 1) {
                            GameMallAdapter.this.G = fVar.k;
                        }
                        GameMallAdapter.this.a(vipGoodsBean);
                    }
                });
                inflate.setPadding(p.a(this.f, 16.0f), p.a(this.f, 16.0f), 0, 0);
                linearLayout.addView(inflate);
            }
            ((TextView) viewHolder.a(R.id.vip_text_supplement)).setText(String.format("(%s)", this.f.getString(R.string.space)));
            TextView textView4 = (TextView) viewHolder.a(R.id.to_purchase_vip_page);
            textView4.setTag(0);
            textView4.setOnClickListener(this);
            TextView textView5 = (TextView) viewHolder.a(R.id.check_vip_detail);
            View a5 = viewHolder.a(R.id.to_purchase_vip_page_area);
            a5.setTag(4);
            a5.setOnClickListener(this);
            if (com.excelliance.kxqp.gs.util.b.cE(this.f) || com.excean.ab_builder.c.a.c(this.f)) {
                textView5.setTextColor(this.f.getResources().getColor(R.color.notice_content));
                textView5.setText(R.string.more_equities);
                return;
            }
            return;
        }
        if (itemViewType == R.layout.game_mall_account_layout) {
            List<com.excelliance.kxqp.gs.ui.game_mall.a.b> list4 = c.f9382b;
            if (list4 == null || list4.size() <= 0) {
                return;
            }
            LinearLayout linearLayout2 = (LinearLayout) viewHolder.a(R.id.purchase_account_layout);
            linearLayout2.removeAllViews();
            for (final com.excelliance.kxqp.gs.ui.game_mall.a.b bVar : list4) {
                View inflate2 = LayoutInflater.from(this.f).inflate(R.layout.game_mall_purchase_item, (ViewGroup) linearLayout2, false);
                ((TextView) inflate2.findViewById(R.id.item_tv)).setText(bVar.f9380b);
                ((TextView) inflate2.findViewById(R.id.item_price)).setText(String.format("¥%s", bVar.c));
                ((TextView) inflate2.findViewById(R.id.purchase_btn)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        if ("1".equals(bVar.f9379a)) {
                            com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, null, "主页", "游戏商城谷歌账号购买按钮", "去Google帐号购买页面", "谷歌帐号", bVar.f9380b, bVar.c, "1", bVar.c);
                            BuyGameAccountActivity.a(GameMallAdapter.this.f);
                        } else if ("2".equals(bVar.f9379a)) {
                            com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, null, "主页", "游戏商城拳头账号购买按钮", "购买拳头帐号", "拳头帐号", bVar.f9380b, bVar.c, "1", bVar.c);
                            GameMallAdapter.this.a(bVar);
                        }
                    }
                });
                inflate2.setPadding(p.a(this.f, 16.0f), p.a(this.f, 16.0f), 0, 0);
                linearLayout2.addView(inflate2);
            }
            ((TextView) viewHolder.a(R.id.game_account_text_supplement)).setText(String.format("(%s)", this.f.getString(R.string.google_and_riot)));
            TextView textView6 = (TextView) viewHolder.a(R.id.to_purchase_game_account_page);
            textView6.setTag(1);
            textView6.setOnClickListener(this);
            TextView textView7 = (TextView) viewHolder.a(R.id.check_game_account_detail);
            View a6 = viewHolder.a(R.id.to_purchase_game_account_page_area);
            a6.setTag(1);
            a6.setOnClickListener(this);
            if (com.excelliance.kxqp.gs.util.b.cE(this.f) || com.excean.ab_builder.c.a.c(this.f)) {
                textView7.setTextColor(this.f.getResources().getColor(R.color.notice_content));
                textView7.setText(R.string.more_equities);
                return;
            }
            return;
        }
        if (itemViewType == R.layout.gain_free_vip_layout) {
            this.I = c.e;
            if (this.I != null) {
                BiEventContent biEventContent = new BiEventContent();
                biEventContent.current_page = this.f3763b.firstPage;
                biEventContent.content_type = "小程序";
                biEventContent.expose_banner_area = "商城页账号VIP售卖区";
                biEventContent.expose_banner_order = "2";
                biEventContent.mini_program_page = "小程序加企微二维码页面";
                ViewTrackerUtil.getInstance().bindData((ExRelativeLayout) viewHolder.a(), biEventContent, true, this.c, this.F, this.f9343a, 0, true, 0);
                ((TextView) viewHolder.a(R.id.gain_free_vip_title)).setText(this.I.f9377a);
                ((TextView) viewHolder.a(R.id.show_gain_vip_dialog)).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {
                        if (TextUtils.isEmpty(GameMallAdapter.this.I.f9378b)) {
                            return;
                        }
                        af.a aVar2 = new af.a();
                        aVar2.f14919a = GameMallAdapter.this.f3763b.firstPage;
                        aVar2.f14920b = "主页";
                        aVar2.c = "保存图片";
                        aVar2.e = "展示二维码";
                        WXconfig a7 = af.a(by.a(GameMallAdapter.this.f, "sp_config").b("sp_key_get_vip_access_dialog_config_info1", (String) null));
                        if (a7 == null) {
                            Toast.makeText(GameMallAdapter.this.f, R.string.get_mini_program_and_qr_code_info_failed, 0).show();
                        } else {
                            aVar2.f14919a = GameMallAdapter.this.f3763b.firstPage;
                            aVar2.c = "保存图片";
                            aVar2.d = "游戏商城私域弹窗";
                            af.a(GameMallAdapter.this.f, a7, aVar2, false, "游戏商城");
                        }
                        BiEventContent biEventContent2 = new BiEventContent();
                        biEventContent2.current_page = GameMallAdapter.this.f3763b.firstPage;
                        biEventContent2.content_type = "小程序";
                        biEventContent2.expose_banner_area = "商城页账号VIP售卖区";
                        biEventContent2.expose_banner_order = "2";
                        biEventContent2.mini_program_page = "小程序加企微二维码页面";
                        com.excelliance.kxqp.gs.g.c.a().a(biEventContent2);
                    }
                });
                return;
            }
            return;
        }
        if (itemViewType == e.a.f10430a) {
            viewHolder.itemView.setOnClickListener(e.a.a(this.f3763b.firstPage, "主页", "游戏商城游戏币商城"));
        }
    }

    public void a() {
        if (this.p == null || this.n == null) {
            return;
        }
        if (this.q != null && this.q.toPay()) {
            this.p.a(this.q.oderInfo, this.n.e());
        }
        if (this.r != null && this.r.toPay()) {
            this.p.a(this.r.oderInfo, this.n.e());
        }
        if (this.s == null || !this.s.toPay()) {
            return;
        }
        this.p.a(this.s.oderInfo, this.n.e());
    }

    public void a(b bVar) {
        this.p = bVar;
    }

    public void b(final com.excelliance.kxqp.gs.ui.game_mall.a.b bVar) {
        com.excelliance.kxqp.gs.ui.pay.a aVar = new com.excelliance.kxqp.gs.ui.pay.a(this.z);
        com.excelliance.kxqp.gs.ui.pay.a.a(1, this.x || this.u);
        com.excelliance.kxqp.gs.ui.pay.a.a(2, this.v || this.w);
        aVar.a(new a.InterfaceC0434a() {
            @Override
            public void a(View view, h.b bVar2) {
                String str;
                String str2;
                String str3;
                String str4;
                int a2 = GameMallAdapter.this.a(bVar2.f4026b);
                if (a2 == 2 || a2 == 3) {
                    str = "微信支付按钮";
                    str2 = "微信支付";
                } else {
                    if (a2 != 1 && a2 != 4) {
                        str3 = null;
                        str4 = null;
                        com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", str3, str4);
                        if (bVar2.f4026b == 2 || as.i(GameMallAdapter.this.f, "com.tencent.mm")) {
                            if (a2 != 4 && !as.i(GameMallAdapter.this.f, "com.eg.android.AlipayGphone")) {
                                cg.a(GameMallAdapter.this.f, w.e(GameMallAdapter.this.f, "share_sdk_not_install_ali"));
                                return;
                            } else if (!"1".equals(bVar.f9379a)) {
                                GameMallAdapter.this.E = "1";
                                GameMallAdapter.this.p.a(bVar2.f4026b);
                                return;
                            } else {
                                if ("2".equals(bVar.f9379a)) {
                                    GameMallAdapter.this.E = "2";
                                    GameMallAdapter.this.p.b(bVar2.f4026b);
                                    return;
                                }
                                return;
                            }
                        }
                        cg.a(GameMallAdapter.this.f, w.e(GameMallAdapter.this.f, "share_sdk_not_install_wechat"));
                        return;
                    }
                    str = "支付宝支付按钮";
                    str2 = "支付宝支付";
                }
                str3 = str;
                str4 = str2;
                com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", str3, str4);
                if (bVar2.f4026b == 2) {
                }
                if (a2 != 4) {
                }
                if (!"1".equals(bVar.f9379a)) {
                }
            }
        });
        List<CouponBean> a2 = com.excelliance.kxqp.gs.ui.MyVoucher.a.a(this.f, "riotAccount");
        if (a2 != null && a2.size() > 0) {
            aVar.a(a2.size());
        }
        aVar.b();
        aVar.a(this.z.findViewById(android.R.id.content));
    }

    public void a(com.excelliance.kxqp.gs.ui.game_mall.a.b bVar) {
        if (bx.a().b(getContext())) {
            if (!bx.a().d(this.f)) {
                ai.a().a(this.z, new AnonymousClass13(bVar), "谷歌账号购买页面");
                return;
            } else if (!bx.a().e(this.f)) {
                com.excelliance.kxqp.gs.util.af.a((FragmentActivity) this.z, "谷歌账号购买页面");
                return;
            } else {
                b(bVar);
                return;
            }
        }
        if (!bx.a().g(this.f)) {
            ai.a().a(this.z, new AnonymousClass14(bVar), "谷歌账号购买页面");
        } else if (!bx.a().h(this.f)) {
            com.excelliance.kxqp.gs.util.af.a((FragmentActivity) this.z, "谷歌账号购买页面");
        } else {
            b(bVar);
        }
    }

    public class AnonymousClass13 implements ai.b {

        final com.excelliance.kxqp.gs.ui.game_mall.a.b f9350a;

        @Override
        public void run() {
        }

        AnonymousClass13(com.excelliance.kxqp.gs.ui.game_mall.a.b bVar) {
            this.f9350a = bVar;
        }

        @Override
        public void a(String str, String str2) {
            Log.d("BeHappy", "user showPaymentMethodWindowCheckRealName execute  userName  " + str + "  idNumber  " + str2);
            if (GameMallAdapter.this.H != null) {
                GameMallAdapter.this.H.a(str, str2, new Runnable() {
                    @Override
                    public void run() {
                        Log.d("BeHappy", "user showPaymentMethodWindowCheckRealNameyoungOrNotRealNameVerify launchViewModel run  userName  ");
                        ai.a().c();
                        GSBaseActivity.hideKeyboard(GameMallAdapter.this.z);
                        cg.a(GameMallAdapter.this.getContext(), GameMallAdapter.this.getContext().getString(R.string.real_name_verify_success));
                        tp.i(new Runnable() {
                            @Override
                            public void run() {
                                GameMallAdapter.this.b(AnonymousClass13.this.f9350a);
                            }
                        });
                    }
                });
            }
        }
    }

    public class AnonymousClass14 implements ai.b {

        final com.excelliance.kxqp.gs.ui.game_mall.a.b f9354a;

        @Override
        public void run() {
        }

        AnonymousClass14(com.excelliance.kxqp.gs.ui.game_mall.a.b bVar) {
            this.f9354a = bVar;
        }

        @Override
        public void a(String str, String str2) {
            Log.d("BeHappy", "devices youngOrNotRealNameVerify showRealNameAuthenticationDialogV3 execute  userName  " + str + "  idNumber  " + str2);
            if (GameMallAdapter.this.H != null) {
                GameMallAdapter.this.H.a(str, str2, new Runnable() {
                    @Override
                    public void run() {
                        Log.d("BeHappy", "devices youngOrNotRealNameVerify launchViewModel run  userName  ");
                        ai.a().c();
                        GSBaseActivity.hideKeyboard(GameMallAdapter.this.z);
                        cg.a(GameMallAdapter.this.getContext(), GameMallAdapter.this.getContext().getString(R.string.real_name_verify_success));
                        tp.i(new Runnable() {
                            @Override
                            public void run() {
                                GameMallAdapter.this.b(AnonymousClass14.this.f9354a);
                            }
                        });
                    }
                });
            }
        }
    }

    public void e() {
        if (this.B == null || !this.B.isShowing()) {
            this.B = z.a(this.f);
            this.B.show();
        }
    }

    public class AnonymousClass15 implements Runnable {

        final VipGoodsBean f9358a;

        AnonymousClass15(VipGoodsBean vipGoodsBean) {
            this.f9358a = vipGoodsBean;
        }

        @Override
        public void run() {
            final ResponseData n = GameMallAdapter.this.n();
            tp.i(new Runnable() {
                @Override
                public void run() {
                    int i;
                    com.excelliance.kxqp.gs.ui.pay.a.a(1, true);
                    com.excelliance.kxqp.gs.ui.pay.a.a(2, true);
                    if (n != null && n.code == 1) {
                        com.excelliance.kxqp.gs.ui.pay.a.a(1, false);
                        com.excelliance.kxqp.gs.ui.pay.a.a(2, false);
                        List<PayChannelItem> list = n.data != 0 ? ((PayChannelList) n.data).payList : null;
                        if (list != null) {
                            for (int i2 = 0; i2 < list.size(); i2++) {
                                try {
                                    i = Integer.parseInt(list.get(i2).id);
                                } catch (Exception unused) {
                                    i = 0;
                                }
                                com.excelliance.kxqp.gs.ui.pay.a.a(i, true);
                            }
                        }
                    }
                    com.excelliance.kxqp.gs.ui.pay.a aVar = new com.excelliance.kxqp.gs.ui.pay.a(GameMallAdapter.this.z);
                    aVar.a(new a.InterfaceC0434a() {
                        @Override
                        public void a(View view, h.b bVar) {
                            switch (bVar.c) {
                                case 1:
                                    com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", "支付宝支付按钮", "支付宝支付");
                                    AnonymousClass15.this.f9358a.setPayMethod(1);
                                    AnonymousClass15.this.f9358a.setGoodsType(1);
                                    GameMallAdapter.this.m.a(AnonymousClass15.this.f9358a, GameMallAdapter.this.getClass().getSimpleName(), "");
                                    return;
                                case 2:
                                    com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", "微信支付按钮", "微信支付");
                                    if (!as.i(GameMallAdapter.this.f, "com.tencent.mm")) {
                                        cg.a(GameMallAdapter.this.f, w.e(GameMallAdapter.this.f, "share_sdk_not_install_wechat"));
                                        return;
                                    } else {
                                        AnonymousClass15.this.f9358a.setPayMethod(2);
                                        AnonymousClass15.this.f9358a.setGoodsType(1);
                                        GameMallAdapter.this.m.a(AnonymousClass15.this.f9358a, GameMallAdapter.this.getClass().getSimpleName(), "");
                                        return;
                                    }
                                case 3:
                                    com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", "微信支付按钮", "微信支付");
                                    if (!as.i(GameMallAdapter.this.f, "com.tencent.mm")) {
                                        cg.a(GameMallAdapter.this.f, w.e(GameMallAdapter.this.f, "share_sdk_not_install_wechat"));
                                        return;
                                    }
                                    AnonymousClass15.this.f9358a.setPayMethod(3);
                                    AnonymousClass15.this.f9358a.setGoodsType(1);
                                    GameMallAdapter.this.n.a(6);
                                    GameMallAdapter.this.s = new AccountOrderInfo();
                                    GameMallAdapter.this.n.a((GoodsBean) AnonymousClass15.this.f9358a);
                                    return;
                                case 4:
                                    com.excelliance.kxqp.gs.g.c.a().a(GameMallAdapter.this.f3763b.firstPage, (String) null, "弹框页", "支付宝支付按钮", "支付宝支付");
                                    AnonymousClass15.this.f9358a.setPayMethod(4);
                                    AnonymousClass15.this.f9358a.setGoodsType(1);
                                    GameMallAdapter.this.n.a(6);
                                    GameMallAdapter.this.s = new AccountOrderInfo();
                                    GameMallAdapter.this.n.a((GoodsBean) AnonymousClass15.this.f9358a);
                                    return;
                                default:
                                    return;
                            }
                        }
                    });
                    List<CouponBean> a2 = com.excelliance.kxqp.gs.ui.MyVoucher.a.a(GameMallAdapter.this.f, "vip");
                    if (a2 != null && a2.size() > 0) {
                        aVar.a(a2.size());
                    }
                    aVar.a(GameMallAdapter.this.z.findViewById(android.R.id.content));
                }
            });
        }
    }

    public void a(VipGoodsBean vipGoodsBean) {
        r.a((FragmentActivity) this.z, new AnonymousClass15(vipGoodsBean), false, this.f3763b.firstPage);
    }

    public ResponseData<PayChannelList> n() {
        PayRequestData payRequestData;
        String str;
        String str2;
        ResponseData<PayChannelList> responseData;
        com.excelliance.kxqp.task.store.c.b(this.f);
        ResponseData<PayChannelList> responseData2 = new ResponseData<>();
        responseData2.code = -1;
        responseData2.msg = o();
        JSONObject i = cn.i(this.f);
        try {
            i.put("type", String.valueOf(1));
            payRequestData = (PayRequestData) new Gson().a(i.toString(), new TypeToken<PayRequestData>() {
            }.getType());
        } catch (Exception e) {
            e.printStackTrace();
            Log.e("GameMallAdapter", e.toString());
            payRequestData = null;
        }
        be d = bd.d("https://api.ourplay.com.cn/pay/config/list", new Gson().a(payRequestData));
        if (d != null) {
            str = d.c;
            responseData2.msg = as.a(this.f, d);
        } else {
            str = null;
        }
        az.d("GameMallAdapter", "checkPayMethodList rawResponse:" + str);
        if (str == null) {
            return responseData2;
        }
        try {
            str2 = com.excelliance.kxqp.task.store.c.b(str);
        } catch (Exception e2) {
            e2.printStackTrace();
            str2 = null;
        }
        az.d("GameMallAdapter", "checkPayMethodList response:" + str2);
        if (str2 == null) {
            return responseData2;
        }
        try {
            responseData = (ResponseData) new Gson().a(str2, new TypeToken<ResponseData<PayChannelList>>() {
            }.getType());
        } catch (Exception e3) {
            e3.printStackTrace();
            responseData = null;
        }
        return responseData != null ? responseData : responseData2;
    }

    private String o() {
        int i = R.string.server_wrong;
        if (!bf.e(this.f)) {
            i = R.string.net_unusable;
        }
        return this.f.getResources().getString(i);
    }

    @Override
    public Handler getHandler() {
        return new Handler(Looper.getMainLooper());
    }

    @Override
    public void a(String str, String str2) {
        if (this.z == null || this.z.isFinishing() || this.t.equals("google_payment")) {
            return;
        }
        if (this.o == null) {
            this.o = new Dialog(this.f, R.style.theme_dialog_no_title2);
            this.o.setContentView(R.layout.buy_riot_account_feedback_dialog);
            Window window = this.o.getWindow();
            if (window != null) {
                WindowManager.LayoutParams attributes = window.getAttributes();
                attributes.width = this.f.getResources().getDisplayMetrics().widthPixels - p.a(this.f, 60.0f);
                attributes.height = -2;
                attributes.gravity = 17;
            }
            this.o.show();
        } else {
            this.o.show();
        }
        TextView textView = (TextView) this.o.findViewById(R.id.title);
        TextView textView2 = (TextView) this.o.findViewById(R.id.content);
        TextView textView3 = (TextView) this.o.findViewById(R.id.button);
        if ("vip_success".equals(str)) {
            textView.setText(R.string.purchase_successful);
            textView2.setText(R.string.riot_purchase_dialog_content);
            textView3.setText(R.string.click_to_check);
            textView3.setTag(2);
            textView3.setOnClickListener(this);
            return;
        }
        textView.setText(R.string.purchase_failed);
        if (!TextUtils.isEmpty(str2)) {
            textView2.setText(String.format("“错误原因”:%s", str2));
        }
        textView3.setText(R.string.re_purchase);
        textView3.setTag(3);
        textView3.setOnClickListener(this);
    }

    public void a(GGAccBean gGAccBean, int i) {
        int i2;
        if (gGAccBean.getTotalNum() <= gGAccBean.getThreshold()) {
            new f.b(this.f).c("dialog_simple_dialog").a(false).b(false).b(new f.a() {
                @Override
                public void a(View view, Dialog dialog) {
                    dialog.dismiss();
                }
            }).d(w.e(this.f, "tip_title")).e(w.e(this.f, "google_account_is_sold_out")).b(w.e(this.f, "confirm")).b();
            return;
        }
        double money = gGAccBean.getMoney();
        if (gGAccBean.getPermax() <= 0 || money <= 0.0d) {
            return;
        }
        int goodsId = gGAccBean.getGoodsId();
        int type = gGAccBean.getType();
        if (com.excelliance.kxqp.gs.util.b.e(this.f)) {
            i2 = 1;
        } else if (com.excelliance.kxqp.gs.util.b.g(this.f)) {
            i2 = 2;
        } else if (com.excelliance.kxqp.gs.util.b.h(this.f)) {
            i2 = 3;
        } else {
            i2 = com.excelliance.kxqp.gs.util.b.j(this.f) ? 4 : 0;
        }
        int a2 = a(i);
        if ((a2 == 3 || a2 == 4) && this.q == null) {
            this.q = new AccountOrderInfo();
        }
        this.t = "google_payment";
        this.C = gGAccBean;
        this.n.a(3);
        this.n.a(a2, 1, money, i2, goodsId, type);
    }

    public void a(RiotAccountPriceBean riotAccountPriceBean, int i) {
        int i2;
        if (a(riotAccountPriceBean.getInventory()) == 0) {
            new f.b(this.f).c("dialog_simple_dialog").a(false).b(false).b(new f.a() {
                @Override
                public void a(View view, Dialog dialog) {
                    dialog.dismiss();
                }
            }).d(w.e(this.f, "tip_title")).e(w.e(this.f, "google_account_is_sold_out")).b(w.e(this.f, "confirm")).b();
            return;
        }
        if (TextUtils.isEmpty(riotAccountPriceBean.getPrice())) {
            return;
        }
        double b2 = b(riotAccountPriceBean.getPrice());
        int goodsid = riotAccountPriceBean.getGoodsid();
        int type = riotAccountPriceBean.getType();
        if (com.excelliance.kxqp.gs.util.b.e(this.f)) {
            i2 = 1;
        } else if (com.excelliance.kxqp.gs.util.b.g(this.f)) {
            i2 = 2;
        } else if (com.excelliance.kxqp.gs.util.b.h(this.f)) {
            i2 = 3;
        } else {
            i2 = com.excelliance.kxqp.gs.util.b.j(this.f) ? 4 : 0;
        }
        int a2 = a(i);
        if ((a2 == 3 || a2 == 4) && this.r == null) {
            this.r = new AccountOrderInfo();
        }
        this.t = "riot_payment";
        this.D = riotAccountPriceBean;
        this.n.a(7);
        this.n.a(a2, 1, b2, i2, goodsid, type);
    }

    public int a(int i) {
        if (i == 2) {
            if (this.v) {
                return 2;
            }
            if (this.w) {
                return 3;
            }
            return i;
        }
        if (this.u) {
            return 1;
        }
        if (this.x) {
            return 4;
        }
        return i;
    }

    public void c(List<PayChannelItem> list) {
        for (PayChannelItem payChannelItem : list) {
            if (TextUtils.equals(payChannelItem.id, "2")) {
                this.v = true;
            } else if (TextUtils.equals(payChannelItem.id, "1")) {
                this.u = true;
            } else if (TextUtils.equals(payChannelItem.id, "3")) {
                this.w = true;
            } else if (TextUtils.equals(payChannelItem.id, "4")) {
                this.x = true;
            }
        }
    }

    public void a(YLBuyStatusResult yLBuyStatusResult) {
        if (yLBuyStatusResult != null) {
            az.d("GameMallAdapter", "queryOderStatusResponse mGoogleOderInfo:" + this.q);
            if (yLBuyStatusResult.status == 1) {
                q();
                if (this.q != null && !TextUtils.isEmpty(this.q.oderInfo) && this.q.uploadServer) {
                    bz.a().l(this.f);
                }
                if (this.r != null) {
                    a("vip_success", (String) null);
                }
                if (this.s != null && !TextUtils.isEmpty(this.s.oderInfo) && this.s.uploadServer && this.n != null && this.n.a() == 6) {
                    GoodsBean b2 = this.n.b();
                    if (b2 instanceof VipGoodsBean) {
                        VipGoodsBean vipGoodsBean = (VipGoodsBean) b2;
                        vipGoodsBean.actualPrice = this.n.d();
                        vipGoodsBean.isRebuy = this.G;
                        if (this.n != null) {
                            a(this.f, this.n.e(), vipGoodsBean);
                        }
                        this.G = 1;
                    }
                }
                cg.a(this.f, com.excelliance.kxqp.swipe.a.a.getString(this.f, "goods_pay_success"));
                if (this.n != null) {
                    a(com.excelliance.kxqp.gs.sdk.a.b.f8108a, this.n.e());
                }
                d();
                p();
                return;
            }
            if (yLBuyStatusResult.status == 2) {
                cg.a(this.f, com.excelliance.kxqp.swipe.a.a.getString(this.f, "goods_pay_fail"));
                if (this.s != null && !TextUtils.isEmpty(this.s.oderInfo) && this.s.uploadServer && this.n != null && this.n.a() == 6) {
                    GoodsBean b3 = this.n.b();
                    if (b3 instanceof VipGoodsBean) {
                        VipGoodsBean vipGoodsBean2 = (VipGoodsBean) b3;
                        vipGoodsBean2.actualPrice = this.n.d();
                        if (this.n != null) {
                            a(com.excelliance.kxqp.gs.sdk.a.b.f8109b, vipGoodsBean2.price, vipGoodsBean2.title, vipGoodsBean2.isRebuy, 1, "会员", this.n.e(), vipGoodsBean2.actualPrice);
                        }
                    }
                }
                if (this.n != null) {
                    a(com.excelliance.kxqp.gs.sdk.a.b.c, this.n.e());
                }
                d();
                p();
                return;
            }
            return;
        }
        az.d("GameMallAdapter", "queryOderStatusResponse buyGoogleAccountStatusResult == null ");
        d();
        p();
    }

    @Override
    public void a(final Context context, final Intent intent) {
        Log.d("GameMallAdapter", "onPayOk: " + Thread.currentThread());
        tp.f(new Runnable() {
            @Override
            public void run() {
                Parcelable parcelableExtra = intent.getParcelableExtra("PAY_EXTRA");
                int intExtra = intent.getIntExtra("type", -1);
                az.d("GameMallAdapter", "onPayOk: " + parcelableExtra);
                if (parcelableExtra instanceof VipGoodsBean) {
                    VipGoodsBean vipGoodsBean = (VipGoodsBean) parcelableExtra;
                    vipGoodsBean.isRebuy = GameMallAdapter.this.G;
                    GameMallAdapter.this.a(context, intExtra, vipGoodsBean);
                    GameMallAdapter.this.G = 1;
                }
                as.af(context);
            }
        });
    }

    @Override
    public void b(Context context, Intent intent) {
        Parcelable parcelableExtra = intent.getParcelableExtra("PAY_EXTRA");
        Log.d("GameMallAdapter", "onPayCancel: extra:" + parcelableExtra);
        int intExtra = intent.getIntExtra("type", -1);
        if (parcelableExtra instanceof VipGoodsBean) {
            VipGoodsBean vipGoodsBean = (VipGoodsBean) parcelableExtra;
            a(com.excelliance.kxqp.gs.sdk.a.b.f8109b, vipGoodsBean.price, vipGoodsBean.title, this.G, 1, "会员", intExtra, vipGoodsBean.actualPrice);
            p();
        }
    }

    @Override
    public void c(Context context, Intent intent) {
        Parcelable parcelableExtra = intent.getParcelableExtra("PAY_EXTRA");
        Log.d("GameMallAdapter", "onPayFailure: extra:" + parcelableExtra);
        int intExtra = intent.getIntExtra("type", -1);
        if (parcelableExtra instanceof VipGoodsBean) {
            VipGoodsBean vipGoodsBean = (VipGoodsBean) parcelableExtra;
            a(com.excelliance.kxqp.gs.sdk.a.b.c, vipGoodsBean.price, vipGoodsBean.title, this.G, 1, "会员", intExtra, vipGoodsBean.actualPrice);
            p();
        }
    }

    @Override
    public Context getContext() {
        return this.f;
    }

    @Override
    public void onClick(View view) {
        switch (((Integer) view.getTag()).intValue()) {
            case 0:
                GameMallVipActivity.a(this.f, 1);
                com.excelliance.kxqp.gs.g.c.a().a(this.f3763b.firstPage, (String) null, "主页", "VIP游戏商城按钮", "开通VIP");
                return;
            case 1:
                BuyGameAccountActivity.a(this.f);
                com.excelliance.kxqp.gs.g.c.a().a(this.f3763b.firstPage, (String) null, "主页", "查看账号购买详情(游戏商城)", "去游戏帐号购买页面");
                return;
            case 2:
                if (this.o != null && this.o.isShowing()) {
                    this.o.dismiss();
                }
                GameAccountActivity.a(this.f);
                return;
            case 3:
                if (this.o != null) {
                    this.o.dismiss();
                    return;
                }
                return;
            case 4:
                com.excelliance.kxqp.gs.g.c.a().a(this.f3763b.firstPage, (String) null, "主页", "查看VIP详情(游戏商城)", "查看详情");
                GameMallVipActivity.a(this.f, 1);
                return;
            default:
                return;
        }
    }

    public static class a implements com.excelliance.kxqp.gs.i.c<com.excelliance.kxqp.gs.ui.game_mall.a.c> {
        @Override
        public int a(int i) {
            return i;
        }

        @Override
        public int a(com.excelliance.kxqp.gs.ui.game_mall.a.c cVar, int i) {
            switch (cVar.f) {
                case 0:
                    return R.layout.game_mall_banner;
                case 1:
                    return R.layout.game_mall_recharge_layout;
                case 2:
                    return R.layout.game_mall_vip_layout;
                case 3:
                    return R.layout.game_mall_account_layout;
                case 4:
                    return R.layout.gain_free_vip_layout;
                case 5:
                    return e.a.f10430a;
                default:
                    return R.layout.game_mall_vip_layout;
            }
        }
    }

    private int a(String str) {
        try {
            return Integer.parseInt(str);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }

    private double b(String str) {
        try {
            return Double.parseDouble(str);
        } catch (Exception e) {
            e.printStackTrace();
            return 0.0d;
        }
    }

    public void c() {
        if (this.A != null) {
            this.A.d();
        }
        if (this.m != null) {
            this.m.a();
        }
        if (this.n != null) {
            this.n.c();
        }
    }

    public void a(int i, String str, String str2, int i2, int i3, String str3, int i4, float f) {
        BiEventPurchaseGoods biEventPurchaseGoods = new BiEventPurchaseGoods();
        biEventPurchaseGoods.account_num = i3 + "";
        biEventPurchaseGoods.current_page = this.f3763b.firstPage;
        biEventPurchaseGoods.vip_package_price = str;
        biEventPurchaseGoods.goods_tyoe = str3;
        biEventPurchaseGoods.vip_package_type = str2;
        if (i == com.excelliance.kxqp.gs.sdk.a.b.f8108a) {
            biEventPurchaseGoods.is_succeed = "成功";
            com.excelliance.kxqp.gs.g.c.a().h(this.f);
            com.excelliance.kxqp.gs.g.c.a().d(this.f, System.currentTimeMillis());
            com.excelliance.kxqp.gs.g.c.a().a(this.f, f);
        } else if (i == com.excelliance.kxqp.gs.sdk.a.b.f8109b) {
            biEventPurchaseGoods.is_succeed = "失败";
            biEventPurchaseGoods.failure_reason = "取消";
        } else if (i == com.excelliance.kxqp.gs.sdk.a.b.c) {
            biEventPurchaseGoods.is_succeed = "失败";
            biEventPurchaseGoods.failure_reason = "接口错误";
        } else if (i == com.excelliance.kxqp.gs.sdk.a.b.d) {
            biEventPurchaseGoods.is_succeed = "失败";
            biEventPurchaseGoods.failure_reason = "没有库存";
        }
        String str4 = null;
        if (i4 == 2 || i4 == 3) {
            str4 = BiEventLoginAccount.LoginInfo.LOGIN_WAY_WX;
        } else if (i4 == 1 || i4 == 4) {
            str4 = "支付宝";
        }
        biEventPurchaseGoods.payment_method = str4;
        if (this.n != null) {
            biEventPurchaseGoods.account_price = f + "";
        }
        biEventPurchaseGoods.is_rebuy = i2 == 1 ? "是" : "否";
        com.excelliance.kxqp.gs.g.c.a().a(biEventPurchaseGoods);
    }

    public void a(int i, int i2) {
        float d = this.n != null ? this.n.d() : 0.0f;
        if (TextUtils.equals(this.E, "1") && this.C != null) {
            a(i, this.C.getMoney() + "", null, this.C.getIsRebuy(), 1, "谷歌帐号", i2, d);
            return;
        }
        if (!TextUtils.equals(this.E, "2") || this.D == null) {
            return;
        }
        a(i, b(this.D.getPrice()) + "", null, this.D.getIsRebuy(), 1, "拳头帐号", i2, d);
    }

    public void p() {
        this.C = null;
        this.D = null;
        this.E = null;
    }

    public String b(String str, String str2) {
        int i;
        try {
            i = Integer.parseInt(str);
        } catch (Exception unused) {
            i = 0;
        }
        return (i == 1 && TextUtils.equals(str2, VipGoodsBean.UNIT_MONTH)) ? "游戏商城中月费购买点击" : (i == 1 && TextUtils.equals(str2, VipGoodsBean.UNIT_YEAR)) ? "VIP游戏商城中年费购买点击" : "购买";
    }

    public void q() {
        if (TextUtils.equals(this.E, "1") && this.C != null) {
            by.a(this.f, "sp_total_info").a("sp_key_bought_google_account_down", true);
            com.excelliance.kxqp.gs.g.c.a().a("is_bought_google_acc", true);
            if (com.excean.ab_builder.c.a.f(this.f) || com.excean.ab_builder.c.a.O(this.f)) {
                com.excelliance.kxqp.bitmap.ui.b.a().a(new t.e(1, 1));
                return;
            }
            return;
        }
        if (!TextUtils.equals(this.E, "2") || this.D == null) {
            return;
        }
        by.a(this.f, "sp_total_info").a("sp_key_bought_ratio_account", true);
        if (com.excean.ab_builder.c.a.f(this.f) || com.excean.ab_builder.c.a.O(this.f)) {
            com.excelliance.kxqp.bitmap.ui.b.a().a(new t.e(1, 2));
        }
    }

    public void a(final Context context, int i, VipGoodsBean vipGoodsBean) {
        VipIncomeUploadUtil.a(context, vipGoodsBean.price);
        cn.a(getContext(), vipGoodsBean.unit, vipGoodsBean.length, vipGoodsBean.title);
        a(com.excelliance.kxqp.gs.sdk.a.b.f8108a, vipGoodsBean.price, vipGoodsBean.title, vipGoodsBean.isRebuy, 1, "会员", i, vipGoodsBean.actualPrice);
        com.excelliance.kxqp.gs.g.c.a().h(this.f);
        com.excelliance.kxqp.gs.g.c.a().d(this.f, System.currentTimeMillis());
        com.excelliance.kxqp.gs.g.c.a().a(this.f, vipGoodsBean.actualPrice);
        if (com.excean.ab_builder.c.a.u(this.f) || com.excean.ab_builder.c.a.v(this.f) || com.excean.ab_builder.c.a.w(this.f)) {
            aa.a(this.f).a();
        }
        VipIncomeUploadUtil.a(context, vipGoodsBean.price);
        com.excelliance.kxqp.bitmap.ui.b.a().a(new VipFragment.c("refresh_accelerate_ui"));
        p();
        tp.i(new Runnable() {
            @Override
            public void run() {
                if (by.a(context, "sp_config").b("sp_key_has_save_picture_from_vip_access_dialog", false).booleanValue()) {
                    return;
                }
                WXconfig a2 = af.a(by.a(context, "sp_config").b("sp_key_get_vip_access_dialog_config_info2", (String) null));
                if (a2 == null) {
                    Toast.makeText(GameMallAdapter.this.f, R.string.get_mini_program_and_qr_code_info_failed, 0).show();
                    return;
                }
                af.a aVar = new af.a();
                aVar.f14919a = GameMallAdapter.this.f3763b.firstPage;
                aVar.c = af.c(GameMallAdapter.this.f);
                aVar.e = af.a(GameMallAdapter.this.f);
                aVar.d = af.b(GameMallAdapter.this.f);
                af.a(GameMallAdapter.this.f, a2, aVar);
            }
        });
    }

    public void d() {
        if (this.q != null) {
            this.q = null;
        }
        if (this.r != null) {
            this.r = null;
        }
        if (this.s != null) {
            this.s = null;
        }
    }
}