Commit a2941088 authored by David黄金龙's avatar David黄金龙

返回 、手势弹窗

parent 7b84dbdc
......@@ -13,6 +13,7 @@ import UIKit
*/
class YHInformationPerfectListVC: YHBaseViewController {
var orderId : Int?
private var firstCheckFlag : Bool = false
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private var hasSubmitFlag : Bool = false {
......@@ -101,9 +102,68 @@ class YHInformationPerfectListVC: YHBaseViewController {
super.viewWillAppear(animated)
loadData()
}
override func backItemClick(_ sender: Any) {
if self.serviceCenterMainReqVM.informationFillStepModel?.step == 6 {
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "你已填完所有信息,是否马上提交?") { agree in
if agree == true {
printLog("点击了 确认 按钮")
self.submitAllInfo()
} else {
printLog("点击了 取消 按钮")
self.navigationController?.popViewController()
}
}
} else {
self.navigationController?.popViewController()
}
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
// @objc func navigationShouldPop() -> Bool
override func navigationShouldPop() -> Bool {
if self.serviceCenterMainReqVM.informationFillStepModel?.step == 6 {
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "你已填完所有信息,是否马上提交?") { agree in
if agree == true {
printLog("点击了 确认 按钮")
self.submitAllInfo()
} else {
printLog("点击了 取消 按钮") }
}
return false
}
return true
}
}
extension YHInformationPerfectListVC {
func checkSubmitTips() {
if firstCheckFlag {
return
}
firstCheckFlag = true
if self.serviceCenterMainReqVM.informationFillStepModel?.step == 6 {
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "你已填完所有信息,是否马上提交?") { agree in
if agree == true {
printLog("点击了 确认 按钮")
self.submitAllInfo()
} else {
printLog("点击了 取消 按钮") }
}
}
}
func submitSweetNotify() {
let params = ["option":1,"order_id":orderId]
serviceCenterMainReqVM.submitSweetNotifyOp(params: params as [String : Any]) { success, error in
......@@ -132,7 +192,6 @@ extension YHInformationPerfectListVC {
guard let orderId = orderId else { return}
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
if success == true {
if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
self.hasSubmitFlag = true
} else {
......@@ -146,14 +205,9 @@ extension YHInformationPerfectListVC {
self.submitBtn.isEnabled = false
}
}
self.checkSubmitTips()
}
self.homeTableView.reloadData()
// if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
// self.showTipsAlert()
// return
// }
}
}
......@@ -181,9 +235,7 @@ extension YHInformationPerfectListVC {
@objc func clickSubmitBtn() {
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "确定是否提交信息?提交后将不能修改") { agree in
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "确定是否提交信息,提交后将不能修改哦~") { agree in
if agree == true {
printLog("点击了 确认 按钮")
......
......@@ -96,7 +96,7 @@ class YHSubmitAllInfoCheckView: UIView {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确认", for: .normal)
button.setTitle("提交", for: .normal)
button.clipsToBounds = true
button.setTitleColor(.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
......@@ -111,8 +111,9 @@ class YHSubmitAllInfoCheckView: UIView {
make.height.equalTo(45)
}
agreeButton.layoutIfNeeded()
agreeButton.addYinHeGradualLayer()
agreeButton.addYinHeGradualLayer()
agreeButton.backgroundColor = .brandMainColor
// agreeButton.addYinHeGradualLayer()
// agreeButton.addYinHeGradualLayer()
}
......
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