获取主播数据接口,新增字段 stream
This commit is contained in:
parent
9b9e2bb2dc
commit
b7a96d9b1d
@ -1,10 +1,19 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
public class HotStrategyBean {
|
public class HotStrategyBean {
|
||||||
|
private String id;
|
||||||
private String title;
|
private String title;
|
||||||
private String english_title;
|
private String english_title;
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,9 @@ public class LiveDataNowFragment extends Fragment {
|
|||||||
private List<LiveDataInfoNowModel> list;
|
private List<LiveDataInfoNowModel> list;
|
||||||
private String mLiveUid;
|
private String mLiveUid;
|
||||||
private onDataResult onDataResult;
|
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.mLiveUid = liveUid;
|
||||||
this.onDataResult = onDataResult;
|
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)));
|
list.add(new LiveDataInfoNowModel(getContext().getString(R.string.live_data_fan_group_rate), getContext().getString(R.string.live_data_loading)));
|
||||||
adapter.setList(list);
|
adapter.setList(list);
|
||||||
LiveNetManager.get(getContext())
|
LiveNetManager.get(getContext())
|
||||||
.getLiveData(mLiveUid, new HttpCallback<LiveDataInfoModel>() {
|
.getLiveData(mLiveUid,mStream, new HttpCallback<LiveDataInfoModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) {
|
||||||
list.clear();
|
list.clear();
|
||||||
|
@ -556,7 +556,8 @@ public interface PDLiveApi {
|
|||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Live.getLiveStatisticalData")
|
@GET("/api/public/?service=Live.getLiveStatisticalData")
|
||||||
Observable<ResponseModel<LiveDataInfoModel>> getLiveDataInfo(
|
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)
|
API.get().pdLiveApi(mContext)
|
||||||
.getLiveDataInfo(liveUid)
|
.getLiveDataInfo(liveUid,stream)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(listResponseModel -> {
|
.subscribe(listResponseModel -> {
|
||||||
|
@ -62,7 +62,7 @@ public class LiveDataInfoDialog extends AbsDialogPopupWindow {
|
|||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
final String[] titles = new String[]{WordUtil.getNewString(R.string.live_data_now_data), WordUtil.getNewString(R.string.live_data_gift_history)};
|
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
|
@Override
|
||||||
public void Result(String countZs, String countPerson) {
|
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() {
|
findViewById(R.id.go_anchor_center).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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);
|
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||||
ZhuangBanActivity.forward(mContext, url, 0);
|
ZhuangBanActivity.forward(mContext, url, 0);
|
||||||
}
|
}
|
||||||
@ -332,24 +332,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
Bus.get().post(new CloseEvent());
|
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) {
|
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() {
|
ViewClicksAntiShake.clicksAntiShake(week, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
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);
|
live_end_vf.addView(weekView);
|
||||||
@ -476,6 +459,24 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
ImgLoader.displayAvatar(mContext, liveBean.getAvatar(), clipImageanchor);
|
ImgLoader.displayAvatar(mContext, liveBean.getAvatar(), clipImageanchor);
|
||||||
}
|
}
|
||||||
ImgLoader.displayBlur(mContext, liveBean.getAvatar(), mAvatar1);
|
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
|
@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.isStayRoomfive;
|
||||||
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
|
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
|
||||||
|
import static com.yunbao.live.views.LiveRoomViewHolder.mStream;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@ -910,7 +911,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
|
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
|
||||||
L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention());
|
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();
|
mLiveRoomViewHolder.firstLookLiveNotify();
|
||||||
}
|
}
|
||||||
//判断是否有免费礼物
|
//判断是否有免费礼物
|
||||||
|
Loading…
Reference in New Issue
Block a user