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

// 预约

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