Commit a0f834c3 authored by mengcuiguang's avatar mengcuiguang

好友邀请逻辑修改

parent 4357506d
...@@ -11,12 +11,16 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager; ...@@ -11,12 +11,16 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.multidex.MultiDexApplication; import androidx.multidex.MultiDexApplication;
import com.hjq.toast.ToastUtils; import com.hjq.toast.ToastUtils;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.wenshu.aiyuebao.common.Constant; import com.wenshu.aiyuebao.common.Constant;
import com.wenshu.aiyuebao.manager.KsManager; import com.wenshu.aiyuebao.manager.KsManager;
import com.wenshu.aiyuebao.manager.LiebaoManager;
import com.wenshu.aiyuebao.manager.MhManager; import com.wenshu.aiyuebao.manager.MhManager;
import com.wenshu.aiyuebao.manager.MiitHelper; import com.wenshu.aiyuebao.manager.MiitHelper;
import com.wenshu.aiyuebao.manager.RsNewsManager;
import com.wenshu.aiyuebao.manager.TtCsjAdManager; import com.wenshu.aiyuebao.manager.TtCsjAdManager;
import com.wenshu.aiyuebao.manager.TzManager; import com.wenshu.aiyuebao.manager.TzManager;
import com.wenshu.aiyuebao.manager.WnManager; import com.wenshu.aiyuebao.manager.WnManager;
...@@ -27,12 +31,6 @@ import com.wenshu.aiyuebao.utils.ForegroundOrBackground; ...@@ -27,12 +31,6 @@ import com.wenshu.aiyuebao.utils.ForegroundOrBackground;
import com.wenshu.aiyuebao.utils.LogUtil; import com.wenshu.aiyuebao.utils.LogUtil;
import com.wenshu.aiyuebao.utils.SystemUtils; import com.wenshu.aiyuebao.utils.SystemUtils;
import com.wenshu.library.utils.CommonUtils; import com.wenshu.library.utils.CommonUtils;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk; import com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk;
import com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest; import com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest;
import com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig; import com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig;
...@@ -136,9 +134,6 @@ public class WenshuApplication extends MultiDexApplication { ...@@ -136,9 +134,6 @@ public class WenshuApplication extends MultiDexApplication {
// 瑞狮新闻 // 瑞狮新闻
// RsNewsManager.INSTANCE.init(this); // RsNewsManager.INSTANCE.init(this);
// 猎豹游戏初始化
// LiebaoManager.getInstance().initCmGameSdk();
// 喜马拉雅 // 喜马拉雅
initXmly(); initXmly();
......
...@@ -344,8 +344,17 @@ public class VideoAdingManager { ...@@ -344,8 +344,17 @@ public class VideoAdingManager {
int wnAdCount = AppConfig.wnVideoAdCount; int wnAdCount = AppConfig.wnVideoAdCount;
int flVideoAdCount = AppConfig.flVideoAdCount; int flVideoAdCount = AppConfig.flVideoAdCount;
int tzVideoAdCount = AppConfig.shVideoAdCount; int tzVideoAdCount = AppConfig.shVideoAdCount;
int ksVideoAdCount = AppConfig.ksVideoAdCount;
if (ylhAdCount <= 0 && csjVideoAdCount <= 0 && wnAdCount <= 0 && flVideoAdCount <= 0 && tzVideoAdCount <= 0) { int csjFullVedioAdCount = AppConfig.csjFullVedioAdCount;
if (ylhAdCount <= 0 &&
csjVideoAdCount <= 0 &&
wnAdCount <= 0 &&
flVideoAdCount <= 0 &&
tzVideoAdCount <= 0 &&
csjFullVedioAdCount <= 0 &&
ksVideoAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧");
return true; return true;
} }
return false; return false;
...@@ -438,6 +447,13 @@ public class VideoAdingManager { ...@@ -438,6 +447,13 @@ public class VideoAdingManager {
* @param bean * @param bean
*/ */
private void loadAdVideo(String videoAdType, VideoAdingBean bean) { private void loadAdVideo(String videoAdType, VideoAdingBean bean) {
if (TextUtils.isEmpty(videoAdType)) {
if (videoAdingListener != null) {
videoAdingListener.videoAdingListenerError(bean.getCarrierType());
}
return;
}
try { try {
if (TextUtils.equals(videoAdType, Constant.YLH_VEDIO_AD)) { if (TextUtils.equals(videoAdType, Constant.YLH_VEDIO_AD)) {
// 优量汇 // 优量汇
......
...@@ -76,9 +76,6 @@ public class AppConfig { ...@@ -76,9 +76,6 @@ public class AppConfig {
* wnVideo 剩余广告播放数 * wnVideo 剩余广告播放数
*/ */
public static int wnVideoAdCount = 0; public static int wnVideoAdCount = 0;
/**
* flVideo 剩余广告播放数
*/
/** /**
* csjFull 剩余广告播放数 * csjFull 剩余广告播放数
*/ */
......
...@@ -46,7 +46,7 @@ public class TtCsjAdManager { ...@@ -46,7 +46,7 @@ public class TtCsjAdManager {
/*全屏视频*/ /*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "946076470";// 通用 public static String TT_AD_FULLVEDIO_ALL = "946076470";// 通用
/*信息流*/ /*信息流*/
public static String TT_AD_NATIVEEXPRESS_XMLY = "946076473";//喜马拉雅信息流 public static String TT_AD_NATIVEEXPRESS_XMLY = "946087036";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "946076481";//信息流弹窗 public static String TT_AD_NATIVEEXPRESS_AWARD = "946076481";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "946076481";//走路 public static String TT_AD_NATIVEEXPRESS_WALK = "946076481";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "946076481";//喝水 public static String TT_AD_NATIVEEXPRESS_WATER = "946076481";//喝水
......
package com.wenshu.aiyuebao.mvp.model; package com.wenshu.aiyuebao.mvp.model;
import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
...@@ -7,7 +8,7 @@ import java.util.List; ...@@ -7,7 +8,7 @@ import java.util.List;
* @date 2021/3/22 * @date 2021/3/22
* @des * @des
*/ */
public class CashoutChallengeBean { public class CashoutChallengeBean implements Serializable {
/** /**
* canRewardCoin : 0 * canRewardCoin : 0
...@@ -43,7 +44,7 @@ public class CashoutChallengeBean { ...@@ -43,7 +44,7 @@ public class CashoutChallengeBean {
this.complete = complete; this.complete = complete;
} }
public static class ListDTO { public class ListDTO implements Serializable{
public Integer getNeedCount() { public Integer getNeedCount() {
return needCount; return needCount;
} }
......
...@@ -3,6 +3,7 @@ package com.wenshu.aiyuebao.mvp.presenters ...@@ -3,6 +3,7 @@ package com.wenshu.aiyuebao.mvp.presenters
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.wenshu.aiyuebao.manager.AppHttpManager import com.wenshu.aiyuebao.manager.AppHttpManager
import com.wenshu.aiyuebao.mvp.model.BaseResponse import com.wenshu.aiyuebao.mvp.model.BaseResponse
import com.wenshu.aiyuebao.mvp.model.CashoutChallengeBean
import com.wenshu.aiyuebao.mvp.model.FriendHallMsgBean import com.wenshu.aiyuebao.mvp.model.FriendHallMsgBean
import com.wenshu.aiyuebao.mvp.views.FriendsView import com.wenshu.aiyuebao.mvp.views.FriendsView
import com.wenshu.library.net.neterror.BaseSubscriber import com.wenshu.library.net.neterror.BaseSubscriber
...@@ -15,7 +16,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -15,7 +16,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/ */
fun getFriendHallMsg() { fun getFriendHallMsg() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.friendHallMsg(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() { .call(
loanService.friendHallMsg(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -32,6 +35,7 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -32,6 +35,7 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
when (baseResponse.status) { when (baseResponse.status) {
200 -> { 200 -> {
sonCashoutChallengeMsg()
view.getFriendsHallMsgSuc(baseResponse.data) view.getFriendsHallMsgSuc(baseResponse.data)
} }
else -> { else -> {
...@@ -47,7 +51,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -47,7 +51,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/ */
fun getContributionLeaders() { fun getContributionLeaders() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionLeaders(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() { .call(
loanService.contributionLeaders(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -80,7 +86,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -80,7 +86,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/ */
fun getContributionBigLeaders() { fun getContributionBigLeaders() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionBigLeaders(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() { .call(
loanService.contributionBigLeaders(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -112,7 +120,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -112,7 +120,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/ */
fun getFriendsGiveTodayList() { fun getFriendsGiveTodayList() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.friendsGiveTodayList, object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() { .call(
loanService.friendsGiveTodayList,
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -144,7 +154,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -144,7 +154,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/ */
fun getContributionOutToCash() { fun getContributionOutToCash() {
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionOutToCash(), object : BaseSubscriber<BaseResponse<JsonObject>>() { .call(
loanService.contributionOutToCash(),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading() view.hideLoading()
...@@ -171,6 +183,43 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -171,6 +183,43 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
}) })
} }
/**
* 新版分红逻辑
*/
private fun sonCashoutChallengeMsg() {
AppHttpManager.getInstance(loanApplication)
.call(
loanService.sonCashoutChallengeMsg(),
object : BaseSubscriber<BaseResponse<CashoutChallengeBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.getSonCashoutChallengeMsgFail()
}
override fun onNext(baseResponse: BaseResponse<CashoutChallengeBean>) {
if (isLinkView) return
view.hideLoading()
when (baseResponse.status) {
200 -> {
view.getSonCashoutChallengeMsgSuc(baseResponse.data)
}
else -> {
view.getSonCashoutChallengeMsgFail()
view.showToast(baseResponse.message)
}
}
}
})
}
/** /**
* 设置邀请成功 * 设置邀请成功
* *
......
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