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

活动行程单 返回

parent 38199d25
...@@ -57,9 +57,88 @@ class YHActivityTravelViewController: YHBaseViewController { ...@@ -57,9 +57,88 @@ class YHActivityTravelViewController: YHBaseViewController {
super.viewWillAppear(animated) super.viewWillAppear(animated)
loadData() loadData()
} }
override func backItemClick(_ sender: Any) {
// if viewModel.didChange {
// YHCommonAlertView.show("", "您尚未保存修改,确定关闭吗?", "仍然关闭", "继续编辑", fullGuestureEnable: false) {
// self.navigationController?.popViewController()
// } callBack: {
// }
// } else {
// self.navigationController?.popViewController()
// }
gotoActivityVC()
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
override func navigationShouldPop() -> Bool {
// if viewModel.didChange {
// YHCommonAlertView.show("", "您尚未保存修改,确定关闭吗?", "仍然关闭", "继续编辑", fullGuestureEnable: false) {
// self.navigationController?.popViewController()
// } callBack: {
// }
// return false
// }
gotoActivityVC()
return false
}
} }
extension YHActivityTravelViewController { extension YHActivityTravelViewController {
func gotoActivityVC() {
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
if vc.selectedIndex == 3 {
if let nav = self.navigationController {
let rrr = nav.viewControllers.contains { $0.isKind(of: YHActivityListViewController.self) }
if rrr {
var targetVc : UIViewController?
for(_,value) in nav.viewControllers.enumerated() {
if value.isKind(of: YHActivityListViewController.self) {
targetVc = value
break
}
}
if let vc = targetVc {
navigationController?.popToViewController(vc, animated: true)
}
return
}
}
} else if vc.selectedIndex == 2 {
if let nav = self.navigationController {
let rrr = nav.viewControllers.contains { $0.isKind(of: YHCommunityViewController.self) }
if rrr {
var targetVc : UIViewController?
for(_,value) in nav.viewControllers.enumerated() {
if value.isKind(of: YHCommunityViewController.self) {
targetVc = value
break
}
}
if let vc = targetVc {
navigationController?.popToViewController(vc, animated: true)
}
return
}
}
}
}
}
func setupUI() { func setupUI() {
gk_navigationBar.isHidden = false gk_navigationBar.isHidden = false
gk_navigationBar.backgroundColor = .clear gk_navigationBar.backgroundColor = .clear
......
...@@ -76,7 +76,6 @@ extension YHApplyActivityResultViewController { ...@@ -76,7 +76,6 @@ extension YHApplyActivityResultViewController {
gk_navigationBar.backgroundColor = .clear gk_navigationBar.backgroundColor = .clear
gk_navTitle = "报名结果" gk_navTitle = "报名结果"
// view.backgroundColor = UIColor.pageBkgColor
view.backgroundColor = UIColor.white view.backgroundColor = UIColor.white
view.addSubview(statusImageV) view.addSubview(statusImageV)
......
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