fix
无故事王国
2024-03-04 54c6ef0be42d9f2e49a344fd69f231cb6df43797
WanPai/Root/Search/VC/MeQRCodeVC.swift
@@ -6,14 +6,21 @@
//
import UIKit
import JQTools
class MeQRCodeVC: BaseVC {
            @IBOutlet weak var tableView: UITableView!
            @IBOutlet weak var label_content: UILabel!
            private let viewModel = StudentExchangeViewModel()
            override func viewDidLoad() {
                        super.viewDidLoad()
                        title = "我的二维码"
                        Services.queryProtocol(.matchStore, progress: false).subscribe(onNext: {[weak self] text in
                                    self?.label_content.text = (text.data ?? "").jq_filterFromHTML_1()
                        }).disposed(by: disposeBag)
            }
            override func setUI() {
@@ -21,21 +28,26 @@
                        tableView.dataSource = self
                        tableView.separatorStyle = .none
                        tableView.register(UINib(nibName: "MyQRCodeTCell", bundle: nil), forCellReuseIdentifier: "_MyQRCodeTCell")
                        viewModel.configure(tableView,needMore: false)
                        viewModel.beginRefresh()
            }
}
extension   MeQRCodeVC:UITableViewDelegate,UITableViewDataSource{
            func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
                        QRPreview.show("123")
                        let model = viewModel.dataSource.value[indexPath.row]
                        QRPreview.show("\(model.stuId)")
            }
            func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
                        return 2
                        return viewModel.dataSource.value.count
            }
            func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
                        let model = viewModel.dataSource.value[indexPath.row]
                        let cell = tableView.dequeueReusableCell(withIdentifier: "_MyQRCodeTCell") as! MyQRCodeTCell
                        cell.studentProfile1Model = model
                        return cell
            }