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);