Commit b0628d1d authored by pete谢兆麟's avatar pete谢兆麟

首页配置修改

parent ed75665a
......@@ -84,7 +84,6 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
}
if item.id == 2 {
let vc = YHHomeIdentityViewController()
vc.hideFlag = true
arrItemVCs.append(vc)
}
if item.id == 3 {
......
......@@ -13,11 +13,6 @@ class YHHomeIdentityViewController: YHBaseViewController {
var subTabArr:[YHHomeLifeCategoryModel] = []
var sectionView: YHSelectLookView!
var tableView: UITableView!
var headView: YHSelectLookHeadView!
var hideFlag: Bool = true
lazy var viewModel: YHHomePageViewModel = {
let vm = YHHomePageViewModel()
return vm
......@@ -83,48 +78,6 @@ class YHHomeIdentityViewController: YHBaseViewController {
make.left.right.top.bottom.equalToSuperview()
}
scrollView.isHidden = hideFlag
subTabBar.isHidden = hideFlag
sectionView = {
let view = YHSelectLookView()
view.block = {[weak self] itemIndex in
guard let self = self else { return }
}
return view
}()
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
headView = {
let head = YHSelectLookHeadView()
head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 46)
return head
}()
tableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.dataSource = self
tableView.delegate = self
tableView.tableHeaderView = sectionView
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.01))
tableView.register(cellWithClass: YHSelectLookTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.left.right.bottom.equalToSuperview()
}
tableView.isHidden = !hideFlag
// tableView.es.addYHPullToRefresh {
// self.loadData()
// }
}
override func viewWillDisappear(_ animated: Bool) {
......@@ -140,42 +93,6 @@ class YHHomeIdentityViewController: YHBaseViewController {
}
}
extension YHHomeIdentityViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 10
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSelectLookTableViewCell.self)
// cell.dataSource = self.viewModel.detailModel.products[indexPath.row]
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 46
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return headView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
extension YHHomeIdentityViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
......
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