Commit 17cd45492690ca00c791e931cb05838c6114216f

Authored by “张旭”
1 parent 67ffb2cb

第一次下载认证-背景图都是蓝色的问题 , 交易记录push方式替换 , 解决self.view变成KSreenHeight-KTabBarHeight的问题

metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
@@ -243,26 +243,30 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -243,26 +243,30 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
243 } 243 }
244 override func viewWillAppear(_ animated: Bool) { 244 override func viewWillAppear(_ animated: Bool) {
245 super.viewWillAppear(animated) 245 super.viewWillAppear(animated)
246 -// print("uid = ",UserInfoManager.shared.userInfo.uid)  
247 - }  
248 -  
249 - override func viewDidAppear(_ animated: Bool) {  
250 - super.viewDidAppear(animated)  
251 self.view.height = KSreenHeight 246 self.view.height = KSreenHeight
252 self.topNavView.isHidden = true 247 self.topNavView.isHidden = true
253 - 248 +// print("22222222currentPageIndex:\(self.pageFlowView.currentPageIndex)")
254 switch vNumPage { 249 switch vNumPage {
255 case .VNumPageMain://中间主页 250 case .VNumPageMain://中间主页
256 self.tabBarController?.tabBar.isHidden = false 251 self.tabBarController?.tabBar.isHidden = false
257 case .VNumPageUp://上滑页 252 case .VNumPageUp://上滑页
258 self.tabBarController?.tabBar.isHidden = true 253 self.tabBarController?.tabBar.isHidden = true
259 self.tabBarController?.tabBar.height = 0 254 self.tabBarController?.tabBar.height = 0
  255 + self.view.height = KSreenHeight
260 case .VNumPageDown://下滑页 256 case .VNumPageDown://下滑页
261 self.tabBarController?.tabBar.isHidden = true 257 self.tabBarController?.tabBar.isHidden = true
262 self.tabBarController?.tabBar.height = 0 258 self.tabBarController?.tabBar.height = 0
  259 + self.view.height = KSreenHeight
263 } 260 }
264 } 261 }
265 262
  263 + override func viewDidLayoutSubviews() {
  264 + super.viewDidLayoutSubviews()
  265 + //解决self.view变成KSreenHeight-KTabBarHeight的问题
  266 + if self.view.height == KSreenHeight-KTabBarHeight{
  267 + self.view.height = KSreenHeight
  268 + }
  269 + }
266 deinit { 270 deinit {
267 /// 移除通知 271 /// 移除通知
268 NotificationCenter.default.removeObserver(self) 272 NotificationCenter.default.removeObserver(self)
@@ -499,11 +503,14 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -499,11 +503,14 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
499 503
500 self.backgroupView.replaceCurerrentApearView(fromIndex: self.backgroupView.currentApearViewIndex, toIndex: toIndex) 504 self.backgroupView.replaceCurerrentApearView(fromIndex: self.backgroupView.currentApearViewIndex, toIndex: toIndex)
501 505
  506 + let identityModel = dataArray[toIndex] as! StandListModel
502 if let toBannerView = self.pageFlowView.cells[toIndex] as? CNCustomIndexView{ 507 if let toBannerView = self.pageFlowView.cells[toIndex] as? CNCustomIndexView{
503 UIView.animate(withDuration: 0.2) { 508 UIView.animate(withDuration: 0.2) {
504 toBannerView.downSlideView.frame = CGRectMake(-LeftGap, 0, KSreenWidth, KSreenHeight) 509 toBannerView.downSlideView.frame = CGRectMake(-LeftGap, 0, KSreenWidth, KSreenHeight)
505 toBannerView.downSlideView.upSlideVC.view.height = KSreenHeight-DownSlideBottomViewHeight 510 toBannerView.downSlideView.upSlideVC.view.height = KSreenHeight-DownSlideBottomViewHeight
506 - toBannerView.downSlideView.shopConsoleVC.view.height = KSreenHeight-DownSlideBottomViewHeight 511 + if identityModel.id == 9{
  512 + toBannerView.downSlideView.shopConsoleVC.view.height = KSreenHeight-DownSlideBottomViewHeight
  513 + }
507 toBannerView.upSlideView.frame = CGRectMake(-LeftGap, KSreenHeight*2,KSreenWidth, KSreenHeight) 514 toBannerView.upSlideView.frame = CGRectMake(-LeftGap, KSreenHeight*2,KSreenWidth, KSreenHeight)
508 } 515 }
509 516
metaCode/Classes/Main/HomePage/Controller/ShopUpConsole/CNLiveShopConsoleController.swift
@@ -33,7 +33,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel @@ -33,7 +33,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel
33 let dataModel = CNLiveShopConsoleModel() 33 let dataModel = CNLiveShopConsoleModel()
34 return dataModel 34 return dataModel
35 }() 35 }()
36 - 36 +
37 override func viewDidLoad() { 37 override func viewDidLoad() {
38 super.viewDidLoad() 38 super.viewDidLoad()
39 self.view.backgroundColor = .white 39 self.view.backgroundColor = .white
@@ -45,7 +45,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel @@ -45,7 +45,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel
45 make.left.bottom.right.equalToSuperview() 45 make.left.bottom.right.equalToSuperview()
46 } 46 }
47 } 47 }
48 - 48 +
49 // MARK: - UICollectionViewDelegate 49 // MARK: - UICollectionViewDelegate
50 func numberOfSections(in collectionView: UICollectionView) -> Int { 50 func numberOfSections(in collectionView: UICollectionView) -> Int {
51 return self.dataModel.list.count 51 return self.dataModel.list.count
@@ -132,7 +132,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel @@ -132,7 +132,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel
132 // } 132 // }
133 else if itemModel.type == CNLiveShopConsoleType.JYJL.rawValue{ 133 else if itemModel.type == CNLiveShopConsoleType.JYJL.rawValue{
134 //交易记录 134 //交易记录
135 - self.navigationController?.pushViewController(CNLiveShopTransViewController.init(), animated: true) 135 + navigationViewController().pushViewController(CNLiveShopTransViewController.init(), animated: true)
136 }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{ 136 }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{
137 //直播管理 137 //直播管理
138 let webVC = CNWebViewController() 138 let webVC = CNWebViewController()
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideView.swift
@@ -105,16 +105,6 @@ class CNDownSlideView:UIView{ @@ -105,16 +105,6 @@ class CNDownSlideView:UIView{
105 }else if(type == UpDownTypeShopDetail){ 105 }else if(type == UpDownTypeShopDetail){
106 106
107 }else if(type == UpDownTypeShopControlConsole){ 107 }else if(type == UpDownTypeShopControlConsole){
108 - var isContainVC = false  
109 - currentViewController()?.children.forEach({ vc in  
110 - if vc == self.shopConsoleVC{  
111 - isContainVC = true  
112 - }  
113 - })  
114 - if isContainVC == false{  
115 - currentViewController()?.addChild(self.shopConsoleVC)  
116 - self.shopConsoleVC.didMove(toParent: currentViewController())  
117 - }  
118 self.addSubview(self.shopConsoleVC.view) 108 self.addSubview(self.shopConsoleVC.view)
119 109
120 }else{ 110 }else{
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNHomePageBackgroupView.swift
@@ -15,7 +15,7 @@ class CNHomePageBackgroupSubView : UIView @@ -15,7 +15,7 @@ class CNHomePageBackgroupSubView : UIView
15 var preSubView: CNHomePageBackgroupSubView? 15 var preSubView: CNHomePageBackgroupSubView?
16 ///后面的视图 16 ///后面的视图
17 var nextSubView: CNHomePageBackgroupSubView? 17 var nextSubView: CNHomePageBackgroupSubView?
18 - 18 + var idModel: StandListModel?
19 var name: String = "" 19 var name: String = ""
20 20
21 lazy var imageView: UIImageView = { 21 lazy var imageView: UIImageView = {
@@ -115,7 +115,7 @@ class CNHomePageBackgroupView: UIView{ @@ -115,7 +115,7 @@ class CNHomePageBackgroupView: UIView{
115 subView.setTitle(title: navTitle) 115 subView.setTitle(title: navTitle)
116 subView.imageView.kf.indicatorType = .activity 116 subView.imageView.kf.indicatorType = .activity
117 subView.imageView.kf.setImage(with: URL(string: idModel.backgroundImg),placeholder: UIImage(named: "homePage_backgroup_blue")) 117 subView.imageView.kf.setImage(with: URL(string: idModel.backgroundImg),placeholder: UIImage(named: "homePage_backgroup_blue"))
118 - 118 + subView.idModel = idModel
119 //更新双向链表 119 //更新双向链表
120 let lastSubView: CNHomePageBackgroupSubView? = self.groupSubViewDataArray.last 120 let lastSubView: CNHomePageBackgroupSubView? = self.groupSubViewDataArray.last
121 lastSubView?.nextSubView = subView 121 lastSubView?.nextSubView = subView
@@ -179,6 +179,7 @@ class CNHomePageBackgroupView: UIView{ @@ -179,6 +179,7 @@ class CNHomePageBackgroupView: UIView{
179 //把要显示的view放到最顶层 179 //把要显示的view放到最顶层
180 if let subView = self.currentApearView{ 180 if let subView = self.currentApearView{
181 self.bringSubviewToFront(subView) 181 self.bringSubviewToFront(subView)
  182 + subView.imageView.kf.setImage(with: URL(string: subView.idModel?.backgroundImg ?? ""),placeholder: UIImage(named: "homePage_backgroup_blue"))
182 } 183 }
183 //更新当前显示的view所处的位置 184 //更新当前显示的view所处的位置
184 self.currentApearViewIndex = toIndex 185 self.currentApearViewIndex = toIndex