OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.pay;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import androidx.fragment.app.FragmentActivity;
import com.excean.bytedancebi.manager.BiManager;
import com.excelliance.kxqp.gs.bean.GoodsBean;
import com.excelliance.kxqp.gs.bean.VipGoodsBeanWrapper;
import com.excelliance.kxqp.gs.bean.VipNotice;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.j.b;
import com.excelliance.kxqp.gs.ui.gaccount.receive.ReceiveBean;
import com.excelliance.kxqp.gs.ui.pay.b;
import com.excelliance.kxqp.gs.util.af;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.cg;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.gs.zhifu.c;
import com.excelliance.kxqp.task.model.YLBuyStatusResult;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.List;
public class d extends com.excelliance.kxqp.gs.j.c<b.InterfaceC0435b> implements b.a {
private Context f10827b;
private com.excelliance.kxqp.gs.j.b c;
private com.excelliance.kxqp.gs.ui.nyactivitys.b d = new com.excelliance.kxqp.gs.ui.nyactivitys.b();
private e e;
private Handler f;
@Override
public void initData() {
}
public d(Context context, int i) {
this.f10827b = context;
this.c = new com.excelliance.kxqp.gs.j.b(this.f10827b, i);
this.e = e.a(context);
HandlerThread handlerThread = new HandlerThread("VipPresenter", 10);
handlerThread.start();
this.f = new Handler(handlerThread.getLooper());
}
@Override
public void a(b.InterfaceC0435b interfaceC0435b) {
super.a((d) interfaceC0435b);
this.c.a((com.excelliance.kxqp.gs.j.b) h_());
}
@Override
public void c() {
super.c();
this.c.c();
this.f10827b = null;
this.f.getLooper().quit();
}
@Override
public void a(GoodsBean goodsBean) {
if (this.c != null) {
this.c.a(goodsBean);
}
}
public void a(c.InterfaceC0490c interfaceC0490c) {
if (this.c != null) {
this.c.a(interfaceC0490c);
}
}
public void a(String str) {
if (this.c != null) {
this.c.b(str);
}
}
@Override
public void a() {
this.f.post(new Runnable() {
@Override
public void run() {
if (d.this.f10827b == null) {
return;
}
final ResponseData a2 = new com.excelliance.kxqp.gs.discover.bbs.c(d.this.f10827b).a(cn.i(d.this.f10827b).toString(), "https://api.ourplay.com.cn/coupon/config", new com.excelliance.kxqp.gs.discover.a.c<ReceiveBean>() {
@Override
public ResponseData<ReceiveBean> a(String str) {
try {
return (ResponseData) new Gson().a(str, new TypeToken<ResponseData<ReceiveBean>>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
});
d.this.d.execute(new Runnable() {
@Override
public void run() {
b.InterfaceC0435b interfaceC0435b;
if (a2 == null || a2.code != 1 || !d.this.i_() || (interfaceC0435b = (b.InterfaceC0435b) d.this.h_()) == null || a2.data == 0) {
return;
}
interfaceC0435b.a(((ReceiveBean) a2.data).voucher);
}
});
}
});
}
@Override
public void a(int i, int i2) {
this.c.a(i, i2);
}
@Override
public void a(int i, int i2, int i3, float f) {
this.c.a(i, i2, i3, f);
}
@Override
public void b() {
this.f.post(new Runnable() {
@Override
public void run() {
final com.excelliance.kxqp.task.model.ResponseData<VipGoodsBeanWrapper> a2 = d.this.e.a();
if (a2.code == -1) {
cg.a(d.this.f10827b, String.valueOf(a2.msg));
return;
}
if (a2.data != null && !cd.a(a2.data.functionAB)) {
BiManager.setPublicPresetParam(BiManager.FUNCTION_AB, a2.data.functionAB);
}
d.this.d.execute(new Runnable() {
@Override
public void run() {
if (d.this.h_() != null) {
((b.InterfaceC0435b) d.this.h_()).a((VipGoodsBeanWrapper) a2.data);
}
}
});
}
});
}
@Override
public void d() {
this.f.post(new Runnable() {
@Override
public void run() {
as.h(d.this.f10827b, 2);
}
});
}
@Override
public void a(final String str, final int i) {
az.d("VipPresenter", "run queryOderStatus: merOrderId:" + str);
this.f.post(new Runnable() {
@Override
public void run() {
final com.excelliance.kxqp.task.model.ResponseData<YLBuyStatusResult> a2 = com.excelliance.kxqp.task.store.b.a(d.this.f10827b).a(d.this.f10827b, str, i);
if (a2.code == 1) {
if (d.this.h_() != null) {
((b.InterfaceC0435b) d.this.h_()).a(a2.data);
return;
}
return;
}
d.this.d.execute(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.task.store.c.a(d.this.f10827b, a2.msg);
}
});
}
});
}
@Override
public void a(int i) {
if (this.c != null) {
this.c.a(i);
}
}
@Override
public GoodsBean e() {
if (this.c != null) {
return this.c.b();
}
return null;
}
@Override
public float f() {
if (this.c == null) {
return 0.0f;
}
this.c.d();
return 0.0f;
}
public void a(b.InterfaceC0243b interfaceC0243b) {
if (this.c != null) {
this.c.a(interfaceC0243b);
}
}
@Override
public int g() {
if (this.c != null) {
return this.c.a();
}
return 4;
}
@Override
public int h() {
if (this.c != null) {
return this.c.e();
}
return 0;
}
@Override
public void i() {
List list = (List) new Gson().a(by.a(this.f10827b, "sp_config").b("sp_key_vip_notice", ""), new TypeToken<List<VipNotice>>() {
}.getType());
if (h_() != null) {
af.a((FragmentActivity) this.f10827b, (List<VipNotice>) list, 3);
}
}
}