[Modify]寻爱接口修改
This commit is contained in:
@@ -1792,7 +1792,7 @@ public class MessageView extends FrameLayout {
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_093), new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_094) + attachment.getBoxTypeStr() + ResUtil.getString(R.string.avroom_widget_messageview_095), new ForegroundColorSpan(greyColor))
|
||||
.append(ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(R.string.avroom_widget_messageview_095), new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getPrizeName(), new ForegroundColorSpan(Color.WHITE));
|
||||
if (attachment.getPrizeNum() > 1) {
|
||||
text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(roomTipColor));
|
||||
|
@@ -437,7 +437,7 @@ class RoomEffectBoxView @JvmOverloads constructor(
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append(
|
||||
ResUtil.getString(R.string.avroom_widget_roomeffectview_09) + attachment.boxTypeStr + ResUtil.getString(
|
||||
ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(
|
||||
R.string.avroom_widget_roomeffectview_010
|
||||
), ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
|
@@ -5076,5 +5076,6 @@
|
||||
<string name="treasure_warm_prompt">溫馨提示</string>
|
||||
<string name="treasure_diamond_balance_is_insufficient">鉆石餘額不足,請先充值吧~</string>
|
||||
<string name="treasure_to_charge">去充值</string>
|
||||
<string name="treasure_in_find_love">通過尋愛之旅</string>
|
||||
|
||||
</resources>
|
@@ -27,10 +27,11 @@ import com.yizhuan.erban.treasure_box.widget.dialog.BoxMoreDialog;
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.TreasureBoxDialog;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.utils.UserUtils;
|
||||
import com.yizhuan.treasure_box.bean.PrizeInfo;
|
||||
import com.yizhuan.treasure_box.bean.PrizeNewInfo;
|
||||
import com.yizhuan.treasure_box.model.BoxModel;
|
||||
import com.yizhuan.treasure_box.model.IBoxModel;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.exception.FailReasonException;
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager;
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent;
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel;
|
||||
@@ -51,10 +52,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@ActLayoutRes(R.layout.activity_treasure_box)
|
||||
public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBoxBinding> implements View.OnClickListener {
|
||||
private final Runnable removeRunnable = () -> mBinding.llPrizeHint.removeAllViews();
|
||||
private int price = 20;
|
||||
private volatile int keyNum;
|
||||
private ArrayList<PrizeInfo> cacheList = new ArrayList<>();
|
||||
private ArrayList<PrizeInfo> hintPrizeCacheList = new ArrayList<>();
|
||||
private ArrayList<PrizeNewInfo> cacheList = new ArrayList<>();
|
||||
private ArrayList<PrizeNewInfo> hintPrizeCacheList = new ArrayList<>();
|
||||
private ObjectAnimator translationXAnimator;
|
||||
private ObjectAnimator translationYAnimator;
|
||||
private int boxType = IBoxModel.BOX_TYPE_NORMAL;
|
||||
@@ -120,7 +119,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
.getKeyInfo(boxType)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(keyInfo -> {
|
||||
price = keyInfo.getKeyPrice();
|
||||
sendMessageSwitchLevel = keyInfo.getSendMessageSwitchLevel();
|
||||
});
|
||||
}
|
||||
@@ -155,50 +153,41 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查钥匙(锤子)数量
|
||||
*
|
||||
* @param count 想要使用的数量
|
||||
* @return true 表示数量不足,无法进行下一步操作
|
||||
* false 表示数量没问题,可以继续操作
|
||||
*/
|
||||
private boolean checkKeyNum(int count) {
|
||||
if (count == 0) {
|
||||
SingleToastUtil.showToast(ResUtil.getString(R.string.treasure_box_activity_treasureboxactivity_03));
|
||||
return true;
|
||||
}
|
||||
if (keyNum < count) {
|
||||
TreasureBoxDialog.newInstance().show(this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void openBox(int count) {
|
||||
if (checkKeyNum(count)) {
|
||||
if (count == 0) {
|
||||
SingleToastUtil.showToast(ResUtil.getString(R.string.treasure_box_activity_treasureboxactivity_03));
|
||||
return;
|
||||
}
|
||||
boolean sendMessage = (sendMessageSwitchLevel != 0 && UserUtils.getExpLevel() < sendMessageSwitchLevel) || DemoCache.readNeedBoxMsg();
|
||||
mBinding.ivOpen.setEnabled(false);
|
||||
mBinding.ivBoxOpen.startAnimation();
|
||||
long startTime = System.currentTimeMillis();
|
||||
// BoxModel.get().openBoxDraw(count, sendMessage)
|
||||
// .compose(bindToLifecycle())
|
||||
// .doOnError(throwable -> {
|
||||
// mBinding.ivOpen.setEnabled(true);
|
||||
// SingleToastUtil.showToast(throwable.getMessage());
|
||||
// })
|
||||
// .toObservable()
|
||||
// .delay(startTime - System.currentTimeMillis() + 300, TimeUnit.MILLISECONDS)
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .flatMap(openBoxResult -> {
|
||||
// mBinding.ivOpen.setEnabled(true);
|
||||
// cacheList.addAll(openBoxResult.getPrizeItemList());
|
||||
// return Observable.fromIterable(openBoxResult.getPrizeItemList());
|
||||
// })
|
||||
// .filter(prizeInfo -> prizeInfo.getPrizeLevel() > 2)
|
||||
// .subscribe(prizeInfo -> hintPrizeCacheList.add(prizeInfo));
|
||||
BoxModel.get().openBoxDraw(count, sendMessage)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError(throwable -> {
|
||||
mBinding.ivOpen.setEnabled(true);
|
||||
if (throwable instanceof FailReasonException) {
|
||||
FailReasonException failReasonException = (FailReasonException) throwable;
|
||||
if(failReasonException.getCode() == BoxModel.ERROR_CODE_DIAMOND){
|
||||
TreasureBoxDialog.newInstance().show(this);
|
||||
}else {
|
||||
SingleToastUtil.showToast(throwable.getMessage());
|
||||
}
|
||||
} else {
|
||||
SingleToastUtil.showToast(throwable.getMessage());
|
||||
}
|
||||
})
|
||||
.toObservable()
|
||||
.delay(startTime - System.currentTimeMillis() + 300, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.flatMap(openBoxResult -> {
|
||||
mBinding.ivOpen.setEnabled(true);
|
||||
cacheList.addAll(openBoxResult);
|
||||
return Observable.fromIterable(openBoxResult);
|
||||
})
|
||||
.filter(prizeInfo -> prizeInfo.getLevel() > 2)
|
||||
.subscribe(prizeInfo -> hintPrizeCacheList.add(prizeInfo));
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -208,8 +197,8 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.filter(aLong -> cacheList.size() > 0)
|
||||
.subscribe(aLong -> {
|
||||
PrizeInfo prizeInfo = cacheList.get(0);
|
||||
String url = prizeInfo.getPrizeImgUrl();
|
||||
PrizeNewInfo prizeInfo = cacheList.get(0);
|
||||
String url = prizeInfo.getPicUrl();
|
||||
if (cacheList.size() > 0) cacheList.remove(0);
|
||||
if (!TextUtils.isEmpty(url)) {
|
||||
if (translationXAnimator != null) translationXAnimator.start();
|
||||
@@ -233,7 +222,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
, e -> looperHintPrize());//出错了继续looper......
|
||||
}
|
||||
|
||||
private void addPrizeHintView(PrizeInfo prizeInfo) {
|
||||
private void addPrizeHintView(PrizeNewInfo prizeInfo) {
|
||||
mBinding.llPrizeHint.removeCallbacks(removeRunnable);
|
||||
mBinding.llPrizeHint.postDelayed(removeRunnable, 3000);
|
||||
LinearLayout linearLayout = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.item_box_prize_hint, null);
|
||||
@@ -251,8 +240,8 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
.start();
|
||||
}
|
||||
|
||||
((TextView) linearLayout.findViewById(R.id.tv_prize_name)).setText(prizeInfo.getPrizeName());
|
||||
((TextView) linearLayout.findViewById(R.id.tv_prize_num)).setText("x" + prizeInfo.getPrizeNum());
|
||||
((TextView) linearLayout.findViewById(R.id.tv_prize_name)).setText(prizeInfo.getRewardName());
|
||||
((TextView) linearLayout.findViewById(R.id.tv_prize_num)).setText("x" + prizeInfo.getNum());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -13,7 +13,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadKt;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
|
||||
/**
|
||||
* @author jack
|
||||
@@ -21,7 +21,7 @@ import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
* @Date 2018/4/16
|
||||
*/
|
||||
|
||||
public class BoxRankingListAdapter extends BaseQuickAdapter<BoxRankingInfo.RankVosBean, BaseViewHolder> {
|
||||
public class BoxRankingListAdapter extends BaseQuickAdapter<TreasureRankingInfo, BaseViewHolder> {
|
||||
|
||||
private final Context mContext;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BoxRankingListAdapter extends BaseQuickAdapter<BoxRankingInfo.RankV
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder baseViewHolder, final BoxRankingInfo.RankVosBean rankVosBeans) {
|
||||
protected void convert(@NonNull BaseViewHolder baseViewHolder, final TreasureRankingInfo rankVosBeans) {
|
||||
if (rankVosBeans == null) return;
|
||||
|
||||
baseViewHolder.setText(R.id.tv_userName, rankVosBeans.getNick()).setText(R.id.tv_amount, rankVosBeans.getAmount() + "");
|
||||
|
@@ -18,6 +18,7 @@ import com.yizhuan.erban.ui.user.activity.UserInfoActivity;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.recyclerview.decoration.HorizontalDecoration;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
@@ -26,6 +27,8 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 房间内私聊用的好友列表界面
|
||||
*
|
||||
@@ -109,17 +112,17 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
|
||||
|
||||
@Override
|
||||
public void getBoxRankingSuccess(BoxRankingInfo rankingInfo) {
|
||||
public void getBoxRankingSuccess(List<TreasureRankingInfo> rankingInfo) {
|
||||
hideStatus();
|
||||
if (mAdapter != null) {
|
||||
int page = getMvpPresenter().getPage();
|
||||
if (page <= 1) {
|
||||
swipeRefresh.setRefreshing(false);
|
||||
|
||||
if (rankingInfo.getRankVos() == null || rankingInfo.getRankVos().size() == 0) {
|
||||
if (rankingInfo == null || rankingInfo.size() == 0) {
|
||||
showNoData(getString(R.string.empty_data));
|
||||
} else {
|
||||
mAdapter.setNewData(rankingInfo.getRankVos());
|
||||
mAdapter.setNewData(rankingInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,12 +139,12 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBoxRankingLoadMoreSuccess(BoxRankingInfo rankingInfo) {
|
||||
if (ListUtils.isListEmpty(rankingInfo.getRankVos())) {
|
||||
public void getBoxRankingLoadMoreSuccess(List<TreasureRankingInfo> rankingInfo) {
|
||||
if (ListUtils.isListEmpty(rankingInfo)) {
|
||||
mAdapter.loadMoreEnd();
|
||||
return;
|
||||
}
|
||||
mAdapter.addData(rankingInfo.getRankVos());
|
||||
mAdapter.addData(rankingInfo);
|
||||
mAdapter.loadMoreComplete();
|
||||
}
|
||||
|
||||
|
@@ -3,10 +3,12 @@ package com.yizhuan.erban.treasure_box.module;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.community.CommunityConstant;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
@@ -15,7 +17,7 @@ public class BoxRankingModel {
|
||||
|
||||
private final Api api = RxNet.create(Api.class);
|
||||
|
||||
public Single<BoxRankingInfo> getBoxRankingList(int datetype,int page,int pageSize) {
|
||||
public Single<List<TreasureRankingInfo>> getBoxRankingList(int datetype,int page,int pageSize) {
|
||||
return api.apiNewbieList(String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
CommunityConstant.VERSION_VALID_TYPE,
|
||||
AuthModel.get().getTicket(),
|
||||
@@ -44,7 +46,7 @@ public class BoxRankingModel {
|
||||
* @return -
|
||||
*/
|
||||
@GET("/findLove/rank")
|
||||
Single<ServiceResult<BoxRankingInfo>> apiNewbieList(
|
||||
Single<ServiceResult<List<TreasureRankingInfo>>> apiNewbieList(
|
||||
@Query("uid") String uid,
|
||||
@Query("types") String types,
|
||||
@Query("ticket") String ticket,
|
||||
|
@@ -1,12 +1,14 @@
|
||||
package com.yizhuan.erban.treasure_box.module;
|
||||
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IBoxRankingView extends IMvpBaseView {
|
||||
void getBoxRankingSuccess(BoxRankingInfo list);
|
||||
void getBoxRankingSuccess(List<TreasureRankingInfo> list);
|
||||
void getBoxRankingFails(String error);
|
||||
void getBoxRankingLoadMoreSuccess(BoxRankingInfo list);
|
||||
void getBoxRankingLoadMoreSuccess(List<TreasureRankingInfo> list);
|
||||
void getBoxRankingLoadMoreFails(String error);
|
||||
|
||||
}
|
||||
|
@@ -6,8 +6,11 @@ import com.yizhuan.erban.treasure_box.module.BoxRankingModel;
|
||||
import com.yizhuan.erban.treasure_box.module.IBoxRankingView;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.yizhuan.xchat_android_core.room.treasure_box.bean.TreasureRankingInfo;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
@@ -23,14 +26,14 @@ public class BoxRankingPresenter extends BaseMvpPresenter<IBoxRankingView> {
|
||||
}
|
||||
|
||||
BoxRankingModel.get().getBoxRankingList(datetype,page, Constants.PAGE_SIZE)
|
||||
.compose(bindToLifecycle()).subscribe(new SingleObserver<BoxRankingInfo>() {
|
||||
.compose(bindToLifecycle()).subscribe(new SingleObserver<List<TreasureRankingInfo>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(BoxRankingInfo roomNewbieInfos) {
|
||||
public void onSuccess(List<TreasureRankingInfo> roomNewbieInfos) {
|
||||
if (roomNewbieInfos != null) {
|
||||
if (mMvpView != null) {
|
||||
if (isRefresh){
|
||||
|
@@ -39,32 +39,6 @@
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_box_meteor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="44dp"
|
||||
android:src="@drawable/treasure_box_meteor"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-6dp"
|
||||
android:background="@drawable/bg_1affff_r8"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_box_meteor"
|
||||
tools:text="200" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
|
@@ -0,0 +1,12 @@
|
||||
package com.yizhuan.xchat_android_core.room.treasure_box.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class TreasureRankingInfo(
|
||||
val uid: Int = 0,
|
||||
val erbanNo: Int = 0,
|
||||
val nick: String = "",
|
||||
val avatar: String = "",
|
||||
val amount: Int = 0,
|
||||
val ranking: Int = 0
|
||||
): Serializable
|
@@ -17,6 +17,15 @@ public class PrizeNewInfo implements Serializable {
|
||||
private String picUrl;
|
||||
private int diamonds;
|
||||
private int num;
|
||||
private int level;
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getRewardId() {
|
||||
return rewardId;
|
||||
|
@@ -5,10 +5,10 @@ import com.yizhuan.treasure_box.bean.ConfigImgUrl;
|
||||
import com.yizhuan.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.yizhuan.treasure_box.bean.HonourKeyInfo;
|
||||
import com.yizhuan.treasure_box.bean.KeyInfo;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxDrawResult;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxHonourResult;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxResult;
|
||||
import com.yizhuan.treasure_box.bean.PrizeInfo;
|
||||
import com.yizhuan.treasure_box.bean.PrizeNewInfo;
|
||||
import com.yizhuan.xchat_android_core.R;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.base.BaseModel;
|
||||
@@ -34,9 +34,9 @@ import retrofit2.http.Query;
|
||||
public class BoxModel extends BaseModel implements IBoxModel {
|
||||
|
||||
/**
|
||||
* 锤子数(钥匙数)不足
|
||||
* 钻石不足
|
||||
*/
|
||||
public static final int ERROR_CODE_KEY_NUM_NOT_ENOUGH = 10000;
|
||||
public static final int ERROR_CODE_DIAMOND = 31005;
|
||||
|
||||
private Api api;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class BoxModel extends BaseModel implements IBoxModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<OpenBoxDrawResult> openBoxDraw(int keyNum, boolean sendMessage) {
|
||||
public Single<List<PrizeNewInfo>> openBoxDraw(int keyNum, boolean sendMessage) {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null) {
|
||||
return Single.error(new Throwable(ResUtil.getString(R.string.treasure_box_model_boxmodel_01)));
|
||||
}
|
||||
@@ -209,7 +209,7 @@ public class BoxModel extends BaseModel implements IBoxModel {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/findLove/draw")
|
||||
Single<ServiceResult<OpenBoxDrawResult>> openBoxDraw(@Field("num") int num,
|
||||
Single<ServiceResult<List<PrizeNewInfo>>> openBoxDraw(@Field("num") int num,
|
||||
@Field("sendMessage") boolean sendMessage,
|
||||
@Field("roomUid") long roomUid);
|
||||
|
||||
|
@@ -5,10 +5,10 @@ import com.yizhuan.treasure_box.bean.ConfigImgUrl;
|
||||
import com.yizhuan.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.yizhuan.treasure_box.bean.HonourKeyInfo;
|
||||
import com.yizhuan.treasure_box.bean.KeyInfo;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxDrawResult;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxHonourResult;
|
||||
import com.yizhuan.treasure_box.bean.OpenBoxResult;
|
||||
import com.yizhuan.treasure_box.bean.PrizeInfo;
|
||||
import com.yizhuan.treasure_box.bean.PrizeNewInfo;
|
||||
import com.yizhuan.xchat_android_core.base.IModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface IBoxModel extends IModel {
|
||||
* @param sendMessage
|
||||
* @return
|
||||
*/
|
||||
Single<OpenBoxDrawResult> openBoxDraw(int keyNum, boolean sendMessage);
|
||||
Single<List<PrizeNewInfo>> openBoxDraw(int keyNum, boolean sendMessage);
|
||||
|
||||
/**
|
||||
* 开箱子
|
||||
|
Reference in New Issue
Block a user