Commit d592711a authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 5b380996
......@@ -159,7 +159,7 @@ public class VedioAdingManager {
if (isHighWeight) {
setVedioAdingListener(null);
adType = getHighWeight();
} else {
} else {
adType = getRandomWeight();
}
isHighWeight = false;
......@@ -178,42 +178,18 @@ public class VedioAdingManager {
* @return
*/
private String getHighWeight() {
int weight = 0;
if (AppConfig.csjVedioAdCount > 0) {
weight = weight + csjVedioWeight;
LogUtil.d(TAG, "权重值:csjVedioWeight:" + csjVedioWeight);
}
if (AppConfig.ylhAdCount > 0) {
weight = weight + ylhWeight;
LogUtil.d(TAG, "权重值:ylhWeight:" + ylhWeight);
}
if (AppConfig.wnVedioAdCount > 0) {
weight = weight + wnWeight;
LogUtil.d(TAG, "权重值:wnWeight:" + wnWeight);
}
// 权重随机
if (weight > 0) {
isTTVideoAd = !isTTVideoAd;
if (isTTVideoAd) {
if (AppConfig.csjVedioAdCount > 0) {
return Constant.CSJ_VEDIO_AD;
} else if (AppConfig.ylhAdCount > 0) {
return Constant.YLH_VEDIO_AD;
} else {
return Constant.SDHZ_VEDIO_AD;
}
} else {
if (AppConfig.ylhAdCount > 0) {
return Constant.YLH_VEDIO_AD;
} else if (AppConfig.csjVedioAdCount > 0) {
return Constant.CSJ_VEDIO_AD;
} else {
return Constant.SDHZ_VEDIO_AD;
}
isTTVideoAd = !isTTVideoAd;
if (isTTVideoAd) {
if (AppConfig.csjVedioAdCount <= 0) {
return Constant.SDHZ_VEDIO_AD;
}
return Constant.CSJ_VEDIO_AD;
} else {
if (AppConfig.ylhAdCount <= 0) {
return Constant.SDHZ_VEDIO_AD;
}
return Constant.YLH_VEDIO_AD;
}
return "";
}
/**
......
......@@ -125,7 +125,7 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID();
break;
}
ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId);
// ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId);
if (rewardVideoAD != null) {
rewardVideoAD = null;
}
......
......@@ -263,7 +263,9 @@ open class MyPresenter : BasePresenter<MyView>() {
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
when (baseResponse.status) { }
when (baseResponse.status) {
200 -> getAutoUserHallBaseMsg()
}
}
})
}
......
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