Commit ea3ab492 authored by pete谢兆麟's avatar pete谢兆麟

修改登录之后的逻辑

parent 4e482777
...@@ -169,12 +169,12 @@ class YHCodeSueecssViewController: YHBaseViewController { ...@@ -169,12 +169,12 @@ class YHCodeSueecssViewController: YHBaseViewController {
YHLoginManager.shared.loginSuccessActionBlock?() YHLoginManager.shared.loginSuccessActionBlock?()
YHHUD.flash(message: "登录成功") YHHUD.flash(message: "登录成功")
TXCommonHandler.sharedInstance().cancelLoginVC(animated: true) TXCommonHandler.sharedInstance().cancelLoginVC(animated: true)
self.dismiss(animated: true) {
if YHLoginManager.shared.userModel?.is_first_login == 1 { if YHLoginManager.shared.userModel?.is_first_login == 1 {
let vc = UINavigationController(rootVC: YHUserInfoSettingViewController()) let vc = YHUserInfoSettingViewController()
vc.modalPresentationStyle = .fullScreen vc.modalPresentationStyle = .fullScreen
UIViewController.current?.present(vc, animated: true) self.navigationController?.pushViewController(vc)
} } else {
self.dismiss(animated: true)
} }
} }
}) })
...@@ -190,12 +190,12 @@ class YHCodeSueecssViewController: YHBaseViewController { ...@@ -190,12 +190,12 @@ class YHCodeSueecssViewController: YHBaseViewController {
YHLoginManager.shared.loginSuccessActionBlock?() YHLoginManager.shared.loginSuccessActionBlock?()
YHHUD.flash(message: "登录成功") YHHUD.flash(message: "登录成功")
TXCommonHandler.sharedInstance().cancelLoginVC(animated: true) TXCommonHandler.sharedInstance().cancelLoginVC(animated: true)
self.dismiss(animated: true) {
if YHLoginManager.shared.userModel?.is_first_login == 1 { if YHLoginManager.shared.userModel?.is_first_login == 1 {
let vc = UINavigationController(rootVC: YHUserInfoSettingViewController()) let vc = YHUserInfoSettingViewController()
vc.modalPresentationStyle = .fullScreen vc.modalPresentationStyle = .fullScreen
UIViewController.current?.present(vc, animated: true) self.navigationController?.pushViewController(vc)
} } else {
self.dismiss(animated: true)
} }
} }
}) })
...@@ -217,12 +217,12 @@ class YHCodeSueecssViewController: YHBaseViewController { ...@@ -217,12 +217,12 @@ class YHCodeSueecssViewController: YHBaseViewController {
YHLoginManager.shared.loginSuccessActionBlock?() YHLoginManager.shared.loginSuccessActionBlock?()
YHHUD.flash(message: "登录成功") YHHUD.flash(message: "登录成功")
TXCommonHandler.sharedInstance().cancelLoginVC(animated: true) TXCommonHandler.sharedInstance().cancelLoginVC(animated: true)
self?.dismiss(animated: true) {
if YHLoginManager.shared.userModel?.is_first_login == 1 { if YHLoginManager.shared.userModel?.is_first_login == 1 {
let vc = UINavigationController(rootVC: YHUserInfoSettingViewController()) let vc = YHUserInfoSettingViewController()
vc.modalPresentationStyle = .fullScreen vc.modalPresentationStyle = .fullScreen
UIViewController.current?.present(vc, animated: true) self?.navigationController?.pushViewController(vc)
} } else {
self?.dismiss(animated: true)
} }
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
class YHUserInfoSettingViewController: YHBaseViewController { class YHUserInfoSettingViewController: YHBaseViewController, UIGestureRecognizerDelegate {
var photoImageView: UIImageView! var photoImageView: UIImageView!
var photoButton: UIButton! var photoButton: UIButton!
var changeButton: UIButton! var changeButton: UIButton!
...@@ -44,6 +44,10 @@ class YHUserInfoSettingViewController: YHBaseViewController { ...@@ -44,6 +44,10 @@ class YHUserInfoSettingViewController: YHBaseViewController {
func setView() { func setView() {
gk_navTitle = "设置" gk_navTitle = "设置"
gk_navLeftBarButtonItems = []
let target = self.navigationController?.interactivePopGestureRecognizer?.delegate
let pan = UIPanGestureRecognizer(target: target, action: nil)
self.view.addGestureRecognizer(pan)
view.backgroundColor = .white view.backgroundColor = .white
photoImageView = { photoImageView = {
let imageView = UIImageView() let imageView = UIImageView()
......
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