//
|
// ActivityListVC.swift
|
// WanPai
|
//
|
// Created by 杨锴 on 2023/6/13.
|
//
|
|
import UIKit
|
import QMUIKit
|
|
class ActivityListVC: BaseVC {
|
@IBOutlet weak var view_top: UIView!
|
@IBOutlet weak var tf_search: QMUITextField!
|
@IBOutlet weak var btn_holdCity: QMUIButton!
|
@IBOutlet weak var btn_joinCondition: QMUIButton!
|
@IBOutlet weak var btn_hotFilter: QMUIButton!
|
@IBOutlet weak var tableView: UITableView!
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "赛事活动列表"
|
}
|
|
override func setUI() {
|
tableView.delegate = self
|
tableView.dataSource = self
|
tableView.register(UINib(nibName: "ActivityInfoTCell", bundle: nil), forCellReuseIdentifier: "_ActivityInfoTCell")
|
|
btn_holdCity.imagePosition = .right
|
btn_holdCity.spacingBetweenImageAndTitle = 5
|
|
btn_joinCondition.imagePosition = .right
|
btn_joinCondition.spacingBetweenImageAndTitle = 5
|
|
btn_hotFilter.imagePosition = .right
|
btn_hotFilter.spacingBetweenImageAndTitle = 5
|
}
|
|
@IBAction func searchAction(_ sender: Any) {
|
|
}
|
|
@IBAction func holdCityAction(_ sender: QMUIButton) {
|
guard !btn_holdCity.isSelected else {return}
|
btn_holdCity.isSelected = true
|
CityChooseSubTypeView.show(inView: self.view, afterView: view_top) { text in
|
|
} closeClouse: {
|
self.btn_holdCity.isSelected = false
|
}
|
}
|
|
@IBAction func signupConditionAction(_ sender: QMUIButton) {
|
guard !sender.isSelected else {return}
|
sender.isSelected = true
|
CourseSubTypeView.show(inView: self.view, afterView: btn_joinCondition, items: ["全部用户参与","仅限年度会员参与","仅限学员参与"]) { str in
|
sender.isSelected = false
|
|
} closeClouse: {
|
sender.isSelected = false
|
}
|
}
|
|
@IBAction func signupAction(_ sender: UIButton) {
|
let vc = ActivitySignupListVC()
|
push(vc: vc)
|
}
|
|
|
}
|
|
extension ActivityListVC:UITableViewDelegate{
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
let vc = ActivityDetailVC()
|
push(vc: vc)
|
}
|
}
|
|
extension ActivityListVC:UITableViewDataSource{
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_ActivityInfoTCell") as! ActivityInfoTCell
|
return cell
|
}
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return 5
|
}
|
}
|