Commit b50e43df authored by David黄金龙's avatar David黄金龙

兼容处理首页 total不一致的bug

parent f9a8b0dc
......@@ -85,6 +85,7 @@ extension YHHomePageViewModel {
self.arrHomeNewsData?.append(contentsOf: result.data)
}
if result.data.count >= page_Size {
if let count = self.arrHomeNewsData?.count {
if count >= self.totalCount {
self.hasMoreForHomeNews = false
......@@ -92,6 +93,9 @@ extension YHHomePageViewModel {
self.hasMoreForHomeNews = true
}
}
} else {
self.hasMoreForHomeNews = false
}
callBackBlock(true, nil)
} else {
......
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