刘千军 11 月之前
父节点
当前提交
45eceb7433

+ 2 - 2
Koala/Koala/Modular/Home/V/HomeView.swift

@@ -14,8 +14,8 @@ class HomeView: BaseView {
     
     lazy var headerView:JDHomeHeaderView = {
         let width = SCREEN_WIDTH
-        let height = 489 * width / 864
-        let view = JDHomeHeaderView.init(frame: CGRect(x: 0, y: 0, width: width, height: height + 40))
+        let height = 160 * width / 375
+        let view = JDHomeHeaderView.init(frame: CGRect(x: 0, y: 0, width: width, height: height))
         view.clickNoticeBlock = { [weak self] index in
             let model:HomeNoticeModel = (self?.VM?.noticeList[index])!
 

+ 34 - 33
Koala/Koala/Modular/Home/V/JDHomeHeaderView.swift

@@ -44,9 +44,9 @@ class JDHomeHeaderView: BaseView {
     }()
     
     lazy var pageView:FSPageControl = {
-        let width = SCREEN_WIDTH
-        let height = 489 * width / 864
-        let view:FSPageControl = FSPageControl.init(frame: CGRect.init(x: 0, y: height-20, width: SCREEN_WIDTH, height: 20))
+        let width = SCREEN_WIDTH - 20
+        let height = 160 * width / 375
+        let view:FSPageControl = FSPageControl.init(frame: CGRect.init(x: 0, y: height-20, width: width, height: 20))
         view.contentHorizontalAlignment = .center
         view.contentInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
         view.hidesForSinglePage = true
@@ -55,9 +55,9 @@ class JDHomeHeaderView: BaseView {
     }()
    
     lazy var pageFlowView:PageFlowView = {
-        let width = SCREEN_WIDTH
-        let height = 489 * width / 864
-        let pageFlowView = PageFlowView.init(frame: CGRect.init(x: 0, y: 0, width: SCREEN_WIDTH, height: height))
+        let width = SCREEN_WIDTH - 20
+        let height = 160 * width / 375
+        let pageFlowView = PageFlowView.init(frame: CGRect.init(x: 0, y: 0, width: width, height: height))
         pageFlowView.backgroundColor = .clear
        
         pageFlowView.delegate = self
@@ -98,36 +98,37 @@ class JDHomeHeaderView: BaseView {
     
     override init(frame: CGRect) {
         super.init(frame: frame)
-        
+        bannerBgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 8)
         self.addSubview(bannerBgView)
         bannerBgView.snp.makeConstraints { make in
-            make.top.left.right.equalTo(self)
-            
-            make.height.equalTo(489 * SCREEN_WIDTH / 864)
+            make.top.equalTo(self)
+            make.left.equalTo(10)
+            make.right.equalTo(-10)
+            make.height.equalTo(160 * (SCREEN_WIDTH - 20) / 375)
         }
         
         self.bannerBgView.addSubview(pageFlowView)
         
         
-        self.addSubview(noticeBgView)
-        noticeBgView.snp.makeConstraints { make in
-            make.left.equalTo(self.snp.left).offset(18)
-            make.right.equalTo(self.snp.right).offset(-16)
-            make.height.equalTo(30)
-            make.bottom.equalTo(self.snp.bottom)
-        }
-        
-        self.noticeBgView.addSubview(noticeIv)
-        noticeIv.snp.makeConstraints { make in
-            make.left.equalTo(self.noticeBgView.snp.left).offset(7)
-            make.centerY.equalTo(self.noticeBgView)
-            make.size.equalTo(CGSizeMake(16, 16))
-        }
-        self.noticeBgView.addSubview(tipsCycle)
-        tipsCycle.snp.makeConstraints { make in
-            make.left.equalTo(noticeIv.snp.right).offset(4)
-            make.top.bottom.right.equalTo(self.noticeBgView)
-        }
+//        self.addSubview(noticeBgView)
+//        noticeBgView.snp.makeConstraints { make in
+//            make.left.equalTo(self.snp.left).offset(18)
+//            make.right.equalTo(self.snp.right).offset(-16)
+//            make.height.equalTo(30)
+//            make.bottom.equalTo(self.snp.bottom)
+//        }
+//        
+//        self.noticeBgView.addSubview(noticeIv)
+//        noticeIv.snp.makeConstraints { make in
+//            make.left.equalTo(self.noticeBgView.snp.left).offset(7)
+//            make.centerY.equalTo(self.noticeBgView)
+//            make.size.equalTo(CGSizeMake(16, 16))
+//        }
+//        self.noticeBgView.addSubview(tipsCycle)
+//        tipsCycle.snp.makeConstraints { make in
+//            make.left.equalTo(noticeIv.snp.right).offset(4)
+//            make.top.bottom.right.equalTo(self.noticeBgView)
+//        }
 //        headerView = loadFromNib()
 //        addSubview(headerView)
 //        headerView.snp.makeConstraints { (make) in
@@ -210,8 +211,8 @@ extension JDHomeHeaderView:PageFlowViewDelegate,PageFlowViewDataSource {
    
     
     func sizeForPageInFlowView(flowView: PageFlowView) -> CGSize {
-        let w = SCREEN_WIDTH
-        let h = 489 * w / 864
+        let w = SCREEN_WIDTH - 20
+        let h = 160 * w / 375
         return CGSize.init(width:w, height: h)
     }
     
@@ -231,8 +232,8 @@ extension JDHomeHeaderView:PageFlowViewDelegate,PageFlowViewDataSource {
         var bannerView = flowView.dequeueReusableCell()
         
         if bannerView == nil {
-            let w = SCREEN_WIDTH
-            let h = 489 * w / 864
+            let w = SCREEN_WIDTH - 20
+            let h = 160 * w / 375
             
             bannerView = IndexBannerSubiew.init(frame: CGRect.init(x: 0, y: 0, width: w, height: h))
             bannerView?.tag = index

+ 15 - 7
Koala/Koala/Modular/Home/V/JDHomeMenuCell.swift

@@ -14,9 +14,9 @@ class JDHomeMenuCell: UITableViewCell {
     lazy var collectionView : UICollectionView = {
         
         let layout = UICollectionViewFlowLayout.init()
-        
+    
 //        let itemWH = (Int(UIScreen.main.bounds.width) - 12) / 2
-        let itemW = (SCREEN_WIDTH - 82)/4
+        let itemW = (SCREEN_WIDTH - 20)/4
         
         layout.minimumInteritemSpacing = 0
         layout.itemSize = CGSizeMake(CGFloat(itemW), 98)
@@ -24,7 +24,7 @@ class JDHomeMenuCell: UITableViewCell {
         
         
         let v = UICollectionView(frame: .zero, collectionViewLayout: layout)
-        v.backgroundColor = .white
+        v.backgroundColor = ALLBackGroundColor
         v.isScrollEnabled = false
         v.showsHorizontalScrollIndicator = false
         v.showsVerticalScrollIndicator = false
@@ -34,19 +34,27 @@ class JDHomeMenuCell: UITableViewCell {
         return v
     }()
     
-    var titleAry = ["存款" , "取款" , "汇兑","客服"]
+    var titleAry = [switchLanguage("存款") , switchLanguage("取款"), switchLanguage("汇兑"),switchLanguage("客服")]
     
     var iconAry = ["jdhome_menu_0" , "jdhome_menu_1" , "jdhome_menu_2", "jdhome_menu_3"]
     
     
     override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
+        contentView.backgroundColor = ALLBackGroundColor
         
         contentView.addSubview(collectionView)
+        
+       // collectionView.setViewLayerBorderColor(myColor: .red, borderWidth: 1, maskBounds: 4)
+        collectionView.layer.borderColor = ViewBorderColor.cgColor
+        collectionView.layer.borderWidth = 1
+        collectionView.layer.cornerRadius = 4
+        collectionView.layer.masksToBounds = true;
+        
         collectionView.snp.makeConstraints { make in
-            make.top.equalTo(contentView).offset(11)
-            make.left.equalTo(contentView.snp.left).offset(41)
-            make.right.equalTo(contentView.snp.right).offset(-41)
+            make.top.equalTo(contentView).offset(10)
+            make.left.equalTo(contentView.snp.left).offset(10)
+            make.right.equalTo(contentView.snp.right).offset(-10)
             make.bottom.equalTo(contentView)
         }
     }

+ 3 - 3
Koala/Koala/Modular/JDMine/V/JDMineCell.swift

@@ -204,8 +204,8 @@ class JDMineMenuItem: UICollectionViewCell {
         
         let v  = UILabel()
         
-        v.font = .systemFont(ofSize: 14)
-        v.textColor = .black
+        v.setTextFont(.PFSR, 12)
+        v.textColor = TitleTextColor
         v.text = "存款"
         return v
         
@@ -215,7 +215,7 @@ class JDMineMenuItem: UICollectionViewCell {
     lazy var bgView : UIView = {
         
         let v = UIView()
-        v.backgroundColor = .white
+        v.backgroundColor = .clear
         
         return v
     }()