Commit 023472a1 authored by pete谢兆麟's avatar pete谢兆麟

重置功能 数据重置

parent e6c2530c
...@@ -430,6 +430,9 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -430,6 +430,9 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
self.endTime = end self.endTime = end
if one == 100, two == 100 , start == "", end == "" { if one == 100, two == 100 , start == "", end == "" {
recommendButton.isSelected = false recommendButton.isSelected = false
viewModel.startTime = ""
viewModel.endTime = ""
viewModel.state = two
} else { } else {
recommendButton.isSelected = true recommendButton.isSelected = true
if one == 0 { if one == 0 {
...@@ -449,12 +452,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -449,12 +452,12 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
viewModel.endTime = "" viewModel.endTime = ""
} }
viewModel.state = two viewModel.state = two
}
self.page = 1 self.page = 1
//请求刷新数据 //请求刷新数据
self.tableView.es.resetNoMoreData() self.tableView.es.resetNoMoreData()
self.viewModel.postRecord(page: 1) {[weak self] success, error in self.viewModel.postRecord(page: 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
// self.tableView.es.stopLoadingMore()
if self.viewModel.recordModel.page_count == 1 { if self.viewModel.recordModel.page_count == 1 {
self.tableView.es.noticeNoMoreData() self.tableView.es.noticeNoMoreData()
self.tableView.footer?.alpha = 1 self.tableView.footer?.alpha = 1
...@@ -468,7 +471,6 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell { ...@@ -468,7 +471,6 @@ class YHInvitationWithGiftsSecondTableViewCell: UITableViewCell {
} }
} }
} }
}
func getCurrentDate() -> String { func getCurrentDate() -> String {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
......
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