Commit d4293fc1 authored by Steven杜宇's avatar Steven杜宇

// 替换全局登录

parent ce56195a
......@@ -140,9 +140,7 @@ extension YHHKEventViewController {
YHShareManager.shared.sendLinkContent("一图看清香港办事", "", UIImage(named: "AppIcon") ?? UIImage(), link: urlString)
}
} else {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
}
}
}
......
......@@ -255,9 +255,7 @@ extension YHHomePageViewController : UITabBarControllerDelegate {
if YHLoginManager.shared.isLogin() {
return true
} else {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
UIViewController.current?.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
YHLoginManager.shared.loginSuccessActionBlock = {[weak self] in
guard self != nil else { return }
tabBarController.selectedIndex = index
......
......@@ -80,9 +80,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
view.likeBlock = { [weak self] flag in
guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
if flag {
......@@ -111,9 +109,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
view.starBlock = { [weak self] flag in
guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
if flag {
......@@ -244,9 +240,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
task.resume()
}
} else {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
}
}
......
......@@ -247,9 +247,7 @@ extension YHHomeCollectionViewCell {
}
}
} else {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.parentViewController?.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
}
}
......
......@@ -99,8 +99,8 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
view.avatarClickBlock = {
[weak self] in
guard let self = self else { return }
// if !checkLogin() { return }
YHLoginMethodManager.shared.autoLogin()
if !checkLogin() { return }
}
view.nickNameClickBlock = {
[weak self] in
......@@ -155,9 +155,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
func checkLogin()->Bool {
if YHLoginManager.shared.isLogin() == false {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return false
}
return true
......@@ -277,9 +275,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
//#endif
if !checkLogin() {
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
......
......@@ -139,9 +139,7 @@ class YHVideoPlayerVC: YHBaseViewController {
guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
self.player.pause()
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
if flag {
......@@ -171,9 +169,7 @@ class YHVideoPlayerVC: YHBaseViewController {
guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
self.player.pause()
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
if flag {
......@@ -266,9 +262,7 @@ extension YHVideoPlayerVC {
if YHLoginManager.shared.isLogin() == false {
self.player.pause()
let vc = UINavigationController(rootVC: YHPhoneLoginWithVideoBkgViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
YHLoginMethodManager.shared.autoLogin()
return
}
......
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