Commit 17cd45492690ca00c791e931cb05838c6114216f
1 parent
67ffb2cb
第一次下载认证-背景图都是蓝色的问题 , 交易记录push方式替换 , 解决self.view变成KSreenHeight-KTabBarHeight的问题
Showing
4 changed files
with
20 additions
and
22 deletions
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| ... | ... | @@ -243,26 +243,30 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 243 | 243 | } |
| 244 | 244 | override func viewWillAppear(_ animated: Bool) { |
| 245 | 245 | super.viewWillAppear(animated) |
| 246 | -// print("uid = ",UserInfoManager.shared.userInfo.uid) | |
| 247 | - } | |
| 248 | - | |
| 249 | - override func viewDidAppear(_ animated: Bool) { | |
| 250 | - super.viewDidAppear(animated) | |
| 251 | 246 | self.view.height = KSreenHeight |
| 252 | 247 | self.topNavView.isHidden = true |
| 253 | - | |
| 248 | +// print("22222222currentPageIndex:\(self.pageFlowView.currentPageIndex)") | |
| 254 | 249 | switch vNumPage { |
| 255 | 250 | case .VNumPageMain://中间主页 |
| 256 | 251 | self.tabBarController?.tabBar.isHidden = false |
| 257 | 252 | case .VNumPageUp://上滑页 |
| 258 | 253 | self.tabBarController?.tabBar.isHidden = true |
| 259 | 254 | self.tabBarController?.tabBar.height = 0 |
| 255 | + self.view.height = KSreenHeight | |
| 260 | 256 | case .VNumPageDown://下滑页 |
| 261 | 257 | self.tabBarController?.tabBar.isHidden = true |
| 262 | 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 | 270 | deinit { |
| 267 | 271 | /// 移除通知 |
| 268 | 272 | NotificationCenter.default.removeObserver(self) |
| ... | ... | @@ -499,11 +503,14 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 499 | 503 | |
| 500 | 504 | self.backgroupView.replaceCurerrentApearView(fromIndex: self.backgroupView.currentApearViewIndex, toIndex: toIndex) |
| 501 | 505 | |
| 506 | + let identityModel = dataArray[toIndex] as! StandListModel | |
| 502 | 507 | if let toBannerView = self.pageFlowView.cells[toIndex] as? CNCustomIndexView{ |
| 503 | 508 | UIView.animate(withDuration: 0.2) { |
| 504 | 509 | toBannerView.downSlideView.frame = CGRectMake(-LeftGap, 0, KSreenWidth, KSreenHeight) |
| 505 | 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 | 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 | 33 | let dataModel = CNLiveShopConsoleModel() |
| 34 | 34 | return dataModel |
| 35 | 35 | }() |
| 36 | - | |
| 36 | + | |
| 37 | 37 | override func viewDidLoad() { |
| 38 | 38 | super.viewDidLoad() |
| 39 | 39 | self.view.backgroundColor = .white |
| ... | ... | @@ -45,7 +45,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel |
| 45 | 45 | make.left.bottom.right.equalToSuperview() |
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | - | |
| 48 | + | |
| 49 | 49 | // MARK: - UICollectionViewDelegate |
| 50 | 50 | func numberOfSections(in collectionView: UICollectionView) -> Int { |
| 51 | 51 | return self.dataModel.list.count |
| ... | ... | @@ -132,7 +132,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel |
| 132 | 132 | // } |
| 133 | 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 | 136 | }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{ |
| 137 | 137 | //直播管理 |
| 138 | 138 | let webVC = CNWebViewController() | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideView.swift
| ... | ... | @@ -105,16 +105,6 @@ class CNDownSlideView:UIView{ |
| 105 | 105 | }else if(type == UpDownTypeShopDetail){ |
| 106 | 106 | |
| 107 | 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 | 108 | self.addSubview(self.shopConsoleVC.view) |
| 119 | 109 | |
| 120 | 110 | }else{ | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNHomePageBackgroupView.swift
| ... | ... | @@ -15,7 +15,7 @@ class CNHomePageBackgroupSubView : UIView |
| 15 | 15 | var preSubView: CNHomePageBackgroupSubView? |
| 16 | 16 | ///后面的视图 |
| 17 | 17 | var nextSubView: CNHomePageBackgroupSubView? |
| 18 | - | |
| 18 | + var idModel: StandListModel? | |
| 19 | 19 | var name: String = "" |
| 20 | 20 | |
| 21 | 21 | lazy var imageView: UIImageView = { |
| ... | ... | @@ -115,7 +115,7 @@ class CNHomePageBackgroupView: UIView{ |
| 115 | 115 | subView.setTitle(title: navTitle) |
| 116 | 116 | subView.imageView.kf.indicatorType = .activity |
| 117 | 117 | subView.imageView.kf.setImage(with: URL(string: idModel.backgroundImg),placeholder: UIImage(named: "homePage_backgroup_blue")) |
| 118 | - | |
| 118 | + subView.idModel = idModel | |
| 119 | 119 | //更新双向链表 |
| 120 | 120 | let lastSubView: CNHomePageBackgroupSubView? = self.groupSubViewDataArray.last |
| 121 | 121 | lastSubView?.nextSubView = subView |
| ... | ... | @@ -179,6 +179,7 @@ class CNHomePageBackgroupView: UIView{ |
| 179 | 179 | //把要显示的view放到最顶层 |
| 180 | 180 | if let subView = self.currentApearView{ |
| 181 | 181 | self.bringSubviewToFront(subView) |
| 182 | + subView.imageView.kf.setImage(with: URL(string: subView.idModel?.backgroundImg ?? ""),placeholder: UIImage(named: "homePage_backgroup_blue")) | |
| 182 | 183 | } |
| 183 | 184 | //更新当前显示的view所处的位置 |
| 184 | 185 | self.currentApearViewIndex = toIndex | ... | ... |