1:修改所有和礼物有关系的接口,分别是打赏接口、房间礼物,这个进行修改
2:修改排麦插队礼物,id传0 3:歌单礼物传递的id是100
This commit is contained in:
@@ -108,7 +108,7 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
if (type == 0) {
|
if (type == 0) {//当type=0的时候,这个是点击排麦插队礼物的,这里传递的id是0
|
||||||
MvpPre.getGiftList("0", type, roomId);
|
MvpPre.getGiftList("0", type, roomId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ public interface ApiServer {
|
|||||||
Call<BaseModel<List<RewardUserBean>>> getRewardList(@Field("id") String id, @Field("page") String page, @Field("page_limit") String page_limit);
|
Call<BaseModel<List<RewardUserBean>>> getRewardList(@Field("id") String id, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||||
|
|
||||||
@GET(Constants.GET_GIFT_LABEL)
|
@GET(Constants.GET_GIFT_LABEL)
|
||||||
Call<BaseModel<List<GiftLabelBean>>> getGiftLabel(@Query("have_hot") String have_hot);
|
Call<BaseModel<List<GiftLabelBean>>> getGiftLabel(@Query("type") String type);
|
||||||
|
|
||||||
//获取礼物列表
|
//获取礼物列表
|
||||||
@GET(Constants.GIFT_LIST)
|
@GET(Constants.GIFT_LIST)
|
||||||
|
|||||||
@@ -2324,8 +2324,14 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGiftLabel(String have_hot, BaseObserver<List<GiftLabelBean>> observer) {
|
/**
|
||||||
sApiServer.getGiftLabel(have_hot).enqueue(new Callback<BaseModel<List<GiftLabelBean>>>() {
|
* 礼物标签表
|
||||||
|
* @param type 1:房间获取标签 2:打赏,不要热度卡 3:
|
||||||
|
* @param observer
|
||||||
|
*/
|
||||||
|
|
||||||
|
public void getGiftLabel(String type, BaseObserver<List<GiftLabelBean>> observer) {
|
||||||
|
sApiServer.getGiftLabel(type).enqueue(new Callback<BaseModel<List<GiftLabelBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<GiftLabelBean>>> call, Response<BaseModel<List<GiftLabelBean>>> response) {
|
public void onResponse(Call<BaseModel<List<GiftLabelBean>>> call, Response<BaseModel<List<GiftLabelBean>>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
@@ -2349,6 +2355,13 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取礼物列表
|
||||||
|
* @param type 0:只获取热门礼物和普通礼物 99:拍卖卡关系选择礼物 100:歌单礼物
|
||||||
|
* @param roomId
|
||||||
|
* @param observer
|
||||||
|
*/
|
||||||
|
|
||||||
public void getGiftList(int type, String roomId, BaseObserver<List<RoonGiftModel>> observer) {
|
public void getGiftList(int type, String roomId, BaseObserver<List<RoonGiftModel>> observer) {
|
||||||
sApiServer.getGiftList(type, roomId).enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
sApiServer.getGiftList(type, roomId).enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -2363,6 +2376,7 @@ public class RetrofitClient {
|
|||||||
setCode301(listBaseModel.getMsg());
|
setCode301(listBaseModel.getMsg());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
ToastUtils.showLong("礼物数据错误", response.code());
|
||||||
LogUtils.e("getGiftList", response.message());
|
LogUtils.e("getGiftList", response.message());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftLabel(String have_hot) {
|
public void getGiftLabel(String type) {
|
||||||
RetrofitClient.getInstance().getGiftLabel(have_hot, new BaseObserver<List<GiftLabelBean>>() {
|
RetrofitClient.getInstance().getGiftLabel(type, new BaseObserver<List<GiftLabelBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
MvpPre.getRewardList(circle_id, 1, 10);
|
MvpPre.getRewardList(circle_id, 1, 10);
|
||||||
MvpPre.getGiftLabel("1");
|
MvpPre.getGiftLabel("2");
|
||||||
MvpPre.wallet();
|
MvpPre.wallet();
|
||||||
mGiftNumList = new ArrayList<>();
|
mGiftNumList = new ArrayList<>();
|
||||||
mGiftNumList.add(new GiftNumBean("20", "x20"));
|
mGiftNumList.add(new GiftNumBean("20", "x20"));
|
||||||
@@ -206,12 +206,12 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
|||||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||||
|
|
||||||
if (giftLabelBeans == null) return;
|
if (giftLabelBeans == null) return;
|
||||||
for (GiftLabelBean giftLabelBean1 : giftLabelBeans) {
|
// for (GiftLabelBean giftLabelBean1 : giftLabelBeans) {
|
||||||
if (giftLabelBean1.getId().equals("2")) {
|
// if (giftLabelBean1.getId().equals("2")) {
|
||||||
giftLabelBeans.remove(giftLabelBean1);
|
// giftLabelBeans.remove(giftLabelBean1);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList, ""));
|
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans, fragmentList, ""));
|
||||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class GiftSongDialog extends BaseDialog<DialogGiftSongBinding> {
|
|||||||
mGiftNumList.add(new GiftNumBean("5", "x5"));
|
mGiftNumList.add(new GiftNumBean("5", "x5"));
|
||||||
mGiftNumList.add(new GiftNumBean("1", "x1"));
|
mGiftNumList.add(new GiftNumBean("1", "x1"));
|
||||||
|
|
||||||
RetrofitClient.getInstance().getGiftList(0,"",new BaseObserver<List<RoonGiftModel>>() {
|
RetrofitClient.getInstance().getGiftList(100,"",new BaseObserver<List<RoonGiftModel>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@@ -147,6 +147,7 @@ public class GiftSongDialog extends BaseDialog<DialogGiftSongBinding> {
|
|||||||
giftList= roonGiftModels;
|
giftList= roonGiftModels;
|
||||||
roomAdapter = new GiftRoomAdapter(CommonAppContext.getInstance(), roonGiftModels, 0, "0");
|
roomAdapter = new GiftRoomAdapter(CommonAppContext.getInstance(), roonGiftModels, 0, "0");
|
||||||
mBinding.rvGift.setAdapter(roomAdapter);
|
mBinding.rvGift.setAdapter(roomAdapter);
|
||||||
|
roomAdapter.setNewData(roonGiftModels);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -847,11 +847,6 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
private void refreshCurrentGiftFragment(String id, int status, String type) {
|
private void refreshCurrentGiftFragment(String id, int status, String type) {
|
||||||
if (getCurrentGiftFragment() != null) {
|
if (getCurrentGiftFragment() != null) {
|
||||||
getCurrentGiftFragment().loadDataIfNeeded(id, status, type);
|
getCurrentGiftFragment().loadDataIfNeeded(id, status, type);
|
||||||
|
|
||||||
if (id.equals("1013")) {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
android:id="@+id/tv_gift_value"
|
android:id="@+id/tv_gift_value"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.3"
|
android:layout_weight="0.4"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
android:drawableLeft="@mipmap/jinb"
|
android:drawableLeft="@mipmap/jinb"
|
||||||
android:gravity="end|center_vertical"
|
android:gravity="end|center_vertical"
|
||||||
|
|||||||
Reference in New Issue
Block a user