无故事王国
2023-10-11 f7e33a3255d9f87b20e4a06fc32012eaad77cad5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    //
    //  SearchStoreListVC.swift
    //  WanPai
    //
    //  Created by 无故事王国 on 2023/6/30.
    //
 
import UIKit
import QMUIKit
import JQTools
 
class SearchStoreListVC: BaseVC {
 
    @IBOutlet weak var btn_city: QMUIButton!
    @IBOutlet weak var btn_distance: QMUIButton!
    @IBOutlet weak var btn_limits: QMUIButton!
    @IBOutlet weak var tableView: UITableView!
    @IBOutlet weak var stackView: UIStackView!
 
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "门店列表"
    }
 
    override func setUI() {
        btn_city.imagePosition = .right
        btn_city.spacingBetweenImageAndTitle = 10
 
        btn_distance.imagePosition = .right
        btn_distance.spacingBetweenImageAndTitle = -5
 
        btn_limits.imagePosition = .left
        btn_limits.spacingBetweenImageAndTitle = 2
 
        stackView.jq_addShadows(shadowColor: UIColor(hexStr: "#DFDFDF").withAlphaComponent(0.5), corner: 0, radius: 4, offset: CGSize(width: 4, height: 0), opacity: 1)
 
        tableView.delegate = self
        tableView.dataSource = self
        tableView.separatorStyle = .none
        tableView.register(UINib(nibName: "SearchStoreTCell", bundle: nil), forCellReuseIdentifier: "_SearchStoreTCell")
    }
 
    @IBAction func cityAction(_ sender: QMUIButton) {
        guard !sender.isSelected else {return}
        sender.isSelected = true
        let items = Array<NormalSimpleModel>()
        CourseSubTypeView.show(inView: self.view, afterView: stackView, items:items) { m in
            sender.isSelected = false
 
        } closeClouse: {
            sender.isSelected = false
        }
    }
 
    @IBAction func distanceAction(_ sender: QMUIButton) {
 
    }
}
 
extension SearchStoreListVC:UITableViewDelegate{
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let vc = SearchStoreDetailVC(id: 0)
        push(vc: vc)
    }
}
 
extension SearchStoreListVC:UITableViewDataSource{
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "_SearchStoreTCell", for: indexPath) as! SearchStoreTCell
        return cell
    }
 
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 10
    }
 
 
}