Browse Source

develop最后提交

南鑫林 6 years ago
parent
commit
fe745a4190
24 changed files with 1115 additions and 392 deletions
  1. 77 17
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 60 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallBanner/ShoppingMallBannerFSPagerViewCell.swift
  3. 94 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallBanner/ShoppingMallBannerTableViewCell.swift
  4. 67 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryCollectionViewCell.swift
  5. 127 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryTableViewCell.swift
  6. 96 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallListView.swift
  7. 56 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialCollectionViewCell.swift
  8. 66 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialFlowLayout.swift
  9. 100 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialTableViewCell.swift
  10. 93 224
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallView.swift
  11. 0 62
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListCellCollectionViewCell.swift
  12. 0 14
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListCellModel.swift
  13. 0 14
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListSectionModel.swift
  14. 0 55
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalSectionHeaderView.swift
  15. 60 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallListViewController.swift
  16. 16 6
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift
  17. 72 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift
  18. 106 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaServiceCMSApi.swift
  19. 1 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift
  20. 1 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaServiceConfigApi.swift
  21. 23 0
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/Contents.json
  22. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06.png
  23. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06@2x.png
  24. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/ShoppingMallModule.xcassets/home_pic_banner_06.imageset/home_pic_banner_06@3x.png

+ 77 - 17
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -159,10 +159,6 @@
 		A79057022276C9770037F823 /* SetPasswordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057012276C9770037F823 /* SetPasswordModel.swift */; };
 		A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057052276EA3D0037F823 /* OpenCityListModel.swift */; };
 		A79057082276FEB00037F823 /* SelfMentionContactsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79057072276FEB00037F823 /* SelfMentionContactsModel.swift */; };
-		A7A97FDA2238FBAD0070F84D /* VerticalListSectionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A97FD62238FBAC0070F84D /* VerticalListSectionModel.swift */; };
-		A7A97FDB2238FBAD0070F84D /* VerticalListCellModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A97FD72238FBAC0070F84D /* VerticalListCellModel.swift */; };
-		A7A97FDC2238FBAD0070F84D /* VerticalListCellCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A97FD82238FBAC0070F84D /* VerticalListCellCollectionViewCell.swift */; };
-		A7A97FDD2238FBAD0070F84D /* VerticalSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A97FD92238FBAD0070F84D /* VerticalSectionHeaderView.swift */; };
 		A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98DFC227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift */; };
 		A7A98DFF227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98DFE227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift */; };
 		A7A98E02227E8900005306E9 /* ProductSearchListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E01227E8900005306E9 /* ProductSearchListModel.swift */; };
@@ -176,6 +172,17 @@
 		A7A98E17227EED76005306E9 /* SpecialViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E16227EED76005306E9 /* SpecialViewController.swift */; };
 		A7A98E1B227EEE49005306E9 /* SpecialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E1A227EEE49005306E9 /* SpecialView.swift */; };
 		A7A98E1D227EF1CB005306E9 /* SpecialBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E1C227EF1CB005306E9 /* SpecialBannerView.swift */; };
+		A7A98E28227FD6C6005306E9 /* ShoppingMallListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E27227FD6C6005306E9 /* ShoppingMallListViewController.swift */; };
+		A7A98E2D22801642005306E9 /* SwiftMoyaServiceCMSApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E2C22801642005306E9 /* SwiftMoyaServiceCMSApi.swift */; };
+		A7A98E2F228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E2E228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift */; };
+		A7A98E3122801B10005306E9 /* ShoppingMallListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E3022801B10005306E9 /* ShoppingMallListView.swift */; };
+		A7A98E332280272A005306E9 /* ShoppingMallBannerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E322280272A005306E9 /* ShoppingMallBannerTableViewCell.swift */; };
+		A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E3522802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift */; };
+		A7A98E3A2280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E392280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift */; };
+		A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E3B228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift */; };
+		A7A98E41228046C5005306E9 /* ShoppingMallSepcialTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E40228046C4005306E9 /* ShoppingMallSepcialTableViewCell.swift */; };
+		A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E4222804851005306E9 /* ShoppingMallSepcialFlowLayout.swift */; };
+		A7A98E4522804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A98E4422804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.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 */; };
@@ -410,10 +417,6 @@
 		A79057052276EA3D0037F823 /* OpenCityListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenCityListModel.swift; sourceTree = "<group>"; };
 		A79057072276FEB00037F823 /* SelfMentionContactsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelfMentionContactsModel.swift; sourceTree = "<group>"; };
 		A7A59A7722363CCB00417FA4 /* RainbowPlanet.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RainbowPlanet.entitlements; sourceTree = "<group>"; };
-		A7A97FD62238FBAC0070F84D /* VerticalListSectionModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalListSectionModel.swift; sourceTree = "<group>"; };
-		A7A97FD72238FBAC0070F84D /* VerticalListCellModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalListCellModel.swift; sourceTree = "<group>"; };
-		A7A97FD82238FBAC0070F84D /* VerticalListCellCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalListCellCollectionViewCell.swift; sourceTree = "<group>"; };
-		A7A97FD92238FBAD0070F84D /* VerticalSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerticalSectionHeaderView.swift; sourceTree = "<group>"; };
 		A7A98DFC227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaServiceProductApi.swift; sourceTree = "<group>"; };
 		A7A98DFE227E8501005306E9 /* SwiftMoyaNetWorkServiceProduct.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaNetWorkServiceProduct.swift; sourceTree = "<group>"; };
 		A7A98E01227E8900005306E9 /* ProductSearchListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductSearchListModel.swift; sourceTree = "<group>"; };
@@ -427,6 +430,17 @@
 		A7A98E16227EED76005306E9 /* SpecialViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialViewController.swift; sourceTree = "<group>"; };
 		A7A98E1A227EEE49005306E9 /* SpecialView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialView.swift; sourceTree = "<group>"; };
 		A7A98E1C227EF1CB005306E9 /* SpecialBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialBannerView.swift; sourceTree = "<group>"; };
+		A7A98E27227FD6C6005306E9 /* ShoppingMallListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallListViewController.swift; sourceTree = "<group>"; };
+		A7A98E2C22801642005306E9 /* SwiftMoyaServiceCMSApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaServiceCMSApi.swift; sourceTree = "<group>"; };
+		A7A98E2E228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftMoyaNetWorkServiceCMS.swift; sourceTree = "<group>"; };
+		A7A98E3022801B10005306E9 /* ShoppingMallListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallListView.swift; sourceTree = "<group>"; };
+		A7A98E322280272A005306E9 /* ShoppingMallBannerTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallBannerTableViewCell.swift; sourceTree = "<group>"; };
+		A7A98E3522802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallBannerFSPagerViewCell.swift; sourceTree = "<group>"; };
+		A7A98E392280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallCategoryTableViewCell.swift; sourceTree = "<group>"; };
+		A7A98E3B228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallCategoryCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7A98E40228046C4005306E9 /* ShoppingMallSepcialTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialTableViewCell.swift; sourceTree = "<group>"; };
+		A7A98E4222804851005306E9 /* ShoppingMallSepcialFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialFlowLayout.swift; sourceTree = "<group>"; };
+		A7A98E4422804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingMallSepcialCollectionViewCell.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>"; };
@@ -716,6 +730,7 @@
 		A71D2A612265756E00A55D16 /* SwiftMoyaServiceApi */ = {
 			isa = PBXGroup;
 			children = (
+				A7A98E29228015BA005306E9 /* SwiftMoyaServiceCMS */,
 				A7A98DFB227E84D0005306E9 /* SwiftMoyaServiceProduct */,
 				A71AA5242273202E008FF1A5 /* SwiftMoyaServiceConfig */,
 				A72843FD224DB79400F82F30 /* SwiftMoyaServiceUser */,
@@ -1164,12 +1179,12 @@
 		A775CBFC2237483E00EBDCF8 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				A7A98E3E22804647005306E9 /* ShoppingMallSepcial */,
+				A7A98E38228030F8005306E9 /* ShoppingMallCategory */,
+				A7A98E3422802A60005306E9 /* ShoppingMallBanner */,
 				A775CBFD2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift */,
 				A775CBFF223774A300EBDCF8 /* ShoppingMallView.swift */,
-				A7A97FD82238FBAC0070F84D /* VerticalListCellCollectionViewCell.swift */,
-				A7A97FD72238FBAC0070F84D /* VerticalListCellModel.swift */,
-				A7A97FD62238FBAC0070F84D /* VerticalListSectionModel.swift */,
-				A7A97FD92238FBAD0070F84D /* VerticalSectionHeaderView.swift */,
+				A7A98E3022801B10005306E9 /* ShoppingMallListView.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -1416,8 +1431,8 @@
 		A77F2CA32232010F001BD3F6 /* ShoppingMallModule */ = {
 			isa = PBXGroup;
 			children = (
-				A7A98E0C227EBEE3005306E9 /* ProductView */,
 				A77F2CA42232010F001BD3F6 /* ShoppingMall */,
+				A7A98E0C227EBEE3005306E9 /* ProductView */,
 				A7A98E03227EB7FD005306E9 /* Category */,
 				A7A98E15227EECEA005306E9 /* Special */,
 			);
@@ -1437,6 +1452,7 @@
 			isa = PBXGroup;
 			children = (
 				A77F2CA72232010F001BD3F6 /* ShoppingMallViewController.swift */,
+				A7A98E27227FD6C6005306E9 /* ShoppingMallListViewController.swift */,
 			);
 			path = ViewController;
 			sourceTree = "<group>";
@@ -1687,6 +1703,43 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		A7A98E29228015BA005306E9 /* SwiftMoyaServiceCMS */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E2C22801642005306E9 /* SwiftMoyaServiceCMSApi.swift */,
+				A7A98E2E228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift */,
+			);
+			path = SwiftMoyaServiceCMS;
+			sourceTree = "<group>";
+		};
+		A7A98E3422802A60005306E9 /* ShoppingMallBanner */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E322280272A005306E9 /* ShoppingMallBannerTableViewCell.swift */,
+				A7A98E3522802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift */,
+			);
+			path = ShoppingMallBanner;
+			sourceTree = "<group>";
+		};
+		A7A98E38228030F8005306E9 /* ShoppingMallCategory */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E392280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift */,
+				A7A98E3B228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift */,
+			);
+			path = ShoppingMallCategory;
+			sourceTree = "<group>";
+		};
+		A7A98E3E22804647005306E9 /* ShoppingMallSepcial */ = {
+			isa = PBXGroup;
+			children = (
+				A7A98E40228046C4005306E9 /* ShoppingMallSepcialTableViewCell.swift */,
+				A7A98E4222804851005306E9 /* ShoppingMallSepcialFlowLayout.swift */,
+				A7A98E4422804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift */,
+			);
+			path = ShoppingMallSepcial;
+			sourceTree = "<group>";
+		};
 		A7BB68512268DCF800AB07A2 /* SelfRecommendation */ = {
 			isa = PBXGroup;
 			children = (
@@ -2291,7 +2344,6 @@
 				A7D46090227617D200A5A54E /* SQLModel.swift in Sources */,
 				A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */,
 				A7C3DD1C226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift in Sources */,
-				A7A97FDC2238FBAD0070F84D /* VerticalListCellCollectionViewCell.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
 				A7A98E12227ECA11005306E9 /* ProductSearchModel.swift in Sources */,
 				A71AF0B0226EF185001730FE /* SearchCollectionViewCell.swift in Sources */,
@@ -2307,6 +2359,7 @@
 				A729B5AD2266FF45004AE098 /* BindPhoneNumberView.swift in Sources */,
 				A7CC74E62270628B003C4F38 /* DeliveryMethodTypeModel.swift in Sources */,
 				A71AA51F22729F35008FF1A5 /* AuthorizationSwift.swift in Sources */,
+				A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */,
 				A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */,
 				A7CC74DA22702E41003C4F38 /* MineOrderTableViewCell.swift in Sources */,
 				A77F2CB92232010F001BD3F6 /* ShoppingCartViewController.swift in Sources */,
@@ -2320,6 +2373,7 @@
 				A77F2CB52232010F001BD3F6 /* ShoppingMallViewController.swift in Sources */,
 				A71AA513227215B5008FF1A5 /* ExpressAddressListView.swift in Sources */,
 				A7DC467F22783A47001F3EFC /* EditExpressAddressTableViewCell.swift in Sources */,
+				A7A98E4522804C63005306E9 /* ShoppingMallSepcialCollectionViewCell.swift in Sources */,
 				A7824B082271F53A00ABA381 /* EditSetDefaultTableViewCell.swift in Sources */,
 				A77F2CC3223203BA001BD3F6 /* AppDelegate+Window.swift in Sources */,
 				A7824B062271F25400ABA381 /* EditAddressTableViewCell.swift in Sources */,
@@ -2328,6 +2382,7 @@
 				A7A98E0B227EBD04005306E9 /* CategorySearchView.swift in Sources */,
 				A72A73142232475E00B21995 /* AlipayManager.swift in Sources */,
 				A7824B042271F10300ABA381 /* EditSelfMentionContactsView.swift in Sources */,
+				A7A98E332280272A005306E9 /* ShoppingMallBannerTableViewCell.swift in Sources */,
 				A71AF0B6226EF99A001730FE /* SearchResultViewController.swift in Sources */,
 				A757C9302274839900226355 /* SelfMentionAddressListModel.swift in Sources */,
 				A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */,
@@ -2346,10 +2401,13 @@
 				A72A72AF22321DE000B21995 /* AppInfo.swift in Sources */,
 				A7D460942276854500A5A54E /* BaiduToCity2Model.swift in Sources */,
 				A72A72D422321E2700B21995 /* EnumMacro.swift in Sources */,
+				A7A98E41228046C5005306E9 /* ShoppingMallSepcialTableViewCell.swift in Sources */,
 				A7CC753A2271B98B003C4F38 /* AddressManagerAddTableViewCell.swift in Sources */,
 				A71AF0AC226EDE37001730FE /* SearchNavigationbarView.swift in Sources */,
 				A7CC75432271E038003C4F38 /* SelfMentionContactsListViewController.swift in Sources */,
 				A7778CDF22461BAD00C7C47A /* PhoneCountryAreaSectionHeaderView.swift in Sources */,
+				A7A98E2D22801642005306E9 /* SwiftMoyaServiceCMSApi.swift in Sources */,
+				A7A98E3122801B10005306E9 /* ShoppingMallListView.swift in Sources */,
 				A7CC751A22716254003C4F38 /* SetTableViewCell.swift in Sources */,
 				A71AA52822732173008FF1A5 /* SwiftMoyaNetWorkServiceConfig.swift in Sources */,
 				A775CC0322377C6500EBDCF8 /* EmptyView.swift in Sources */,
@@ -2360,13 +2418,12 @@
 				A75414FD224B5F28002480B5 /* MobileLoginViewController.swift in Sources */,
 				A771F07C226D4E1C007999DB /* AddressPOITableViewCell.swift in Sources */,
 				A72A72AE22321DE000B21995 /* CountdownButton.swift in Sources */,
+				A7A98E28227FD6C6005306E9 /* ShoppingMallListViewController.swift in Sources */,
 				A77F2CB72232010F001BD3F6 /* MineViewController.swift in Sources */,
 				A7778CA92244904500C7C47A /* Extension+Gifu.GIFImageView.swift in Sources */,
-				A7A97FDD2238FBAD0070F84D /* VerticalSectionHeaderView.swift in Sources */,
 				A7A98E02227E8900005306E9 /* ProductSearchListModel.swift in Sources */,
 				A7A98E17227EED76005306E9 /* SpecialViewController.swift in Sources */,
 				A7778CB32244D73400C7C47A /* RegisterLoginViewController.swift in Sources */,
-				A7A97FDB2238FBAD0070F84D /* VerticalListCellModel.swift in Sources */,
 				A7CC752F2271A1F2003C4F38 /* SetPasswordView.swift in Sources */,
 				A7A98E09227EB8DD005306E9 /* CategoryView.swift in Sources */,
 				A7CC75362271AC14003C4F38 /* AddressManagerView.swift in Sources */,
@@ -2382,8 +2439,8 @@
 				A7CC74E0227042A4003C4F38 /* MineServiceTableViewCell.swift in Sources */,
 				A72A72BC22321DE000B21995 /* Extension+UIAlertController.swift in Sources */,
 				A7BB68662269B1DD00AB07A2 /* AddressPOIView.swift in Sources */,
-				A7A97FDA2238FBAD0070F84D /* VerticalListSectionModel.swift in Sources */,
 				A72A72C322321DE000B21995 /* Extension+Date.swift in Sources */,
+				A7A98E3A2280312C005306E9 /* ShoppingMallCategoryTableViewCell.swift in Sources */,
 				A7778CAB2244B12500C7C47A /* CountDownManager.swift in Sources */,
 				A775CBFE2237493600EBDCF8 /* ShoppingMallNavigationBarView.swift in Sources */,
 				A71AA5212272E527008FF1A5 /* Extension+UINavigationController.swift in Sources */,
@@ -2399,6 +2456,7 @@
 				A738D202225AD6AD00EEE860 /* Extension+UICollectionView.swift in Sources */,
 				A7CC74D6226FF421003C4F38 /* MineNavigationBarView.swift in Sources */,
 				A71AF0BC226F099B001730FE /* ProductHBigTableViewCell.swift in Sources */,
+				A7A98E3C228036D7005306E9 /* ShoppingMallCategoryCollectionViewCell.swift in Sources */,
 				A71AF0AA226EDDF5001730FE /* SearchView.swift in Sources */,
 				A7A98E0E227EC0C6005306E9 /* CategoryTableViewCell.swift in Sources */,
 				A7284A542252FB5C000BAEC4 /* PaginationModel.swift in Sources */,
@@ -2425,6 +2483,7 @@
 				A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */,
 				A72A72D222321E2700B21995 /* Common.swift in Sources */,
 				A71AF0A6226EDDC8001730FE /* SearchViewController.swift in Sources */,
+				A7A98E4322804851005306E9 /* ShoppingMallSepcialFlowLayout.swift in Sources */,
 				A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */,
 				A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */,
 				A7CC751F227190C5003C4F38 /* AccountSecurityViewController.swift in Sources */,
@@ -2434,6 +2493,7 @@
 				A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */,
 				A757C9342274882E00226355 /* UIScrollView+MJRefreshEX.m in Sources */,
 				A77F2C9C2231FDCF001BD3F6 /* BaseView.swift in Sources */,
+				A7A98E2F228017E2005306E9 /* SwiftMoyaNetWorkServiceCMS.swift in Sources */,
 				A7284A522252EE9A000BAEC4 /* RootModel.swift in Sources */,
 				A72A7388223396CB00B21995 /* ApiMacro.swift in Sources */,
 				A72A72B922321DE000B21995 /* Extension+Array.swift in Sources */,

+ 60 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallBanner/ShoppingMallBannerFSPagerViewCell.swift

@@ -0,0 +1,60 @@
+//
+//  ShoppingMallBannerFSPagerViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import FSPagerView
+
+class ShoppingMallBannerFSPagerViewCell: FSPagerViewCell {
+    class func cellWith(collectionView:FSPagerView,index:Int) -> ShoppingMallBannerFSPagerViewCell {
+        let ID = "KowhhowOneSectionHeaderFSPagerViewCell"
+        collectionView.register(ShoppingMallBannerFSPagerViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : ShoppingMallBannerFSPagerViewCell =
+            collectionView.dequeueReusableCell(withReuseIdentifier: ID, at: index) as! ShoppingMallBannerFSPagerViewCell
+        cell.index = index
+        return cell
+    }
+    //MARK: - indexPath
+    var index: Int?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MARK: - 设置view
+    private func setupViews() {
+        addSubview(bgImageView)
+    }
+    
+    private func setupLayouts() {
+        bgImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+    }
+    
+    private lazy var bgImageView: UIImageView = {
+        let bgImageView = UIImageView()
+        return bgImageView
+    }()
+    
+    var imageNames: Array<String>?{
+        didSet {
+            bgImageView.image = kImage(name: imageNames![index!])
+        }
+    }
+}

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

@@ -0,0 +1,94 @@
+//
+//  ShoppingMallBannerTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import FSPagerView
+
+class ShoppingMallBannerTableViewCell: UITableViewCell {
+    
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            frame.origin.y += 10
+            super.frame = frame
+        }
+    }
+    
+     var imageNames = ["home_pic_banner_06","home_pic_banner_06","home_pic_banner_06"]
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingMallBannerTableViewCell {
+        let ID = "ShoppingMallBannerTableViewCell"
+        tableView.register(ShoppingMallBannerTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingMallBannerTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingMallBannerTableViewCell
+        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
+        backgroundColor = kf7f8faColor
+        addSubview(pagerView)
+    }
+    
+    private func setupLayouts() {
+        pagerView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    private lazy var pagerView: FSPagerView = {
+        let pagerView = FSPagerView(frame: CGRect.zero)
+        pagerView.delegate = self
+        pagerView.dataSource = self
+        pagerView.scrollDirection = .horizontal
+        pagerView.automaticSlidingInterval = 3.0
+        pagerView.isInfinite = true
+        pagerView.cornerRadius = 4
+        pagerView.masksToBounds = true
+        return pagerView
+    }()
+
+}
+
+extension ShoppingMallBannerTableViewCell:FSPagerViewDataSource,FSPagerViewDelegate {
+    func numberOfItems(in pagerView: FSPagerView) -> Int {
+        return 1
+    }
+    func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
+        let cell  = ShoppingMallBannerFSPagerViewCell.cellWith(collectionView: pagerView, index: index)
+        cell.imageNames = imageNames
+        return cell
+    }
+    
+    func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
+        pagerView.deselectItem(at: index, animated: true)
+        pagerView.scrollToItem(at: index, animated: true)
+    }
+    
+}

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

@@ -0,0 +1,67 @@
+//
+//  ShoppingMallCategoryCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallCategoryCollectionViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> ShoppingMallCategoryCollectionViewCell {
+        let ID = "ShoppingMallCategoryCollectionViewCell"
+        collectionView.register(ShoppingMallCategoryCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : ShoppingMallCategoryCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! ShoppingMallCategoryCollectionViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MARK: - 设置view
+    private func setupViews() {
+        addSubview(iconImageView)
+        addSubview(titleLabel)
+    }
+    
+    private func setupLayouts() {
+        iconImageView.snp.makeConstraints { (make) in
+            make.top.centerX.equalToSuperview()
+            make.size.equalTo(44 * kScaleWidth)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.height.equalTo(18 * kScaleWidth)
+            make.bottom.left.right.equalToSuperview()
+        }
+    }
+    
+    lazy var iconImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "logo")
+        return iconImageView
+    }()
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "新鲜蔬菜"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kScaleRegularFont12
+        titleLabel.textAlignment = .center
+        return titleLabel
+    }()
+}

+ 127 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallCategory/ShoppingMallCategoryTableViewCell.swift

@@ -0,0 +1,127 @@
+//
+//  ShoppingMallCategoryTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallCategoryTableViewCell: UITableViewCell {
+    
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            frame.origin.y += 10
+            super.frame = frame
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingMallCategoryTableViewCell {
+        let ID = "ShoppingMallCategoryTableViewCell"
+        tableView.register(ShoppingMallCategoryTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingMallCategoryTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingMallCategoryTableViewCell
+        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
+        backgroundColor = kf7f8faColor
+        addSubview(collectionView)
+    }
+    
+    private func setupLayouts() {
+        collectionView.snp.remakeConstraints {(make) in
+            make.top.equalTo(10)
+            make.left.right.equalToSuperview()
+            make.bottom.lessThanOrEqualTo(self)
+        }
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = UIColor.white
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.cornerRadius = 4
+        collectionView.masksToBounds = true
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = kScaleWidth * 21
+        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(10)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(contentSize.height)
+            make.bottom.lessThanOrEqualTo(self)
+        }
+        
+        self.collectionView.collectionViewLayout.invalidateLayout()
+    }
+}
+
+extension ShoppingMallCategoryTableViewCell: 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 = ShoppingMallCategoryCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-kScaleWidth * 39)/5, height: kScaleValue(value: 67))
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 12, left: 0, bottom: 12, right: 0)
+    }
+    
+}
+
+

+ 96 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallListView.swift

@@ -0,0 +1,96 @@
+//
+//  ShoppingMallListView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallListView: BaseView {
+    
+    override func setupViews() {
+        addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+    }
+    
+    override func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+extension ShoppingMallListView : UITableViewDelegate, UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 3
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch indexPath.section {
+        case 0:
+            let cell = ShoppingMallBannerTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return cell
+        case 1:
+            let cell = ShoppingMallCategoryTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.frame = tableView.bounds
+            cell.layoutIfNeeded()
+            cell.reloadData()
+            return cell
+            
+        case 2:
+            let cell = ShoppingMallSepcialTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return cell
+            
+        default:
+            return UITableViewCell()
+        }
+       
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        switch indexPath.section {
+        case 0:
+            return (160 * kScaleWidth)
+        case 1:
+            return  UITableView.automaticDimension
+        case 2:
+            return  (193 * kScaleWidth) + 10
+        default:
+            return 0
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+}
+
+

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

@@ -0,0 +1,56 @@
+//
+//  ShoppingMallSepcialCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallSepcialCollectionViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> ShoppingMallSepcialCollectionViewCell {
+        let ID = "ShoppingMallSepcialCollectionViewCell"
+        collectionView.register(ShoppingMallSepcialCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : ShoppingMallSepcialCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! ShoppingMallSepcialCollectionViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            
+        }
+    }
+    //MARK: - 初始化
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    //MARK: - 设置view
+    private func setupViews() {
+        addSubview(iconImageView)
+    }
+    
+    private func setupLayouts() {
+        iconImageView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    lazy var iconImageView : UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "logo")
+        iconImageView.cornerRadius = 4
+        iconImageView.masksToBounds = true
+        return iconImageView
+    }()
+    
+    
+}

+ 66 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialFlowLayout.swift

@@ -0,0 +1,66 @@
+//
+//  ShoppingMallSepcialFlowLayout.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallSepcialFlowLayout: UICollectionViewFlowLayout {
+
+    // 内容区域总大小,不是可见区域
+    override var collectionViewContentSize: CGSize {
+        let width = collectionView!.bounds.size.width - collectionView!.contentInset.left
+            - collectionView!.contentInset.right
+        let height = 193 * kScaleWidth
+        return CGSize(width: width, height: height)
+    }
+    
+    // 所有单元格位置属性
+    override func layoutAttributesForElements(in rect: CGRect)
+        -> [UICollectionViewLayoutAttributes]? {
+            var attributesArray = [UICollectionViewLayoutAttributes]()
+            let cellCount = self.collectionView!.numberOfItems(inSection: 0)
+            for i in 0..<cellCount {
+                let indexPath =  IndexPath(item:i, section:0)
+                let attributes =  self.layoutAttributesForItem(at: indexPath)
+                attributesArray.append(attributes!)
+            }
+            return attributesArray
+    }
+    
+    // 这个方法返回每个单元格的位置和大小
+    override func layoutAttributesForItem(at indexPath: IndexPath)
+        -> UICollectionViewLayoutAttributes? {
+            //当前单元格布局属性
+            let attribute =  UICollectionViewLayoutAttributes(forCellWith:indexPath)
+            
+            //单元格边长
+            let largeCellSide = 147 * kScaleWidth
+            let smallCellSide = 190 * kScaleWidth
+            
+            //当前行数,每行显示3个图片,1大2小
+            let line:Int =  indexPath.item / 3
+            //当前行的Y坐标
+            let lineOriginY =  largeCellSide * CGFloat(line)
+            //右侧单元格X坐标,这里按左右对齐,所以中间空隙大
+            let rightSmallX = collectionViewContentSize.width - smallCellSide
+            
+            if (indexPath.item % 3 == 0) {
+                attribute.frame = CGRect(x:0, y:lineOriginY, width:largeCellSide,
+                                         height:collectionViewContentSize.height)
+            } else if (indexPath.item % 3 == 1) {
+                attribute.frame = CGRect(x:rightSmallX, y:lineOriginY, width:smallCellSide,
+                                         height:92 * kScaleWidth)
+            } else if (indexPath.item % 3 == 2) {
+                attribute.frame = CGRect(x:rightSmallX,
+                                         y:9 * kScaleWidth + 92 * kScaleWidth,
+                                         width:smallCellSide, height:92 * kScaleWidth)
+            }
+            
+            return attribute
+    }
+    
+}

+ 100 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallSepcial/ShoppingMallSepcialTableViewCell.swift

@@ -0,0 +1,100 @@
+//
+//  ShoppingMallSepcialTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+
+class ShoppingMallSepcialTableViewCell: UITableViewCell {
+    override var frame: CGRect {
+        get {
+            return super.frame
+        }
+        set {
+            var frame = newValue
+            frame.origin.x += 14 * kScaleWidth
+            frame.size.width -= 14 * kScaleWidth * 2
+            frame.origin.y += 10
+            super.frame = frame
+        }
+    }
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> ShoppingMallSepcialTableViewCell {
+        let ID = "ShoppingMallSepcialTableViewCell"
+        tableView.register(ShoppingMallSepcialTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : ShoppingMallSepcialTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! ShoppingMallSepcialTableViewCell
+        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
+        backgroundColor = kf7f8faColor
+        addSubview(collectionView)
+    }
+    
+    private func setupLayouts() {
+//        collectionView.snp.remakeConstraints {(make) in
+//            make.top.equalTo(10)
+//            make.left.right.equalToSuperview()
+//            make.bottom.lessThanOrEqualTo(self)
+//        }
+//        self.collectionView.collectionViewLayout.invalidateLayout()
+
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect(x: 0, y: 10, width: kScreenWidth - kScaleWidth * 14, height: 193 * kScaleWidth), collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kf7f8faColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: ShoppingMallSepcialFlowLayout = {
+        let collectionViewLayout = ShoppingMallSepcialFlowLayout()
+        return collectionViewLayout
+    }()
+
+}
+
+extension ShoppingMallSepcialTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return 3
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = ShoppingMallSepcialCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+    }
+    
+}

+ 93 - 224
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/ShoppingMallView.swift

@@ -7,251 +7,120 @@
 //
 
 import UIKit
-
-let verticalListCategoryViewHeight = 30;   //悬浮categoryView的高度
-let verticalListPinSectionIndex = 1;    //悬浮固定section的index
+import JXSegmentedView
 
 class ShoppingMallView: BaseView {
-
-
-    typealias CategoryActionBlock = () -> Void
-    var categoryActionBlock : CategoryActionBlock?
-
-    var dataSource = Array<VerticalListSectionModel>()
-
-    var sectionHeaderAttributes = Array<UICollectionViewLayoutAttributes>()
-
-    let headerTitles = ["我的频道", "超级大IP", "热门HOT", "周边衍生", "影视综", "游戏集锦", "搞笑百事"];
-    var imageNames = ["boat", "crab", "lobster", "apple", "carrot", "grape", "watermelon"];
-
+    
     override func setupViews() {
-        super.setupViews()
-        for (index, title) in headerTitles.enumerated() {
-            let sectionModel = VerticalListSectionModel()
-            sectionModel.sectionTitle = title
-            let randomCount = arc4random()%10 + 5
-            var cellModels = Array<VerticalListCellModel>()
-
-            for _ in 0..<randomCount {
-                let cellModel = VerticalListCellModel()
-                cellModel.imageName = imageNames[index]
-                cellModel.itemName = title
-                cellModels.append(cellModel)
-            }
-            sectionModel.cellModels = cellModels
-            dataSource.append(sectionModel)
-        }
-        addSubview(categoryButton)
-//        addSubview(pinCategoryView)
-//        addSubview(allCollectionView)
-
-
+       addSubview(segmentedView)
+       addSubview(listContainerView)
     }
 
     override func setupLayouts() {
-        categoryButton.snp.makeConstraints { (make) in
-            make.top.equalToSuperview().offset(2)
-            make.right.equalToSuperview().offset(-10)
-            make.size.equalTo(30)
+        segmentedView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            if segmentedDataSource.titles.count > 1 {
+                 make.height.equalTo(44)
+            }else {
+                make.height.equalTo(0)
+            }
         }
-//        pinCategoryView.snp.makeConstraints { (make) in
-//            make.top.equalToSuperview().offset(2)
-//            make.right.equalTo(categoryButton.snp.left)
-//            make.left.equalToSuperview().offset(10)
-//            make.height.equalTo(30)
-//        }
-//        allCollectionView.snp.makeConstraints { (make) in
-//            make.top.equalTo(pinCategoryView.snp.bottom)
-//            make.left.right.bottom.equalToSuperview()
-//        }
-
-    }
-
-
-    private lazy var categoryButton: UIButton = {
-        let categoryButton = UIButton(type: UIButton.ButtonType.custom)
-        categoryButton.setImage(kImage(name: "shop"), for: UIControl.State.normal)
-        categoryButton.rx.tap.subscribe(onNext: {
-            [weak self] in
-            if let categoryActionBlock = self?.categoryActionBlock {
-                categoryActionBlock()
+        listContainerView.snp.makeConstraints { (make) in
+            if segmentedDataSource.titles.count > 1 {
+                make.top.equalTo(segmentedView.snp.bottom)
+            }else {
+                make.top.equalToSuperview()
             }
-        }).disposed(by: disposeBag)
-        return categoryButton
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    //1.初始化JXSegmentedView
+    lazy var segmentedView: JXSegmentedView = {
+        let segmentedView = JXSegmentedView()
+        segmentedView.delegate = self
+        segmentedView.dataSource = segmentedDataSource
+        segmentedView.indicators = [indicator]
+        segmentedView.contentScrollView = listContainerView.scrollView
+        return segmentedView
     }()
-
-//    private lazy var pinCategoryView: JXCategoryTitleView = {
-//        let pinCategoryView = JXCategoryTitleView()
-//        pinCategoryView.backgroundColor = UIColor.white
-//        pinCategoryView.titles = headerTitles
-//        pinCategoryView.titleColorGradientEnabled = true
-//        pinCategoryView.titleLabelZoomEnabled = true
-//        pinCategoryView.titleLabelZoomScale = 1.2
-//        let lineView = JXCategoryIndicatorLineView()
-//        lineView.lineStyle = .lengthen
-//        pinCategoryView.indicators = [lineView];
-//        pinCategoryView.delegate = self
-//        return pinCategoryView
-//    }()
-
-    private lazy var categoryCollectionViewLayout: UICollectionViewFlowLayout = {
-        let categoryCollectionViewLayout = UICollectionViewFlowLayout.init()
-        categoryCollectionViewLayout.scrollDirection = UICollectionView.ScrollDirection.horizontal
-        categoryCollectionViewLayout.estimatedItemSize = CGSize(width: (kScreenWidth-50)/5, height:30)
-        return categoryCollectionViewLayout
+    
+    //2.初始化dataSource
+    lazy var segmentedDataSource: JXSegmentedTitleDataSource = {
+        let segmentedDataSource = JXSegmentedTitleDataSource()
+        segmentedDataSource.titles = ["今日团购","菜市场"]
+        segmentedDataSource.isTitleColorGradientEnabled = true
+        segmentedDataSource.isItemSpacingAverageEnabled = true
+        segmentedDataSource.titleNormalColor = k333333Color
+        segmentedDataSource.titleSelectedColor = k333333Color
+        segmentedDataSource.titleNormalFont = kMediumFont18!
+        segmentedDataSource.titleSelectedFont = kMediumFont18
+       
+        //reloadData(selectedIndex:)方法一定要调用,方法内部会刷新数据源数组
+        segmentedDataSource.reloadData(selectedIndex: 0)
+        return segmentedDataSource
     }()
-
-//    private lazy var allCollectionView: UICollectionView = {
-//        let allCollectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: allCollectionViewLayout)
-//        allCollectionView.backgroundColor = UIColor.white;
-//        allCollectionView.delegate = self;
-//        allCollectionView.dataSource = self;
-//        return allCollectionView
-//    }()
-
-//    private lazy var allCollectionViewLayout: UICollectionViewFlowLayout = {
-//        let allCollectionViewLayout = UICollectionViewFlowLayout.init()
-//        allCollectionViewLayout.scrollDirection = UICollectionView.ScrollDirection.vertical
-//        //分组头悬停
-////        allCollectionViewLayout.sectionHeadersPinToVisibleBounds = true
-//        allCollectionViewLayout.itemSize = CGSize(width: kScreenWidth, height:30)
-//        return allCollectionViewLayout
-//    }()
+    //3.初始化指示器indicator
+    lazy var indicator: JXSegmentedIndicatorLineView = {
+        let indicator = JXSegmentedIndicatorLineView()
+        indicator.indicatorColor = kFFA42FColor
+        indicator.indicatorHeight = 4
+        indicator.indicatorWidth = 34
+        return indicator
+    }()
+    
+    //4.初始化JXSegmentedListContainerView
+    lazy var listContainerView: JXSegmentedListContainerView = {
+        let listContainerView = JXSegmentedListContainerView(dataSource: self)
+        listContainerView.didAppearPercent = 0.01
+        return listContainerView
+    }()
+    
+    
 
 }
 
-extension ShoppingMallView : UICollectionViewDelegate,UICollectionViewDataSource {
-
-    func numberOfSections(in collectionView: UICollectionView) -> Int {
-        return dataSource.count
+extension ShoppingMallView : JXSegmentedViewDelegate {
+    //点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,而不关心具体是点击还是滚动选中的情况。
+    func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
+       
     }
-    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        return self.dataSource[section].cellModels!.count;
+    
+    // 点击选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didClickSelectedItemAt index: Int) {
+        //传递didClickSelectedItemAt事件给listContainerView,必须调用!!!
+        listContainerView.didClickSelectedItem(at: index)
     }
-
-    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let cell = VerticalListCellCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-        let sectionModel = dataSource[indexPath.section]
-        let cellModel: VerticalListCellModel? = sectionModel.cellModels![indexPath.row]
-        cell.itemImageView.image = UIImage(named: cellModel?.imageName ?? "")
-        cell.titleLabel.text = cellModel?.itemName
-        return cell
+    
+    // 滚动选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didScrollSelectedItemAt index: Int) {
+        
     }
-
-    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-
+    
+    // 正在滚动中的回调
+    func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
+        //传递scrolling事件给listContainerView,必须调用!!!
+        listContainerView.segmentedViewScrolling(from: leftIndex, to: rightIndex, percent: percent, selectedIndex: segmentedView.selectedIndex)
     }
-
-    func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
-        if kind == UICollectionView.elementKindSectionHeader {
-
-            let headerView = VerticalSectionHeaderView.headerWith(collectionView: collectionView, kind:  UICollectionView.elementKindSectionHeader, indexPath: indexPath)
-            let sectionModel = dataSource[indexPath.section]
-            headerView.titleLabel.text = sectionModel.sectionTitle
-            return headerView
-        }
-        return UICollectionReusableView()
+    
+    /// 是否允许点击选中目标index的item
+    func segmentedView(_ segmentedView: JXSegmentedView, canClickItemAt index: Int) -> Bool {
+        return true
     }
-
-     // 标记一下 CollectionView 的滚动方向,是向上还是向下
-//    func scrollViewDidScroll(_ scrollView: UIScrollView) {
-//
-//        if sectionHeaderAttributes.count <= 0 {
-//            var attributes: [AnyHashable] = []
-//            var lastHeaderAttri: UICollectionViewLayoutAttributes? = nil
-//            for i in 0..<headerTitles.count {
-//                let attri: UICollectionViewLayoutAttributes? = allCollectionView.collectionViewLayout.layoutAttributesForSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, at: IndexPath(item: 0, section: i))
-//                if let attri = attri {
-//                    attributes.append(attri)
-//                }
-//                if i == headerTitles.count - 1 {
-//                    lastHeaderAttri = attri
-//                }
-//            }
-//            sectionHeaderAttributes = attributes as! [UICollectionViewLayoutAttributes]
-//
-//            //如果最后一个section条目太少了,会导致滚动最底部,但是却不能触发categoryView选中最后一个item。而且点击最后一个滚动的contentOffset.y也不要弄。所以添加contentInset,让最后一个section滚到最下面能显示完整个屏幕,
-//
-//            let lastCellAttri: UICollectionViewLayoutAttributes? = allCollectionView.collectionViewLayout.layoutAttributesForItem(at: IndexPath(item: (dataSource[headerTitles.count - 1]).cellModels!.count - 1, section: headerTitles.count - 1))
-//            let lastSectionHeight: CGFloat = (lastCellAttri?.frame.maxY)! - (lastHeaderAttri?.frame.minY)!
-//
-//            let value = CGFloat(bounds.size.height - CGFloat(verticalListCategoryViewHeight)) - lastSectionHeight
-//            if value > 0 {
-//                allCollectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: value, right: 0)
-//            }
-//        }
-//
-//
-//        if (!(scrollView.isTracking || scrollView.isDecelerating)) {
-//            //不是用户滚动的,比如setContentOffset等方法,引起的滚动不需要处理。
-//            return;
-//        }
-//
-//        //用户滚动的才处理
-//        //获取categoryView下面一点的所有布局信息,用于知道,当前最上方是显示的哪个section
-//        let topRect = CGRect(x: 0, y: scrollView.contentOffset.y + 1, width: bounds.size.width, height: 1)
-//        let topAttributes: UICollectionViewLayoutAttributes? = allCollectionView.collectionViewLayout.layoutAttributesForElements(in: topRect)?.first
-//        let topSection: Int? = topAttributes?.indexPath.section
-//        if topAttributes != nil && topSection! >= 0 {
-//            if pinCategoryView.selectedIndex != topSection! {
-//                //不相同才切换
-//                pinCategoryView.selectItem(at: topSection!)
-//            }
-//        }
-//    }
 }
 
-extension ShoppingMallView:UICollectionViewDelegateFlowLayout {
-
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
-        return CGSize(width: self.bounds.size.width, height: 40)
-    }
-
-
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        return CGSize(width: 100, height: 100)
-    }
+extension ShoppingMallView :JXSegmentedListContainerViewDataSource {
 
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-        return 10
-    }
-
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-        return (self.bounds.size.width - 100 * 3) / 4
+    
+    func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
+        if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
+            return titleDataSource.dataSource.count
+        }
+        return 0
     }
-
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        let margin: CGFloat = (self.bounds.size.width - 100 * 3) / 4
-        return UIEdgeInsets(top: 0, left: margin, bottom: 0, right: margin)
+    func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
+        let vc = ShoppingMallListViewController()
+        vc.shoppingMallListVCType = index
+        return vc
     }
-
 }
-
-
-//extension ShoppingMallView: JXCategoryViewDelegate{
-//
-//    func categoryView(_ categoryView: JXCategoryBaseView!, didClickSelectedItemAt index: Int) {
-//        self.collectionViewScrollToTop(section: index, animated: true)
-//    }
-//
-//    //将右侧colletionView的指定分区自动滚动到最顶端
-//    func collectionViewScrollToTop(section: Int, animated: Bool) {
-//        let headerRect = collectionViewHeaderFrame(section: section)
-//        let topOfHeader = CGPoint(x: 0, y: headerRect.origin.y
-//            - allCollectionView.contentInset.top)
-//        allCollectionView.setContentOffset(topOfHeader, animated: animated)
-//    }
-//
-//    //后获colletionView的指定分区头的高度
-//    func collectionViewHeaderFrame(section: Int) -> CGRect {
-//        let indexPath = IndexPath(item: 0, section: section)
-//        let attributes = allCollectionView.collectionViewLayout
-//            .layoutAttributesForSupplementaryView(ofKind:
-//                UICollectionView.elementKindSectionHeader, at: indexPath)
-//        guard let frameForFirstCell = attributes?.frame else {
-//            return .zero
-//        }
-//        return frameForFirstCell;
-//    }
-//
-//}

+ 0 - 62
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListCellCollectionViewCell.swift

@@ -1,62 +0,0 @@
-//
-//  VerticalListCellCollectionViewCell.swift
-//  Test
-//
-//  Created by 南鑫林 on 2019/3/13.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class VerticalListCellCollectionViewCell: UICollectionViewCell {
-    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> VerticalListCellCollectionViewCell {
-        let ID = "VerticalListCellCollectionViewCell"
-        collectionView.register(VerticalListCellCollectionViewCell.self, forCellWithReuseIdentifier: ID)
-        let cell : VerticalListCellCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! VerticalListCellCollectionViewCell
-        cell.indexPath = indexPath
-        return cell
-    }
-    //MARK: - indexPath
-    var indexPath: IndexPath?{
-        didSet {
-
-        }
-    }
-    //MARK: - 初始化
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupViews()
-    }
-
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    //MARK: - 设置view
-    private func setupViews() {
-        contentView.backgroundColor = UIColor.white
-        contentView.layer.cornerRadius = 10
-        contentView.addSubview(titleLabel)
-        contentView.addSubview(itemImageView)
-    }
-
-    override func layoutSubviews() {
-        super.layoutSubviews()
-        self.itemImageView.bounds = CGRect(x: 0, y: 0, width: 50, height: 50)
-        self.itemImageView.center = CGPoint(x: self.bounds.size.width/2, y: 30)
-
-        self.titleLabel.frame = CGRect(x: 0, y: itemImageView.frame.maxY + 5, width:  self.bounds.size.width, height: 30)
-    }
-
-    lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.textAlignment = .center
-        return titleLabel
-    }()
-
-    lazy var itemImageView: UIImageView = {
-        let itemImageView = UIImageView()
-        return itemImageView
-    }()
-
-}

+ 0 - 14
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListCellModel.swift

@@ -1,14 +0,0 @@
-//
-//  VerticalListCellModel.swift
-//  Test
-//
-//  Created by 南鑫林 on 2019/3/13.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class VerticalListCellModel: NSObject {
-    var imageName : String?
-    var itemName : String?
-}

+ 0 - 14
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalListSectionModel.swift

@@ -1,14 +0,0 @@
-//
-//  VerticalListSectionModel.swift
-//  Test
-//
-//  Created by 南鑫林 on 2019/3/13.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class VerticalListSectionModel: NSObject {
-    var sectionTitle : String?
-    var cellModels : Array<VerticalListCellModel>?
-}

+ 0 - 55
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/View/VerticalSectionHeaderView.swift

@@ -1,55 +0,0 @@
-//
-//  VerticalSectionHeaderView.swift
-//  Test
-//
-//  Created by 南鑫林 on 2019/3/13.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class VerticalSectionHeaderView: UICollectionReusableView {
-    class func headerWith(collectionView:UICollectionView,kind: String,indexPath: IndexPath) -> VerticalSectionHeaderView {
-        let ID = "VerticalSectionHeaderView"
-        collectionView.register(VerticalSectionHeaderView.self, forSupplementaryViewOfKind: kind, withReuseIdentifier: ID)
-        let headerView : VerticalSectionHeaderView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: ID, for: indexPath) as! VerticalSectionHeaderView
-        headerView.indexPath = indexPath
-        return headerView
-    }
-
-    var indexPath : IndexPath? {
-        didSet {
-
-        }
-    }
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupViews()
-    }
-
-    required init?(coder aDecoder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    //MARK: - 设置View
-    private func setupViews() {
-        backgroundColor = UIColor(red: 0.94, green: 0.94, blue: 0.94, alpha: 1)
-
-        addSubview(titleLabel)
-    }
-
-    override func layoutSubviews() {
-        super.layoutSubviews()
-
-        titleLabel.sizeToFit()
-        titleLabel.frame = CGRect(x: 16, y: (bounds.size.height - (titleLabel.bounds.size.height)) / 2, width: 200, height: titleLabel.bounds.size.height)
-    }
-
-    lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel()
-        titleLabel.textColor = UIColor.lightGray
-        titleLabel.font = UIFont.systemFont(ofSize: 15)
-        return titleLabel
-    }()
-
-}

+ 60 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallListViewController.swift

@@ -0,0 +1,60 @@
+//
+//  ShoppingMallListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+
+class ShoppingMallListViewController: UIViewController {
+    
+    var shoppingMallListVCType : Int = 0
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupView()
+        setupLayouts()
+        setupdata()
+    }
+    
+    func setupdata() {
+        shoppingMallListView.tableView
+            .addHeaderWithHeader(withBeginRefresh: true, animation: false) {
+                [weak self] (page) in
+            self?.cmsTemplateSetPreviewApi()
+        }
+        
+    }
+    func setupView() {
+        view.backgroundColor = kf7f8faColor
+        view.addSubview(shoppingMallListView)
+    }
+    
+    func setupLayouts() {
+        shoppingMallListView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    lazy var shoppingMallListView: ShoppingMallListView = {
+        let shoppingMallListView = ShoppingMallListView()
+        return shoppingMallListView
+    }()
+    
+    /// 获取首页数据
+    func cmsTemplateSetPreviewApi() {
+        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateSetPreviewApi(type: shoppingMallListVCType) {
+            [weak self] (data) -> (Void) in
+            
+        }
+    }
+}
+
+extension ShoppingMallListViewController : JXSegmentedListContainerViewListDelegate {
+    func listView() -> UIView {
+        return view
+    }
+}

+ 16 - 6
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ShoppingMall/ViewController/ShoppingMallViewController.swift

@@ -9,17 +9,16 @@
 import UIKit
 
 class ShoppingMallViewController: BaseViewController {
+    
     override func viewDidLoad() {
         super.viewDidLoad()
         setupViews()
         setupLayouts()
         setupData()
-        
     }
     override func setupViews() {
         super.setupViews()
         navigationBar.addSubview(navigationBarView)
-        view.addSubview(shoppingMallView)
     }
 
     override func setupLayouts() {
@@ -27,10 +26,6 @@ class ShoppingMallViewController: BaseViewController {
             make.top.equalToSuperview().offset(kSafeStatusBarHeight)
             make.left.right.bottom.equalToSuperview()
         }
-        shoppingMallView.snp.makeConstraints { (make) in
-            make.bottom.left.right.equalToSuperview()
-            make.top.equalTo(navigationBarView.snp.bottom)
-        }
     }
     
     override func setupData() {
@@ -53,6 +48,21 @@ class ShoppingMallViewController: BaseViewController {
             vc.navigationBar.title = "专题页面"
             self?.navigationController?.pushViewController(vc, animated: true)
         }).disposed(by: disposeBag)
+        
+        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateSetTemplateNameApi {
+            [weak self] (data) -> (Void) in
+            self?.setShoppingMallView()
+        }
+    }
+    
+    
+    /// 添加view
+    func setShoppingMallView() {
+        view.addSubview(shoppingMallView)
+        shoppingMallView.snp.makeConstraints { (make) in
+            make.bottom.left.right.equalToSuperview()
+            make.top.equalTo(kNavBarTotalHeight)
+        }
     }
 
     private lazy var navigationBarView: ShoppingMallNavigationBarView = {

+ 72 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift

@@ -0,0 +1,72 @@
+//
+//  SwiftMoyaNetWorkServiceCMS.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import Moya
+import SwiftyJSON
+import ObjectMapper
+
+class SwiftMoyaNetWorkServiceCMS: NSObject {
+    private static let _sharedInstance = SwiftMoyaNetWorkServiceCMS()
+    
+    private override init() {} // 私有化init方法
+    
+    class func shared() -> SwiftMoyaNetWorkServiceCMS {
+        return _sharedInstance
+    }
+    /// 数据回调
+    typealias apiCallBack = (Any) -> (Void)
+    
+    /// 获取模板名称
+    ///
+    /// - Parameter completion: 完成
+    func cmsTemplateSetTemplateNameApi(completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        let loacationModel = LocationModel.shared().getLocationModel()
+        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
+            SwiftProgressHUD.shared().hide()
+            completion(data)
+        }
+    }
+    
+    /// 获取首页
+    ///
+    /// - Parameter completion: 完成
+    func cmsTemplateSetPreviewApi(type:Int,completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        SwiftProgressHUD.shared().showWait()
+        let loacationModel = LocationModel.shared().getLocationModel()
+        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
+            SwiftProgressHUD.shared().hide()
+            completion(data)
+        }
+    }
+    
+    /// 获取商品列表
+    ///
+    /// - Parameter completion: 完成
+    func cmsTemplateSetProductListApi(id:Int = 0,block:String = "",completion: @escaping apiCallBack) {
+        var parameters = Dictionary<String,Any>()
+        parameters.updateValue(block, forKey: "block")
+        parameters.updateValue(id, forKey: "id")
+        SwiftProgressHUD.shared().showWait()
+        SwiftMoyaNetWorkManager.shared().request(target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateSetProductList(parameters: parameters))) {
+            (data) in
+            SwiftProgressHUD.shared().hide()
+            completion(data)
+        }
+    }
+}

+ 106 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaServiceCMSApi.swift

@@ -0,0 +1,106 @@
+//
+//  SwiftMoyaServiceCMSApi.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/5/6.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import Foundation
+import Moya
+
+
+// MARK: - 获取模板名称
+/// 获取模板名称
+public let kCMSTemplateSetTemplateNameApi = "/cms/templateSet/templateName"
+
+// MARK: - 获取首页
+/// 获取首页
+public let kCMSTemplateSetPreviewApi = "/cms/templateSet/preview"
+
+// MARK: - 获取商品列表
+/// 获取商品列表
+public let kCMSTemplateSetProductListApi = "/cms/templateSet/productList"
+
+
+/// CMS
+///
+/// - configTemplateSetTemplateName: 获取模板名称
+/// - configTemplateSetPreview: 获取首页
+/// - configTemplateSetProductList: 获取商品列表
+public enum SwiftMoyaServiceCMSApi {
+    case cmsTemplateSetTemplateName(parameters:Dictionary<String, Any>)
+    case cmsTemplateSetPreview(parameters:Dictionary<String, Any>)
+    case cmsTemplateSetProductList(parameters:Dictionary<String, Any>)
+}
+
+extension SwiftMoyaServiceCMSApi: TargetType {
+    
+    public var baseURL: URL {
+        switch self {
+        case .cmsTemplateSetTemplateName,
+             .cmsTemplateSetPreview,
+             .cmsTemplateSetProductList
+            :
+            return URL(string: kApiDataPrefix())!
+        }
+    }
+    
+    public var path: String {
+        switch self {
+        case .cmsTemplateSetTemplateName:
+            return kCMSTemplateSetTemplateNameApi
+        case .cmsTemplateSetPreview:
+            return kCMSTemplateSetPreviewApi
+        case .cmsTemplateSetProductList:
+            return kCMSTemplateSetProductListApi
+        }
+    }
+    
+    public var method: Moya.Method {
+        switch self {
+        case .cmsTemplateSetTemplateName,
+             .cmsTemplateSetPreview,
+             .cmsTemplateSetProductList
+            :
+            return .post
+        }
+    }
+    
+    // MARK: - 请求任务事件(这里附带上参数)
+    public var task: Task {
+        switch self {
+        case .cmsTemplateSetTemplateName(var parameters),
+             .cmsTemplateSetPreview(var parameters),
+             .cmsTemplateSetProductList(var parameters)
+            :
+            let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
+            parameters.updateValue(sign, forKey: "sign")
+            return .requestParameters(parameters: parameters, encoding: URLEncoding.default)
+        }
+    }
+    
+    
+    // MARK: - 是否执行Alamofire验证
+    public var validate: Bool {
+        return false
+    }
+    
+    // MARK: - 这个就是做单元测试模拟的数据,只会在单元测试文件中有作用
+    public var sampleData: Data {
+        return "{}".data(using: String.Encoding.utf8)!
+    }
+    
+    // MARK: - 请求头
+    public var headers: [String : String]? {
+        //同task,具体选择看后台 有application/x-www-form-urlencoded 、application/json
+        switch self {
+        case .cmsTemplateSetTemplateName,
+             .cmsTemplateSetPreview,
+             .cmsTemplateSetProductList
+            :
+            return (headerParameters(headerType: .tokenHeader) as! [String : String])
+        }
+    }
+    
+}

+ 1 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaNetWorkServiceConfig.swift

@@ -65,4 +65,5 @@ class SwiftMoyaNetWorkServiceConfig: NSObject {
             completion(selfMentionAddressListModel)
         }
     }
+    
 }

+ 1 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceConfig/SwiftMoyaServiceConfigApi.swift

@@ -25,6 +25,7 @@ public let kConfigCityManagementIndexApi = "/config/cityManagement/index"
 public enum SwiftMoyaServiceConfigApi {
     case configPickupNodeIndex(parameters:Dictionary<String, Any>)
     case configCityManagementIndex(parameters:Dictionary<String, Any>)
+
 }
 
 extension SwiftMoyaServiceConfigApi: TargetType {

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

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

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