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

修改登录之后的逻辑

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