Commit adf6c57423383ea9c3852ea6984c882c52c85919
1 parent
a8fed67e
主页宽度调小 , 上下滑地址取反
Showing
4 changed files
with
12 additions
and
9 deletions
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
| ... | ... | @@ -12,6 +12,9 @@ import CNLiveRequestBastKit |
| 12 | 12 | |
| 13 | 13 | let Width: CGFloat = UIScreen.main.bounds.size.width |
| 14 | 14 | let Height: CGFloat = UIScreen.main.bounds.size.height |
| 15 | +///主窗口宽度 | |
| 16 | +let MainViewW: CGFloat = Width-100 | |
| 17 | + | |
| 15 | 18 | |
| 16 | 19 | ///存储是否第一次显示首页上滑引导 |
| 17 | 20 | let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey" |
| ... | ... | @@ -71,7 +74,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 71 | 74 | |
| 72 | 75 | ///无网.接口失败View |
| 73 | 76 | lazy var notNetworkView: UIView = { |
| 74 | - let W = Width-50 | |
| 77 | + let W = MainViewW | |
| 75 | 78 | let H = W*1.5 |
| 76 | 79 | let notNetworkView = UIView.init(frame: CGRect(x: 25, y: KSreenHeight*0.16, width: W, height: H )) |
| 77 | 80 | notNetworkView.backgroundColor = UIColor.white |
| ... | ... | @@ -368,7 +371,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 368 | 371 | var bannerView:CNCustomIndexView? = flowView.dequeueReusableCell() as? CNCustomIndexView |
| 369 | 372 | |
| 370 | 373 | if (bannerView == nil) { |
| 371 | - bannerView = CNCustomIndexView.init(frame: CGRectMake(0, 0, Width-50, Height)) | |
| 374 | + bannerView = CNCustomIndexView.init(frame: CGRectMake(0, 0, MainViewW, Height)) | |
| 372 | 375 | bannerView?.tag = index + 100 |
| 373 | 376 | bannerView?.layer.cornerRadius = 4 |
| 374 | 377 | bannerView?.layer.masksToBounds = false |
| ... | ... | @@ -384,7 +387,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 384 | 387 | } |
| 385 | 388 | |
| 386 | 389 | func sizeForPage(in flowView: NewPagedFlowView!) -> CGSize { |
| 387 | - return CGSize(width: Width-50, height: Height) | |
| 390 | + return CGSize(width: MainViewW, height: Height) | |
| 388 | 391 | } |
| 389 | 392 | |
| 390 | 393 | ///NewPagedFlowView 开始滑动 |
| ... | ... | @@ -436,7 +439,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 436 | 439 | |
| 437 | 440 | scrollView.isScrollEnabled = true |
| 438 | 441 | |
| 439 | - let toIndex:Int = Int(scrollView.contentOffset.x/(Width-50)) | |
| 442 | + let toIndex:Int = Int(scrollView.contentOffset.x/(MainViewW)) | |
| 440 | 443 | |
| 441 | 444 | if toIndex == self.backgroupView.currentApearViewIndex{ |
| 442 | 445 | return | ... | ... |
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
| ... | ... | @@ -118,8 +118,8 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange |
| 118 | 118 | set{ |
| 119 | 119 | self.mainView.idModel = newValue! |
| 120 | 120 | _idModel = newValue |
| 121 | - self.upSlideView.url = _idModel?.upPath | |
| 122 | - self.downSlideView.url = _idModel?.downPath | |
| 121 | + self.upSlideView.url = _idModel?.downPath | |
| 122 | + self.downSlideView.url = _idModel?.upPath | |
| 123 | 123 | self.topNavView.setTitleString(title:(_idModel?.name)!) |
| 124 | 124 | } |
| 125 | 125 | ... | ... |
metaCode/Classes/Main/HomePage/View/CNMainView.swift
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
| ... | ... | @@ -148,8 +148,8 @@ final class StandListModel: BaseModel, TableCodable { |
| 148 | 148 | var descBackgroundImg: String = ""//首页文字背景图 |
| 149 | 149 | var cardImg: String = ""//卡片背景图 |
| 150 | 150 | var cardBackgroundImg: String = ""//首页卡片背景图 |
| 151 | - var upPath: String = ""//上滑h5 | |
| 152 | - var downPath: String = ""//下滑h5 | |
| 151 | + var upPath: String = ""//顶部h5 | |
| 152 | + var downPath: String = ""//底部h5 | |
| 153 | 153 | var auth: Bool = false//身份是否验证 |
| 154 | 154 | |
| 155 | 155 | var createTimeString: String = "" | ... | ... |