Explorar el Código

CMS布局完成

南鑫林 hace 6 años
padre
commit
db7820e7b6
Se han modificado 27 ficheros con 544 adiciones y 81 borrados
  1. 41 5
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MessageDetailes/View/MessageDetailesTableViewCell.swift
  3. 2 2
      RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineTableViewHeaderView.swift
  4. 1 1
      RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/View/RegisterLoginView.swift
  5. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ProductView/ProductHBigTableViewCell.swift
  6. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ProductView/ProductHSmallTableViewCell.swift
  7. 212 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallBarChart/ShoppingMallBarChartCollectionViewCell.swift
  8. 139 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallBarChart/ShoppingMallBarChartTableViewCell.swift
  9. 32 32
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureCollectionViewCell.swift
  10. 16 22
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureTableViewCell.swift
  11. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightCollectionViewCell.swift
  12. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightTableViewCell.swift
  13. 2 4
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/FloorBannerView.swift
  14. 31 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/TitleBanner/FloorTitleCenterBaseView.swift
  15. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/TitleBanner/FloorTitleView.swift
  16. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryCollectionViewCell.swift
  17. 17 10
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallListView.swift
  18. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialCollectionViewCell.swift
  19. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/Special/View/SpecialBannerView.swift
  20. 23 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/Contents.json
  21. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy.png
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy@2x.png
  23. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy@3x.png
  24. 23 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/Contents.json
  25. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract.png
  26. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@2x.png
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@3x.png

+ 41 - 5
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -190,6 +190,9 @@
 		A7B4E723228154750012914A /* FloorBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E722228154750012914A /* FloorBannerView.swift */; };
 		A7B4E72622815DA30012914A /* ShoppingMallRightSideleftPictureTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E72522815DA30012914A /* ShoppingMallRightSideleftPictureTableViewCell.swift */; };
 		A7B4E728228160BA0012914A /* ShoppingMallRightSideleftPictureCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E727228160BA0012914A /* ShoppingMallRightSideleftPictureCollectionViewCell.swift */; };
+		A7B4E72B2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E72A2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift */; };
+		A7B4E72D228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E72C228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift */; };
+		A7B4E72F2281773F0012914A /* FloorTitleCenterBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E72E2281773F0012914A /* FloorTitleCenterBaseView.swift */; };
 		A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BB684D2268DCEC00AB07A2 /* SelfRecommendationViewController.swift */; };
 		A7BB68552268DE8600AB07A2 /* SelfRecommendationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BB68542268DE8600AB07A2 /* SelfRecommendationView.swift */; };
 		A7BB6857226965C100AB07A2 /* SelfRecommendationHeaderCollectionReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BB6856226965C100AB07A2 /* SelfRecommendationHeaderCollectionReusableView.swift */; };
@@ -455,6 +458,9 @@
 		A7B4E722228154750012914A /* FloorBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloorBannerView.swift; sourceTree = "<group>"; };
 		A7B4E72522815DA30012914A /* ShoppingMallRightSideleftPictureTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallRightSideleftPictureTableViewCell.swift; sourceTree = "<group>"; };
 		A7B4E727228160BA0012914A /* ShoppingMallRightSideleftPictureCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallRightSideleftPictureCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7B4E72A2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallBarChartTableViewCell.swift; sourceTree = "<group>"; };
+		A7B4E72C228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallBarChartCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7B4E72E2281773F0012914A /* FloorTitleCenterBaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloorTitleCenterBaseView.swift; sourceTree = "<group>"; };
 		A7BB684D2268DCEC00AB07A2 /* SelfRecommendationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfRecommendationViewController.swift; sourceTree = "<group>"; };
 		A7BB68542268DE8600AB07A2 /* SelfRecommendationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfRecommendationView.swift; sourceTree = "<group>"; };
 		A7BB6856226965C100AB07A2 /* SelfRecommendationHeaderCollectionReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfRecommendationHeaderCollectionReusableView.swift; sourceTree = "<group>"; };
@@ -1193,15 +1199,11 @@
 		A775CBFC2237483E00EBDCF8 /* View */ = {
 			isa = PBXGroup;
 			children = (
-				A7A98E0C227EBEE3005306E9 /* ProductView */,
-				A7B4E72422815AFB0012914A /* ShoppingMallRightSideleftPicture */,
-				A7B4E71B22812D390012914A /* ShoppingMallSlidingLeftRight */,
+				A7B4E730228177A90012914A /* Floor */,
 				A7A98E3E22804647005306E9 /* ShoppingMallSepcial */,
 				A7A98E38228030F8005306E9 /* ShoppingMallCategory */,
 				A7A98E3422802A60005306E9 /* ShoppingMallBanner */,
 				A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */,
-				A7B4E720228151F40012914A /* FloorTitleView.swift */,
-				A7B4E722228154750012914A /* FloorBannerView.swift */,
 				A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */,
 				A7A98E3022801B10005306E9 /* ShoppingMallListView.swift */,
 			);
@@ -1777,6 +1779,37 @@
 			path = ShoppingMallRightSideleftPicture;
 			sourceTree = "<group>";
 		};
+		A7B4E729228174E70012914A /* ShoppingMallBarChart */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E72A2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift */,
+				A7B4E72C228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift */,
+			);
+			path = ShoppingMallBarChart;
+			sourceTree = "<group>";
+		};
+		A7B4E730228177A90012914A /* Floor */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E0C227EBEE3005306E9 /* ProductView */,
+				A7B4E732228177BC0012914A /* TitleBanner */,
+				A7B4E729228174E70012914A /* ShoppingMallBarChart */,
+				A7B4E72422815AFB0012914A /* ShoppingMallRightSideleftPicture */,
+				A7B4E71B22812D390012914A /* ShoppingMallSlidingLeftRight */,
+			);
+			path = Floor;
+			sourceTree = "<group>";
+		};
+		A7B4E732228177BC0012914A /* TitleBanner */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E720228151F40012914A /* FloorTitleView.swift */,
+				A7B4E722228154750012914A /* FloorBannerView.swift */,
+				A7B4E72E2281773F0012914A /* FloorTitleCenterBaseView.swift */,
+			);
+			path = TitleBanner;
+			sourceTree = "<group>";
+		};
 		A7BB68512268DCF800AB07A2 /* SelfRecommendation */ = {
 			isa = PBXGroup;
 			children = (
@@ -2390,6 +2423,7 @@
 				A77F2CCA223209F2001BD3F6 /* BaseTabbarViewController.swift in Sources */,
 				A7CC75332271ABB0003C4F38 /* AddressManagerViewController.swift in Sources */,
 				A7CC750D227157DA003C4F38 /* MessageDetailesView.swift in Sources */,
+				A7B4E72B2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift in Sources */,
 				A71AA519227219D7008FF1A5 /* EditExpressAddressViewController.swift in Sources */,
 				A729B5B022671310004AE098 /* MobileLoginView.swift in Sources */,
 				A71AA50C2272126A008FF1A5 /* EditAddressFooterView.swift in Sources */,
@@ -2493,6 +2527,7 @@
 				A72A72D122321E2700B21995 /* HTMLURLMacro.swift in Sources */,
 				A72A73162232481600B21995 /* WeChatpayManager.swift in Sources */,
 				A7CC750F22715AAC003C4F38 /* MessageDetailesTableViewCell.swift in Sources */,
+				A7B4E72D228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift in Sources */,
 				A7CC7516227161D5003C4F38 /* SetViewController.swift in Sources */,
 				A7778CBA2244F14B00C7C47A /* Extension+UIViewController.swift in Sources */,
 				A7CC752C2271A1AE003C4F38 /* SetPasswordViewController.swift in Sources */,
@@ -2503,6 +2538,7 @@
 				A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */,
 				A71AF0AA226EDDF5001730FE /* SearchView.swift in Sources */,
 				A7A98E0E227EC0C6005306E9 /* CategoryTableViewCell.swift in Sources */,
+				A7B4E72F2281773F0012914A /* FloorTitleCenterBaseView.swift in Sources */,
 				A7284A542252FB5C000BAEC4 /* PaginationModel.swift in Sources */,
 				A72A72D022321E2700B21995 /* FontMacro.swift in Sources */,
 				A71AA52622732068008FF1A5 /* SwiftMoyaServiceConfigApi.swift in Sources */,

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/MessageDetailes/View/MessageDetailesTableViewCell.swift

@@ -117,7 +117,7 @@ class MessageDetailesTableViewCell: UITableViewCell {
         detailsIconImageView.backgroundColor = kf7f8faColor
         detailsIconImageView.cornerRadius = 2
         detailsIconImageView.masksToBounds = true
-        detailsIconImageView.image = kImage(name: "logo")
+        detailsIconImageView.image = kImage(name: "pic_preload")
         return detailsIconImageView
     }()
     

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/MineModule/Mine/View/MineTableViewHeaderView.swift

@@ -119,7 +119,7 @@ class MineTableViewHeaderView: BaseView {
     
     private lazy var avatarButton: UIButton = {
         let avatarButton = UIButton(type: UIButton.ButtonType.custom)
-        avatarButton.setBackgroundImage(kImage(name: "logo"), for: UIControl.State.normal)
+        avatarButton.setBackgroundImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
         avatarButton.cornerRadius = 25
         avatarButton.masksToBounds = true
         return avatarButton
@@ -158,7 +158,7 @@ class MineTableViewHeaderView: BaseView {
     
     var userModel : UserModel? {
         didSet {
-            avatarButton.kf.setImage(with: kURLImage(name: userModel?.avatarurl ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "logo"))
+            avatarButton.kf.setImage(with: kURLImage(name: userModel?.avatarurl ?? ""), for: UIControl.State.normal, placeholder: kImage(name: "pic_preload"))
             nickNameLabel.text = userModel?.username
         }
     }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/RegisterLoginModule/RegisterLogin/View/RegisterLoginView.swift

@@ -44,7 +44,7 @@ class RegisterLoginView: BaseView {
 
     private lazy var iconImageView: UIImageView = {
         let iconImageView = UIImageView()
-        iconImageView.image = kImage(name: "logo")
+        iconImageView.image = kImage(name: "pic_preload")
         return iconImageView
     }()
 

RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ProductView/ProductHBigTableViewCell.swift → RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ProductView/ProductHBigTableViewCell.swift


RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ProductView/ProductHSmallTableViewCell.swift → RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ProductView/ProductHSmallTableViewCell.swift


+ 212 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallBarChart/ShoppingMallBarChartCollectionViewCell.swift

@@ -0,0 +1,212 @@
+//
+//  ShoppingMallBarChartCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/7.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallBarChartCollectionViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> ShoppingMallBarChartCollectionViewCell {
+        let ID = "ShoppingMallBarChartCollectionViewCell"
+        collectionView.register(ShoppingMallBarChartCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : ShoppingMallBarChartCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! ShoppingMallBarChartCollectionViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        backgroundColor = UIColor.white
+        cornerRadius = 4
+        masksToBounds = true
+        setupViews()
+        setupLayouts()
+        
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        addSubview(iconImagView)
+        addSubview(titleLabel)
+        addSubview(detailTitleLabel)
+        addSubview(sellNumberLabel)
+        addSubview(sellPriceLabel)
+        addSubview(markPriceLabel)
+        addSubview(plusButton)
+        addSubview(numberLabel)
+        addSubview(reduceButton)
+        addSubview(shopingCarButton)
+    }
+    
+    private func setupLayouts() {
+        iconImagView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(150 * kScaleWidth)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(10)
+            make.top.equalTo(iconImagView.snp.bottom).offset(10)
+            make.right.equalTo(-10)
+            make.height.equalTo(23)
+        }
+        detailTitleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(4)
+            make.right.left.equalTo(titleLabel)
+            make.height.equalTo(13)
+        }
+        sellNumberLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(detailTitleLabel.snp.bottom).offset(15)
+            make.left.right.equalTo(detailTitleLabel)
+            make.height.equalTo(13)
+        }
+        sellPriceLabel.snp.remakeConstraints { (make) in
+            make.left.equalTo(titleLabel)
+            make.bottom.equalTo(-10)
+            make.height.equalTo(19)
+        }
+        markPriceLabel.snp.remakeConstraints { (make) in
+            make.left.equalTo(sellPriceLabel.snp.right).offset(5)
+            make.bottom.equalTo(-10)
+            make.height.equalTo(13)
+        }
+        plusButton.snp.makeConstraints { (make) in
+            make.right.equalTo(-10)
+            make.bottom.equalTo(-10)
+            make.size.equalTo(25)
+        }
+        
+        numberLabel.snp.makeConstraints { (make) in
+            make.top.bottom.equalTo(plusButton)
+            make.right.equalTo(plusButton.snp.left)
+            make.width.greaterThanOrEqualTo(50)
+        }
+        
+        reduceButton.snp.makeConstraints { (make) in
+            make.right.equalTo(numberLabel.snp.left)
+            make.top.width.bottom.equalTo(plusButton)
+        }
+        
+        shopingCarButton.snp.makeConstraints { (make) in
+            make.right.equalTo(-10)
+            make.bottom.equalTo(-10)
+            make.width.equalTo(100)
+            make.height.equalTo(31)
+        }
+        
+    }
+    
+    private lazy var iconImagView: UIImageView = {
+        let iconImagView = UIImageView()
+        iconImagView.image = kImage(name: "pic_preload")
+        return iconImagView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "海南冰糖心木瓜 1个装"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kScaleMediumFont15
+        titleLabel.textAlignment = .left
+        titleLabel.numberOfLines = 1
+        return titleLabel
+    }()
+    
+    private lazy var detailTitleLabel: UILabel = {
+        let detailTitleLabel = UILabel()
+        detailTitleLabel.text = "酸甜可口营养无限"
+        detailTitleLabel.textColor = k999999Color
+        detailTitleLabel.font = kScaleRegularFont12
+        detailTitleLabel.textAlignment = .left
+        return detailTitleLabel
+    }()
+    
+    private lazy var sellNumberLabel: UILabel = {
+        let sellNumberLabel = UILabel()
+        sellNumberLabel.text = "已售2400件"
+        sellNumberLabel.textColor = k333333Color
+        sellNumberLabel.font = kScaleRegularFont11
+        return sellNumberLabel
+    }()
+    
+    private lazy var sellPriceLabel: UILabel = {
+        let sellPriceLabel = UILabel()
+        sellPriceLabel.text = "¥11.8"
+        sellPriceLabel.textColor = kfe352bColor
+        sellPriceLabel.font = kScaleBoldFont15
+        sellPriceLabel.textAlignment = .left
+        return sellPriceLabel
+    }()
+    
+    private lazy var markPriceLabel: UILabel = {
+        let markPriceLabel = UILabel()
+        markPriceLabel.text = "¥24.4"
+        markPriceLabel.textColor = kbbbbbbColor
+        markPriceLabel.font = kScaleRegularFont13
+        let attrString = NSMutableAttributedString(string: "¥24.4")
+        attrString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
+        markPriceLabel.attributedText = attrString
+        return markPriceLabel
+    }()
+    
+    private lazy var plusButton: UIButton = {
+        let plusButton = UIButton(type: UIButton.ButtonType.custom)
+        plusButton.setImage(kImage(name: "home_btn_buy"), for: UIControl.State.normal)
+        return plusButton
+    }()
+    
+    private lazy var numberLabel: UILabel = {
+        let numberLabel = UILabel()
+        numberLabel.text = "1"
+        numberLabel.textAlignment = .center
+        numberLabel.font = kRegularFont14
+        numberLabel.textColor = k333333Color
+        return numberLabel
+    }()
+    
+    private lazy var reduceButton: UIButton = {
+        let reduceButton = UIButton(type: UIButton.ButtonType.custom)
+        reduceButton.setImage(kImage(name: "home_btn_buy_subtract"), for: UIControl.State.normal)
+        return reduceButton
+    }()
+    
+
+    private lazy var shopingCarButton: UIButton = {
+        let shopingCarButton = UIButton(type: UIButton.ButtonType.custom)
+        shopingCarButton.setTitle("加入购物车", for: UIControl.State.normal)
+        shopingCarButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
+        shopingCarButton.titleLabel?.font = kMediumFont14
+        shopingCarButton.backgroundColor = kFFAC33Color
+        shopingCarButton.cornerRadius = 31/2
+        shopingCarButton.masksToBounds = true
+        shopingCarButton.isHidden = true
+        return shopingCarButton
+    }()
+    
+    //    var productSearchModel: ProductSearchModel? {
+    //        didSet {
+    //            iconImagView.kf.setImage(with: kURLImage(name: productSearchModel?.img ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
+    //            titleLabel.text = productSearchModel?.nameSkuName
+    //            detailTitleLabel.text = productSearchModel?.saleName
+    //            sellNumberLabel.text = "已售\(productSearchModel?.totalCount ?? 0)件"
+    //            sellPriceLabel.text = "¥\(productSearchModel?.price ?? 0)"
+    //            let attributeString = NSMutableAttributedString(string:"¥\(productSearchModel?.originPrice ?? 0)")
+    //            attributeString.changeStrikethrough(atAllStyle: NSUnderlineStyle.single, color: kbbbbbbColor)
+    //            markPriceLabel.attributedText = attributeString
+    //
+    //        }
+    //    }
+    
+}

+ 139 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallBarChart/ShoppingMallBarChartTableViewCell.swift

@@ -0,0 +1,139 @@
+//
+//  ShoppingMallBarChartTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/7.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallBarChartTableViewCell: UITableViewCell {
+
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            super.frame = frame
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingMallBarChartTableViewCell {
+        let ID = "ShoppingMallBarChartTableViewCell"
+        tableView.register(ShoppingMallBarChartTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingMallBarChartTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingMallBarChartTableViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        cornerRadius = 4
+        masksToBounds = true
+        backgroundColor = kf7f8faColor
+        addSubview(floorTitleView)
+        addSubview(floorBannerView)
+        addSubview(collectionView)
+    }
+    
+    private func setupLayouts() {
+        floorTitleView.snp.remakeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(63)
+        }
+        floorBannerView.snp.remakeConstraints { (make) in
+            make.top.equalTo(63)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(90 * kScaleWidth)
+        }
+    }
+    
+    private lazy var floorTitleView: FloorTitleCenterBaseView = {
+        let floorTitleView = FloorTitleCenterBaseView()
+        return floorTitleView
+    }()
+    
+    private lazy var floorBannerView: FloorBannerView = {
+        let floorBannerView = FloorBannerView()
+        return floorBannerView
+    }()
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kf7f8faColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 10
+        collectionViewLayout.minimumInteritemSpacing = 0
+        return collectionViewLayout
+    }()
+    
+    //加载数据
+    func reloadData() {
+        
+        //collectionView重新加载数据
+        self.collectionView.reloadData()
+        //更新collectionView的高度约束
+        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
+        collectionView.snp.remakeConstraints { (make) in
+            make.top.equalTo(63 + 90 * kScaleWidth)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(contentSize.height)
+            make.bottom.equalToSuperview()
+        }
+        self.collectionView.collectionViewLayout.invalidateLayout()
+    }
+    
+}
+
+extension ShoppingMallBarChartTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return 10
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = ShoppingMallBarChartCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:347 * kScaleWidth, height: 150 * kScaleWidth + 109)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)
+    }
+    
+}

+ 32 - 32
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureCollectionViewCell.swift

@@ -45,43 +45,43 @@ class ShoppingMallRightSideleftPictureCollectionViewCell: UICollectionViewCell {
     }
     
     private func setupLayouts() {
-//        iconImagView.snp.makeConstraints { (make) in
-//            make.top.equalTo(10)
-//            make.left.equalTo(10)
-//            make.size.equalTo(120)
-//        }
-//        titleLabel.snp.makeConstraints { (make) in
-//            make.left.equalTo(iconImagView.snp.right).offset(10)
-//            make.top.equalTo(iconImagView)
-//            make.right.equalTo(-10)
-//        }
-//        detailTitleLabel.snp.makeConstraints { (make) in
-//            make.top.equalTo(titleLabel.snp.bottom).offset(10)
-//            make.right.left.equalTo(titleLabel)
-//        }
-//        sellNumberLabel.snp.makeConstraints { (make) in
-//            make.top.equalTo(detailTitleLabel.snp.bottom).offset(10)
-//            make.left.right.equalTo(detailTitleLabel)
-//        }
-//        sellPriceLabel.snp.remakeConstraints { (make) in
-//            make.left.equalTo(titleLabel)
-//            make.bottom.equalTo(iconImagView)
-//        }
-//        markPriceLabel.snp.remakeConstraints { (make) in
-//            make.left.equalTo(sellPriceLabel.snp.right).offset(5)
-//            make.bottom.equalTo(iconImagView)
-//        }
-//        plusButton.snp.makeConstraints { (make) in
-//            make.bottom.equalTo(iconImagView)
-//            make.right.equalTo(-10)
-//            make.size.equalTo(25)
-//        }
+        iconImagView.snp.makeConstraints { (make) in
+            make.top.equalTo(10)
+            make.left.equalTo(10)
+            make.size.equalTo(120)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(iconImagView.snp.right).offset(10)
+            make.top.equalTo(iconImagView)
+            make.right.equalTo(-10)
+        }
+        detailTitleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom).offset(10)
+            make.right.left.equalTo(titleLabel)
+        }
+        sellNumberLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(detailTitleLabel.snp.bottom).offset(10)
+            make.left.right.equalTo(detailTitleLabel)
+        }
+        sellPriceLabel.snp.remakeConstraints { (make) in
+            make.left.equalTo(titleLabel)
+            make.bottom.equalTo(iconImagView)
+        }
+        markPriceLabel.snp.remakeConstraints { (make) in
+            make.left.equalTo(sellPriceLabel.snp.right).offset(5)
+            make.bottom.equalTo(iconImagView)
+        }
+        plusButton.snp.makeConstraints { (make) in
+            make.bottom.equalTo(iconImagView)
+            make.right.equalTo(-10)
+            make.size.equalTo(25)
+        }
         
     }
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
-        iconImagView.image = kImage(name: "iconImagView")
+        iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()
     

+ 16 - 22
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureTableViewCell.swift

@@ -50,27 +50,21 @@ class ShoppingMallRightSideleftPictureTableViewCell: UITableViewCell {
         cornerRadius = 4
         masksToBounds = true
         backgroundColor = kf7f8faColor
-//        addSubview(floorTitleView)
-//        addSubview(floorBannerView)
-//        addSubview(collectionView)
+        addSubview(floorTitleView)
+        addSubview(floorBannerView)
+        addSubview(collectionView)
     }
     
     private func setupLayouts() {
-//        floorTitleView.snp.remakeConstraints { (make) in
-//            make.top.left.right.equalToSuperview()
-//            make.height.equalTo(50)
-//        }
-//        floorBannerView.snp.remakeConstraints { (make) in
-//            make.top.equalTo(50)
-//            make.left.right.equalToSuperview()
-//            make.height.equalTo(90 * kScaleWidth)
-//        }
-//        collectionView.snp.remakeConstraints {(make) in
-//            make.top.equalTo(50 + 90 * kScaleWidth)
-//            make.left.right.equalToSuperview()
-//            make.height.equalTo(140)
-//            make.bottom.lessThanOrEqualTo(self)
-//        }
+        floorTitleView.snp.remakeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(50)
+        }
+        floorBannerView.snp.remakeConstraints { (make) in
+            make.top.equalTo(50)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(90 * kScaleWidth)
+        }
     }
     
     private lazy var floorTitleView: FloorTitleView = {
@@ -108,11 +102,11 @@ class ShoppingMallRightSideleftPictureTableViewCell: UITableViewCell {
         //更新collectionView的高度约束
         let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
         collectionView.snp.remakeConstraints { (make) in
-            make.top.left.right.equalToSuperview()
+            make.top.equalTo(50 + 90 * kScaleWidth)
+            make.left.right.equalToSuperview()
             make.height.equalTo(contentSize.height)
-            make.bottom.lessThanOrEqualTo(self)
+            make.bottom.equalToSuperview()
         }
-
         self.collectionView.collectionViewLayout.invalidateLayout()
     }
 
@@ -134,7 +128,7 @@ extension ShoppingMallRightSideleftPictureTableViewCell: UICollectionViewDelegat
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        return CGSize(width:kScaleWidth - 14 * kScaleWidth * 2, height: 140)
+        return CGSize(width:347 * kScaleWidth, height: 140)
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightCollectionViewCell.swift

@@ -77,7 +77,7 @@ class ShoppingMallSlidingLeftRightCollectionViewCell: UICollectionViewCell {
     
     private lazy var iconImagView: UIImageView = {
         let iconImagView = UIImageView()
-        iconImagView.image = kImage(name: "logo")
+        iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()
     

RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightTableViewCell.swift → RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightTableViewCell.swift


+ 2 - 4
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/FloorBannerView.swift

@@ -17,15 +17,13 @@ class FloorBannerView: BaseView {
     
     override func setupLayouts() {
         bannerButton.snp.makeConstraints { (make) in
-            make.left.equalTo(5)
-            make.bottom.top.equalToSuperview()
-            make.right.equalTo(-5)
+            make.edges.equalToSuperview()
         }
     }
     
     private lazy var bannerButton: UIButton = {
         let bannerButton = UIButton(type: UIButton.ButtonType.custom)
-        bannerButton.setBackgroundImage(kImage(name: "logo"), for: UIControl.State.normal)
+        bannerButton.setBackgroundImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
         bannerButton.cornerRadius = 4
         bannerButton.masksToBounds = true
         return bannerButton

+ 31 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/TitleBanner/FloorTitleCenterBaseView.swift

@@ -0,0 +1,31 @@
+//
+//  FloorTitleCenterBaseView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/7.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class FloorTitleCenterBaseView: BaseView {
+    
+    override func setupViews() {
+        addSubview(titleLabel)
+    }
+    
+    override func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.center.equalToSuperview()
+            make.height.equalTo(25)
+        }
+    }
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kMediumFont18
+        titleLabel.text = "今日推荐"
+        return titleLabel
+    }()
+}

RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/FloorTitleView.swift → RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/Floor/TitleBanner/FloorTitleView.swift


+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryCollectionViewCell.swift

@@ -52,7 +52,7 @@ class ShoppingMallCategoryCollectionViewCell: UICollectionViewCell {
     
     lazy var iconImageView : UIImageView = {
         let iconImageView = UIImageView()
-        iconImageView.image = kImage(name: "logo")
+        iconImageView.image = kImage(name: "pic_preload")
         return iconImageView
     }()
     

+ 17 - 10
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallListView.swift

@@ -40,7 +40,7 @@ class ShoppingMallListView: BaseView {
 
 extension ShoppingMallListView : UITableViewDelegate, UITableViewDataSource {
     func numberOfSections(in tableView: UITableView) -> Int {
-        return 4
+        return 6
     }
     
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
@@ -65,13 +65,18 @@ extension ShoppingMallListView : UITableViewDelegate, UITableViewDataSource {
         case 3:
             let cell = ShoppingMallSlidingLeftRightTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
             return cell
-            
-//        case 4:
-//            let cell = ShoppingMallRightSideleftPictureTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
-//            cell.frame = tableView.bounds
-//            cell.layoutIfNeeded()
-//            cell.reloadData()
-//            return cell
+        case 4:
+            let cell = ShoppingMallRightSideleftPictureTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.frame = tableView.bounds
+            cell.layoutIfNeeded()
+            cell.reloadData()
+            return cell
+        case 5:
+            let cell = ShoppingMallBarChartTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.frame = tableView.bounds
+            cell.layoutIfNeeded()
+            cell.reloadData()
+            return cell
             
         default:
             return UITableViewCell()
@@ -89,8 +94,10 @@ extension ShoppingMallListView : UITableViewDelegate, UITableViewDataSource {
             return  (193 * kScaleWidth)
         case 3:
             return  200 + 50 + 90 * kScaleWidth
-//        case 4:
-//            return  UITableView.automaticDimension
+        case 4:
+            return  UITableView.automaticDimension
+        case 5:
+            return  UITableView.automaticDimension
         default:
             return 0
         }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialCollectionViewCell.swift

@@ -49,7 +49,7 @@ class ShoppingMallSepcialCollectionViewCell: UICollectionViewCell {
     
     lazy var iconImageView : UIImageView = {
         let iconImageView = UIImageView()
-        iconImageView.image = kImage(name: "logo")
+        iconImageView.image = kImage(name: "pic_preload")
         iconImageView.cornerRadius = 4
         iconImageView.masksToBounds = true
         return iconImageView

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/Special/View/SpecialBannerView.swift

@@ -25,7 +25,7 @@ class SpecialBannerView: BaseView {
     
     lazy var bannerButton: UIButton = {
         let bannerButton = UIButton(type: UIButton.ButtonType.custom)
-        bannerButton.setBackgroundImage(kImage(name: "logo"), for: UIControl.State.normal)
+        bannerButton.setBackgroundImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
         bannerButton.backgroundColor = UIColor.white
         bannerButton.cornerRadius = 4
         bannerButton.masksToBounds = true

+ 23 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy.imageset/home_btn_buy@3x.png


+ 23 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy_subtract.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy_subtract@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "home_btn_buy_subtract@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@3x.png