Commit 0d0f2cfa by pierce

fixed bugs

parent e940266c
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "share_small_icon_apple@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "share_small_icon_qq@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "share_small_icon_wechat@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -120,11 +120,29 @@ class GDSettingItemBindCell: GDSettingItemBaseCell { ...@@ -120,11 +120,29 @@ class GDSettingItemBindCell: GDSettingItemBaseCell {
self.socialPlatImageView.isHidden = false self.socialPlatImageView.isHidden = false
if model.plat == .apple { if model.plat == .apple {
self.socialPlatImageView.isHidden = true self.socialPlatImageView.isHidden = true
faceImageView.snp.remakeConstraints({ make in
make.left.equalToSuperview()
make.size.equalTo(0)
make.centerY.equalToSuperview()
})
} else {
faceImageView.snp.remakeConstraints({ make in
make.left.equalToSuperview().offset(16)
make.size.equalTo(30)
make.centerY.equalToSuperview()
})
} }
} else { } else {
self.bindBtn.style = .circle self.bindBtn.style = .circle
self.bindBtn.setTitle("绑定", for: .normal) self.bindBtn.setTitle("绑定", for: .normal)
self.socialPlatImageView.isHidden = true self.socialPlatImageView.isHidden = true
faceImageView.snp.remakeConstraints({ make in
make.left.equalToSuperview()
make.size.equalTo(0)
make.centerY.equalToSuperview()
})
} }
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
......
...@@ -55,6 +55,7 @@ public class GDURLVideoPlayView: BaseView { ...@@ -55,6 +55,7 @@ public class GDURLVideoPlayView: BaseView {
if isValidString(self.videoUrl) == false { if isValidString(self.videoUrl) == false {
return; return;
} }
self.videoUrl = self.videoUrl.replacingOccurrences(of: "\t", with: "")
self.destroyEngine() self.destroyEngine()
//使用默认配置 //使用默认配置
...@@ -81,7 +82,7 @@ public class GDURLVideoPlayView: BaseView { ...@@ -81,7 +82,7 @@ public class GDURLVideoPlayView: BaseView {
self.player = IJKFFMoviePlayerController.init(contentURL: URL.init(string: self.videoUrl), with: options) self.player = IJKFFMoviePlayerController.init(contentURL: URL.init(string: self.videoUrl), with: options)
self.player?.setPauseInBackground(false) self.player?.setPauseInBackground(false)
//缩放模式 //缩放模式
self.player?.scalingMode = .aspectFill self.player?.scalingMode = .aspectFit
//设置自动播放模式 //设置自动播放模式
self.player?.shouldAutoplay = true self.player?.shouldAutoplay = true
//准备播放 //准备播放
......
...@@ -20,8 +20,7 @@ class GDSettingAccountController: BaseViewController { ...@@ -20,8 +20,7 @@ class GDSettingAccountController: BaseViewController {
// 更新数据 // 更新数据
GDRouter.UserRouter?.refreshUserInfo() GDRouter.UserRouter?.refreshUserInfo()
// getSocialPlatInfo()
// getSocialPlatInfo()
} }
// MARK: UI // MARK: UI
...@@ -119,25 +118,25 @@ class GDSettingAccountController: BaseViewController { ...@@ -119,25 +118,25 @@ class GDSettingAccountController: BaseViewController {
} }
}.bind(to: phone.subtitle).disposed(by: self.disposeBag) }.bind(to: phone.subtitle).disposed(by: self.disposeBag)
// // QQ 按钮 // QQ 按钮
// let qq = GDSettingItemModel(type: .bind) let qq = GDSettingItemModel(type: .bind)
// qq.plat = .qq qq.plat = .qq
// qq.actionHandler = {[weak self] type in qq.actionHandler = {[weak self] type in
// guard let self = self else { return } guard let self = self else { return }
// switch type { switch type {
// case .bind: case .bind:
// if qq.platIsBind.value { if qq.platIsBind.value {
// GDStatistics.track(.settingAccountBindQQ, params: [.state: "解绑"]) GDStatistics.track(.settingAccountBindQQ, params: [.state: "解绑"])
// self.unbindPlat(plat: .qq) self.unbindPlat(plat: .qq)
// } else { } else {
// GDStatistics.track(.settingAccountBindQQ, params: [.state: "绑定"]) GDStatistics.track(.settingAccountBindQQ, params: [.state: "绑定"])
// self.bindPlat(plat: .qq) self.bindPlat(plat: .qq)
// } }
// default: break default: break
// } }
// } }
//
// // 微信按钮 // 微信按钮
// let wechat = GDSettingItemModel(type: .bind) // let wechat = GDSettingItemModel(type: .bind)
// wechat.plat = .wechat // wechat.plat = .wechat
// wechat.actionHandler = {[weak self] type in // wechat.actionHandler = {[weak self] type in
...@@ -154,23 +153,23 @@ class GDSettingAccountController: BaseViewController { ...@@ -154,23 +153,23 @@ class GDSettingAccountController: BaseViewController {
// default: break // default: break
// } // }
// } // }
//
// let apple = GDSettingItemModel(type: .bind) let apple = GDSettingItemModel(type: .bind)
// apple.plat = .apple apple.plat = .apple
// apple.actionHandler = {[weak self] type in apple.actionHandler = {[weak self] type in
// guard let self = self else { return } guard let self = self else { return }
// switch type { switch type {
// case .bind: case .bind:
// if apple.platIsBind.value { if apple.platIsBind.value {
// GDStatistics.track(.settingAccountBindApple, params: [.state: "解绑"]) GDStatistics.track(.settingAccountBindApple, params: [.state: "解绑"])
// self.unbindPlat(plat: .apple) self.unbindPlat(plat: .apple)
// } else { } else {
// GDStatistics.track(.settingAccountBindApple, params: [.state: "绑定"]) GDStatistics.track(.settingAccountBindApple, params: [.state: "绑定"])
// self.bindPlat(plat: .apple) self.bindPlat(plat: .apple)
// } }
// default: break default: break
// } }
// } }
// 账号注销 // 账号注销
let destroyAccount = GDSettingItemModel(type: .normal, title: "账号注销", userInteractor: true) {[weak self] (type) in let destroyAccount = GDSettingItemModel(type: .normal, title: "账号注销", userInteractor: true) {[weak self] (type) in
...@@ -201,141 +200,141 @@ class GDSettingAccountController: BaseViewController { ...@@ -201,141 +200,141 @@ class GDSettingAccountController: BaseViewController {
// 构建数据 // 构建数据
let securityItem = GDSettingSectionModel(sectionTitle: nil, items: [security]) let securityItem = GDSettingSectionModel(sectionTitle: nil, items: [security])
let accountSetting = GDSettingSectionModel(sectionTitle: "通过以下设置可提高安全等级", items: phoneArr, height: 30.0) let accountSetting = GDSettingSectionModel(sectionTitle: "通过以下设置可提高安全等级", items: phoneArr, height: 30.0)
// let socialAccount = GDSettingSectionModel(sectionTitle: "账号绑定", items: [qq, wechat, apple], height: 30.0) //let socialAccount = GDSettingSectionModel(sectionTitle: "账号绑定", items: [qq, wechat, apple], height: 30.0)*/
let socialAccount = GDSettingSectionModel(sectionTitle: "账号绑定", items: [qq, apple], height: 30.0)
let accountCancle = GDSettingSectionModel(sectionTitle: "", items: [destroyAccount], height: 8.0) let accountCancle = GDSettingSectionModel(sectionTitle: "", items: [destroyAccount], height: 8.0)
// socialAccount.identifier = self.socialAccountIdentifier socialAccount.identifier = self.socialAccountIdentifier
// self.tableView.items.accept([securityItem, accountSetting, socialAccount, accountCancle]) self.tableView.items.accept([securityItem, accountSetting, socialAccount, accountCancle])
self.tableView.items.accept([securityItem, accountSetting, accountCancle])
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
} }
// MARK: Method // MARK: Method
// func getSocialPlatInfo() { func getSocialPlatInfo() {
// GDPersonalHttpHelper.shared.getSocialAccountInfo().subscribe(onSuccess: {[weak self] (socialArr) in GDPersonalHttpHelper.shared.getSocialAccountInfo().subscribe(onSuccess: {[weak self] (socialArr) in
// guard let self = self else { return } guard let self = self else { return }
//
// let qq = GDSettingItemModel(type: .bind) let qq = GDSettingItemModel(type: .bind)
// qq.plat = .qq qq.plat = .qq
//
// let wechat = GDSettingItemModel(type: .bind) let wechat = GDSettingItemModel(type: .bind)
// wechat.plat = .wechat wechat.plat = .wechat
//
// let apple = GDSettingItemModel(type: .bind) let apple = GDSettingItemModel(type: .bind)
// apple.plat = .apple apple.plat = .apple
//
// for platInfo in socialArr { for platInfo in socialArr {
// if platInfo.openType == "2" { if platInfo.openType == "2" {
// // 微信 // 微信
// wechat.platFace.accept(platInfo.facePath) wechat.platFace.accept(platInfo.facePath)
// wechat.platName.accept(platInfo.nickname) wechat.platName.accept(platInfo.nickname)
// wechat.platIsBind.accept(true) wechat.platIsBind.accept(true)
// } else if platInfo.openType == "1" { } else if platInfo.openType == "1" {
// // QQ // QQ
// qq.platFace.accept(platInfo.facePath) qq.platFace.accept(platInfo.facePath)
// qq.platName.accept(platInfo.nickname) qq.platName.accept(platInfo.nickname)
// qq.platIsBind.accept(true) qq.platIsBind.accept(true)
// } else if platInfo.openType == "4" { } else if platInfo.openType == "4" {
// // 苹果登录 // 苹果登录
// apple.platFace.accept(platInfo.facePath) apple.platFace.accept(platInfo.facePath)
// apple.platName.accept(platInfo.nickname) apple.platName.accept(platInfo.nickname)
// apple.platIsBind.accept(true) apple.platIsBind.accept(true)
// } }
// } }
//
// let items = self.tableView.items.value let items = self.tableView.items.value
//
// for sector in items { for sector in items {
// // 找到账号区 // 找到账号区
// if sector.identifier == self.socialAccountIdentifier { if sector.identifier == self.socialAccountIdentifier {
// for platItem in sector.items { for platItem in sector.items {
// if platItem.plat == .qq { if platItem.plat == .qq {
// platItem.platFace.accept(qq.platFace.value) platItem.platFace.accept(qq.platFace.value)
// platItem.platName.accept(qq.platName.value) platItem.platName.accept(qq.platName.value)
// platItem.platIsBind.accept(qq.platIsBind.value) platItem.platIsBind.accept(qq.platIsBind.value)
// } else if platItem.plat == .wechat { } else if platItem.plat == .wechat {
// platItem.platFace.accept(wechat.platFace.value) platItem.platFace.accept(wechat.platFace.value)
// platItem.platName.accept(wechat.platName.value) platItem.platName.accept(wechat.platName.value)
// platItem.platIsBind.accept(wechat.platIsBind.value) platItem.platIsBind.accept(wechat.platIsBind.value)
// } else if platItem.plat == .apple { } else if platItem.plat == .apple {
// platItem.platFace.accept(apple.platFace.value) platItem.platFace.accept(apple.platFace.value)
// platItem.platName.accept(apple.platName.value) platItem.platName.accept(apple.platName.value)
// platItem.platIsBind.accept(apple.platIsBind.value) platItem.platIsBind.accept(apple.platIsBind.value)
// } }
// } }
// break break
// } }
// } }
//
// }, onFailure: { (error) in }, onFailure: { (error) in
//
// }).disposed(by: disposeBag) }).disposed(by: disposeBag)
// } }
// /// 绑定第三方品台 /// 绑定第三方品台
// /// - Parameter plat: 平台 /// - Parameter plat: 平台
// private func bindPlat(plat: GDSocial.Plat) { private func bindPlat(plat: GDSocial.Plat) {
// // 未绑定进行绑定 // 未绑定进行绑定
// GDRouter.UserRouter?.bindSocialPlat(on: plat, currentVC: self).subscribe(onSuccess: {[weak self] (_) in GDRouter.UserRouter?.bindSocialPlat(on: plat, currentVC: self).subscribe(onSuccess: {[weak self] (_) in
// FTIndicator.showToastMessage("绑定成功") FTIndicator.showToastMessage("绑定成功")
// guard let self = self else { return } guard let self = self else { return }
//// self.getSocialPlatInfo() // self.getSocialPlatInfo()
// }, onFailure: { (error) in }, onFailure: { (error) in
// guard let error = error as? GDMoyaError else { return } guard let error = error as? GDMoyaError else { return }
// FTIndicator.showToastMessage(error.msg) FTIndicator.showToastMessage(error.msg)
// }).disposed(by: disposeBag) }).disposed(by: disposeBag)
// } }
//
// /// 解绑第三方平台 /// 解绑第三方平台
// /// - Parameter plat: 平台 /// - Parameter plat: 平台
// private func unbindPlat(plat: GDSocial.Plat) { private func unbindPlat(plat: GDSocial.Plat) {
//
// var hadBind = false var hadBind = false
// for section in tableView.items.value { for section in tableView.items.value {
// if section.identifier == socialAccountIdentifier { if section.identifier == socialAccountIdentifier {
// for platItem in section.items { for platItem in section.items {
// if platItem.plat != plat && platItem.platIsBind.value { if platItem.plat != plat && platItem.platIsBind.value {
// hadBind = true hadBind = true
// break break
// } }
// } }
// break break
// } }
// } }
//
// // 已绑定进行解绑 // 已绑定进行解绑
// if GDRouter.UserRouter?.user.value.phone?.count ?? 0 <= 0 && !hadBind { if GDRouter.UserRouter?.user.value.phone?.count ?? 0 <= 0 && !hadBind {
//
// _ = GDAlertView.showAlertView(title: "解绑失败", message: "您需要至少绑定一个社交账号或手机号,否则将无法登录\(GDAppConfig.gd_appName)\n立即绑定手机号?", confirmTitle: "确定", cancleTitle: "取消", confirmAction: { _ = GDAlertView.showAlertView(title: "解绑失败", message: "您需要至少绑定一个社交账号或手机号,否则将无法登录\(GDAppConfig.gd_appName)\n立即绑定手机号?", confirmTitle: "确定", cancleTitle: "取消", confirmAction: {
//
// GDRouter.LoginRouter?.showUserBindPhoneVC(bindPhoneType: .bindPhone, canSkip: false) GDRouter.LoginRouter?.showUserBindPhoneVC(bindPhoneType: .bindPhone, canSkip: false)
// }, cancleAction: nil) }, cancleAction: nil)
//
// return return
// } }
//
// _ = GDAlertView.showAlertView(viewController: self, title: nil, message: "解绑后将无法再使用此账号登录!\n仍然解绑?", confirmTitle: "解绑", cancleTitle: "取消", confirmAction: { _ = GDAlertView.showAlertView(viewController: self, title: nil, message: "解绑后将无法再使用此账号登录!\n仍然解绑?", confirmTitle: "解绑", cancleTitle: "取消", confirmAction: {
//
// GDRouter.UserRouter?.unbindSocialPlat(opentype: plat).subscribe(onSuccess: {[weak self] (_) in GDRouter.UserRouter?.unbindSocialPlat(opentype: plat).subscribe(onSuccess: {[weak self] (_) in
// guard let self = self else { return } guard let self = self else { return }
//
// let phone = GDRouter.UserRouter?.user.value.phone ?? "" let phone = GDRouter.UserRouter?.user.value.phone ?? ""
// if phone.count > 0 && !hadBind { if phone.count > 0 && !hadBind {
//
// _ = GDAlertView.showAlertView(title: "解绑完成", message: "下次请使用手机号登录\(GDAppConfig.gd_appName)\n手机号:\(phone)", confirmTitle: "我知道了", cancleTitle: nil, confirmAction: nil, cancleAction: nil) _ = GDAlertView.showAlertView(title: "解绑完成", message: "下次请使用手机号登录\(GDAppConfig.gd_appName)\n手机号:\(phone)", confirmTitle: "我知道了", cancleTitle: nil, confirmAction: nil, cancleAction: nil)
//
// } else { } else {
// FTIndicator.showToastMessage("解绑成功") FTIndicator.showToastMessage("解绑成功")
// } }
// self.getSocialPlatInfo() self.getSocialPlatInfo()
// }, onFailure: { (error) in }, onFailure: { (error) in
// guard let error = error as? GDMoyaError else { return } guard let error = error as? GDMoyaError else { return }
// FTIndicator.showToastMessage(error.msg) FTIndicator.showToastMessage(error.msg)
// }).disposed(by: self.disposeBag) }).disposed(by: self.disposeBag)
//
// }, cancleAction: nil) }, cancleAction: nil)
//
// } }
} }
...@@ -68,8 +68,11 @@ class GDTeenagerPlayController: BaseViewController { ...@@ -68,8 +68,11 @@ class GDTeenagerPlayController: BaseViewController {
} }
closeBtn.rx.tap closeBtn.rx.tap
.bind(to: self.rx_dismissViewController) .subscribe(onNext: { [weak self] _ in
.disposed(by: disposeBag) self?.viewModel.leaveRoom()
self?.streamPlayView.destroyEngine()
self?.dismiss(animated: true)
}).disposed(by: disposeBag)
} }
/// 流播放 View /// 流播放 View
......
...@@ -12,7 +12,8 @@ import RxCocoa ...@@ -12,7 +12,8 @@ import RxCocoa
import GDToolBox import GDToolBox
import GDRouter import GDRouter
let authArr: [GDPersonalAuthType] = [.phone, .idCard, .wechat] //let authArr: [GDPersonalAuthType] = [.phone, .idCard, .wechat]
let authArr: [GDPersonalAuthType] = [.phone, .idCard]
class GDZoneInfoAuthCell: UITableViewCell { class GDZoneInfoAuthCell: UITableViewCell {
......
...@@ -32,5 +32,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -32,5 +32,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true return true
} }
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
Bifrost.checkAllModules(with: #selector(application(_:open:options:)), arguments: [app, url, options])
}
func applicationDidBecomeActive(_ application: UIApplication) {
Bifrost.checkAllModules(with: #selector(applicationDidBecomeActive(_:)), arguments: [application])
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Bifrost.checkAllModules(with: #selector(application(_:didRegisterForRemoteNotificationsWithDeviceToken:)), arguments: [application, deviceToken])
}
func applicationDidEnterBackground(_ application: UIApplication) {
Bifrost.checkAllModules(with: #selector(applicationDidEnterBackground(_:)), arguments: [application])
}
func applicationWillEnterForeground(_ application: UIApplication) {
Bifrost.checkAllModules(with: #selector(applicationWillEnterForeground(_:)), arguments: [application])
}
func applicationWillTerminate(_ application: UIApplication) {
Bifrost.checkAllModules(with: #selector(applicationWillTerminate(_:)), arguments: [application])
}
} }
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
<!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>LSApplicationQueriesSchemes</key>
<array>
<string>wtloginmqq2</string>
<string>mqqapi</string>
<string>mqqopensdkapiv2</string>
<string>mqqopensdkapiv3</string>
<string>mqq</string>
<string>mqqwpa</string>
<string>mqqopensdkssologin</string>
</array>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
<dict> <dict>
<key>aps-environment</key> <key>aps-environment</key>
<string>development</string> <string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<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>
......
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