Merge branch 'fix/GHZS-2641' into 'dev-5.28.0'

fix: 游戏单功能优化-游戏单广场—0606测试(修复筛选游戏单标签时请求接口缺少参数的问题) https://jira.shanqu.cc/browse/GHZS-2641

See merge request halo/android/assistant-android!1137
This commit is contained in:
叶子维
2023-06-16 16:57:54 +08:00

View File

@ -48,27 +48,23 @@ class GameCollectionSquareViewModel(application: Application) :
}
override fun provideDataSingle(page: Int): Single<MutableList<GamesCollectionEntity>> {
val paramsMap = if (view == "recommend") {
if (refreshCount == 0 && page == 1) {
if (selectedTagId.isNotEmpty()) {
mapOf("refresh" to "true", "tag_id" to selectedTagId, "random" to mRandomId)
} else {
mapOf("refresh" to "true", "random" to mRandomId)
}
} else {
mapOf("random" to mRandomId)
}
} else if (selectedTagId.isNotEmpty()) {
mapOf("tag_id" to selectedTagId)
val paramsMap = if (selectedTagId.isNotEmpty()) {
mutableMapOf("tag_id" to selectedTagId)
} else {
mapOf()
mutableMapOf()
}
if (view == "recommend") {
paramsMap["random"] = mRandomId
if (refreshCount == 0 && page == 1) {
paramsMap["refresh"] = "true"
}
}
return RetrofitManager.getInstance()
.api.getGameCollectionSquareList(
view,
page,
PAGE_SIZE,
paramsMap
paramsMap.toMap()
)
}