中建乐购 v3.2.2版本的 MD5 值为:0553721e6bc6ba8dd67004696a555b81

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


package fd;

import am.a;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.AbsListView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.shopex.westore.AgentApplication;
import com.shopex.westore.activity.AgentActivity;
import com.shopex.westore.activity.MainTabFragmentActivity;
import com.umeng.analytics.pro.dq;
import com.zjsjtz.ecstore.R;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ay extends bx.b {
    private int f17082k;
    private ListView f17083l;
    private View f17084m;
    private View f17085n;
    private View f17086o;
    private View f17087p;
    private View f17088q;
    private View f17089r;
    private View f17090s;
    private com.qianseit.westore.ui.d f17091t;
    private AlertDialog f17092u;
    private int f17093v;
    private int f17094w;
    public final int f17072a = 1;
    public final int f17073b = 2;
    public final int f17074c = 3;
    public final int f17075d = 4;
    public final int f17076e = 5;
    private ArrayList<JSONObject> f17077f = new ArrayList<>();
    private JSONObject f17078g = null;
    private JSONObject f17079h = null;
    private JSONObject f17080i = null;
    private JSONObject f17081j = null;
    private View.OnClickListener f17095x = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            if (ay.this.f17091t != null) {
                ay.this.f17091t.h();
            }
            if (view.getTag() != null) {
                try {
                    JSONObject jSONObject = (JSONObject) view.getTag();
                    JSONObject jSONObject2 = new JSONObject();
                    jSONObject2.put("pay_app_id", jSONObject.optString("app_id"));
                    jSONObject2.put("payment_name", jSONObject.optString("app_display_name"));
                    com.shopex.westore.k.a(new fj.d(), new b(jSONObject2.toString()));
                } catch (Exception unused) {
                }
            }
        }
    };
    private BroadcastReceiver f17096y = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent.getAction().equals(r.f17578a)) {
                ay.this.mActivity.finish();
            }
        }
    };

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.mActionBar.setTitle(R.string.order_detail_title);
        try {
            this.f17078g = AgentApplication.b(this.mActivity).f8440g;
            this.f17079h = this.f17078g.optJSONObject("consignee");
            this.f17081j = this.f17078g.optJSONObject("shipping");
            this.f17080i = this.f17078g.optJSONObject("payinfo");
            JSONArray optJSONArray = this.f17078g.optJSONArray("goods_items");
            int length = optJSONArray.length();
            for (int i2 = 0; i2 < length; i2++) {
                this.f17077f.add(optJSONArray.getJSONObject(i2).optJSONObject("product"));
            }
        } catch (Exception unused) {
            this.mActivity.finish();
        }
    }

    @Override
    public void init(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.rootView = layoutInflater.inflate(R.layout.fragment_order_detail, (ViewGroup) null);
        this.f17083l = (ListView) findViewById(16908298);
        findViewById(R.id.order_detail_buy_again).setOnClickListener(this);
        findViewById(R.id.order_detail_apply_retuen).setOnClickListener(this);
        findViewById(R.id.order_detail_pay).setOnClickListener(this);
        this.mActionBar.getBackButton().setOnClickListener(this);
        this.f17085n = findViewById(R.id.order_detail_paystate);
        this.f17084m = findViewById(R.id.confirm_order_address);
        this.f17086o = findViewById(R.id.order_detail_price_info);
        this.f17087p = findViewById(R.id.order_detail_paysMode_parent);
        this.f17088q = findViewById(R.id.order_detail_status_parent);
        this.f17089r = findViewById(R.id.order_detail_big_qrcode_layout);
        this.f17089r.setOnClickListener(this);
        this.f17090s = findViewById(R.id.order_detail_shipping_layout);
        a(this.f17078g);
        this.f17083l.setAdapter((ListAdapter) new e());
        String optString = this.f17078g.optString("logi_name");
        if (!optString.equals("null") && TextUtils.isEmpty(optString)) {
            new fj.d().execute(new g(optString, this.f17078g.optString("logi_no")));
        } else {
            this.f17090s.setVisibility(8);
        }
        IntentFilter intentFilter = new IntentFilter(r.f17578a);
        intentFilter.setPriority(3);
        getActivity().registerReceiver(this.f17096y, intentFilter);
    }

    private void a() {
        boolean z2 = this.f17079h == null;
        this.f17084m.findViewById(R.id.my_address_book_item_name).setVisibility(z2 ? 4 : 0);
        this.f17084m.findViewById(R.id.my_address_book_item_phone).setVisibility(z2 ? 4 : 0);
        this.f17084m.findViewById(R.id.my_address_book_item_address).setVisibility(z2 ? 4 : 0);
        if (this.f17079h != null) {
            ((TextView) this.f17084m.findViewById(R.id.my_address_book_item_address)).setText(com.shopex.westore.k.a(this.f17079h.optString("txt_area"), "\n", this.f17079h.optString("addr")));
            ((TextView) this.f17084m.findViewById(R.id.my_address_book_item_phone)).setText(this.f17079h.optString("mobile"));
            ((TextView) this.f17084m.findViewById(R.id.my_address_book_item_name)).setText(this.f17079h.optString(ca.c.f4821e));
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        try {
            getActivity().unregisterReceiver(this.f17096y);
        } catch (Exception e2) {
            e2.printStackTrace();
        }
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.order_detail_buy_again) {
            a(0);
            showLoadingDialog();
        } else if (id == R.id.order_detail_apply_retuen) {
            b();
        } else if (view.getId() == R.id.order_detail_pay) {
            com.shopex.westore.k.a(new fj.d(), new a(new fj.c("mobileapi.paycenter.dopayment").a("payment_order_id", this.f17078g.optString("order_id")).a("payment_cur_money", this.f17078g.optString("total_amount")).a("payment_pay_app_id", this.f17080i.optString("pay_app_id"))));
        } else if (view == this.mActionBar.getBackButton()) {
            if (findViewById(R.id.exchagne_tip_layout).getVisibility() == 0) {
                findViewById(R.id.exchagne_tip_layout).setVisibility(8);
                this.mActionBar.setTitle(R.string.order_detail_title);
                return;
            }
            getActivity().finish();
        } else if (view.getId() == R.id.order_detail_promotion_img) {
            JSONArray optJSONArray = this.f17078g.optJSONArray("order_pmt");
            if (optJSONArray == null || optJSONArray.length() <= 0) {
                return;
            }
            StringBuffer stringBuffer = new StringBuffer();
            for (int i2 = 0; i2 < optJSONArray.length() - 1; i2++) {
                JSONObject optJSONObject = optJSONArray.optJSONObject(i2);
                if (optJSONObject != null) {
                    stringBuffer.append(optJSONObject.optString("pmt_memo") + " ( -" + optJSONObject.optString("pmt_amount") + " )\n");
                }
            }
            JSONObject optJSONObject2 = optJSONArray.optJSONObject(optJSONArray.length() - 1);
            if (optJSONObject2 != null) {
                stringBuffer.append(optJSONObject2.optString("pmt_memo") + " ( -" + optJSONObject2.optString("pmt_amount") + " )");
            }
            final com.qianseit.westore.ui.d dVar = new com.qianseit.westore.ui.d(this.mActivity);
            dVar.a("优惠信息");
            dVar.a(stringBuffer);
            dVar.c(getString(R.string.ok), new View.OnClickListener() {
                @Override
                public void onClick(View view2) {
                    dVar.h();
                }
            });
            dVar.b(true).c(true).g();
        } else if (view.getId() == R.id.order_detail_order_barcode) {
            this.f17089r.setVisibility(0);
            ((ImageView) findViewById(R.id.order_detail_big_qrcode)).setImageBitmap(com.shopex.westore.util.ai.a(this.mActivity, (String) view.getTag(), (int) a.AbstractC0009a.f516b, (int) a.AbstractC0009a.f516b));
        } else if (view.getId() == R.id.order_detail_big_qrcode_layout) {
            this.f17089r.setVisibility(8);
        } else {
            super.onClick(view);
        }
    }

    @Override
    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        if (i2 == 4) {
            if (findViewById(R.id.exchagne_tip_layout).getVisibility() == 0) {
                findViewById(R.id.exchagne_tip_layout).setVisibility(8);
                this.mActionBar.setTitle(R.string.order_detail_title);
                return true;
            }
            getActivity().finish();
        }
        return super.onKeyDown(i2, keyEvent);
    }

    private void b() {
        if (this.f17092u == null) {
            this.f17092u = new AlertDialog.Builder(this.mActivity).create();
            Window window = this.f17092u.getWindow();
            window.setGravity(80);
            window.setWindowAnimations(R.style.my_dialog_style);
            this.f17092u.show();
            this.f17092u.setContentView(R.layout.exchange_goods_view);
            this.f17092u.findViewById(R.id.exchange_goods_1).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    ay.this.f17092u.dismiss();
                    ay.this.startActivity(AgentActivity.a(ay.this.mActivity, (int) AgentActivity.V).putExtra("com.shopex.westore.EXTRA_DATA", ay.this.f17078g.optString("order_id")).putExtra(com.shopex.westore.k.f10194q, "1"));
                }
            });
            this.f17092u.findViewById(R.id.exchange_goods_2).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    ay.this.f17092u.dismiss();
                    ay.this.findViewById(R.id.exchagne_tip_layout).setVisibility(0);
                    ay.this.mActionBar.setTitle("换货须知");
                }
            });
            Display defaultDisplay = this.mActivity.getWindowManager().getDefaultDisplay();
            WindowManager.LayoutParams attributes = this.f17092u.getWindow().getAttributes();
            attributes.width = defaultDisplay.getWidth();
            this.f17092u.getWindow().setAttributes(attributes);
            return;
        }
        this.f17092u.show();
    }

    public void a(int i2) {
        if (i2 > this.f17077f.size() - 1) {
            hideLoadingDialog();
            if (this.f17094w == 0) {
                Toast.makeText(this.mActivity, getString(R.string.account_orders_rebuy_succeed), 0).show();
            } else if (this.f17093v == 0) {
                Toast.makeText(this.mActivity, getString(R.string.account_orders_rebuy_fail), 0).show();
            } else {
                Toast.makeText(this.mActivity, getString(R.string.account_orders_rebuy_part, Integer.valueOf(this.f17093v)), 0).show();
            }
            Intent intent = new Intent(getActivity(), MainTabFragmentActivity.class);
            MainTabFragmentActivity.f8616c.f8620d = 3;
            intent.addFlags(67108864);
            intent.putExtra(com.shopex.westore.k.f10185h, 3);
            startActivity(intent);
            return;
        }
        new fj.d().execute(new f(i2));
    }

    public class f implements fj.e {
        private int f17113b;

        public f(int i2) {
            this.f17113b = i2;
        }

        @Override
        public void task_response(String str) {
            try {
                if (com.shopex.westore.k.a((Context) ay.this.mActivity, new JSONObject(str))) {
                    ay.this.f17093v++;
                } else {
                    ay.this.f17094w++;
                }
                ay.this.a(this.f17113b + 1);
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fj.c task_request() {
            fj.c cVar = new fj.c("mobileapi.cart.add");
            cVar.a("product_id", ((JSONObject) ay.this.f17077f.get(this.f17113b)).optString("goods_id"));
            return cVar;
        }
    }

    private void a(JSONObject jSONObject) {
        a();
        ((TextView) findViewById(R.id.order_detail_order_no)).setText(this.mActivity.getString(R.string.order_detail_order_no) + jSONObject.optString("order_id"));
        ((TextView) findViewById(R.id.order_detail_paytype)).setText(this.mActivity.getString(R.string.order_detail_payinfo) + this.f17080i.optString(dq.f12249g));
        ((TextView) findViewById(R.id.order_detail_create_time)).setText(this.mActivity.getString(R.string.order_detail_create_time) + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Long.valueOf(jSONObject.optLong("createtime") * 1000)));
        ((TextView) findViewById(R.id.order_detail_goods_total_price)).setText("¥" + jSONObject.optString("cost_item"));
        ((TextView) findViewById(R.id.order_detail_sum_quantity)).setText(this.mActivity.getString(R.string.account_orders_order_sum_quantity, new Object[]{Integer.valueOf(this.f17077f.size())}));
        JSONObject optJSONObject = jSONObject.optJSONObject("shipping");
        ((TextView) findViewById(R.id.order_detail_express_fee)).setText("¥" + optJSONObject.optString("cost_shipping"));
        ((TextView) findViewById(R.id.order_detail_payment_money)).setText("¥" + jSONObject.optString("total_amount"));
        ((TextView) findViewById(R.id.order_detail_pmt_order)).setText("¥" + jSONObject.optString("pmt_order"));
        if (optJSONObject.optString("shipping_id").equals("2")) {
            ((TextView) findViewById(R.id.order_detail_paysMode)).setText(getString(R.string.confirm_order_express) + ":");
            ((TextView) findViewById(R.id.order_detail_paysMode_title)).setText(optJSONObject.optString("shipping_name"));
            ((TextView) findViewById(R.id.order_detail_paysMode_shop)).setText(getString(R.string.confirm_order_express_delivery_shop) + ":");
            ((TextView) findViewById(R.id.order_detail_paysMode_title_shopname)).setText(this.f17078g.optString("branch_name_user"));
            ((TextView) findViewById(R.id.order_detail_paysMode_time)).setText(getString(R.string.confirm_order_express_self_time) + ":");
            ((TextView) findViewById(R.id.order_detail_paysMode_title_timen)).setText(this.f17079h.optString("r_time"));
        } else {
            ((TextView) findViewById(R.id.order_detail_paysMode)).setText(getString(R.string.confirm_order_express) + ":");
            ((TextView) findViewById(R.id.order_detail_paysMode_title)).setText(optJSONObject.optString("shipping_name"));
            ((TextView) findViewById(R.id.order_detail_paysMode_shop)).setText(getString(R.string.confirm_order_express_delivery_time) + ":");
            ((TextView) findViewById(R.id.order_detail_paysMode_title_shopname)).setText(this.f17079h.optString("r_time"));
            findViewById(R.id.order_detail_paysMode_time).setVisibility(8);
            findViewById(R.id.order_detail_paysMode_title_timen).setVisibility(8);
        }
        TextView textView = (TextView) findViewById(R.id.order_detail_state);
        if ("active".equalsIgnoreCase(this.f17078g.optString("status"))) {
            if ("1".equalsIgnoreCase(this.f17078g.optString("pay_status")) && "1".equalsIgnoreCase(this.f17078g.optString("ship_status"))) {
                findViewById(R.id.order_detail_apply_retuen).setVisibility(0);
            } else {
                findViewById(R.id.order_detail_apply_retuen).setVisibility(8);
            }
        } else {
            findViewById(R.id.order_detail_apply_retuen).setVisibility(8);
        }
        if ("dead".equalsIgnoreCase(this.f17078g.optString("status"))) {
            this.f17082k = 5;
            textView.setText(R.string.account_orders_state_cancel);
        } else if ("finish".equalsIgnoreCase(this.f17078g.optString("status"))) {
            this.f17082k = 4;
            textView.setText(R.string.account_orders_state_complete);
        } else if ("1".equalsIgnoreCase(this.f17078g.optString("delivery_sign_status"))) {
            this.f17082k = 4;
            textView.setText(R.string.account_orders_state_tuotou);
        } else if (this.f17078g.optInt("ship_status") == 1) {
            textView.setText(R.string.account_orders_state_receive);
            this.f17082k = 3;
        } else if (this.f17078g.optInt("pay_status") == 0) {
            this.f17082k = 1;
            if (!com.shopex.westore.k.c(this.f17080i)) {
                findViewById(R.id.order_detail_pay).setVisibility(0);
            }
            textView.setText(R.string.account_orders_state_paying);
        } else if (this.f17078g.optInt("ship_status") == 0) {
            this.f17082k = 2;
            textView.setText(R.string.account_orders_state_shipping);
        } else if (this.f17078g.optInt("ship_status") == 2) {
            textView.setText(R.string.account_orders_state_part_shipping);
        } else if (this.f17078g.optInt("ship_status") == 3) {
            textView.setText(R.string.account_orders_state_part_refund);
        } else if (this.f17078g.optInt("ship_status") == 4) {
            textView.setText(R.string.account_orders_state_refund);
        } else {
            this.f17082k = 4;
            textView.setText(R.string.account_orders_state_cancel);
        }
        com.shopex.westore.k.a(this.f17085n);
        com.shopex.westore.k.a(this.f17084m);
        com.shopex.westore.k.a(this.f17086o);
        com.shopex.westore.k.a(this.f17087p);
        com.shopex.westore.k.a(this.f17088q);
        com.shopex.westore.k.a(this.f17090s);
        this.f17085n.setLayoutParams(new AbsListView.LayoutParams(this.f17085n.getLayoutParams()));
        this.f17084m.setLayoutParams(new AbsListView.LayoutParams(this.f17084m.getLayoutParams()));
        this.f17086o.setLayoutParams(new AbsListView.LayoutParams(this.f17086o.getLayoutParams()));
        this.f17087p.setLayoutParams(new AbsListView.LayoutParams(this.f17087p.getLayoutParams()));
        this.f17088q.setLayoutParams(new AbsListView.LayoutParams(this.f17088q.getLayoutParams()));
        this.f17090s.setLayoutParams(new AbsListView.LayoutParams(this.f17090s.getLayoutParams()));
        this.f17083l.addHeaderView(this.f17085n);
        this.f17083l.addFooterView(this.f17086o);
        this.f17083l.addFooterView(this.f17084m);
        this.f17083l.addFooterView(this.f17087p);
        this.f17083l.addFooterView(this.f17090s);
    }

    public void c() {
        JSONObject optJSONObject = this.f17078g.optJSONObject("payment");
        if (this.f17078g.optString("status").equals("dead")) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
            ((TextView) this.f17088q.findViewById(R.id.order_detail_status_1_title)).setText("订单已取消");
            this.f17083l.addFooterView(this.f17088q);
            return;
        }
        if (optJSONObject.optBoolean("is_cod")) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_2)).setImageResource(R.drawable.order_detail_status2_ok);
        } else if (this.f17078g.optString("pay_status").equals("1") || this.f17078g.optString("pay_status").equals("2")) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_2)).setImageResource(R.drawable.order_detail_status2_ok);
        } else if (this.f17078g.optString("pay_status").equals("0")) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
        }
        if (this.f17078g.optInt("ship_status") != 0) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_3)).setImageResource(R.drawable.order_detail_status3_ok);
        }
        if (!this.f17078g.optString("delivery_sign_status").equalsIgnoreCase("0")) {
            ((ImageView) this.f17088q.findViewById(R.id.order_detail_status_4)).setImageResource(R.drawable.order_detail_status4_ok);
        }
        this.f17083l.addFooterView(this.f17088q);
    }

    public void a(JSONArray jSONArray, String str) throws Exception {
        View inflate = this.mActivity.getLayoutInflater().inflate(R.layout.fragment_order_detail_payments, (ViewGroup) null);
        this.f17091t = new com.qianseit.westore.ui.d(this.mActivity);
        this.f17091t.b(R.string.confirm_order_paytype);
        this.f17091t.a(inflate);
        this.f17091t.b(true);
        this.f17091t.g();
    }

    @Override
    public void onCheckoutHistoryLoaded(String str) {
        try {
            JSONObject jSONObject = new JSONObject(str);
            if (com.shopex.westore.k.a((Context) this.mActivity, jSONObject)) {
                com.shopex.westore.k.a(new fj.d(), new c(jSONObject.optJSONObject("data").optString("total")));
            } else {
                hideLoadingDialog_mt();
            }
        } catch (Exception unused) {
            hideLoadingDialog_mt();
        }
    }

    private class e extends BaseAdapter implements View.OnClickListener {
        @Override
        public long getItemId(int i2) {
            return 0L;
        }

        private e() {
        }

        @Override
        public int getCount() {
            return ay.this.f17077f.size();
        }

        @Override
        public JSONObject getItem(int i2) {
            return (JSONObject) ay.this.f17077f.get(i2);
        }

        @Override
        public View getView(int i2, View view, ViewGroup viewGroup) {
            if (view == null) {
                view = ay.this.mActivity.getLayoutInflater().inflate(R.layout.fragment_confirm_order_item, (ViewGroup) null);
                ((TextView) view.findViewById(R.id.account_orders_item_oldprice)).getPaint().setFlags(16);
                view.setOnClickListener(this);
            }
            JSONObject item = getItem(i2);
            try {
                view.setTag(item);
                ((TextView) view.findViewById(R.id.account_orders_item_title)).setText(item.optString(ca.c.f4821e));
                ((TextView) view.findViewById(R.id.account_orders_item_price)).setText("¥" + item.optString("price"));
                ((TextView) view.findViewById(R.id.account_orders_item_oldprice)).setText(item.optString("price"));
                ((TextView) view.findViewById(R.id.account_orders_item_quantity)).setText(com.shopex.westore.k.a("x", item.optString("quantity")));
                bo.c.a(item.optString("thumbnail_pic_src"), (ImageView) view.findViewById(R.id.account_orders_item_thumb));
            } catch (Exception unused) {
            }
            return view;
        }

        @Override
        public void onClick(View view) {
            try {
                ay.this.startActivity(AgentActivity.a(ay.this.mActivity, (int) AgentActivity.f8577g).putExtra(com.shopex.westore.k.f10186i, ((JSONObject) view.getTag()).optString("goods_id")));
            } catch (Exception unused) {
            }
        }
    }

    private class c implements fj.e {
        private String f17108b;

        public c(String str) {
            this.f17108b = "0.00";
            this.f17108b = str;
        }

        @Override
        public fj.c task_request() {
            ay.this.f17080i = null;
            return new fj.c("mobileapi.cart.payment_change").a("shipping", ay.this.f17081j.optString("shipping"));
        }

        @Override
        public void task_response(String str) {
            JSONArray optJSONArray;
            ay.this.hideLoadingDialog_mt();
            try {
                JSONObject jSONObject = new JSONObject(str);
                if (!com.shopex.westore.k.a((Context) ay.this.mActivity, jSONObject) || (optJSONArray = jSONObject.optJSONArray("data")) == null || optJSONArray.length() <= 0) {
                    return;
                }
                ay.this.a(optJSONArray, this.f17108b);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    private class b implements fj.e {
        private String f17106b;

        public b(String str) {
            this.f17106b = str;
        }

        @Override
        public fj.c task_request() {
            ay.this.showCancelableLoadingDialog();
            return new fj.c("mobileapi.order.payment_change").a("payment[pay_app_id]", this.f17106b).a("order_id", ay.this.f17078g.optString("order_id"));
        }

        @Override
        public void task_response(String str) {
            ay.this.hideLoadingDialog_mt();
            try {
                JSONObject jSONObject = new JSONObject(str);
                if (com.shopex.westore.k.a((Context) ay.this.mActivity, jSONObject)) {
                    JSONObject optJSONObject = jSONObject.optJSONObject("data");
                    ay.this.f17080i = optJSONObject.optJSONObject("payinfo");
                    ay.this.f17078g.put("payinfo", ay.this.f17080i);
                }
            } catch (Exception unused) {
            }
        }
    }

    private class a implements fj.e {
        private fj.c f17104b;

        public a(fj.c cVar) {
            this.f17104b = cVar;
        }

        @Override
        public fj.c task_request() {
            ay.this.showCancelableLoadingDialog();
            return this.f17104b;
        }

        @Override
        public void task_response(String str) {
            ay.this.hideLoadingDialog_mt();
            try {
                JSONObject jSONObject = new JSONObject(str);
                if (com.shopex.westore.k.a((Context) ay.this.mActivity, jSONObject)) {
                    if (com.shopex.westore.k.b(ay.this.mActivity, jSONObject)) {
                        ay.this.mActivity.setResult(-1);
                        ay.this.mActivity.finish();
                    } else {
                        ay.this.callWXPay(jSONObject.optJSONObject("data"));
                    }
                } else {
                    com.shopex.westore.k.a((Activity) ay.this.mActivity, jSONObject);
                }
            } catch (Exception unused) {
                com.shopex.westore.k.c((Context) ay.this.mActivity, (int) R.string.confirm_order_pay_failed);
            }
        }
    }

    private class d implements fj.e {
        private String f17110b;

        public d(String str) {
            this.f17110b = str;
        }

        @Override
        public void task_response(String str) {
            try {
                JSONObject jSONObject = new JSONObject(str);
                if (com.shopex.westore.k.a((Context) ay.this.mActivity, jSONObject)) {
                    ay.this.f17078g = jSONObject.optJSONObject("data").optJSONObject("order");
                    if (ay.this.f17078g.optJSONArray("order_pmt") != null && ay.this.f17078g.optJSONArray("order_pmt").length() > 0) {
                        View findViewById = ay.this.findViewById(R.id.order_detail_promotion_img);
                        findViewById.setVisibility(0);
                        findViewById.setOnClickListener(ay.this);
                    }
                    ay.this.c();
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public fj.c task_request() {
            fj.c cVar = new fj.c("mobileapi.member.orderdetail");
            cVar.a("order_id", this.f17110b);
            return cVar;
        }
    }

    private class g implements fj.e {
        private String f17115b;
        private String f17116c;

        public g(String str, String str2) {
            this.f17115b = str;
            this.f17116c = str2;
        }

        @Override
        public void task_response(String str) {
            if (TextUtils.isEmpty(str) || !str.contains("查询结果如下所示")) {
                ay.this.f17090s.setVisibility(8);
            } else if (!TextUtils.isEmpty(str) && str.contains("</form>")) {
                String[] split = str.substring(str.indexOf("查询结果如下所示") + 22, str.indexOf("</form>")).split("</p>");
                if (split.length < 0) {
                    return;
                }
                LinearLayout linearLayout = (LinearLayout) ay.this.f17090s.findViewById(R.id.order_detail_shipping_log);
                LayoutInflater from = LayoutInflater.from(ay.this.mActivity);
                for (int i2 = 0; i2 < split.length; i2++) {
                    if (!TextUtils.isEmpty(split[i2].trim())) {
                        String[] split2 = split[i2].split("<br />");
                        View inflate = from.inflate(R.layout.item_shipping_log, (ViewGroup) null);
                        inflate.setBackgroundColor(i2 % 2 == 0 ? -1118482 : -1381654);
                        ((TextView) inflate.findViewById(R.id.shipping_time)).setText(split2[0].substring(12));
                        ((TextView) inflate.findViewById(R.id.shipping_detail)).setText(split2[1]);
                        linearLayout.addView(inflate);
                    }
                }
            }
        }

        @Override
        public fj.c task_request() {
            return new fj.c("http://wap.kuaidi100.com/wap_result.jsp?rand=" + System.currentTimeMillis() + "&id=" + this.f17115b + "&fromWeb=&postid=" + this.f17116c, "");
        }
    }
}