Commit f52f437f authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 4fd3243f
package com.duben.miniplaylet.manager;
import android.text.TextUtils;
import com.duben.miniplaylet.MintsApplication;
import com.duben.miniplaylet.mvp.model.VedioBean;
import com.duben.miniplaylet.mvp.presenters.TrackPresenter;
......@@ -92,7 +94,13 @@ public class TrackManager {
public void addCashoutReq(String unitId) {
if (trackPresenter != null) {
trackPresenter.riskinfo2(2, unitId);
trackPresenter.riskinfo2(2, unitId,"ALIPAY");
}
}
public void addCashoutReq(String unitId,String payChannel) {
if (trackPresenter != null) {
trackPresenter.riskinfo2(2, unitId,payChannel);
}
}
}
......
......@@ -184,7 +184,7 @@ public class TrackPresenter extends BaseTrackPresenter {
});
}
public void riskinfo2(int eventid, String unitId) {
public void riskinfo2(int eventid, String unitId,String payChannel) {
DeviceInfo deviceInfo = DeviceInfo.Companion.getInstance();
HashMap<String, Object> vo = new HashMap<>();
......@@ -229,7 +229,7 @@ public class TrackPresenter extends BaseTrackPresenter {
public void onNext(BaseResponse<RiskBean> baseResponse) {
try {
if (baseResponse.getStatus() == 200) {
addCashoutReq(unitId);
addCashoutReq(unitId,payChannel);
}
} catch (Exception e) {
e.printStackTrace();
......@@ -424,9 +424,10 @@ public class TrackPresenter extends BaseTrackPresenter {
});
}
public void addCashoutReq(String unitId) {
public void addCashoutReq(String unitId,String payChannel) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("unitId", unitId);
vo.put("payChannel", payChannel);
AppHttpManager.getInstance(loanApplication)
.call(loanService.addCashoutReq(vo),
new BaseSubscriber<BaseResponse<JsonObject>>() {
......
......@@ -251,7 +251,7 @@ class DrawCashFragment : LazyLoadBaseFragment(), OnLoginListener, DrawCashView,
showAd(Constant.CARRIERTYPE_ONLY_SHOW)
} else {
//发起提现
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId,payChannel)
showToast("发起提现成功")
Handler(Looper.getMainLooper()).postDelayed({
......@@ -350,7 +350,7 @@ class DrawCashFragment : LazyLoadBaseFragment(), OnLoginListener, DrawCashView,
private fun adCloseNext(carrierType: String) {
when (carrierType) {
Constant.CARRIERTYPE_ONLY_SHOW -> {
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId,payChannel)
Handler(Looper.getMainLooper()).postDelayed({
if (!isAdded) return@postDelayed
......
......@@ -101,14 +101,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
// System.out.println("mcg -->>>>>:: diffInSeconds=" + diffInSeconds + " adSuccessStatus=" + SplashManager.INSTANCE.isSuccessStatus());
// if (diffInSeconds >= 10 && SplashManager.INSTANCE.isSuccessStatus()) {
//支付宝授权时不弹
// if (AppConfig.alipayBackFalg) {
// tempAlipay = tempAlipay + 1;
// if (tempAlipay >= 2) {
// AppConfig.alipayBackFalg = false;
// }
// } else {
// activity.startActivity(new Intent(activity, SplashBackActivity.class));
// }
if (AppConfig.alipayBackFalg) {
tempAlipay = tempAlipay + 1;
if (tempAlipay >= 2) {
AppConfig.alipayBackFalg = false;
}
} else {
activity.startActivity(new Intent(activity, SplashBackActivity.class));
}
// }
}
count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment