新增资源位相关逻辑
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.home.bean
|
||||
|
||||
data class ResourceInfo(
|
||||
val icon: String? = null,
|
||||
val id: Int = 0,
|
||||
val posSeq: Int? = null,
|
||||
val resourceContent: String? = null,
|
||||
val resourceType: Int? = null,
|
||||
val strategySeq: Int? = null
|
||||
)
|
@@ -99,6 +99,16 @@ object HomeModel : BaseModel() {
|
||||
api.getHotRoom()
|
||||
}
|
||||
|
||||
suspend fun getHomeResource(): List<ResourceInfo>? =
|
||||
launchRequest {
|
||||
api.getHomeResource()
|
||||
}
|
||||
|
||||
suspend fun getResourceJumpInfo(id: Int): List<ResourceInfo>? =
|
||||
launchRequest {
|
||||
api.getResourceJumpInfo(id)
|
||||
}
|
||||
|
||||
suspend fun getCommonRoom(tabId: Int, pageNum: Int, pageSize: Int): List<HomeRoomInfo>? =
|
||||
launchRequest {
|
||||
api.getCommonRoom(tabId, pageNum, pageSize)
|
||||
@@ -186,6 +196,22 @@ object HomeModel : BaseModel() {
|
||||
@GET("/home/hotRoom")
|
||||
suspend fun getHotRoom(): ServiceResult<List<HomeRoomInfo>>
|
||||
|
||||
/**
|
||||
* 首页资源位
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/home/currentResource")
|
||||
suspend fun getHomeResource(): ServiceResult<List<ResourceInfo>>
|
||||
|
||||
/**
|
||||
* 首页资源位跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/home/pickResource")
|
||||
suspend fun getResourceJumpInfo(@Query("id") id: Int): ServiceResult<List<ResourceInfo>>
|
||||
|
||||
/**
|
||||
* 首页热门房间
|
||||
*
|
||||
|
Reference in New Issue
Block a user