新增创建房间弹窗
This commit is contained in:
@@ -18,10 +18,12 @@ import lombok.ToString;
|
||||
@Data
|
||||
@ToString
|
||||
public class RoomInfo implements Parcelable,Serializable {
|
||||
public static final int ROOMTYPE_DEFAULT = -1;//使用服务器的房间类型
|
||||
public static final int ROOMTYPE_AUCTION = 1;//竞拍房间
|
||||
public static final int ROOMTYPE_LIGHT_CHAT = 2;//轻聊房
|
||||
public static final int ROOMTYPE_HOME_PARTY = 3;//轰趴房
|
||||
public static final int ROOMTYPE_CP = 5;//陪伴房
|
||||
public static final int ROOMTYPE_GAME = 7;//游戏房
|
||||
|
||||
public static final String DATING_STATE_FLOW = "1";//嘉宾交流
|
||||
public static final String DATING_STATE_SELECT = "2";//心动选人
|
||||
@@ -184,6 +186,9 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
*/
|
||||
private String audioSdkType;
|
||||
|
||||
private boolean isReselect;
|
||||
|
||||
private long gameId;
|
||||
// /**
|
||||
// * 房间角标
|
||||
// */
|
||||
|
@@ -0,0 +1,11 @@
|
||||
package com.yizhuan.xchat_android_core.room.game
|
||||
|
||||
data class GameInfo(
|
||||
val isShow: Boolean = false,
|
||||
val mgId: String = "",
|
||||
val name: String = "",
|
||||
val pic: String = "",
|
||||
val remark: String = "",
|
||||
val seq: Int = 0,
|
||||
var isSelect: Boolean = false
|
||||
)
|
@@ -22,6 +22,12 @@ object GameModel : BaseModel() {
|
||||
.compose(RxHelper.handleSchAndExce())
|
||||
}
|
||||
|
||||
fun getGameList(): Single<List<GameInfo>> {
|
||||
return api.getGameList()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchAndExce())
|
||||
}
|
||||
|
||||
suspend fun getHomeBanner(type: String): List<BannerInfo>? =
|
||||
launchRequest {
|
||||
api.apiHomeBanner(
|
||||
@@ -35,6 +41,16 @@ object GameModel : BaseModel() {
|
||||
|
||||
private interface Api {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@POST("/miniGame/record/miniGameList")
|
||||
fun getGameList(
|
||||
): Single<ServiceResult<List<GameInfo>>>
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -47,6 +63,7 @@ object GameModel : BaseModel() {
|
||||
@Field("uid") uid: Long
|
||||
): Single<ServiceResult<GameCodeInfo>>
|
||||
|
||||
|
||||
/**
|
||||
* 首页Banner
|
||||
*
|
||||
|
@@ -503,7 +503,7 @@ public class AvRoomModel extends RoomBaseModel implements IAvRoomModel {
|
||||
@Override
|
||||
public Single<RoomResult> requestRoomResult(String uid, int pageType) {
|
||||
return mRoomService.getRoomInfo(uid, AuthModel.get().getCurrentUid())
|
||||
.timeout(10, TimeUnit.SECONDS)
|
||||
.timeout(60, TimeUnit.SECONDS)
|
||||
.compose(RxHelper.handleSchAndExce())
|
||||
.doOnSuccess(roomResult -> {
|
||||
if (roomResult != null && roomResult.isSuccess() && roomResult.getData() != null) {
|
||||
|
@@ -720,7 +720,7 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
||||
*/
|
||||
@Override
|
||||
public Single<RoomResult> openRoom(long uid, int type, String title, String roomDesc,
|
||||
String backPic, String rewardId) {
|
||||
String backPic, String rewardId,long gameId) {
|
||||
if (TextUtils.isEmpty(title)) {
|
||||
return UserModel.get().getUserInfo(uid)
|
||||
.flatMap(new Function<UserInfo, SingleSource<RoomResult>>() {
|
||||
|
@@ -75,9 +75,21 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
* @param label 标签名字
|
||||
* @param tagId 标签id
|
||||
*/
|
||||
public Single<RoomInfo> updateRoomInfo(String title, String desc, String introduction, String pwd, String label,
|
||||
int tagId, long uid, String ticket, boolean hasEffect, int audio, String limitType, boolean isPureMode) {
|
||||
return mRoomSettingService.updateRoomInfo(title, desc, introduction, pwd, label, tagId, uid, hasEffect, audio, limitType, isPureMode)
|
||||
public Single<RoomInfo> updateRoomInfo(String title,
|
||||
String desc,
|
||||
String introduction,
|
||||
String pwd,
|
||||
String label,
|
||||
int tagId,
|
||||
long uid,
|
||||
String ticket,
|
||||
boolean hasEffect,
|
||||
int audio,
|
||||
String limitType,
|
||||
boolean isPureMode,
|
||||
int type,
|
||||
long gameId) {
|
||||
return mRoomSettingService.updateRoomInfo(title, desc, introduction, pwd, label, tagId, uid, hasEffect, audio, limitType, isPureMode, type, gameId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
.onErrorResumeNext(this.<RoomInfo>getSingleCommonExceptionFunction())
|
||||
@@ -124,13 +136,13 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
public Single<RoomInfo> updateRoomPureMode(long roomUid, String title, String desc,
|
||||
String introduction, String pwd, String label,
|
||||
int tagId, boolean hasEffect, int audio, boolean isPureMode) {
|
||||
return mRoomSettingService.updateRoomPureMode(roomUid, title, desc, introduction, pwd, label,
|
||||
tagId, AuthModel.get().getCurrentUid(), hasEffect, audio, isPureMode)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
.onErrorResumeNext(this.<RoomInfo>getSingleCommonExceptionFunction())
|
||||
.flatMap(this.<RoomInfo>getSingleFunction())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
return mRoomSettingService.updateRoomPureMode(roomUid, title, desc, introduction, pwd, label,
|
||||
tagId, AuthModel.get().getCurrentUid(), hasEffect, audio, isPureMode)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
.onErrorResumeNext(this.<RoomInfo>getSingleCommonExceptionFunction())
|
||||
.flatMap(this.<RoomInfo>getSingleFunction())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +178,6 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param roomUid 房主uid
|
||||
*/
|
||||
public Single<String> leaveModeOpen(long roomUid) {
|
||||
@@ -183,7 +194,6 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param roomUid 房主uid
|
||||
*/
|
||||
public Single<String> leaveModeClose(long roomUid) {
|
||||
@@ -203,7 +213,8 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
|
||||
/**
|
||||
* 请求所有的标签列表数据
|
||||
*4.18更改接口,传房间uid
|
||||
* 4.18更改接口,传房间uid
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@@ -230,7 +241,9 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
@Field("hasAnimationEffect") boolean hasAnimationEffect,
|
||||
@Field("audioQuality") int audioQuality,
|
||||
@Field("limitType") String limitType,
|
||||
@Field("isPureMode") boolean isPureMode);
|
||||
@Field("isPureMode") boolean isPureMode,
|
||||
@Field("type") int type,
|
||||
@Field("mgId") long gameId);
|
||||
|
||||
/**
|
||||
* 更新房间设置信息
|
||||
|
@@ -170,7 +170,7 @@ public interface IRoomBaseModel extends IModel {
|
||||
* rewardId:当type为2时,必填如rewardId
|
||||
*/
|
||||
Single<RoomResult> openRoom(long uid, int type, String title, String roomDesc,
|
||||
String backPic, String rewardId);
|
||||
String backPic, String rewardId, long gameId);
|
||||
|
||||
/**
|
||||
*关闭公屏
|
||||
|
Reference in New Issue
Block a user