diff --git a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java index a6a4ce3ac..8260ee377 100644 --- a/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java +++ b/common/src/main/java/com/yunbao/common/bean/OpenAdModel.java @@ -96,6 +96,9 @@ public class OpenAdModel extends BaseModel { } return url + "?t=" + System.currentTimeMillis() / 1000; } + public String getOriginalUrl(){ + return url; + } public void setUrl(String url) { this.url = url; diff --git a/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java b/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java index 122cf2568..d5a0de407 100644 --- a/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/OpenAdCenterDialogPopup.java @@ -14,6 +14,7 @@ import com.yunbao.common.bean.OpenAdModel; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ScreenDimenUtil; public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow { @@ -65,6 +66,11 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow { mClose = findViewById(R.id.close); findViewById(R.id.layout).setOnClickListener(v -> dismiss()); mImageView.setOnClickListener(v -> { + if("home_page_banner_battle".equals(model.getOriginalUrl())){ + RouteUtil.forwardBattlePass(); + dismiss(); + return; + } WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME); if (mListener != null) { mListener.onItemClick(model, 1); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 2b280ad62..ec1232965 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -55,6 +55,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.adapter.ViewPagerAdapter; +import com.yunbao.common.bean.AnchorRecommendItemModel; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.AnchorStartLiveBean; import com.yunbao.common.bean.ChatRemarksBean; @@ -633,20 +634,27 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene ((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal()); } if (data.getShowWarOrder() == 0) { - floatWarOrder.setVisibility(View.GONE); - floatBanner.setVisibility(View.VISIBLE); - findViewById(R.id.banner_click).setVisibility(View.VISIBLE); + //战令关闭情况下,在判断一次Banner是否足够 + if (data.getListShow() == 1 && data.getList().size() > 2) { + floatBanner.setVisibility(View.VISIBLE); + findViewById(R.id.banner_click).setVisibility(View.VISIBLE); + floatBanner.showBanner(data.getList()); + } else { + floatBanner.setVisibility(View.GONE); + findViewById(R.id.banner_click).setVisibility(View.GONE); + } } else { - if (mainHomeViewHolder!=null&&mainHomeViewHolder.isFloatWarOrder()){ + if (mainHomeViewHolder != null && mainHomeViewHolder.isFloatWarOrder()) { floatWarOrder.setVisibility(View.GONE); - }else { + } else { floatWarOrder.setVisibility(View.VISIBLE); } floatBanner.setVisibility(View.GONE); findViewById(R.id.banner_click).setVisibility(View.GONE); } + } @Override diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 14fa4c79d..48c711896 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -458,6 +458,8 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement if (link.contains("http")) { WebViewActivity.forward(mContext, link, true, false); + } else if ("home_page_banner_battle".equals(link)) { + RouteUtil.forwardBattlePass(); } else { gotoLive(link); } diff --git a/main/src/main/res/mipmap-b+en+us/icon_bp_flot.png b/main/src/main/res/mipmap-b+en+us/icon_bp_flot.png index 621bf37e6..3baeca99e 100644 Binary files a/main/src/main/res/mipmap-b+en+us/icon_bp_flot.png and b/main/src/main/res/mipmap-b+en+us/icon_bp_flot.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/icon_bp_flot.png b/main/src/main/res/mipmap-xxhdpi/icon_bp_flot.png index f6620e821..6bacf9a24 100644 Binary files a/main/src/main/res/mipmap-xxhdpi/icon_bp_flot.png and b/main/src/main/res/mipmap-xxhdpi/icon_bp_flot.png differ