Commit 6659c2ae authored by Steven杜宇's avatar Steven杜宇

// 赴港

parent 202ea1b9
......@@ -30,7 +30,7 @@ class YHCertificateAppointViewController: YHBaseViewController {
var isNeedGoHK: Int = 2 // 0不需要 1需要赴港 2没有选择
// 有没有预约人员
var reservationToHK: Int = 0 // 0没有预约 1已经预約
// 申请人是否统一赴港激活签证
// 申请人是否统一赴港激活签证 本地记录的开关
var isAllMembersGo: Bool = true // 默认一起去
lazy var tableView: UITableView = {
......@@ -234,6 +234,13 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
if item.type == .activeVisa {
// 赴港激活签证
let cell = tableView.dequeueReusableCell(withIdentifier: YHActivateHKVisaCell.cellReuseIdentifier, for: indexPath) as! YHActivateHKVisaCell
cell.isAllGo = self.isAllMembersGo
cell.selectBlock = {
[weak self] isAllGo in
guard let self = self else { return }
self.isAllMembersGo = isAllGo
self.updateData()
}
return cell
}
......
......@@ -14,13 +14,14 @@ class YHActivateHKVisaCell: UITableViewCell {
static let cellReuseIdentifier = "YHActivateHKVisaCell"
// 此处index 是按钮从左到右由0开始
var selectIndex = -1 {
var isAllGo:Bool = true {
didSet {
var selectIndex = isAllGo ? 0 : 1
optionView.selectIndex = selectIndex
}
}
var selectBlock:((Int)->())?
var selectBlock:((_ isAllGo: Bool)->())?
lazy var whiteContentView: UIView = {
let view = UIView()
......@@ -52,7 +53,8 @@ class YHActivateHKVisaCell: UITableViewCell {
view.selectBlock = {
[weak self] index in
guard let self = self else { return }
self.selectBlock?(index)
let isAllGo = index == 0 ? true : false
self.selectBlock?(isAllGo)
}
return view
}()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment