Commit 8ed70d3375d98a8bcb53ceabb769b889015f9991

Authored by “张旭”
1 parent 9b562ea2

认证页-偶尔不显示tabbar问题

metaCode/Classes/Config/CNLiveConfigManager.swift
@@ -91,4 +91,8 @@ extension Notification.Name { @@ -91,4 +91,8 @@ extension Notification.Name {
91 //销毁播放器通知 91 //销毁播放器通知
92 public static let kPlayerDestroyNotification = Notification.Name("kPlayerDestroyNotification") 92 public static let kPlayerDestroyNotification = Notification.Name("kPlayerDestroyNotification")
93 } 93 }
  94 + struct AuthVNumPageManage {
  95 + //认证页垂直方向是哪个页面的通知 1上面页 2中间页 3下面页
  96 + public static let kAuthVNumPageChangedNotification = Notification.Name("kAuthVNumPageChangedNotification")
  97 + }
94 } 98 }
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
@@ -223,6 +223,9 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -223,6 +223,9 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
223 //我的身份排序后刷新 223 //我的身份排序后刷新
224 NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil) 224 NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil)
225 225
  226 + //认证页垂直方向是哪个页面的通知
  227 + NotificationCenter.default.addObserver(self, selector: #selector(kAuthVNumPageChangedNotificationAction), name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil)
  228 +
226 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight 229 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight
227 230
228 } 231 }
@@ -307,6 +310,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -307,6 +310,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
307 self.getApplyShopInfo() 310 self.getApplyShopInfo()
308 print("DSShopDarenAuthResultNotificationAction") 311 print("DSShopDarenAuthResultNotificationAction")
309 } 312 }
  313 + //刷新当前垂直是哪个页面
  314 + @objc func kAuthVNumPageChangedNotificationAction(noti:Notification){
  315 + let dict = (noti.userInfo ?? ["":""]) as! [String :Any]
  316 + let num = dict["AuthVNumPage"] as! Int
  317 + if num == 1{
  318 + self.vNumPage = .VNumPageDown
  319 + }else if num == 2{
  320 + self.vNumPage = .VNumPageMain
  321 + }else if num == 3{
  322 + self.vNumPage = .VNumPageUp
  323 + }
  324 + }
310 325
311 326
312 327
metaCode/Classes/Main/HomePage/Controller/ShopDownDetail/CNLiveDownShopDetailController.swift
@@ -26,6 +26,10 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD @@ -26,6 +26,10 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD
26 let upSlideView = self.view.superview as! CNUpSlideView 26 let upSlideView = self.view.superview as! CNUpSlideView
27 let scrollView = upSlideView.superview as! UIScrollView 27 let scrollView = upSlideView.superview as! UIScrollView
28 scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true) 28 scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true)
  29 +
  30 + let result:Dictionary = ["AuthVNumPage":2]
  31 + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
  32 +
29 currentViewController()?.tabBarController?.tabBar.isHidden = false 33 currentViewController()?.tabBarController?.tabBar.isHidden = false
30 34
31 let metaVC = currentViewController() as! CNMetaCodeHomePageController 35 let metaVC = currentViewController() as! CNMetaCodeHomePageController
@@ -91,6 +95,9 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD @@ -91,6 +95,9 @@ class CNLiveDownShopDetailController:CNLiveBaseViewController, UICollectionViewD
91 scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true) 95 scrollView.setContentOffset(CGPoint(x: 0, y: scrollView.height), animated: true)
92 currentViewController()?.tabBarController?.tabBar.isHidden = false 96 currentViewController()?.tabBarController?.tabBar.isHidden = false
93 97
  98 + let result:Dictionary = ["AuthVNumPage":2]
  99 + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
  100 +
94 let metaVC = currentViewController() as! CNMetaCodeHomePageController 101 let metaVC = currentViewController() as! CNMetaCodeHomePageController
95 let index = metaVC.pageFlowView.currentPageIndex 102 let index = metaVC.pageFlowView.currentPageIndex
96 let customIndexView = metaVC.pageFlowView.viewWithTag(100+index) as! CNCustomIndexView 103 let customIndexView = metaVC.pageFlowView.viewWithTag(100+index) as! CNCustomIndexView
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
@@ -691,6 +691,10 @@ class CNFrontMainView : UIView{ @@ -691,6 +691,10 @@ class CNFrontMainView : UIView{
691 let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView 691 let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView
692 let baseScrollView = customIndexView.baseScrollView 692 let baseScrollView = customIndexView.baseScrollView
693 baseScrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true) 693 baseScrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)
  694 +
  695 + let result:Dictionary = ["AuthVNumPage":1]
  696 + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
  697 +
694 currentViewController()?.tabBarController?.tabBar.isHidden = false 698 currentViewController()?.tabBarController?.tabBar.isHidden = false
695 customIndexView.superScrollView?.isScrollEnabled = true 699 customIndexView.superScrollView?.isScrollEnabled = true
696 700
@@ -704,6 +708,10 @@ class CNFrontMainView : UIView{ @@ -704,6 +708,10 @@ class CNFrontMainView : UIView{
704 let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView 708 let customIndexView = ((self.superview as! CNMainView).superview as! UIScrollView).superview as! CNCustomIndexView
705 let baseScrollView = customIndexView.baseScrollView 709 let baseScrollView = customIndexView.baseScrollView
706 baseScrollView.setContentOffset(CGPoint(x: 0, y: (baseScrollView.height*2+KNavigationHeight)), animated: true) 710 baseScrollView.setContentOffset(CGPoint(x: 0, y: (baseScrollView.height*2+KNavigationHeight)), animated: true)
  711 +
  712 + let result:Dictionary = ["AuthVNumPage":3]
  713 + NotificationCenter.default.post(name: Notification.Name.AuthVNumPageManage.kAuthVNumPageChangedNotification, object: nil, userInfo: result)
  714 +
707 currentViewController()?.tabBarController?.tabBar.isHidden = false 715 currentViewController()?.tabBarController?.tabBar.isHidden = false
708 customIndexView.superScrollView?.isScrollEnabled = true 716 customIndexView.superScrollView?.isScrollEnabled = true
709 717