Commit 27095b13 authored by Steven杜宇's avatar Steven杜宇

// 预约

parent 0bdcae68
......@@ -184,11 +184,13 @@ class YHResignAppointScheduleListViewController: YHBaseViewController {
} else if status == .canConfirmHK { // 可点击确认在港
let alertView = YHResignAppointedScheduleRiskTipsView.alertView()
alertView.confirmBlock = {
[weak self] in
alertView.bottomBtnBlock = {
[weak self] isSure in
guard let self = self else { return }
if isSure {
self.requestConfirmInHK(model)
}
}
alertView.show()
}
}
......
......@@ -11,7 +11,7 @@ import AttributedString
class YHResignAppointedScheduleRiskTipsView: UIView {
var confirmBlock:(()->())?
var bottomBtnBlock:((Bool)->())?
lazy var blackMaskView: UIView = {
let view = UIView()
......@@ -62,8 +62,8 @@ class YHResignAppointedScheduleRiskTipsView: UIView {
lazy var confirmBtn: UIButton = {
let button = UIButton()
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.setTitle("我已知悉,确认", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.setTitle("确认在港", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = .brandMainColor
button.addTarget(self, action: #selector(didConfirmBtnClicked), for: .touchUpInside)
......@@ -71,6 +71,19 @@ class YHResignAppointedScheduleRiskTipsView: UIView {
return button
}()
lazy var cancelBtn: UIButton = {
let button = UIButton()
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.setTitle("还未", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.backgroundColor = .white
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.layer.borderWidth = 1.0
button.addTarget(self, action: #selector(didCancelBtnClicked), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
return button
}()
static func alertView() -> YHResignAppointedScheduleRiskTipsView {
let view = YHResignAppointedScheduleRiskTipsView(frame: UIScreen.main.bounds)
return view
......@@ -85,7 +98,12 @@ class YHResignAppointedScheduleRiskTipsView: UIView {
}
@objc func didConfirmBtnClicked() {
confirmBlock?()
bottomBtnBlock?(true)
self.dismiss()
}
@objc func didCancelBtnClicked() {
bottomBtnBlock?(false)
self.dismiss()
}
......@@ -106,6 +124,7 @@ class YHResignAppointedScheduleRiskTipsView: UIView {
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(firstDetailLabel)
whiteContentView.addSubview(secondDetailLabel)
whiteContentView.addSubview(cancelBtn)
whiteContentView.addSubview(confirmBtn)
blackMaskView.snp.makeConstraints { make in
......@@ -142,12 +161,19 @@ class YHResignAppointedScheduleRiskTipsView: UIView {
make.right.equalTo(-21)
make.top.equalTo(firstDetailLabel.snp.bottom).offset(8)
}
cancelBtn.snp.makeConstraints { make in
make.top.equalTo(secondDetailLabel.snp.bottom).offset(32)
make.left.equalTo(21)
make.right.equalTo(confirmBtn.snp.left).offset(-10)
make.width.equalTo(confirmBtn.snp.width)
make.bottom.equalTo(-21)
make.height.equalTo(45)
}
confirmBtn.snp.makeConstraints { make in
make.top.equalTo(secondDetailLabel.snp.bottom).offset(21)
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
make.top.equalTo(secondDetailLabel.snp.bottom).offset(32)
make.right.equalTo(-21)
make.bottom.equalTo(-21)
make.height.equalTo(45)
}
}
......
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