|
@@ -40,6 +40,7 @@ class RegisterLoginViewController: BaseViewController {
|
|
view.addSubview(mobileLoginButton)
|
|
view.addSubview(mobileLoginButton)
|
|
view.addSubview(weixinLoginButton)
|
|
view.addSubview(weixinLoginButton)
|
|
view.addSubview(QQLoginButton)
|
|
view.addSubview(QQLoginButton)
|
|
|
|
+ view.addSubview(agreementLabel)
|
|
view.insertSubview(navigationBar, aboveSubview: playerView)
|
|
view.insertSubview(navigationBar, aboveSubview: playerView)
|
|
view.insertSubview(navigationBar, aboveSubview: bgView)
|
|
view.insertSubview(navigationBar, aboveSubview: bgView)
|
|
|
|
|
|
@@ -66,7 +67,7 @@ class RegisterLoginViewController: BaseViewController {
|
|
|
|
|
|
|
|
|
|
mobileLoginButton.snp.makeConstraints { (make) in
|
|
mobileLoginButton.snp.makeConstraints { (make) in
|
|
- make.bottom.equalTo(weixinLoginButton.snp.top).offset(-20)
|
|
|
|
|
|
+ make.bottom.equalTo(QQLoginButton.snp.top).offset(-20)
|
|
make.left.equalTo(30)
|
|
make.left.equalTo(30)
|
|
make.right.equalTo(-30)
|
|
make.right.equalTo(-30)
|
|
make.height.equalTo(48)
|
|
make.height.equalTo(48)
|
|
@@ -74,19 +75,35 @@ class RegisterLoginViewController: BaseViewController {
|
|
mobileLoginButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
|
|
mobileLoginButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 5)
|
|
|
|
|
|
weixinLoginButton.snp.makeConstraints { (make) in
|
|
weixinLoginButton.snp.makeConstraints { (make) in
|
|
- make.bottom.equalTo(-40)
|
|
|
|
|
|
+ make.bottom.equalTo(agreementLabel.snp.top).offset(-15)
|
|
|
|
+
|
|
make.centerX.equalToSuperview().offset(-30)
|
|
make.centerX.equalToSuperview().offset(-30)
|
|
}
|
|
}
|
|
QQLoginButton.snp.makeConstraints { (make) in
|
|
QQLoginButton.snp.makeConstraints { (make) in
|
|
- make.bottom.equalTo(-40)
|
|
|
|
|
|
+ make.bottom.equalTo(agreementLabel.snp.top).offset(-15)
|
|
make.centerX.equalToSuperview().offset(30)
|
|
make.centerX.equalToSuperview().offset(30)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ agreementLabel.snp.makeConstraints { (make) in
|
|
|
|
+ make.bottom.equalTo(-(kSafeTabBarHeight+20))
|
|
|
|
+ make.centerX.equalToSuperview()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
override func setupData() {
|
|
override func setupData() {
|
|
player.play()
|
|
player.play()
|
|
|
|
+
|
|
|
|
+ agreementLabel.addClickText("由你用户协议", attributeds: [NSAttributedString.Key.font:kRegularFont13 as Any,NSAttributedString.Key.foregroundColor:kffffffColor,NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,NSAttributedString.Key.underlineColor:kffffffColor], transmitBody: nil) {
|
|
|
|
+ (data) in
|
|
|
|
+ Mediator.push(H5RouterModuleType.pushContentId6)
|
|
|
|
+ }
|
|
|
|
+ agreementLabel.addClickText("隐私条款", attributeds: [NSAttributedString.Key.font:kRegularFont13 as Any,NSAttributedString.Key.foregroundColor:kffffffColor,NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,NSAttributedString.Key.underlineColor:kffffffColor], transmitBody: nil) {
|
|
|
|
+ (data) in
|
|
|
|
+ Mediator.push(H5RouterModuleType.pushContentId11)
|
|
|
|
+ }
|
|
|
|
+
|
|
navigationBar.onClickLeftButton = {
|
|
navigationBar.onClickLeftButton = {
|
|
[weak self] in
|
|
[weak self] in
|
|
//移除本地用户信息
|
|
//移除本地用户信息
|
|
@@ -165,6 +182,17 @@ class RegisterLoginViewController: BaseViewController {
|
|
return QQLoginButton
|
|
return QQLoginButton
|
|
}()
|
|
}()
|
|
|
|
|
|
|
|
+ private lazy var agreementLabel: FMLinkLabel = {
|
|
|
|
+ let agreementLabel = FMLinkLabel()
|
|
|
|
+ agreementLabel.numberOfLines = 0
|
|
|
|
+ agreementLabel.textColor = kbbbbbbColor
|
|
|
|
+ agreementLabel.font = kRegularFont12
|
|
|
|
+ agreementLabel.isUserInteractionEnabled = true
|
|
|
|
+ agreementLabel.text = "登录即表示你已阅读并同意 由你用户协议 和 隐私条款"
|
|
|
|
+ agreementLabel.textAlignment = .center
|
|
|
|
+ return agreementLabel
|
|
|
|
+ }()
|
|
|
|
+
|
|
private lazy var playerView: UIView = {
|
|
private lazy var playerView: UIView = {
|
|
let playerView = UIView()
|
|
let playerView = UIView()
|
|
return playerView
|
|
return playerView
|
|
@@ -200,7 +228,7 @@ class RegisterLoginViewController: BaseViewController {
|
|
//第三方登录
|
|
//第三方登录
|
|
func tripartiteLogin(platformType:UMSocialPlatformType,loginType:LoginType) {
|
|
func tripartiteLogin(platformType:UMSocialPlatformType,loginType:LoginType) {
|
|
|
|
|
|
- UMManager.shared.loginGetUserInfo(platformType: platformType) {
|
|
|
|
|
|
+ UMManager.shared.loginGetUserInfo(platformType: platformType, currentViewController: self) {
|
|
[weak self] (userModel) -> (Void) in
|
|
[weak self] (userModel) -> (Void) in
|
|
let wxLoginModel = userModel
|
|
let wxLoginModel = userModel
|
|
SwiftMoyaNetWorkServiceUser.shared().userTripartiteRegisterTLoginApi(loginType:loginType,open_id: wxLoginModel.open_id, union_id: wxLoginModel.union_id, avatar: wxLoginModel.avatar, username: wxLoginModel.username, gender: wxLoginModel.gender, completion: {
|
|
SwiftMoyaNetWorkServiceUser.shared().userTripartiteRegisterTLoginApi(loginType:loginType,open_id: wxLoginModel.open_id, union_id: wxLoginModel.union_id, avatar: wxLoginModel.avatar, username: wxLoginModel.username, gender: wxLoginModel.gender, completion: {
|