feat:完成房间-游戏切换入口调整需求

This commit is contained in:
max
2024-06-03 19:00:13 +08:00
parent 6de2f68106
commit b25276875b
23 changed files with 440 additions and 254 deletions

View File

@@ -20,24 +20,37 @@ object GameModel : BaseModel() {
.compose(RxHelper.handleSchAndExce())
}
fun getGameList(): Single<List<GameInfo>> {
return api.getGameList()
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchAndExce())
fun getGameList(roomUid: Long?): Single<List<GameInfo>> {
if (roomUid == null) {
return api.getGameList()
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchAndExce())
} else {
return api.getGameList(roomUid)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchAndExce())
}
}
private interface Api {
/**
*
*
* @param uid
* @return
*/
@POST("/miniGame/record/miniGameList")
fun getGameList(
): Single<ServiceResult<List<GameInfo>>>
/**
* @param uid
* @return
*/
@FormUrlEncoded
@POST("/miniGame/record/miniGameList")
fun getGameList(
@Field("roomUid") uid: Long
): Single<ServiceResult<List<GameInfo>>>
/**
*
*