Commit 185f860f authored by David黄金龙's avatar David黄金龙

修改 首页弹窗 逻辑

parent e42f57a2
......@@ -466,12 +466,18 @@ private extension YHHomeHoldViewPageViewController {
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
//判断是否在 首页tab
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
if vc.selectedIndex != 0 {
return
}
}
//判断是否在 首页-推荐tab
if self.segmentedView.selectedIndex != 0 {
return
}
self.princleVM.postAlertStatus(20) { success, error in
}
......@@ -496,6 +502,9 @@ private extension YHHomeHoldViewPageViewController {
let view = YHManagerFuncGuildeCheckView.sheetView()
view.itemRect = viewFrame
view.block = {
self.homePageVC.gotoYinHeMgrVC()
}
view.show()
self.homePageVC.homeCollectView.isScrollEnabled = true
......
......@@ -381,6 +381,10 @@ extension YHHomePageViewController {
//MARK: - public方法
extension YHHomePageViewController {
func gotoYinHeMgrVC() {
self.gotoMgrVC()
}
func goTop() {
self.homeCollectView.setContentOffset(CGPoint(x: 0, y: -homeHeaderViewHeight), animated: true)
}
......
......@@ -10,7 +10,7 @@ import UIKit
class YHManagerFuncGuildeCheckView: UIView {
typealias Block = (Int) -> ()
typealias Block = () -> ()
var block: Block?
lazy var blackMaskView: UIView = {
......@@ -66,6 +66,10 @@ class YHManagerFuncGuildeCheckView: UIView {
updateUI()
}
}
}
extension YHManagerFuncGuildeCheckView {
......@@ -84,7 +88,7 @@ extension YHManagerFuncGuildeCheckView {
}
@objc func clickCloseBtn() {
self.block?(1)
self.block?()
dismiss()
}
}
......
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 to comment