Commit 75421c06 authored by pete谢兆麟's avatar pete谢兆麟

首页甄选优化

parent bd0cb80d
......@@ -91,8 +91,7 @@ extension YHSelectViewController {
self.viewModel.getGoodsList(categoryID: model.id, sortType: buttonItem) {[weak self] success, error in
guard let self = self else { return }
self.tableView.reloadData {
self.tableView.contentOffset = CGPoint(x: 0, y: 92)
self.sectionView.isHidden = false
self.tableView.setContentOffset(CGPoint(x: 0, y: 92), animated: true)
}
if self.viewModel.goodsArray.count == 0 {
noDataView.isHidden = false
......@@ -119,14 +118,12 @@ extension YHSelectViewController {
let head = YHSelectLookHeadView()
head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 66)
head.block = { index in
self.sectionView.isHidden = true
self.selectItem = index
self.buttonItem = 0
self.updataData()
}
head.buttonBlock = { index in
self.buttonItem = index
self.sectionView.isHidden = true
self.updataData()
}
return head
......@@ -142,7 +139,7 @@ extension YHSelectViewController {
tableView.dataSource = self
tableView.delegate = self
tableView.tableHeaderView = sectionView
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.01))
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight/3))
tableView.register(cellWithClass: YHSelectLookTableViewCell.self)
return tableView
}()
......
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