Commit 2940b8ee authored by Alex朱枝文's avatar Alex朱枝文

申请类别更改页面跳转逻辑

parent f0cd29c5
......@@ -122,13 +122,15 @@ extension YHGCApplicationTypeController {
return
}
YHHUD.show(.progress(message: "加载中..."))
self.viewModel.submitApplyType(orderId, model.type.rawValue) { success, error in
self.viewModel.submitApplyType(orderId, model.type.rawValue) { [weak self] success, error in
guard let self = self else {
return
}
YHHUD.hide()
if success {
YHHUD.flash(message: "提交成功")
//self.requestData(isNeedLoading: false)
let resultVC = YHGCApplicationTypeResultController(type: model.type)
self.navigationController?.pushViewController(resultVC)
self.gotoResultPage(model)
} else {
var errorMsg = "提交失败"
if let error = error, error.errorMsg.count > 0 {
......@@ -140,6 +142,16 @@ extension YHGCApplicationTypeController {
}
}
private func gotoResultPage(_ model: YHGCApplicationModel) {
if let navigationController = self.navigationController {
let ctl = YHGCApplicationTypeResultController(type: model.type)
var viewControllers = navigationController.viewControllers
viewControllers.removeLast()
viewControllers.append(ctl)
navigationController.setViewControllers(viewControllers, animated: true)
}
}
private func setupUI() {
gk_navTitle = "申请类别"
gk_navBarAlpha = 0
......
......@@ -105,6 +105,7 @@ extension YHGCApplicationTypeResultController {
@objc private func clickBackButton() {
backButtonEvent?()
navigationController?.popViewController(animated: true)
}
private func setupUI() {
......
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