| | |
| | | } |
| | | |
| | | lazy private var tableView:UITableView = { |
| | | let table = UITableView(frame: .zero, style: .grouped) |
| | | let table = UITableView(frame: .zero, style: .grouped) |
| | | table.separatorStyle = .none |
| | | table.delegate = self |
| | | table.dataSource = self |
| | |
| | | if let model = data.data{ |
| | | self?.searchStoreDetailModel = model |
| | | |
| | | DispatchQueue.main.asyncAfter(deadline: .now()+1.5){ |
| | | self?.tableView.tableHeaderView?.height = 500 |
| | | } |
| | | // DispatchQueue.main.asyncAfter(deadline: .now()+1.5){ |
| | | // self?.tableView.tableHeaderView?.height = 500 |
| | | // } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | |
| | |
| | | } |
| | | |
| | | tableView.layoutIfNeeded() |
| | | // tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: UIDevice.jq_safeEdges.bottom, right: 0) |
| | | tableView.tableHeaderView = headView |
| | | } |
| | | |
| | | @objc func moreAction(btn:UIButton){ |
| | | let selectStore = NormalSimpleModel(id: searchStoreDetailModel!.storeId, name: searchStoreDetailModel!.storeName) |
| | | if btn.tag == 10{ |
| | | let vc = YardListVC() |
| | | let vc = YardListVC(selectStore: selectStore) |
| | | push(vc: vc) |
| | | }else{ |
| | | let vc = CourseListVC() |
| | | let vc = CourseListVC(selectStore: selectStore) |
| | | push(vc: vc) |
| | | } |
| | | } |
| | |
| | | let morebtn = QMUIButton(type: .custom) |
| | | morebtn.setTitle("查看更多", for: .normal) |
| | | morebtn.tag = 10+section |
| | | morebtn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium) |
| | | morebtn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold) |
| | | morebtn.setTitleColor(UIColor(hexStr: "#0048FF"), for: .normal) |
| | | morebtn.setImage(UIImage(named: "btn_more"), for: .normal) |
| | | morebtn.imagePosition = .right |
| | |
| | | make.center.equalToSuperview() |
| | | } |
| | | } |
| | | |
| | | |
| | | return footView |
| | | } |
| | | } |
| | |
| | | extension SearchStoreDetailVC:UITableViewDataSource{ |
| | | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| | | if section == 0{ |
| | | return searchStoreDetailModel?.venueList.count ?? 0 |
| | | return min(searchStoreDetailModel?.venueList.count ?? 0,3) |
| | | }else{ |
| | | return searchStoreDetailModel?.courseVoList.count ?? 0 |
| | | } |