修复首页Banner进直播间没有弹新人特惠问题
This commit is contained in:
parent
6fb29bbf60
commit
733678532a
@ -8,6 +8,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/9.
|
* Created by cxf on 2017/8/9.
|
||||||
@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
|
|||||||
private String recommendCardIconSizeTwo = "";
|
private String recommendCardIconSizeTwo = "";
|
||||||
private String recommendCardIconSizeThree = "";
|
private String recommendCardIconSizeThree = "";
|
||||||
|
|
||||||
|
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||||
|
|
||||||
public String getRecommendCardIconSizeTwo() {
|
public String getRecommendCardIconSizeTwo() {
|
||||||
return recommendCardIconSizeTwo;
|
return recommendCardIconSizeTwo;
|
||||||
}
|
}
|
||||||
@ -81,6 +84,14 @@ public class LiveBean implements Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getParams() {
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParams(Map<String, String> params) {
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRecommendcardtype() {
|
public String getRecommendcardtype() {
|
||||||
return recommendCardtype;
|
return recommendCardtype;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.Postcard;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
@ -186,21 +187,25 @@ public class RouteUtil {
|
|||||||
* 打开直播页面
|
* 打开直播页面
|
||||||
*/
|
*/
|
||||||
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
|
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
|
||||||
if(MicStatusManager.getInstance().isMic(mLiveBean.getUid())){
|
if (MicStatusManager.getInstance().isMic(mLiveBean.getUid())) {
|
||||||
MicStatusManager.getInstance().showDownMicDialog(CommonAppContext.activityWeakReference.get());
|
MicStatusManager.getInstance().showDownMicDialog(CommonAppContext.activityWeakReference.get());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
Postcard postcard = ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||||
.withBoolean(Constants.NEW_ENTER_ROOM, false)
|
.withBoolean(Constants.NEW_ENTER_ROOM, false)
|
||||||
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
||||||
.withInt(Constants.LIVE_TYPE, mLiveType)
|
.withInt(Constants.LIVE_TYPE, mLiveType)
|
||||||
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
||||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal)
|
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal);
|
||||||
.navigation();
|
if (mLiveBean.getParams() != null) {
|
||||||
|
for (String key : mLiveBean.getParams().keySet()) {
|
||||||
|
postcard.withString(key, mLiveBean.getParams().get(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
postcard.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 举报个人
|
* 举报个人
|
||||||
*/
|
*/
|
||||||
|
@ -326,6 +326,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
|||||||
if (gotoRoomKey != null && gotoRoomKey.isEmpty()) {
|
if (gotoRoomKey != null && gotoRoomKey.isEmpty()) {
|
||||||
gotoRoomKey = null;
|
gotoRoomKey = null;
|
||||||
}
|
}
|
||||||
|
liveBean.setParams(gotoRoomKey);
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user