修复首页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.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/9.
|
||||
@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
return recommendCardIconSizeTwo;
|
||||
}
|
||||
@ -81,6 +84,14 @@ public class LiveBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getRecommendcardtype() {
|
||||
return recommendCardtype;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
@ -186,21 +187,25 @@ public class RouteUtil {
|
||||
* 打开直播页面
|
||||
*/
|
||||
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());
|
||||
return;
|
||||
}
|
||||
ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||
Postcard postcard = ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
|
||||
.withBoolean(Constants.NEW_ENTER_ROOM, false)
|
||||
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
|
||||
.withInt(Constants.LIVE_TYPE, mLiveType)
|
||||
.withInt(Constants.LIVE_SDK, mLiveSDK)
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal)
|
||||
.navigation();
|
||||
.withInt(Constants.LIVE_TYPE_VAL, mLiveTypeVal);
|
||||
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()) {
|
||||
gotoRoomKey = null;
|
||||
}
|
||||
liveBean.setParams(gotoRoomKey);
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user