[Modify]首页逻辑调整

This commit is contained in:
wushaocheng
2023-09-14 15:56:38 +08:00
parent d99ef80d2e
commit aeb47da0ee
9 changed files with 213 additions and 74 deletions

View File

@@ -0,0 +1,13 @@
package com.yizhuan.xchat_android_core.home.bean
import lombok.Data
@Data
data class CurrentResourceInfo(
val icon: String = "",
val id: Int = 0,
val posSeq: Int = 0,
val resourceContent: String = "",
val resourceType: Int = 0,
val strategySeq: Int = 0
)

View File

@@ -3,6 +3,7 @@ package com.yizhuan.xchat_android_core.home.model
import com.yizhuan.xchat_android_core.R
import com.yizhuan.xchat_android_core.auth.AuthModel
import com.yizhuan.xchat_android_core.base.BaseModel
import com.yizhuan.xchat_android_core.bean.response.ListResult
import com.yizhuan.xchat_android_core.bean.response.ServiceResult
import com.yizhuan.xchat_android_core.community.CommunityConstant
import com.yizhuan.xchat_android_core.community.bean.UnReadCountInfo
@@ -115,6 +116,12 @@ object HomeModel : BaseModel() {
)
}
//首页改版资源位
suspend fun getCurrentResource(): List<CurrentResourceInfo>? =
launchRequest {
api.getCurrentResource()
}
suspend fun getDiamondGiveHistory(page: Int, pageSize: Int): List<DiamondGiveHistoryInfo>? =
launchRequest {
api.getRecord(page, pageSize)
@@ -155,6 +162,11 @@ object HomeModel : BaseModel() {
api.getResourceJumpInfo(id)
}
suspend fun getHomeChatPick(): String? =
launchRequest {
api.getHomeChatPick()
}
suspend fun getCommonRoom(tabId: Int, pageNum: Int, pageSize: Int): List<HomeRoomInfo>? =
launchRequest {
api.getCommonRoom(tabId, pageNum, pageSize)
@@ -305,6 +317,14 @@ object HomeModel : BaseModel() {
@Query("ticket") ticket: String
): ServiceResult<List<BannerInfo>>
/**
* 首页改版资源位
*
* @return
*/
@GET("/home/currentResource")
suspend fun getCurrentResource(): ServiceResult<List<CurrentResourceInfo>>
/**
* 首页热门房间
*
@@ -329,6 +349,14 @@ object HomeModel : BaseModel() {
@GET("/home/pickResource")
suspend fun getResourceJumpInfo(@Query("id") id: Int): ServiceResult<HomeRoomInfo>
/**
* 首页资源位跳转
*
* @return
*/
@GET("home/chat/pick")
suspend fun getHomeChatPick(): ServiceResult<String>
/**
* 首页热门房间
*