无故事王国
2023-10-17 77041c81c325c0bc88c94dc28d732f656cc4c885
WanPai/Root/Search/VC/SearchStoreDetailVC.swift
@@ -21,7 +21,7 @@
    }
    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
@@ -57,9 +57,9 @@
            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)
@@ -72,15 +72,17 @@
        }
        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)
        }
    }
@@ -145,7 +147,7 @@
            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
@@ -157,8 +159,6 @@
                make.center.equalToSuperview()
            }
        }
        return footView
    }
}
@@ -166,7 +166,7 @@
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
        }