中建乐购 v3.2.3版本的 MD5 值为:3856d0da11f056931d64951d23a4b3b8
以下内容为反编译后的 ay.java 源代码,内容仅作参考
package fo;
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 f17305k;
private ListView f17306l;
private View f17307m;
private View f17308n;
private View f17309o;
private View f17310p;
private View f17311q;
private View f17312r;
private View f17313s;
private com.qianseit.westore.ui.d f17314t;
private AlertDialog f17315u;
private int f17316v;
private int f17317w;
public final int f17295a = 1;
public final int f17296b = 2;
public final int f17297c = 3;
public final int f17298d = 4;
public final int f17299e = 5;
private ArrayList<JSONObject> f17300f = new ArrayList<>();
private JSONObject f17301g = null;
private JSONObject f17302h = null;
private JSONObject f17303i = null;
private JSONObject f17304j = null;
private View.OnClickListener f17318x = new View.OnClickListener() {
@Override
public void onClick(View view) {
if (ay.this.f17314t != null) {
ay.this.f17314t.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 fu.d(), new b(jSONObject2.toString()));
} catch (Exception unused) {
}
}
}
};
private BroadcastReceiver f17319y = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(r.f17801a)) {
ay.this.mActivity.finish();
}
}
};
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.mActionBar.setTitle(R.string.order_detail_title);
try {
this.f17301g = AgentApplication.b(this.mActivity).f8486g;
this.f17302h = this.f17301g.optJSONObject("consignee");
this.f17304j = this.f17301g.optJSONObject("shipping");
this.f17303i = this.f17301g.optJSONObject("payinfo");
JSONArray optJSONArray = this.f17301g.optJSONArray("goods_items");
int length = optJSONArray.length();
for (int i2 = 0; i2 < length; i2++) {
this.f17300f.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.f17306l = (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.f17308n = findViewById(R.id.order_detail_paystate);
this.f17307m = findViewById(R.id.confirm_order_address);
this.f17309o = findViewById(R.id.order_detail_price_info);
this.f17310p = findViewById(R.id.order_detail_paysMode_parent);
this.f17311q = findViewById(R.id.order_detail_status_parent);
this.f17312r = findViewById(R.id.order_detail_big_qrcode_layout);
this.f17312r.setOnClickListener(this);
this.f17313s = findViewById(R.id.order_detail_shipping_layout);
a(this.f17301g);
this.f17306l.setAdapter((ListAdapter) new e());
String optString = this.f17301g.optString("logi_name");
if (!optString.equals("null") && TextUtils.isEmpty(optString)) {
new fu.d().execute(new g(optString, this.f17301g.optString("logi_no")));
} else {
this.f17313s.setVisibility(8);
}
IntentFilter intentFilter = new IntentFilter(r.f17801a);
intentFilter.setPriority(3);
getActivity().registerReceiver(this.f17319y, intentFilter);
}
private void a() {
boolean z2 = this.f17302h == null;
this.f17307m.findViewById(R.id.my_address_book_item_name).setVisibility(z2 ? 4 : 0);
this.f17307m.findViewById(R.id.my_address_book_item_phone).setVisibility(z2 ? 4 : 0);
this.f17307m.findViewById(R.id.my_address_book_item_address).setVisibility(z2 ? 4 : 0);
if (this.f17302h != null) {
((TextView) this.f17307m.findViewById(R.id.my_address_book_item_address)).setText(com.shopex.westore.k.a(this.f17302h.optString("txt_area"), "\n", this.f17302h.optString("addr")));
((TextView) this.f17307m.findViewById(R.id.my_address_book_item_phone)).setText(this.f17302h.optString("mobile"));
((TextView) this.f17307m.findViewById(R.id.my_address_book_item_name)).setText(this.f17302h.optString(ca.c.f4824e));
}
}
@Override
public void onDestroy() {
super.onDestroy();
try {
getActivity().unregisterReceiver(this.f17319y);
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override
public void onClick(View view) {
int id2 = view.getId();
if (id2 == R.id.order_detail_buy_again) {
a(0);
showLoadingDialog();
} else if (id2 == R.id.order_detail_apply_retuen) {
b();
} else if (view.getId() == R.id.order_detail_pay) {
com.shopex.westore.k.a(new fu.d(), new a(new fu.c("mobileapi.paycenter.dopayment").a("payment_order_id", this.f17301g.optString("order_id")).a("payment_cur_money", this.f17301g.optString("total_amount")).a("payment_pay_app_id", this.f17303i.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.f17301g.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.f17312r.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.f17312r.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.f17315u == null) {
this.f17315u = new AlertDialog.Builder(this.mActivity).create();
Window window = this.f17315u.getWindow();
window.setGravity(80);
window.setWindowAnimations(R.style.my_dialog_style);
this.f17315u.show();
this.f17315u.setContentView(R.layout.exchange_goods_view);
this.f17315u.findViewById(R.id.exchange_goods_1).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ay.this.f17315u.dismiss();
ay.this.startActivity(AgentActivity.a(ay.this.mActivity, (int) AgentActivity.V).putExtra("com.shopex.westore.EXTRA_DATA", ay.this.f17301g.optString("order_id")).putExtra(com.shopex.westore.k.f10245q, "1"));
}
});
this.f17315u.findViewById(R.id.exchange_goods_2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ay.this.f17315u.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.f17315u.getWindow().getAttributes();
attributes.width = defaultDisplay.getWidth();
this.f17315u.getWindow().setAttributes(attributes);
return;
}
this.f17315u.show();
}
public void a(int i2) {
if (i2 > this.f17300f.size() - 1) {
hideLoadingDialog();
if (this.f17317w == 0) {
Toast.makeText(this.mActivity, getString(R.string.account_orders_rebuy_succeed), 0).show();
} else if (this.f17316v == 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.f17316v)), 0).show();
}
Intent intent = new Intent(getActivity(), MainTabFragmentActivity.class);
MainTabFragmentActivity.f8662c.f8666d = 3;
intent.addFlags(67108864);
intent.putExtra(com.shopex.westore.k.f10236h, 3);
startActivity(intent);
return;
}
new fu.d().execute(new f(i2));
}
public class f implements fu.e {
private int f17336b;
public f(int i2) {
this.f17336b = i2;
}
@Override
public void task_response(String str) {
try {
if (com.shopex.westore.k.a((Context) ay.this.mActivity, new JSONObject(str))) {
ay.this.f17316v++;
} else {
ay.this.f17317w++;
}
ay.this.a(this.f17336b + 1);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
@Override
public fu.c task_request() {
fu.c cVar = new fu.c("mobileapi.cart.add");
cVar.a("product_id", ((JSONObject) ay.this.f17300f.get(this.f17336b)).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.f17303i.optString(dq.f12307g));
((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.f17300f.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.f17301g.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.f17302h.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.f17302h.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.f17301g.optString("status"))) {
if ("1".equalsIgnoreCase(this.f17301g.optString("pay_status")) && "1".equalsIgnoreCase(this.f17301g.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.f17301g.optString("status"))) {
this.f17305k = 5;
textView.setText(R.string.account_orders_state_cancel);
} else if ("finish".equalsIgnoreCase(this.f17301g.optString("status"))) {
this.f17305k = 4;
textView.setText(R.string.account_orders_state_complete);
} else if ("1".equalsIgnoreCase(this.f17301g.optString("delivery_sign_status"))) {
this.f17305k = 4;
textView.setText(R.string.account_orders_state_tuotou);
} else if (this.f17301g.optInt("ship_status") == 1) {
textView.setText(R.string.account_orders_state_receive);
this.f17305k = 3;
} else if (this.f17301g.optInt("pay_status") == 0) {
this.f17305k = 1;
if (!com.shopex.westore.k.c(this.f17303i)) {
findViewById(R.id.order_detail_pay).setVisibility(0);
}
textView.setText(R.string.account_orders_state_paying);
} else if (this.f17301g.optInt("ship_status") == 0) {
this.f17305k = 2;
textView.setText(R.string.account_orders_state_shipping);
} else if (this.f17301g.optInt("ship_status") == 2) {
textView.setText(R.string.account_orders_state_part_shipping);
} else if (this.f17301g.optInt("ship_status") == 3) {
textView.setText(R.string.account_orders_state_part_refund);
} else if (this.f17301g.optInt("ship_status") == 4) {
textView.setText(R.string.account_orders_state_refund);
} else {
this.f17305k = 4;
textView.setText(R.string.account_orders_state_cancel);
}
com.shopex.westore.k.a(this.f17308n);
com.shopex.westore.k.a(this.f17307m);
com.shopex.westore.k.a(this.f17309o);
com.shopex.westore.k.a(this.f17310p);
com.shopex.westore.k.a(this.f17311q);
com.shopex.westore.k.a(this.f17313s);
this.f17308n.setLayoutParams(new AbsListView.LayoutParams(this.f17308n.getLayoutParams()));
this.f17307m.setLayoutParams(new AbsListView.LayoutParams(this.f17307m.getLayoutParams()));
this.f17309o.setLayoutParams(new AbsListView.LayoutParams(this.f17309o.getLayoutParams()));
this.f17310p.setLayoutParams(new AbsListView.LayoutParams(this.f17310p.getLayoutParams()));
this.f17311q.setLayoutParams(new AbsListView.LayoutParams(this.f17311q.getLayoutParams()));
this.f17313s.setLayoutParams(new AbsListView.LayoutParams(this.f17313s.getLayoutParams()));
this.f17306l.addHeaderView(this.f17308n);
this.f17306l.addFooterView(this.f17309o);
this.f17306l.addFooterView(this.f17307m);
this.f17306l.addFooterView(this.f17310p);
this.f17306l.addFooterView(this.f17313s);
}
public void c() {
JSONObject optJSONObject = this.f17301g.optJSONObject("payment");
if (this.f17301g.optString("status").equals("dead")) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
((TextView) this.f17311q.findViewById(R.id.order_detail_status_1_title)).setText("订单已取消");
this.f17306l.addFooterView(this.f17311q);
return;
}
if (optJSONObject.optBoolean("is_cod")) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_2)).setImageResource(R.drawable.order_detail_status2_ok);
} else if (this.f17301g.optString("pay_status").equals("1") || this.f17301g.optString("pay_status").equals("2")) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_2)).setImageResource(R.drawable.order_detail_status2_ok);
} else if (this.f17301g.optString("pay_status").equals("0")) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_1)).setImageResource(R.drawable.order_detail_status1_ok);
}
if (this.f17301g.optInt("ship_status") != 0) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_3)).setImageResource(R.drawable.order_detail_status3_ok);
}
if (!this.f17301g.optString("delivery_sign_status").equalsIgnoreCase("0")) {
((ImageView) this.f17311q.findViewById(R.id.order_detail_status_4)).setImageResource(R.drawable.order_detail_status4_ok);
}
this.f17306l.addFooterView(this.f17311q);
}
public void a(JSONArray jSONArray, String str) throws Exception {
View inflate = this.mActivity.getLayoutInflater().inflate(R.layout.fragment_order_detail_payments, (ViewGroup) null);
this.f17314t = new com.qianseit.westore.ui.d(this.mActivity);
this.f17314t.b(R.string.confirm_order_paytype);
this.f17314t.a(inflate);
this.f17314t.b(true);
this.f17314t.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 fu.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.f17300f.size();
}
@Override
public JSONObject getItem(int i2) {
return (JSONObject) ay.this.f17300f.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.f4824e));
((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.f8623g).putExtra(com.shopex.westore.k.f10237i, ((JSONObject) view.getTag()).optString("goods_id")));
} catch (Exception unused) {
}
}
}
private class c implements fu.e {
private String f17331b;
public c(String str) {
this.f17331b = "0.00";
this.f17331b = str;
}
@Override
public fu.c task_request() {
ay.this.f17303i = null;
return new fu.c("mobileapi.cart.payment_change").a("shipping", ay.this.f17304j.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.f17331b);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
private class b implements fu.e {
private String f17329b;
public b(String str) {
this.f17329b = str;
}
@Override
public fu.c task_request() {
ay.this.showCancelableLoadingDialog();
return new fu.c("mobileapi.order.payment_change").a("payment[pay_app_id]", this.f17329b).a("order_id", ay.this.f17301g.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.f17303i = optJSONObject.optJSONObject("payinfo");
ay.this.f17301g.put("payinfo", ay.this.f17303i);
}
} catch (Exception unused) {
}
}
}
private class a implements fu.e {
private fu.c f17327b;
public a(fu.c cVar) {
this.f17327b = cVar;
}
@Override
public fu.c task_request() {
ay.this.showCancelableLoadingDialog();
return this.f17327b;
}
@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 fu.e {
private String f17333b;
public d(String str) {
this.f17333b = 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.f17301g = jSONObject.optJSONObject("data").optJSONObject("order");
if (ay.this.f17301g.optJSONArray("order_pmt") != null && ay.this.f17301g.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 fu.c task_request() {
fu.c cVar = new fu.c("mobileapi.member.orderdetail");
cVar.a("order_id", this.f17333b);
return cVar;
}
}
private class g implements fu.e {
private String f17338b;
private String f17339c;
public g(String str, String str2) {
this.f17338b = str;
this.f17339c = str2;
}
@Override
public void task_response(String str) {
if (TextUtils.isEmpty(str) || !str.contains("查询结果如下所示")) {
ay.this.f17313s.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.f17313s.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 fu.c task_request() {
return new fu.c("http://wap.kuaidi100.com/wap_result.jsp?rand=" + System.currentTimeMillis() + "&id=" + this.f17338b + "&fromWeb=&postid=" + this.f17339c, "");
}
}
}