Quellcode durchsuchen

Merge branch 'feature/liuxuqing' of http://git.caihongxingqiu.net/rainbow/platform-ios into feature/liuxuqing

Chris vor 6 Jahren
Ursprung
Commit
2dc03d70d2
32 geänderte Dateien mit 897 neuen und 91 gelöschten Zeilen
  1. 69 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. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallBanner/ShoppingMallBannerTableViewCell.swift
  6. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryCollectionViewCell.swift
  7. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ProductView/ProductHBigTableViewCell.swift
  8. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ProductView/ProductHSmallTableViewCell.swift
  9. 224 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ShoppingMallBarChart/ShoppingMallBarChartCollectionViewCell.swift
  10. 139 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ShoppingMallBarChart/ShoppingMallBarChartTableViewCell.swift
  11. 32 32
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureCollectionViewCell.swift
  12. 16 22
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallRightSideleftPicture/ShoppingMallRightSideleftPictureTableViewCell.swift
  13. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightCollectionViewCell.swift
  14. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ShoppingMallSlidingLeftRight/ShoppingMallSlidingLeftRightTableViewCell.swift
  15. 2 4
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/FloorBannerView.swift
  16. 31 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/TitleBanner/FloorTitleCenterBaseView.swift
  17. 0 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/TitleBanner/FloorTitleView.swift
  18. 17 10
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallListView.swift
  19. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialCollectionViewCell.swift
  20. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/Special/View/SpecialBannerView.swift
  21. 203 0
      RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSModel.swift
  22. 54 0
      RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSTemplateModel.swift
  23. 13 0
      RainbowPlanet/RainbowPlanet/Service/Model/CommonModel/CommondModel.swift
  24. 6 6
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift
  25. 79 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkManager.swift
  26. 3 3
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/Contents.json
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract.png
  28. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@2x.png
  29. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_btn_buy_subtract.imageset/home_btn_buy_subtract@3x.png
  30. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06.png
  31. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06@2x.png
  32. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06@3x.png

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

@@ -190,6 +190,12 @@
 		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 */; };
+		A7B4E7352281907A0012914A /* CMSModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E7342281907A0012914A /* CMSModel.swift */; };
+		A7B4E738228191CC0012914A /* CommondModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E737228191CC0012914A /* CommondModel.swift */; };
+		A7B4E73A228192D20012914A /* CMSTemplateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B4E739228192D10012914A /* CMSTemplateModel.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 +461,12 @@
 		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>"; };
+		A7B4E7342281907A0012914A /* CMSModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMSModel.swift; sourceTree = "<group>"; };
+		A7B4E737228191CC0012914A /* CommondModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommondModel.swift; sourceTree = "<group>"; };
+		A7B4E739228192D10012914A /* CMSTemplateModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMSTemplateModel.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>"; };
@@ -1105,10 +1117,12 @@
 		A738D203225AEAD000EEE860 /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				A7B4E736228190810012914A /* CommonModel */,
 				A72A73722233966800B21995 /* RootModel */,
 				A7A98E00227E88E8005306E9 /* ProductModel */,
 				A79057032276D5FE0037F823 /* ConfigModel */,
 				A7284402224DBE3500F82F30 /* UserModel */,
+				A7B4E733228190630012914A /* CMSModel */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1193,15 +1207,11 @@
 		A775CBFC2237483E00EBDCF8 /* View */ = {
 			isa = PBXGroup;
 			children = (
-				A7A98E0C227EBEE3005306E9 /* ProductView */,
-				A7B4E72422815AFB0012914A /* ShoppingMallRightSideleftPicture */,
-				A7B4E71B22812D390012914A /* ShoppingMallSlidingLeftRight */,
+				A7B4E730228177A90012914A /* ShoppingMallFloor */,
 				A7A98E3E22804647005306E9 /* ShoppingMallSepcial */,
 				A7A98E38228030F8005306E9 /* ShoppingMallCategory */,
 				A7A98E3422802A60005306E9 /* ShoppingMallBanner */,
 				A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */,
-				A7B4E720228151F40012914A /* FloorTitleView.swift */,
-				A7B4E722228154750012914A /* FloorBannerView.swift */,
 				A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */,
 				A7A98E3022801B10005306E9 /* ShoppingMallListView.swift */,
 			);
@@ -1777,6 +1787,54 @@
 			path = ShoppingMallRightSideleftPicture;
 			sourceTree = "<group>";
 		};
+		A7B4E729228174E70012914A /* ShoppingMallBarChart */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E72A2281752B0012914A /* ShoppingMallBarChartTableViewCell.swift */,
+				A7B4E72C228176060012914A /* ShoppingMallBarChartCollectionViewCell.swift */,
+			);
+			path = ShoppingMallBarChart;
+			sourceTree = "<group>";
+		};
+		A7B4E730228177A90012914A /* ShoppingMallFloor */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E0C227EBEE3005306E9 /* ProductView */,
+				A7B4E732228177BC0012914A /* TitleBanner */,
+				A7B4E729228174E70012914A /* ShoppingMallBarChart */,
+				A7B4E72422815AFB0012914A /* ShoppingMallRightSideleftPicture */,
+				A7B4E71B22812D390012914A /* ShoppingMallSlidingLeftRight */,
+			);
+			path = ShoppingMallFloor;
+			sourceTree = "<group>";
+		};
+		A7B4E732228177BC0012914A /* TitleBanner */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E720228151F40012914A /* FloorTitleView.swift */,
+				A7B4E722228154750012914A /* FloorBannerView.swift */,
+				A7B4E72E2281773F0012914A /* FloorTitleCenterBaseView.swift */,
+			);
+			path = TitleBanner;
+			sourceTree = "<group>";
+		};
+		A7B4E733228190630012914A /* CMSModel */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E739228192D10012914A /* CMSTemplateModel.swift */,
+				A7B4E7342281907A0012914A /* CMSModel.swift */,
+			);
+			path = CMSModel;
+			sourceTree = "<group>";
+		};
+		A7B4E736228190810012914A /* CommonModel */ = {
+			isa = PBXGroup;
+			children = (
+				A7B4E737228191CC0012914A /* CommondModel.swift */,
+			);
+			path = CommonModel;
+			sourceTree = "<group>";
+		};
 		A7BB68512268DCF800AB07A2 /* SelfRecommendation */ = {
 			isa = PBXGroup;
 			children = (
@@ -2360,10 +2418,12 @@
 				A71AA51C227219EF008FF1A5 /* EditExpressAddressView.swift in Sources */,
 				A7CC751122715AE3003C4F38 /* MessageDetailesTimeView.swift in Sources */,
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
+				A7B4E7352281907A0012914A /* CMSModel.swift in Sources */,
 				A72A72BE22321DE000B21995 /* Extension+RxTimer.swift in Sources */,
 				A7CC74EA22706ACD003C4F38 /* MessageViewController.swift in Sources */,
 				A72A72C422321DE000B21995 /* Extension+CAGradientLayer.swift in Sources */,
 				A7778CA72243A05400C7C47A /* IQKeyboardManagerSwiftManager.swift in Sources */,
+				A7B4E738228191CC0012914A /* CommondModel.swift in Sources */,
 				A7CC74D4226FF1AA003C4F38 /* MineView.swift in Sources */,
 				A71AA5152272160A008FF1A5 /* ExpressAddressListTableViewCell.swift in Sources */,
 				A72A72B722321DE000B21995 /* Extension+NSMutableAttributedString.swift in Sources */,
@@ -2390,6 +2450,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 */,
@@ -2489,10 +2550,12 @@
 				A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */,
 				A71AA5212272E527008FF1A5 /* Extension+UINavigationController.swift in Sources */,
 				A7CC751822716202003C4F38 /* SetView.swift in Sources */,
+				A7B4E73A228192D20012914A /* CMSTemplateModel.swift in Sources */,
 				A72A72C622321DE000B21995 /* WebView.swift in Sources */,
 				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 +2566,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
     }()
 

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallBanner/ShoppingMallBannerTableViewCell.swift

@@ -24,7 +24,7 @@ class ShoppingMallBannerTableViewCell: UITableViewCell {
         }
     }
     
-     var imageNames = ["home_pic_banner_06","home_pic_banner_06","home_pic_banner_06"]
+     var imageNames = ["pic_preload","pic_preload","pic_preload"]
     
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingMallBannerTableViewCell {
         let ID = "ShoppingMallBannerTableViewCell"

+ 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
     }()
     

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


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


+ 224 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallFloor/ShoppingMallBarChart/ShoppingMallBarChartCollectionViewCell.swift

@@ -0,0 +1,224 @@
+//
+//  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(newLabel)
+        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
+    }()
+    
+    lazy var newLabel: UILabel = {
+        let newLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 50, height: 18))
+        newLabel.backgroundColor = kFE352BColor
+        newLabel.text = "新品上架"
+        newLabel.textColor = kffffffColor
+        newLabel.font = kMediumFont11
+        newLabel.textAlignment = .center
+        newLabel.configRectCorner(corner: [.bottomRight], radii: CGSize(width: 4, height: 4))
+        return newLabel
+    }()
+    
+    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: "shopping_mall_plus"), 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/ShoppingMallFloor/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/ShoppingMallFloor/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/ShoppingMallFloor/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/ShoppingMallFloor/TitleBanner/FloorTitleView.swift


+ 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

+ 203 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSModel.swift

@@ -0,0 +1,203 @@
+//
+//	CMSModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CMSModel : NSObject, NSCoding, Mappable{
+
+	var applyType : String?
+	var content : [CMSContentModel]?
+	var title : String?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CMSModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		applyType <- map["apply_type"]
+		content <- map["content"]
+		title <- map["title"]
+		
+	}
+
+    /**
+    * NSCoding required initializer.
+    * Fills the data from the passed decoder
+    */
+    @objc required init(coder aDecoder: NSCoder)
+	{
+         applyType = aDecoder.decodeObject(forKey: "apply_type") as? String
+         content = aDecoder.decodeObject(forKey: "content") as? [CMSContentModel]
+         title = aDecoder.decodeObject(forKey: "title") as? String
+
+	}
+
+    /**
+    * NSCoding required method.
+    * Encodes mode properties into the decoder
+    */
+    @objc func encode(with aCoder: NSCoder)
+	{
+		if applyType != nil{
+			aCoder.encode(applyType, forKey: "apply_type")
+		}
+		if content != nil{
+			aCoder.encode(content, forKey: "content")
+		}
+		if title != nil{
+			aCoder.encode(title, forKey: "title")
+		}
+
+	}
+
+}
+
+class CMSContentModel : NSObject, NSCoding, Mappable{
+    
+    var areaType : String?
+    var rule : [CMSRuleModel]?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CMSContentModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        areaType <- map["area_type"]
+        rule <- map["rule"]
+        
+    }
+    
+    /**
+     * NSCoding required initializer.
+     * Fills the data from the passed decoder
+     */
+    @objc required init(coder aDecoder: NSCoder)
+    {
+        areaType = aDecoder.decodeObject(forKey: "area_type") as? String
+        rule = aDecoder.decodeObject(forKey: "rule") as? [CMSRuleModel]
+        
+    }
+    
+    /**
+     * NSCoding required method.
+     * Encodes mode properties into the decoder
+     */
+    @objc func encode(with aCoder: NSCoder)
+    {
+        if areaType != nil{
+            aCoder.encode(areaType, forKey: "area_type")
+        }
+        if rule != nil{
+            aCoder.encode(rule, forKey: "rule")
+        }
+        
+    }
+    
+}
+
+class CMSRuleModel : NSObject, NSCoding, Mappable{
+    
+    var linkType : String?
+    var linkUrl : String?
+    var showNum : Int?
+    var title : String?
+    var url : String?
+    var id : Int?
+    var productId : String?
+    var rule : CMSRuleModel?
+    var showType : Int?
+    var subjectId : String?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CMSRuleModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        linkType <- map["link_type"]
+        linkUrl <- map["link_url"]
+        showNum <- map["show_num"]
+        title <- map["title"]
+        url <- map["url"]
+        id <- map["id"]
+        productId <- map["product_id"]
+        rule <- map["rule"]
+        showType <- map["show_type"]
+        subjectId <- map["subject_id"]
+        
+    }
+    
+    /**
+     * NSCoding required initializer.
+     * Fills the data from the passed decoder
+     */
+    @objc required init(coder aDecoder: NSCoder)
+    {
+        linkType = aDecoder.decodeObject(forKey: "link_type") as? String
+        linkUrl = aDecoder.decodeObject(forKey: "link_url") as? String
+        showNum = aDecoder.decodeObject(forKey: "show_num") as? Int
+        title = aDecoder.decodeObject(forKey: "title") as? String
+        url = aDecoder.decodeObject(forKey: "url") as? String
+        id = aDecoder.decodeObject(forKey: "id") as? Int
+        productId = aDecoder.decodeObject(forKey: "product_id") as? String
+        rule = aDecoder.decodeObject(forKey: "rule") as? CMSRuleModel
+        showType = aDecoder.decodeObject(forKey: "show_type") as? Int
+        subjectId = aDecoder.decodeObject(forKey: "subject_id") as? String
+        
+    }
+    
+    /**
+     * NSCoding required method.
+     * Encodes mode properties into the decoder
+     */
+    @objc func encode(with aCoder: NSCoder)
+    {
+        if linkType != nil{
+            aCoder.encode(linkType, forKey: "link_type")
+        }
+        if linkUrl != nil{
+            aCoder.encode(linkUrl, forKey: "link_url")
+        }
+        if showNum != nil{
+            aCoder.encode(showNum, forKey: "show_num")
+        }
+        if title != nil{
+            aCoder.encode(title, forKey: "title")
+        }
+        if url != nil{
+            aCoder.encode(url, forKey: "url")
+        }
+        if id != nil{
+            aCoder.encode(id, forKey: "id")
+        }
+        if productId != nil{
+            aCoder.encode(productId, forKey: "product_id")
+        }
+        if rule != nil{
+            aCoder.encode(rule, forKey: "rule")
+        }
+        if showType != nil{
+            aCoder.encode(showType, forKey: "show_type")
+        }
+        if subjectId != nil{
+            aCoder.encode(subjectId, forKey: "subject_id")
+        }
+        
+    }
+    
+}
+

+ 54 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CMSModel/CMSTemplateModel.swift

@@ -0,0 +1,54 @@
+//
+//	CMSTemplateModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CMSTemplateModel : NSObject, NSCoding, Mappable{
+
+	var applyType : Int?
+	var title : String?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CMSTemplateModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		applyType <- map["apply_type"]
+		title <- map["title"]
+		
+	}
+
+    /**
+    * NSCoding required initializer.
+    * Fills the data from the passed decoder
+    */
+    @objc required init(coder aDecoder: NSCoder)
+	{
+         applyType = aDecoder.decodeObject(forKey: "apply_type") as? Int
+         title = aDecoder.decodeObject(forKey: "title") as? String
+
+	}
+
+    /**
+    * NSCoding required method.
+    * Encodes mode properties into the decoder
+    */
+    @objc func encode(with aCoder: NSCoder)
+	{
+		if applyType != nil{
+			aCoder.encode(applyType, forKey: "apply_type")
+		}
+		if title != nil{
+			aCoder.encode(title, forKey: "title")
+		}
+
+	}
+
+}

+ 13 - 0
RainbowPlanet/RainbowPlanet/Service/Model/CommonModel/CommondModel.swift

@@ -0,0 +1,13 @@
+//
+//  CommondModel.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/7.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class CommondModel: NSObject {
+
+}

+ 6 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift

@@ -31,10 +31,10 @@ class SwiftMoyaNetWorkServiceCMS: NSObject {
         let baiduToCityModel = BaiduToCityFactory.shared.query(bjcityId: loacationModel!.cityCode)
         parameters.updateValue(baiduToCityModel.areaCode, forKey: "city_id")
         SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetTemplateName(parameters: parameters))) {
-            (data) in
+        SwiftMoyaNetWorkManager.shared().requestArray(CMSTemplateModel.self,target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetTemplateName(parameters: parameters))) {
+            (cmsTemplateModels) in
             SwiftProgressHUD.shared().hide()
-            completion(data)
+            completion(cmsTemplateModels)
         }
     }
     
@@ -48,10 +48,10 @@ class SwiftMoyaNetWorkServiceCMS: NSObject {
         let baiduToCityModel = BaiduToCityFactory.shared.query(bjcityId: loacationModel!.cityCode)
         parameters.updateValue(baiduToCityModel.areaCode, forKey: "city_id")
         parameters.updateValue(type, forKey: "type")
-        SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetPreview(parameters: parameters))) {
-            (data) in
+        SwiftMoyaNetWorkManager.shared().request(CMSModel.self,target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetPreview(parameters: parameters))) {
+            (cmsModel) in
             SwiftProgressHUD.shared().hide()
-            completion(data)
+            completion(cmsModel)
         }
     }
     

+ 79 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkManager.swift

@@ -107,6 +107,8 @@ public class SwiftMoyaNetWorkManager: NSObject {
     typealias successCallback = (_ data: Any) -> Void
     /// 成功回调带泛型
     typealias successCallTBack = (_ T: BaseMappable) -> Void
+    
+    typealias successCallArrayTback = (_ T: [BaseMappable]) -> Void
 
     typealias falseCallback = () -> Void
     var falseCallback : falseCallback?
@@ -148,6 +150,44 @@ public class SwiftMoyaNetWorkManager: NSObject {
             }
             .disposed(by: disposeBag)
     }
+    
+    /// 网络请求
+    ///
+    /// - Parameters:
+    ///   - type: 模型
+    ///   - target: 请求地址加参数
+    ///   - isCache: 是否缓存
+    ///   - completion: 回调
+    func requestArray<T: BaseMappable>(_ type: T.Type ,target: MultiTarget,isCustomAlert:Bool = false,completion: @escaping successCallArrayTback) -> Void {
+        //判断是否链接网络
+        if !isNetworkConnect{
+            SwiftProgressHUD.shared().showError("网络链接失败,请检查网络")
+            return
+        }
+        
+        provider.rx
+            .request(target)
+            .mapArray(T.self)
+            .subscribeOn(ConcurrentDispatchQueueScheduler(qos: .userInitiated))
+            .observeOn(MainScheduler.instance)
+            .subscribe(onSuccess: { [weak self] element in
+                
+                guard let element = element else {
+                    if let falseCallback = self?.falseCallback  {
+                        falseCallback()
+                    }
+                    return
+                }
+                completion(element)
+            }) {
+                [weak self] (error) in
+                if let falseCallback = self?.falseCallback  {
+                    falseCallback()
+                }
+                SwiftProgressHUD.shared().showError("网络链接失败,请检查网络")
+            }
+            .disposed(by: disposeBag)
+    }
 
     /// 缓存请求
     ///
@@ -391,4 +431,43 @@ extension PrimitiveSequence where TraitType == SingleTrait, ElementType == Respo
             }
         }
     }
+    
+    func mapArray<T: BaseMappable>(_ type: T.Type) -> Single<[T]?> {
+        return flatMap { response -> Single<[T]?> in
+            do {
+                let json = try JSON(response.mapJSON())
+                if response.statusCode == 200 {
+                    NXLLog("\nstatusCode=\(response.statusCode)\njson=\n\(json.description)");
+                    
+                    let json = JSON(parseJSON: json.description)
+                    let rootModel = RootModel(JSONString: json.description)
+                    let data = JSON(json["data"]).description
+                    rootModel?.data = data
+                    if rootModel!.code  == 0 {
+                        let mapper = Mapper<T>().mapArray(JSONString: rootModel!.data!)
+                        return Single<[T]?>.just(mapper)
+                    }else if rootModel!.code  == 1 {
+                        SwiftProgressHUD.shared().showText(rootModel!.msg ?? "信息有误!!!", textAlignment: .left)
+                        return Single<[T]?>.just(nil)
+                    }else {
+                        return Single<[T]?>.just(nil)
+                    }
+                }else if response.statusCode == 401 {
+                    NXLLog("\nstatusCode=\(response.statusCode)\njson=\n\(json.description)");
+                    let infoModel = InfoModel(JSONString: json.description)
+                    SwiftProgressHUD.shared().showText(infoModel!.message ?? "登录过期,请重新登录")
+                    kAppDelegate.setLoginController()
+                    return Single<[T]?>.just(nil)
+                }else {                NXLLog("\nstatusCode=\(response.statusCode)\nerror=\n\(response.description)");
+                    SwiftProgressHUD.shared().showText(response.description)
+                    return Single<[T]?>.just(nil)
+                }
+                
+            } catch {
+                NXLLog("\nstatusCode=\(response.statusCode)\nerror=\n\(response.description)");
+                SwiftProgressHUD.shared().showText(response.description)
+                return Single<[T]?>.just(nil)
+            }
+        }
+    }
 }

+ 3 - 3
RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/Contents.json

@@ -2,17 +2,17 @@
   "images" : [
     {
       "idiom" : "universal",
-      "filename" : "home_pic_banner_06.png",
+      "filename" : "home_btn_buy_subtract.png",
       "scale" : "1x"
     },
     {
       "idiom" : "universal",
-      "filename" : "home_pic_banner_06@2x.png",
+      "filename" : "home_btn_buy_subtract@2x.png",
       "scale" : "2x"
     },
     {
       "idiom" : "universal",
-      "filename" : "home_pic_banner_06@3x.png",
+      "filename" : "home_btn_buy_subtract@3x.png",
       "scale" : "3x"
     }
   ],

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


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


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


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