Commit 19dcce4b authored by yinjiacheng's avatar yinjiacheng

fix 商品列表上拉加载更多数据重复

parent a79f74c3
...@@ -67,8 +67,7 @@ class CommodityListViewModel : BaseViewModel(), IGetCommodityManagementListCallb ...@@ -67,8 +67,7 @@ class CommodityListViewModel : BaseViewModel(), IGetCommodityManagementListCallb
} }
override fun getCommodityListSuccess(result: CommodityManagementListDto?) { override fun getCommodityListSuccess(result: CommodityManagementListDto?) {
// lastId为-1时即没有下一页数据 此时不记录 lastId = result?.lastId
result?.lastId?.let { if (it != "-1") lastId = it }
// 通知下拉刷新或上拉加载更多完成 // 通知下拉刷新或上拉加载更多完成
when (loadType) { when (loadType) {
LoadType.REFRESH -> refreshFinish.value = result?.goodsList LoadType.REFRESH -> refreshFinish.value = result?.goodsList
......
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