Commit e940266c by pierce

qq登录接入

parent bd821e8b
Showing with 339 additions and 271 deletions
...@@ -256,9 +256,9 @@ public struct GDSDK { ...@@ -256,9 +256,9 @@ public struct GDSDK {
public static let gd_wechatUniversalLink = "https://yabolive.com/qiezi/" public static let gd_wechatUniversalLink = "https://yabolive.com/qiezi/"
/// QQ Appid /// QQ Appid
public static let gd_QQAppId = "1110627651" public static let gd_QQAppId = "102105469"
/// QQ key /// QQ key
public static let gd_QQAppKey = "xF0T9ElsZgDoC6N0" public static let gd_QQAppKey = "a5NUO4VihRxEG3f4"
// //
// /// 字节推拉流SDK AppID // /// 字节推拉流SDK AppID
// public static let gd_byteDanceAppID = "201548" // public static let gd_byteDanceAppID = "201548"
......
...@@ -19,7 +19,7 @@ class LoginViewController: BaseViewController { ...@@ -19,7 +19,7 @@ class LoginViewController: BaseViewController {
/// 背景图片 /// 背景图片
let bgImageView = UIImageView(image: GDLoginBundle.imageNamed("user_login_bg1")) let bgImageView = UIImageView(image: GDLoginBundle.imageNamed("user_login_bg1"))
/// Logo 图片 /// Logo 图片
// let iconImageView = UIImageView(image: GDLoginBundle.imageNamed("user_login_AppIcon_6")) // let iconImageView = UIImageView(image: GDLoginBundle.imageNamed("user_login_AppIcon_6"))
/// 登录相关背景 View /// 登录相关背景 View
let loginBgView = UIView(frame: .zero) let loginBgView = UIView(frame: .zero)
/// 手机号登录 /// 手机号登录
...@@ -28,9 +28,9 @@ class LoginViewController: BaseViewController { ...@@ -28,9 +28,9 @@ class LoginViewController: BaseViewController {
let otherDescLabel = UILabel() let otherDescLabel = UILabel()
/// 第三方登录按钮 /// 第三方登录按钮
let qqBtn = UIButton(type: .system) let qqBtn = UIButton(type: .system)
let wechatBtn = UIButton(type: .system) // let wechatBtn = UIButton(type: .system)
let appleBtn = UIButton(type: .system) let appleBtn = UIButton(type: .system)
// let visitorBtn = UIButton(type: .custom) // let visitorBtn = UIButton(type: .custom)
// 暂存秒验登录 VC // 暂存秒验登录 VC
var quickLoginVC: UIViewController? var quickLoginVC: UIViewController?
var showSplashView = false var showSplashView = false
...@@ -69,9 +69,9 @@ class LoginViewController: BaseViewController { ...@@ -69,9 +69,9 @@ class LoginViewController: BaseViewController {
delay(2) {[weak self] in delay(2) {[weak self] in
guard let self = self else { return } guard let self = self else { return }
// self.iconImageView.isHidden = true // self.iconImageView.isHidden = true
firstOpenView.startAnimation { firstOpenView.startAnimation {
// self.iconImageView.isHidden = false // self.iconImageView.isHidden = false
firstOpenView.removeFromSuperview() firstOpenView.removeFromSuperview()
GDNetworkStatus.shared.isConnect GDNetworkStatus.shared.isConnect
...@@ -128,7 +128,7 @@ class LoginViewController: BaseViewController { ...@@ -128,7 +128,7 @@ class LoginViewController: BaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
// self.startBackgroundAnimation() // self.startBackgroundAnimation()
GDRouter.UserRouter?.verifyShouldShowVisitorMode() GDRouter.UserRouter?.verifyShouldShowVisitorMode()
...@@ -184,14 +184,14 @@ class LoginViewController: BaseViewController { ...@@ -184,14 +184,14 @@ class LoginViewController: BaseViewController {
qqBtn.layer.masksToBounds = true qqBtn.layer.masksToBounds = true
qqBtn.layer.cornerRadius = qqBtn.bounds.height / 2 qqBtn.layer.cornerRadius = qqBtn.bounds.height / 2
wechatBtn.layer.masksToBounds = true // wechatBtn.layer.masksToBounds = true
wechatBtn.layer.cornerRadius = wechatBtn.bounds.height / 2 // wechatBtn.layer.cornerRadius = wechatBtn.bounds.height / 2
appleBtn.layer.masksToBounds = true appleBtn.layer.masksToBounds = true
appleBtn.layer.cornerRadius = appleBtn.bounds.height / 2 appleBtn.layer.cornerRadius = appleBtn.bounds.height / 2
// //
// visitorBtn.layer.masksToBounds = true // visitorBtn.layer.masksToBounds = true
// visitorBtn.layer.cornerRadius = visitorBtn.height / 2.0 // visitorBtn.layer.cornerRadius = visitorBtn.height / 2.0
} }
override var preferredStatusBarStyle: UIStatusBarStyle { override var preferredStatusBarStyle: UIStatusBarStyle {
...@@ -207,7 +207,7 @@ class LoginViewController: BaseViewController { ...@@ -207,7 +207,7 @@ class LoginViewController: BaseViewController {
makeBgImageView() makeBgImageView()
// makeIconImageView() // makeIconImageView()
makeLoginView() makeLoginView()
...@@ -270,10 +270,10 @@ class LoginViewController: BaseViewController { ...@@ -270,10 +270,10 @@ class LoginViewController: BaseViewController {
self.view.addSubview(bgImageView) self.view.addSubview(bgImageView)
} }
// private func makeIconImageView() { // private func makeIconImageView() {
// iconImageView.contentMode = .scaleAspectFit // iconImageView.contentMode = .scaleAspectFit
// self.view.addSubview(iconImageView) // self.view.addSubview(iconImageView)
// } // }
private func makeLoginView() { private func makeLoginView() {
...@@ -293,10 +293,10 @@ class LoginViewController: BaseViewController { ...@@ -293,10 +293,10 @@ class LoginViewController: BaseViewController {
loginBtn.setTitleColor(.init(white: 1, alpha: 0.8), for: .normal) loginBtn.setTitleColor(.init(white: 1, alpha: 0.8), for: .normal)
loginBgView.addSubview(loginBtn) loginBgView.addSubview(loginBtn)
// visitorBtn.setTitle("游客登录", for: .normal) // visitorBtn.setTitle("游客登录", for: .normal)
// visitorBtn.setTitleColor(.init(white: 1, alpha: 0.5), for: .normal) // visitorBtn.setTitleColor(.init(white: 1, alpha: 0.5), for: .normal)
// visitorBtn.titleLabel?.font = .gd_default(14) // visitorBtn.titleLabel?.font = .gd_default(14)
// loginBgView.addSubview(visitorBtn) // loginBgView.addSubview(visitorBtn)
} }
private func makeSocialLogin() { private func makeSocialLogin() {
...@@ -309,18 +309,18 @@ class LoginViewController: BaseViewController { ...@@ -309,18 +309,18 @@ class LoginViewController: BaseViewController {
qqBtn.setImage(qqBtnImage, for: .normal) qqBtn.setImage(qqBtnImage, for: .normal)
loginBgView.addSubview(qqBtn) loginBgView.addSubview(qqBtn)
let wechatBtnImage = GDLoginBundle.imageNamed("user_login_third_icon_wechat")?.withRenderingMode(.alwaysOriginal) // let wechatBtnImage = GDLoginBundle.imageNamed("user_login_third_icon_wechat")?.withRenderingMode(.alwaysOriginal)
wechatBtn.setImage(wechatBtnImage, for: .normal) // wechatBtn.setImage(wechatBtnImage, for: .normal)
loginBgView.addSubview(wechatBtn) // loginBgView.addSubview(wechatBtn)
let appleBtnImage = GDLoginBundle.imageNamed("user_login_third_icon_apple_white")?.withRenderingMode(.alwaysOriginal) let appleBtnImage = GDLoginBundle.imageNamed("user_login_third_icon_apple_white")?.withRenderingMode(.alwaysOriginal)
appleBtn.setImage(appleBtnImage, for: .normal) appleBtn.setImage(appleBtnImage, for: .normal)
loginBgView.addSubview(appleBtn) loginBgView.addSubview(appleBtn)
// visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_more")?.withRenderingMode(.alwaysOriginal), for: .normal) // visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_more")?.withRenderingMode(.alwaysOriginal), for: .normal)
// visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_visitor")?.withRenderingMode(.alwaysOriginal), for: .selected) // visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_visitor")?.withRenderingMode(.alwaysOriginal), for: .selected)
// visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_visitor")?.withRenderingMode(.alwaysOriginal), for: .focused) // visitorBtn.setImage(GDLoginBundle.imageNamed("user_login_third_icon_visitor")?.withRenderingMode(.alwaysOriginal), for: .focused)
// loginBgView.addSubview(visitorBtn) // loginBgView.addSubview(visitorBtn)
} }
private func makeLastLoginView() { private func makeLastLoginView() {
...@@ -386,11 +386,11 @@ class LoginViewController: BaseViewController { ...@@ -386,11 +386,11 @@ class LoginViewController: BaseViewController {
private func makeConstraints() { private func makeConstraints() {
// iconImageView.snp.makeConstraints { make in // iconImageView.snp.makeConstraints { make in
// make.size.equalTo(143) // make.size.equalTo(143)
// make.centerX.equalToSuperview() // make.centerX.equalToSuperview()
// make.centerY.equalToSuperview().offset(-140) // make.centerY.equalToSuperview().offset(-140)
// } // }
loginBgView.snp.makeConstraints { (make) in loginBgView.snp.makeConstraints { (make) in
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
...@@ -450,91 +450,108 @@ class LoginViewController: BaseViewController { ...@@ -450,91 +450,108 @@ class LoginViewController: BaseViewController {
} }
if #available(iOS 13.0, *) { if #available(iOS 13.0, *) {
// //
// if GDRouter.UserRouter?.isVisitor.value == false { // if GDRouter.UserRouter?.isVisitor.value == false {
// visitorBtn.isHidden = false // visitorBtn.isHidden = false
// wechatBtn.snp.makeConstraints { (make) in // wechatBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60) // make.size.equalTo(60)
// make.right.equalTo(qqBtn.snp.left).offset(-20) // make.right.equalTo(qqBtn.snp.left).offset(-20)
// make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
// } // }
// //
// qqBtn.snp.makeConstraints { (make) in // qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60) // make.size.equalTo(60)
// make.centerX.equalToSuperview().offset(-40) // make.centerX.equalToSuperview().offset(-40)
// make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50) // make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
// } // }
// //
// appleBtn.snp.makeConstraints { (make) in // appleBtn.snp.makeConstraints { (make) in
// make.size.equalTo(58) // make.size.equalTo(58)
// make.left.equalTo(qqBtn.snp.right).offset(20) // make.left.equalTo(qqBtn.snp.right).offset(20)
// make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
// } // }
// //
// visitorBtn.snp.makeConstraints { make in // visitorBtn.snp.makeConstraints { make in
// make.centerX.equalTo(self.loginBtn.snp.centerX) // make.centerX.equalTo(self.loginBtn.snp.centerX)
// make.top.equalTo(self.loginBtn.snp.bottom).offset(10) // make.top.equalTo(self.loginBtn.snp.bottom).offset(10)
// } // }
// } else { // } else {
// visitorBtn.isHidden = true // visitorBtn.isHidden = true
// //
// qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60)
// make.centerX.equalToSuperview()
// make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
// }
//
// wechatBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60)
// make.right.equalTo(qqBtn.snp.left).offset(-20)
// make.bottom.equalTo(qqBtn)
// }
//
// appleBtn.snp.makeConstraints { (make) in
// make.size.equalTo(58)
// make.left.equalTo(qqBtn.snp.right).offset(20)
// make.bottom.equalTo(qqBtn)
// }
qqBtn.snp.makeConstraints { (make) in qqBtn.snp.makeConstraints { (make) in
make.size.equalTo(60) make.size.equalTo(60)
make.centerX.equalToSuperview() make.centerX.equalToSuperview().offset(60)
make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50) make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
} }
wechatBtn.snp.makeConstraints { (make) in
make.size.equalTo(60)
make.right.equalTo(qqBtn.snp.left).offset(-20)
make.bottom.equalTo(qqBtn)
}
appleBtn.snp.makeConstraints { (make) in appleBtn.snp.makeConstraints { (make) in
make.size.equalTo(58) make.size.equalTo(60)
make.left.equalTo(qqBtn.snp.right).offset(20) make.centerX.equalToSuperview().offset(-60)
make.bottom.equalTo(qqBtn) make.bottom.equalTo(qqBtn)
} }
// }
// } //
//
} else { } else {
// appleBtn.isHidden = true // appleBtn.isHidden = true
// //
// if GDRouter.UserRouter?.isVisitor.value == false { // if GDRouter.UserRouter?.isVisitor.value == false {
// qqBtn.snp.makeConstraints { (make) in // qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60) // make.size.equalTo(60)
// make.centerX.equalToSuperview() // make.centerX.equalToSuperview()
// make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50) // make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
// } // }
// //
// wechatBtn.snp.makeConstraints { (make) in // wechatBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60) // make.size.equalTo(60)
// make.right.equalTo(qqBtn.snp.left).offset(-20) // make.right.equalTo(qqBtn.snp.left).offset(-20)
// make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
// } // }
// //
// visitorBtn.snp.makeConstraints { make in // visitorBtn.snp.makeConstraints { make in
// make.size.equalTo(60) // make.size.equalTo(60)
// make.left.equalTo(qqBtn.snp.right).offset(20) // make.left.equalTo(qqBtn.snp.right).offset(20)
// make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
// } // }
// } else { // } else {
// visitorBtn.isHidden = true // visitorBtn.isHidden = true
// qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60)
// make.centerX.equalToSuperview().offset(60)
// make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
// }
//
// wechatBtn.snp.makeConstraints { (make) in
// make.size.equalTo(60)
// make.centerX.equalToSuperview().offset(-60)
// make.bottom.equalTo(qqBtn)
// }
qqBtn.snp.makeConstraints { (make) in qqBtn.snp.makeConstraints { (make) in
make.size.equalTo(60) make.size.equalTo(60)
make.centerX.equalToSuperview().offset(60) make.centerX.equalToSuperview()
make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50) make.bottom.equalTo(bottomLayoutGuide.snp.top).offset(-50)
} }
wechatBtn.snp.makeConstraints { (make) in
make.size.equalTo(60)
make.centerX.equalToSuperview().offset(-60)
make.bottom.equalTo(qqBtn)
} }
} //
// // }
// }
} }
// MARK: Data // MARK: Data
...@@ -546,33 +563,33 @@ class LoginViewController: BaseViewController { ...@@ -546,33 +563,33 @@ class LoginViewController: BaseViewController {
self.socialLogin(with: .apple) self.socialLogin(with: .apple)
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
wechatBtn.rx.tap.subscribe(onNext: {[weak self] (_) in // wechatBtn.rx.tap.subscribe(onNext: {[weak self] (_) in
guard let self = self else { return } // guard let self = self else { return }
self.socialLogin(with: .wechat) // self.socialLogin(with: .wechat)
}).disposed(by: disposeBag) // }).disposed(by: disposeBag)
qqBtn.rx.tap.subscribe(onNext: {[weak self] _ in qqBtn.rx.tap.subscribe(onNext: {[weak self] _ in
guard let self = self else { return } guard let self = self else { return }
self.socialLogin(with: .qq) self.socialLogin(with: .qq)
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
// //
// visitorBtn.rx.tap.subscribe(onNext: {[weak self] _ in // visitorBtn.rx.tap.subscribe(onNext: {[weak self] _ in
// guard let self = self else { return } // guard let self = self else { return }
//// if self.visitorBtn.isSelected == false { //// if self.visitorBtn.isSelected == false {
//// self.visitorBtn.isSelected = true //// self.visitorBtn.isSelected = true
//// } else { //// } else {
//// self.visitorBtn.isEnabled = false //// self.visitorBtn.isEnabled = false
//// delay(0.5) { //// delay(0.5) {
//// self.visitorBtn.isEnabled = true //// self.visitorBtn.isEnabled = true
//// } //// }
// if GDRouter.UserRouter?.isVisitor.value == false { // if GDRouter.UserRouter?.isVisitor.value == false {
// // 进入游客模式 // // 进入游客模式
// GDRouter.UserRouter?.visitorLogin() // GDRouter.UserRouter?.visitorLogin()
// } else { // } else {
// self.navigationController?.dismiss(animated: true, completion: nil) // self.navigationController?.dismiss(animated: true, completion: nil)
// } // }
// } // }
// }).disposed(by: disposeBag) // }).disposed(by: disposeBag)
loginBtn.rx.tap.subscribe(onNext: {[weak self] (_) in loginBtn.rx.tap.subscribe(onNext: {[weak self] (_) in
self?.phoneNumberLogin() self?.phoneNumberLogin()
...@@ -649,14 +666,14 @@ class LoginViewController: BaseViewController { ...@@ -649,14 +666,14 @@ class LoginViewController: BaseViewController {
} }
/// 启动背景动画 /// 启动背景动画
// private func startBackgroundAnimation() { // private func startBackgroundAnimation() {
// self.bgImageView.layer.removeAllAnimations() // self.bgImageView.layer.removeAllAnimations()
// let animation = CAKeyframeAnimation(keyPath: "position") // let animation = CAKeyframeAnimation(keyPath: "position")
// animation.values = [CGPoint.init(x: (GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0), CGPoint.init(x: abs(GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0), CGPoint.init(x: (GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0)] // animation.values = [CGPoint.init(x: (GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0), CGPoint.init(x: abs(GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0), CGPoint.init(x: (GDScreen.width - self.bgImageView.width) / 2.0 + GDScreen.width / 2.0, y: GDScreen.height / 2.0)]
// animation.duration = 10 // animation.duration = 10
// animation.repeatCount = 10000 // animation.repeatCount = 10000
// self.bgImageView.layer.add(animation, forKey: "position") // self.bgImageView.layer.add(animation, forKey: "position")
// } // }
private func setupLastLoginUser(_ user: GDUserModel) { private func setupLastLoginUser(_ user: GDUserModel) {
lastLoginFaceImageView.cancelDownload() lastLoginFaceImageView.cancelDownload()
...@@ -745,54 +762,54 @@ extension LoginViewController { ...@@ -745,54 +762,54 @@ extension LoginViewController {
model.privacyTextAlignment = NSNumber(value: NSTextAlignment.center.rawValue) model.privacyTextAlignment = NSNumber(value: NSTextAlignment.center.rawValue)
model.privacyLineSpacing = 4 model.privacyLineSpacing = 4
// let layout = SecVerifyCustomLayouts() // let layout = SecVerifyCustomLayouts()
// //
// let sloganLayout = SecVerifyLayout() // let sloganLayout = SecVerifyLayout()
// sloganLayout.layoutBottom = NSNumber(floatLiteral: -Double(16.0 + GDScreen.SafeArea.bottom)) // sloganLayout.layoutBottom = NSNumber(floatLiteral: -Double(16.0 + GDScreen.SafeArea.bottom))
// sloganLayout.layoutCenterX = 0 // sloganLayout.layoutCenterX = 0
// sloganLayout.layoutHeight = 20 // sloganLayout.layoutHeight = 20
// layout.sloganLayout = sloganLayout // layout.sloganLayout = sloganLayout
// //
// let privacyLayout = SecVerifyLayout() // let privacyLayout = SecVerifyLayout()
// privacyLayout.layoutBottom = NSNumber(floatLiteral: -Double(16.0 + GDScreen.SafeArea.bottom + 20)) // privacyLayout.layoutBottom = NSNumber(floatLiteral: -Double(16.0 + GDScreen.SafeArea.bottom + 20))
// privacyLayout.layoutCenterX = 0 // privacyLayout.layoutCenterX = 0
// privacyLayout.layoutHeight = 40 // privacyLayout.layoutHeight = 40
// privacyLayout.layoutLeft = 50 // privacyLayout.layoutLeft = 50
// privacyLayout.layoutRight = -50 // privacyLayout.layoutRight = -50
// layout.privacyLayout = privacyLayout // layout.privacyLayout = privacyLayout
// //
// let switchLayout = SecVerifyLayout() // let switchLayout = SecVerifyLayout()
// switchLayout.layoutTop = NSNumber(floatLiteral: Double(GDScreen.height) * 0.75) // switchLayout.layoutTop = NSNumber(floatLiteral: Double(GDScreen.height) * 0.75)
// switchLayout.layoutCenterX = 0 // switchLayout.layoutCenterX = 0
// switchLayout.layoutHeight = 20 // switchLayout.layoutHeight = 20
// layout.switchLayout = switchLayout // layout.switchLayout = switchLayout
// //
// let loginLayout = SecVerifyLayout() // let loginLayout = SecVerifyLayout()
// loginLayout.layoutHeight = 50 // loginLayout.layoutHeight = 50
// loginLayout.layoutLeft = 50 // loginLayout.layoutLeft = 50
// loginLayout.layoutRight = -50 // loginLayout.layoutRight = -50
// loginLayout.layoutTop = NSNumber(floatLiteral: switchLayout.layoutTop.doubleValue - 50 - 16) // loginLayout.layoutTop = NSNumber(floatLiteral: switchLayout.layoutTop.doubleValue - 50 - 16)
// layout.loginLayout = loginLayout // layout.loginLayout = loginLayout
// //
// let phoneLayout = SecVerifyLayout() // let phoneLayout = SecVerifyLayout()
// phoneLayout.layoutHeight = 50 // phoneLayout.layoutHeight = 50
// phoneLayout.layoutLeft = 50 // phoneLayout.layoutLeft = 50
// phoneLayout.layoutRight = -50 // phoneLayout.layoutRight = -50
// phoneLayout.layoutTop = NSNumber(floatLiteral: loginLayout.layoutTop.doubleValue - 50 - 16) // phoneLayout.layoutTop = NSNumber(floatLiteral: loginLayout.layoutTop.doubleValue - 50 - 16)
// layout.phoneLayout = phoneLayout // layout.phoneLayout = phoneLayout
// //
// let leftControlLayout = SecVerifyLayout() // let leftControlLayout = SecVerifyLayout()
// leftControlLayout.layoutTop = NSNumber(floatLiteral: Double(GDScreen.SafeArea.top + 18)) // leftControlLayout.layoutTop = NSNumber(floatLiteral: Double(GDScreen.SafeArea.top + 18))
// leftControlLayout.layoutWidth = 40 // leftControlLayout.layoutWidth = 40
// leftControlLayout.layoutHeight = 40 // leftControlLayout.layoutHeight = 40
// if visitorDirectPhoneLogin { // if visitorDirectPhoneLogin {
// leftControlLayout.layoutRight = 8 // leftControlLayout.layoutRight = 8
// } else { // } else {
// leftControlLayout.layoutLeft = 8 // leftControlLayout.layoutLeft = 8
// } // }
// layout.leftControlLayout = leftControlLayout // layout.leftControlLayout = leftControlLayout
// SVSDKLoginManager.default().secLoginViewController?.dismiss(animated: false, completion: nil) // SVSDKLoginManager.default().secLoginViewController?.dismiss(animated: false, completion: nil)
SVSDKHyVerify.finishLoginVc(animated: false, completion: nil) SVSDKHyVerify.finishLoginVc(animated: false, completion: nil)
SVSDKHyVerify.setDelegate(self) SVSDKHyVerify.setDelegate(self)
......
...@@ -104,7 +104,7 @@ class GDAddNewAccountController: BaseViewController { ...@@ -104,7 +104,7 @@ class GDAddNewAccountController: BaseViewController {
let otherDescLabel = UILabel() let otherDescLabel = UILabel()
/// 第三方登录按钮 /// 第三方登录按钮
let qqBtn = UIButton(type: .system) let qqBtn = UIButton(type: .system)
let wechatBtn = UIButton(type: .system) // let wechatBtn = UIButton(type: .system)
let appleBtn = UIButton(type: .system) let appleBtn = UIButton(type: .system)
private func makePhoneTextInputView() { private func makePhoneTextInputView() {
...@@ -299,9 +299,9 @@ class GDAddNewAccountController: BaseViewController { ...@@ -299,9 +299,9 @@ class GDAddNewAccountController: BaseViewController {
qqBtn.setImage(qqBtnImage, for: .normal) qqBtn.setImage(qqBtnImage, for: .normal)
self.view.addSubview(qqBtn) self.view.addSubview(qqBtn)
let wechatBtnImage = GDPersonalBundle.imageNamed("share_invite_wechat_icon")?.withRenderingMode(.alwaysOriginal) // let wechatBtnImage = GDPersonalBundle.imageNamed("share_invite_wechat_icon")?.withRenderingMode(.alwaysOriginal)
wechatBtn.setImage(wechatBtnImage, for: .normal) // wechatBtn.setImage(wechatBtnImage, for: .normal)
self.view.addSubview(wechatBtn) // self.view.addSubview(wechatBtn)
let appleBtnImage = GDPersonalBundle.imageNamed("share_invite_apple_icon")?.withRenderingMode(.alwaysOriginal) let appleBtnImage = GDPersonalBundle.imageNamed("share_invite_apple_icon")?.withRenderingMode(.alwaysOriginal)
appleBtn.setImage(appleBtnImage, for: .normal) appleBtn.setImage(appleBtnImage, for: .normal)
...@@ -351,35 +351,54 @@ class GDAddNewAccountController: BaseViewController { ...@@ -351,35 +351,54 @@ class GDAddNewAccountController: BaseViewController {
} }
if #available(iOS 13.0, *) { if #available(iOS 13.0, *) {
wechatBtn.snp.makeConstraints { (make) in // wechatBtn.snp.makeConstraints { (make) in
make.size.equalTo(50) // make.size.equalTo(50)
make.right.equalTo(qqBtn.snp.left).offset(-20) // make.right.equalTo(qqBtn.snp.left).offset(-20)
make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
} // }
//
// qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(50)
// make.centerX.equalToSuperview()
// make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30)
// }
//
// appleBtn.snp.makeConstraints { (make) in
// make.size.equalTo(50)
// make.left.equalTo(qqBtn.snp.right).offset(20)
// make.bottom.equalTo(qqBtn)
// }
qqBtn.snp.makeConstraints { (make) in qqBtn.snp.makeConstraints { (make) in
make.size.equalTo(50) make.size.equalTo(50)
make.centerX.equalToSuperview() make.centerX.equalToSuperview().offset(-60)
make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30) make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30)
} }
appleBtn.snp.makeConstraints { (make) in appleBtn.snp.makeConstraints { (make) in
make.size.equalTo(50) make.size.equalTo(50)
make.left.equalTo(qqBtn.snp.right).offset(20) make.centerX.equalToSuperview().offset(60)
make.bottom.equalTo(qqBtn) make.bottom.equalTo(qqBtn)
} }
} else { } else {
appleBtn.isHidden = true appleBtn.isHidden = true
wechatBtn.snp.makeConstraints { (make) in // wechatBtn.snp.makeConstraints { (make) in
make.size.equalTo(50) // make.size.equalTo(50)
make.centerX.equalToSuperview().offset(-60) // make.centerX.equalToSuperview().offset(-60)
make.bottom.equalTo(qqBtn) // make.bottom.equalTo(qqBtn)
} // }
//
// qqBtn.snp.makeConstraints { (make) in
// make.size.equalTo(50)
// make.centerX.equalToSuperview().offset(60)
// make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30)
// }
qqBtn.snp.makeConstraints { (make) in qqBtn.snp.makeConstraints { (make) in
make.size.equalTo(50) make.size.equalTo(50)
make.centerX.equalToSuperview().offset(60) make.centerX.equalToSuperview()
make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30) make.bottom.equalTo(userAgreementTitleBtn.snp.top).offset(-30)
} }
} }
...@@ -467,10 +486,10 @@ class GDAddNewAccountController: BaseViewController { ...@@ -467,10 +486,10 @@ class GDAddNewAccountController: BaseViewController {
} }
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
wechatBtn.rx.tap.subscribe(onNext: {[weak self] (_) in // wechatBtn.rx.tap.subscribe(onNext: {[weak self] (_) in
guard let self = self else { return } // guard let self = self else { return }
self.socialLogin(with: .wechat) // self.socialLogin(with: .wechat)
}).disposed(by: disposeBag) // }).disposed(by: disposeBag)
qqBtn.rx.tap.subscribe(onNext: {[weak self] _ in qqBtn.rx.tap.subscribe(onNext: {[weak self] _ in
guard let self = self else { return } guard let self = self else { return }
......
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_apple_icon.png", "filename" : "share_invite_apple_icon.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_bg.png", "filename" : "share_invite_bg.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_circle_icon.png", "filename" : "share_invite_circle_icon.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_qq_icon.png", "filename" : "share_invite_qq_icon.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_qrcode_icon.png", "filename" : "share_invite_qrcode_icon.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
{ {
"images": [ "images" : [
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "1x" "scale" : "1x"
}, },
{ {
"filename": "share_invite_wechat_icon.png", "filename" : "share_invite_wechat_icon.png",
"idiom": "universal", "idiom" : "universal",
"scale": "2x" "scale" : "2x"
}, },
{ {
"idiom": "universal", "idiom" : "universal",
"scale": "3x" "scale" : "3x"
} }
], ],
"info": { "info" : {
"author": "xcode", "author" : "xcode",
"version": 1 "version" : 1
} }
} }
...@@ -566,6 +566,7 @@ struct GDPlat { ...@@ -566,6 +566,7 @@ struct GDPlat {
} }
static func setup(with delegate: TencentSessionDelegate) -> TencentOAuth? { static func setup(with delegate: TencentSessionDelegate) -> TencentOAuth? {
TencentOAuth.setIsUserAgreedAuthorization(true)
return TencentOAuth(appId: GDSDK.gd_QQAppId, andDelegate: delegate) return TencentOAuth(appId: GDSDK.gd_QQAppId, andDelegate: delegate)
} }
......
...@@ -38,7 +38,6 @@ struct GDTeenagerSocketCID { ...@@ -38,7 +38,6 @@ struct GDTeenagerSocketCID {
let teenagerView = GDTeenagerModePopupView() let teenagerView = GDTeenagerModePopupView()
teenagerView.currentVC = UIViewController.topViewController() teenagerView.currentVC = UIViewController.topViewController()
teenagerView.show(on: view) teenagerView.show(on: view)
} }
} }
} }
......
...@@ -2,6 +2,37 @@ ...@@ -2,6 +2,37 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>xiusechat</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>tencent</string>
<key>CFBundleURLSchemes</key>
<array>
<string>tencent102105469</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>qq</string>
<key>CFBundleURLSchemes</key>
<array>
<string>QQ0616017D</string>
</array>
</dict>
</array>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:xs.cxylive.top/xiusechat/</string> <string>applinks:xs.cxylive.top/xiusechat/</string>
<string>applinks:xs.cxylive.top/qq_conn/102105469/</string>
</array> </array>
</dict> </dict>
</plist> </plist>
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 sign in to comment