From 99d32c03b246a87177a5072680515615b6f06c39 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 18 Oct 2022 18:24:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=9B=B4=E6=92=AD=E9=97=B4=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=8E=A8=E8=8D=90banner=E7=82=B9=E5=87=BB=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=90=8E=E6=9C=AA=E6=89=93=E5=BC=80=E6=96=B0=E4=BA=BA?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E5=AF=B9=E8=AF=9D=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/bean/SlideInfoModel.java | 10 ++++++++++ .../com/yunbao/live/views/SidebarViewHoler.java | 13 ++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/SlideInfoModel.java b/common/src/main/java/com/yunbao/common/bean/SlideInfoModel.java index cb17e7763..8c1547075 100644 --- a/common/src/main/java/com/yunbao/common/bean/SlideInfoModel.java +++ b/common/src/main/java/com/yunbao/common/bean/SlideInfoModel.java @@ -15,6 +15,8 @@ public class SlideInfoModel extends BaseModel { private String slidePic = ""; @SerializedName("slide_url") private String slideUrl = ""; + @SerializedName("type") + private int type; public String getSlidePic() { return slidePic; @@ -33,4 +35,12 @@ public class SlideInfoModel extends BaseModel { this.slideUrl = slideUrl; return this; } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } } diff --git a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java index 3acd1b543..dbc88476a 100644 --- a/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java +++ b/live/src/main/java/com/yunbao/live/views/SidebarViewHoler.java @@ -19,7 +19,9 @@ import com.yunbao.common.bean.LiveBean; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class SidebarViewHoler extends RecyclerView.ViewHolder { //侧边栏轮播 @@ -54,7 +56,7 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { if (link.contains("http")) { WebViewActivity.forward(itemView.getContext(), link, true); } else { - gotoLive(link); + gotoLive(link, bean.getType()); } } } @@ -66,7 +68,7 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { /** * 前往直播间 */ - private void gotoLive(final String liveId) { + private void gotoLive(final String liveId, int type) { LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -76,7 +78,12 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder { if (liveBean1 == null) { return; } - LiveAudienceActivity.forward(itemView.getContext(), liveBean1, liveType, liveTypeVal, "", 0, liveSdk); + Map map = null; + if (type == 2) { + map = new HashMap<>(); + map.put("OPEN", "NEWUSER"); + } + LiveAudienceActivity.forward(itemView.getContext(), liveBean1, liveType, liveTypeVal, "", map, 0, liveSdk); ((Activity) itemView.getContext()).finish(); }); mCheckLivePresenter.checkLive(liveBean);