Commit e940266c by pierce

qq登录接入

parent bd821e8b
Showing with 141 additions and 90 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"
......
...@@ -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