//
|
// BankWithdrawVC.swift
|
// XQMuse
|
//
|
// Created by 无故事王国 on 2024/8/21.
|
//
|
|
import UIKit
|
import QMUIKit
|
|
class BankWithdrawVC: BaseVC {
|
|
@IBOutlet weak var tableView: UITableView!
|
@IBOutlet weak var cons_height: NSLayoutConstraint!
|
private var selectIndexPath = IndexPath(row: 0, section: 0)
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "收益提现"
|
}
|
|
override func setUI() {
|
view.backgroundColor = UIColor(hexString: "f6f6f6")
|
tableView.delegate = self
|
tableView.dataSource = self
|
tableView.separatorStyle = .none
|
tableView.backgroundColor = .clear
|
tableView.register(UINib(nibName: "BankInfoTCell", bundle: nil), forCellReuseIdentifier: "_BankInfoTCell")
|
cons_height.constant = 84 * 2
|
}
|
|
@IBAction func addBankCardAction(_ sender: QMUIButton) {
|
let vc = AddBankInfoVC()
|
push(vc: vc)
|
}
|
}
|
|
extension BankWithdrawVC:UITableViewDelegate & UITableViewDataSource{
|
|
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
selectIndexPath = indexPath
|
tableView.reloadData()
|
}
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_BankInfoTCell", for: indexPath) as! BankInfoTCell
|
cell.isSelect(indexPath == selectIndexPath)
|
return cell
|
}
|
|
func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
return true
|
}
|
|
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
|
CommonAlertView.show(title: "提示", content: "是否删除此张银行卡?") { _ in
|
|
}
|
}
|
|
func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
|
return .delete
|
}
|
|
func tableView(_ tableView: UITableView, titleForDeleteConfirmationButtonForRowAt indexPath: IndexPath) -> String? {
|
return "删除"
|
}
|
|
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return 2
|
}
|
|
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
return 84
|
}
|
}
|