Commit 7d6e37d4 by “leiyan”

1、修复bug:赛事数据显示不完整

parent 88a22f11
...@@ -6,8 +6,11 @@ import com.softgarden.baselibrary.network.NetworkTransformer ...@@ -6,8 +6,11 @@ import com.softgarden.baselibrary.network.NetworkTransformer
import com.softgarden.baselibrary.network.RxCallback import com.softgarden.baselibrary.network.RxCallback
import com.hupu.tv.player.app.api.RetrofitClient import com.hupu.tv.player.app.api.RetrofitClient
import com.hupu.tv.player.app.bean.MatchContentEntity import com.hupu.tv.player.app.bean.MatchContentEntity
import com.hupu.tv.player.app.bean.MatchInfoEntity
import com.hupu.tv.player.app.ui.contact.MatchContentFragmentContract import com.hupu.tv.player.app.ui.contact.MatchContentFragmentContract
import com.hupu.tv.player.app.utils.CommonUtils
import com.hupu.tv.player.app.utils.JsonUtils import com.hupu.tv.player.app.utils.JsonUtils
import kotlin.collections.HashMap
/** /**
* @author by Dell * @author by Dell
...@@ -31,6 +34,11 @@ class MatchContentPresenter : IBasePresenter, MatchContentFragmentContract.Prese ...@@ -31,6 +34,11 @@ class MatchContentPresenter : IBasePresenter, MatchContentFragmentContract.Prese
if (date.isNotEmpty()) { if (date.isNotEmpty()) {
hashMap["startDate"] = date hashMap["startDate"] = date
hashMap["endDate"] = date hashMap["endDate"] = date
} else {
if(2 == status || 3 == status){
hashMap["startDate"] = CommonUtils.time
hashMap["endDate"] = CommonUtils.time
}
} }
hashMap["pageNum"] = pageNum hashMap["pageNum"] = pageNum
hashMap["pageSize"] = pageSize hashMap["pageSize"] = pageSize
...@@ -40,7 +48,11 @@ class MatchContentPresenter : IBasePresenter, MatchContentFragmentContract.Prese ...@@ -40,7 +48,11 @@ class MatchContentPresenter : IBasePresenter, MatchContentFragmentContract.Prese
.subscribe(object : RxCallback<MatchContentEntity>() { .subscribe(object : RxCallback<MatchContentEntity>() {
override fun onSuccess(data: MatchContentEntity?) { override fun onSuccess(data: MatchContentEntity?) {
if (data?.matchLists?.size ?: 0 > 0) { if (data?.matchLists?.size ?: 0 > 0) {
mView?.onMatchList(data?.matchLists?.get(0)?.matchInfos) val matchInfos = mutableListOf<MatchInfoEntity>()
for (mactchList in data?.matchLists!!){
matchInfos.addAll(mactchList.matchInfos)
}
mView?.onMatchList(matchInfos)
} else { } else {
mView?.onMatchList(null) mView?.onMatchList(null)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment