Commit 575a7515 authored by David黄金龙's avatar David黄金龙

首页刷新逻辑

parent 81cdfdc4
...@@ -70,6 +70,7 @@ extension YHHomePageViewModel { ...@@ -70,6 +70,7 @@ extension YHHomePageViewModel {
return return
} }
for item in result.data { for item in result.data {
item.calHeightParam() item.calHeightParam()
} }
...@@ -77,7 +78,9 @@ extension YHHomePageViewModel { ...@@ -77,7 +78,9 @@ extension YHHomePageViewModel {
if firstPageFlag { if firstPageFlag {
self.totalCount = result.total self.totalCount = result.total
self.arrHomeNewsData = result.data self.arrHomeNewsData = result.data
curPageIndex = 1
} else { } else {
curPageIndex = curPageIndex + 1
self.arrHomeNewsData?.append(contentsOf: result.data) self.arrHomeNewsData?.append(contentsOf: result.data)
} }
......
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