Commit b2dc3556 authored by Steven杜宇's avatar Steven杜宇

// 赴港

parent a93935af
......@@ -329,26 +329,27 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
guard let self = self else { return }
// 抢号中点击取消预约
let alert = YHCancelAppointAlertView.alertView()
alert.memberNamesText = groupModel.getMemberNames()
alert.selectBlock = {
[weak self] sure in
guard let self = self else { return }
if !sure {
return
}
YHHUD.show(.progress(message: "加载中..."))
self.viewModel.cancelAppoint(orderId: orderId, reservationId: groupModel.id) { success in
YHHUD.hide()
if !success {
YHHUD.flash(message: "取消失败")
let alert = YHCancelAppointAlertView.alertView()
alert.memberNamesText = groupModel.getMemberNames()
alert.selectBlock = {
[weak self] sure in
guard let self = self else { return }
if !sure {
return
}
self.requestData()
YHHUD.show(.progress(message: "加载中..."))
self.viewModel.cancelAppoint(orderId: orderId, reservationId: groupModel.id) { success in
YHHUD.hide()
if !success {
YHHUD.flash(message: "取消失败")
return
}
self.requestData()
}
}
}
alert.show()
}
return cell
}
......
......@@ -18,8 +18,8 @@ class YHCancelAppointAlertView: UIView {
var memberNamesText: String = "" {
didSet {
let b: ASAttributedString = .init("取消预约后,不可恢复,您可重新预约!成员:", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let a: ASAttributedString = .init("\(memberNamesText)", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let a: ASAttributedString = .init("取消预约后,不可恢复,您可重新预约!成员:", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let b: ASAttributedString = .init("\(memberNamesText)", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
detailLabel.attributed.text = a+b
}
}
......@@ -85,6 +85,7 @@ class YHCancelAppointAlertView: UIView {
@objc func didConfirmBtnClicked(_ sender:UIButton) {
let tag = sender.tag-self.baseTag
dismiss()
selectBlock?(tag == 1)
}
......@@ -159,6 +160,7 @@ class YHCancelAppointAlertView: UIView {
make.right.equalTo(cancelBtn.snp.left).offset(-8)
make.bottom.equalTo(-21)
make.height.equalTo(45)
make.width.equalTo(cancelBtn)
}
cancelBtn.snp.makeConstraints { make in
......
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