获取主播数据接口,新增字段 stream
This commit is contained in:
parent
9b9e2bb2dc
commit
b7a96d9b1d
@ -1,10 +1,19 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class HotStrategyBean {
|
||||
private String id;
|
||||
private String title;
|
||||
private String english_title;
|
||||
private String url;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
@ -30,8 +30,9 @@ public class LiveDataNowFragment extends Fragment {
|
||||
private List<LiveDataInfoNowModel> list;
|
||||
private String mLiveUid;
|
||||
private onDataResult onDataResult;
|
||||
private String mStream;
|
||||
|
||||
public LiveDataNowFragment(Context context, String liveUid,LiveDataNowFragment.onDataResult onDataResult) {
|
||||
public LiveDataNowFragment(Context context, String liveUid,String mStream,LiveDataNowFragment.onDataResult onDataResult) {
|
||||
this.mLiveUid = liveUid;
|
||||
this.onDataResult = onDataResult;
|
||||
}
|
||||
@ -63,7 +64,7 @@ public class LiveDataNowFragment extends Fragment {
|
||||
list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group_rate), getContext().getString(R.string.live_data_loading)));
|
||||
adapter.setList(list);
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveData(mLiveUid, new HttpCallback<LiveDataInfoModel>() {
|
||||
.getLiveData(mLiveUid,mStream, new HttpCallback<LiveDataInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||
list.clear();
|
||||
|
@ -556,7 +556,8 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveStatisticalData")
|
||||
Observable<ResponseModel<LiveDataInfoModel>> getLiveDataInfo(
|
||||
@Query("liveuid") String liveUid
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -1216,9 +1216,9 @@ public class LiveNetManager {
|
||||
/**
|
||||
* 获取直播数据
|
||||
*/
|
||||
public void getLiveData(String liveUid, HttpCallback<LiveDataInfoModel> callback) {
|
||||
public void getLiveData(String liveUid,String stream, HttpCallback<LiveDataInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveDataInfo(liveUid)
|
||||
.getLiveDataInfo(liveUid,stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
|
@ -62,7 +62,7 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
final String[] titles = new String[]{WordUtil.getNewString(R.string.live_data_now_data), WordUtil.getNewString(R.string.live_data_gift_history)};
|
||||
fragmentList.add(new LiveDataNowFragment(mContext, mLiveUid, new LiveDataNowFragment.onDataResult() {
|
||||
fragmentList.add(new LiveDataNowFragment(mContext, mLiveUid, mStream,new LiveDataNowFragment.onDataResult() {
|
||||
@Override
|
||||
public void Result(String countZs, String countPerson) {
|
||||
|
||||
|
@ -314,7 +314,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
findViewById(R.id.go_anchor_center).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Auth&a=authcenter";
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Auth&";
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||
ZhuangBanActivity.forward(mContext, url, 0);
|
||||
}
|
||||
@ -332,24 +332,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
Bus.get().post(new CloseEvent());
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(mContext).getLiveData(CommonAppConfig.getInstance().getUid(), new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||
count1.setText(data.getTotalCoin() + "");
|
||||
count2.setText(data.getTotalGold() + "");
|
||||
count3.setText(data.getAcceptNum() + "");
|
||||
count4.setText(data.getEnterNum() + "");
|
||||
count5.setText(data.getAttentionNum() + "");
|
||||
count6.setText(data.getAttentionNumRate() + "");
|
||||
count7.setText(data.getFanGroupNum() + "");
|
||||
count8.setText(data.getFanGroupNumRate() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void upData(String votes, String length, int nums, String uname) {
|
||||
@ -416,7 +398,8 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
ViewClicksAntiShake.clicksAntiShake(week, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
WebViewActivity.forward(mContext,hotStrategyBeanList.get(finalI).getUrl(),true);
|
||||
String url = CommonAppConfig.HOST+"/h5/activity/pdlNewCenter/details.html?id="+hotStrategyBeanList.get(finalI).getId();
|
||||
WebViewActivity.forward(mContext,url,true);
|
||||
}
|
||||
});
|
||||
live_end_vf.addView(weekView);
|
||||
@ -476,6 +459,24 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
ImgLoader.displayAvatar(mContext, liveBean.getAvatar(), clipImageanchor);
|
||||
}
|
||||
ImgLoader.displayBlur(mContext, liveBean.getAvatar(), mAvatar1);
|
||||
LiveNetManager.get(mContext).getLiveData(CommonAppConfig.getInstance().getUid(),stream, new HttpCallback<com.yunbao.common.bean.LiveDataInfoModel>() {
|
||||
@Override
|
||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||
count1.setText(data.getTotalCoin() + "");
|
||||
count2.setText(data.getTotalGold() + "");
|
||||
count3.setText(data.getAcceptNum() + "");
|
||||
count4.setText(data.getEnterNum() + "");
|
||||
count5.setText(data.getAttentionNum() + "");
|
||||
count6.setText(data.getAttentionNumRate() + "");
|
||||
count7.setText(data.getFanGroupNum() + "");
|
||||
count8.setText(data.getFanGroupNumRate() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.views;
|
||||
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.isStayRoomfive;
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.mStream;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
@ -910,7 +911,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
|
||||
L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention());
|
||||
//检测是否是首次观看该直播间
|
||||
if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")&&data.getEnterRoomInfo().getIsattention().equals("0")){
|
||||
if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")){
|
||||
mLiveRoomViewHolder.firstLookLiveNotify();
|
||||
}
|
||||
//判断是否有免费礼物
|
||||
|
Loading…
Reference in New Issue
Block a user