Commit 806f0a2a by pierce

fixed bugs

parent 523e9cbb
...@@ -371,7 +371,7 @@ public class GDAlertView: BaseView { ...@@ -371,7 +371,7 @@ public class GDAlertView: BaseView {
} }
// MARK: Method // MARK: Method
private let minHeight: CGFloat = 164 private let minHeight: CGFloat = 180
public func show(on view: UIView, animate: Bool = true) { public func show(on view: UIView, animate: Bool = true) {
guard self.superview == nil else { return } guard self.superview == nil else { return }
view.addSubview(self) view.addSubview(self)
...@@ -385,7 +385,7 @@ public class GDAlertView: BaseView { ...@@ -385,7 +385,7 @@ public class GDAlertView: BaseView {
buttonHeight = 45 buttonHeight = 45
} }
let topSpace: CGFloat = 4 let topSpace: CGFloat = 24
let contentSpace: CGFloat = 4 let contentSpace: CGFloat = 4
let buttonSpace: CGFloat = 16 let buttonSpace: CGFloat = 16
...@@ -403,7 +403,7 @@ public class GDAlertView: BaseView { ...@@ -403,7 +403,7 @@ public class GDAlertView: BaseView {
if bgView.height < minHeight { if bgView.height < minHeight {
bgView.height = minHeight bgView.height = minHeight
contentLabel.centerY = bgView.height / 2.0 - 10 contentLabel.centerY = bgView.height / 2.0
titleLabel.y = contentLabel.y - contentSpace - titleLabel.height titleLabel.y = contentLabel.y - contentSpace - titleLabel.height
} }
......
...@@ -89,10 +89,7 @@ class GDWebviewPlugin: GDToolBoxWebviewPlugin { ...@@ -89,10 +89,7 @@ class GDWebviewPlugin: GDToolBoxWebviewPlugin {
/// 打开发布动态界面 /// 打开发布动态界面
override func showMomentVC(rootVC: UIViewController?) { override func showMomentVC(rootVC: UIViewController?) {
/// 打开动态页面 /// 打开动态页面
if let momentPlaza = GDRouter.Moment?.momentPlazaController() { GDRouter.Tabbar?.jumpToTabbar(page: .moment, rootVC: rootVC)
momentPlaza.hidesBottomBarWhenPushed = true
rootVC?.navigationController?.pushViewController(momentPlaza, animated: true)
}
} }
/// 打开发布动态界面 /// 打开发布动态界面
......
...@@ -99,6 +99,8 @@ extension GDBaseBussinessModule: BifrostModuleProtocol { ...@@ -99,6 +99,8 @@ extension GDBaseBussinessModule: BifrostModuleProtocol {
// 埋点 // 埋点
GDStatistics.track(.open) GDStatistics.track(.open)
// 开启友盟统计
UMConfigure.initWithAppkey("66714089cd5dc22f9621c1cd", channel: GDAppConfig.gd_cid)
if application.responds(to: #selector(UIApplication.registerUserNotificationSettings(_:))) { if application.responds(to: #selector(UIApplication.registerUserNotificationSettings(_:))) {
let settings = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) let settings = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
UIApplication.shared.registerUserNotificationSettings(settings) UIApplication.shared.registerUserNotificationSettings(settings)
......
...@@ -511,7 +511,7 @@ class GDLiveAnchorStartView: BaseView { ...@@ -511,7 +511,7 @@ class GDLiveAnchorStartView: BaseView {
guard let self = self else { return } guard let self = self else { return }
GDlog.verbose("====> Test End \(self.startEnable)") GDlog.verbose("====> Test End \(self.startEnable)")
if success { if success {
let wishStr = ""//self.viewModel.wishListViewModel.convertToWishStr() let wishStr = self.viewModel.wishListViewModel.convertToWishStr()
// 成功之后在外部等待推流成功后销毁progressVIew // 成功之后在外部等待推流成功后销毁progressVIew
self.completionHandler?(theme!, isContinue, wishStr) self.completionHandler?(theme!, isContinue, wishStr)
self.beautyPanelView?.dismiss() self.beautyPanelView?.dismiss()
......
...@@ -883,6 +883,7 @@ class GDLiveFunctionView: BaseView { ...@@ -883,6 +883,7 @@ class GDLiveFunctionView: BaseView {
.disposed(by: disposeBag) .disposed(by: disposeBag)
Observable.combineLatest(progressActivityBottomSpace.distinctUntilChanged(), self.activityWebView.viewModel.weburl, viewModel.hadWishList).subscribe(onNext: {[weak self] space, url, hadWishList in Observable.combineLatest(progressActivityBottomSpace.distinctUntilChanged(), self.activityWebView.viewModel.weburl, viewModel.hadWishList).subscribe(onNext: {[weak self] space, url, hadWishList in
guard let self = self else { return } guard let self = self else { return }
guard let _ = GDLiveHelper.shared.roomid.value else { return }
var realSpace = space var realSpace = space
if isValidString(url) == false { if isValidString(url) == false {
realSpace = 0 realSpace = 0
...@@ -892,18 +893,56 @@ class GDLiveFunctionView: BaseView { ...@@ -892,18 +893,56 @@ class GDLiveFunctionView: BaseView {
} }
if hadWishList { if hadWishList {
self.wishListView.snp.remakeConstraints { (make) in if ((self.wishListView.superview) != nil) {
make.width.equalTo(60) self.wishListView.snp.remakeConstraints { (make) in
make.height.equalTo(88) make.width.equalTo(60)
make.bottom.equalTo(self.activityWebView.snp.bottom).offset(-realSpace) make.height.equalTo(88)
make.centerX.equalTo(self.activityWebView.snp.centerX) if self.watchTimeView.isHidden || self.watchTimeView.superview == nil {
make.bottom.equalTo(self.activityWebView.snp.top)
} else {
make.bottom.equalTo(self.watchTimeView.snp.top)
}
make.centerX.equalTo(self.activityWebView.snp.centerX)
}
}
if self.progressActivityView.superview != nil {
self.progressActivityView.snp.remakeConstraints { make in
make.bottom.equalTo(self.wishListView.snp.top)
make.centerX.equalTo(self.activityWebView.snp.centerX)
make.width.equalTo(self.progressActivityView.width)
make.height.equalTo(self.progressActivityView.width + 20)
}
} }
} else { } else {
self.wishListView.snp.remakeConstraints { (make) in if ((self.wishListView.superview) != nil) {
make.width.equalTo(60) self.wishListView.snp.remakeConstraints { (make) in
make.height.equalTo(0) make.width.equalTo(60)
make.bottom.equalTo(self.activityWebView.snp.bottom).offset(-realSpace) make.height.equalTo(0)
make.centerX.equalTo(self.activityWebView.snp.centerX) make.bottom.equalTo(self.activityWebView.snp.bottom).offset(-realSpace)
make.centerX.equalTo(self.activityWebView.snp.centerX)
}
}
if self.progressActivityView.superview != nil {
self.progressActivityView.snp.remakeConstraints { (make) in
if GDLiveHelper.shared.role.value == .anchor {
if self.activityWebView.superview != nil {
make.bottom.equalTo(self.activityWebView.snp.top)
} else {
return
}
} else {
if self.watchTimeView.superview != nil {
make.bottom.equalTo(self.watchTimeView.snp.top)
} else {
return
}
}
make.centerX.equalTo(self.activityWebView.snp.centerX)
make.width.equalTo(self.progressActivityView.width)
make.height.equalTo(self.progressActivityView.width + 20)
}
} }
} }
......
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