南鑫林 5 vuotta sitten
vanhempi
commit
462facb20b
38 muutettua tiedostoa jossa 1465 lisäystä ja 49 poistoa
  1. 108 4
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  2. 3 1
      RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift
  3. 3 1
      RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift
  4. 2 0
      RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift
  5. 16 0
      RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift
  6. 2 0
      RainbowPlanet/RainbowPlanet/Macro/FontMacro.swift
  7. 122 0
      RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSRedemptionAreaModel.swift
  8. 18 30
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/CommunityNavigationBarView.swift
  9. 72 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaBannerCollectionViewCell.swift
  10. 295 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaBannerTableViewCell.swift
  11. 61 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaFSPagerViewCell.swift
  12. 117 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorCell/RedemptionAreaFloorTableViewCell.swift
  13. 138 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorCell/RedemptionAreaProductCollectionViewCell.swift
  14. 40 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorHeader/FloorHeaderViewFloorHeaderView.swift
  15. 181 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/ViewController/RedemptionAreaViewController.swift
  16. 36 0
      RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/ViewModel/RedemptionAreaViewModel.swift
  17. 45 3
      RainbowPlanet/RainbowPlanet/Router/H5RouterModuleType.swift
  18. 12 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaNetWorkServiceCMS.swift
  19. 16 4
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaServiceCMSApi.swift
  20. 6 6
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift
  21. 23 0
      RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkH5Manager.swift
  22. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/Contents.json
  23. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/navbar_class_black@2x.png
  24. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/navbar_class_black@3x.png
  25. 6 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/Contents.json
  26. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/Contents.json
  27. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/exchange_ico_bean@2x.png
  28. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/exchange_ico_bean@3x.png
  29. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/Contents.json
  30. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/exchange_ico_cheats@2x.png
  31. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/exchange_ico_cheats@3x.png
  32. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/Contents.json
  33. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/exchange_ico_detail@2x.png
  34. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/exchange_ico_detail@3x.png
  35. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/Contents.json
  36. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/exchange_ico_indent@2x.png
  37. BIN
      RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/exchange_ico_indent@3x.png
  38. 33 0
      RainbowPlanet/RainbowPlanet/ViewModel/UserMemberTotalBeanViewModel/UserMemberTotalBeanViewModel.swift

+ 108 - 4
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -41,6 +41,8 @@
 		A70B8430228FF6D400882BC5 /* ProductCartCountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A70B842F228FF6D400882BC5 /* ProductCartCountModel.swift */; };
 		A70B843422911AF600882BC5 /* ProductDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A70B843322911AF600882BC5 /* ProductDetailView.swift */; };
 		A70EBBC022561179000AD74F /* Extension+UITableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A70EBBBF22561179000AD74F /* Extension+UITableView.swift */; };
+		A714348722DD9D4700132DA9 /* RedemptionAreaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A714348622DD9D4700132DA9 /* RedemptionAreaViewController.swift */; };
+		A714348C22DDA3E400132DA9 /* CMSRedemptionAreaModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A714348B22DDA3E300132DA9 /* CMSRedemptionAreaModel.swift */; };
 		A7146349228EFCE20066099B /* ORSKUDataFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = A7146347228EFCE20066099B /* ORSKUDataFilter.m */; };
 		A715333E22980CC60017C861 /* ConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A715333D22980CC60017C861 /* ConfigModel.swift */; };
 		A71738A622897892000AEA6A /* SwiftMoyaServiceShopApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = A71738A522897892000AEA6A /* SwiftMoyaServiceShopApi.swift */; };
@@ -262,7 +264,6 @@
 		A790705D22B9B723008CE279 /* ModifyDataAvatarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790705C22B9B723008CE279 /* ModifyDataAvatarView.swift */; };
 		A790706122B9C294008CE279 /* ModifyDataNickNameSignView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A790706022B9C294008CE279 /* ModifyDataNickNameSignView.swift */; };
 		A790706522B9DFAD008CE279 /* TextLimitTool.m in Sources */ = {isa = PBXBuildFile; fileRef = A790706422B9DFAD008CE279 /* TextLimitTool.m */; };
-		A7931E0822AF855E00297D0A /* RegisterLoginModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7931E0722AF855E00297D0A /* RegisterLoginModule.xcassets */; };
 		A7931E0D22AF874600297D0A /* GenderSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931E0C22AF874600297D0A /* GenderSelectionViewController.swift */; };
 		A7931E1122AF989B00297D0A /* TopicSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931E1022AF989B00297D0A /* TopicSelectionViewController.swift */; };
 		A7931E1422AF9E4000297D0A /* TopicSelectionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7931E1322AF9E4000297D0A /* TopicSelectionCollectionViewCell.swift */; };
@@ -387,6 +388,15 @@
 		A7D5F26122C0C2F300F8E9AF /* UserFollowsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D5F26022C0C2F300F8E9AF /* UserFollowsModel.swift */; };
 		A7D5F26322C0CF8600F8E9AF /* UserFansModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D5F26222C0CF8600F8E9AF /* UserFansModel.swift */; };
 		A7D5F26522C118F100F8E9AF /* CMSMemberListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D5F26422C118F100F8E9AF /* CMSMemberListModel.swift */; };
+		A7D77DE422DDB4B20048D5F6 /* RedemptionAreaBannerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DE322DDB4B20048D5F6 /* RedemptionAreaBannerTableViewCell.swift */; };
+		A7D77DE722DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DE622DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift */; };
+		A7D77DE922DDBEF70048D5F6 /* RedemptionAreaModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7D77DE822DDBEF70048D5F6 /* RedemptionAreaModule.xcassets */; };
+		A7D77DEB22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DEA22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift */; };
+		A7D77DEE22DDDDDB0048D5F6 /* RedemptionAreaViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DED22DDDDDB0048D5F6 /* RedemptionAreaViewModel.swift */; };
+		A7D77DF122DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DF022DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift */; };
+		A7D77DF422DDEED10048D5F6 /* FloorHeaderViewFloorHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DF322DDEED10048D5F6 /* FloorHeaderViewFloorHeaderView.swift */; };
+		A7D77DF722DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DF622DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift */; };
+		A7D77DF922DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7D77DF822DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift */; };
 		A7DAB33322D881F5005B964E /* H5RouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33222D881F5005B964E /* H5RouterModuleType.swift */; };
 		A7DAB33522D8D3AC005B964E /* RegisterLoginRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33422D8D3AC005B964E /* RegisterLoginRouterModuleType.swift */; };
 		A7DAB33922DC2B83005B964E /* ShareRouterModuleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */; };
@@ -721,6 +731,8 @@
 		A70B842F228FF6D400882BC5 /* ProductCartCountModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductCartCountModel.swift; sourceTree = "<group>"; };
 		A70B843322911AF600882BC5 /* ProductDetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductDetailView.swift; sourceTree = "<group>"; };
 		A70EBBBF22561179000AD74F /* Extension+UITableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extension+UITableView.swift"; sourceTree = "<group>"; };
+		A714348622DD9D4700132DA9 /* RedemptionAreaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaViewController.swift; sourceTree = "<group>"; };
+		A714348B22DDA3E300132DA9 /* CMSRedemptionAreaModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMSRedemptionAreaModel.swift; sourceTree = "<group>"; };
 		A7146347228EFCE20066099B /* ORSKUDataFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORSKUDataFilter.m; sourceTree = "<group>"; };
 		A7146348228EFCE20066099B /* ORSKUDataFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORSKUDataFilter.h; sourceTree = "<group>"; };
 		A715333D22980CC60017C861 /* ConfigModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigModel.swift; sourceTree = "<group>"; };
@@ -959,7 +971,6 @@
 		A790706022B9C294008CE279 /* ModifyDataNickNameSignView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyDataNickNameSignView.swift; sourceTree = "<group>"; };
 		A790706322B9DFAD008CE279 /* TextLimitTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextLimitTool.h; sourceTree = "<group>"; };
 		A790706422B9DFAD008CE279 /* TextLimitTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextLimitTool.m; sourceTree = "<group>"; };
-		A7931E0722AF855E00297D0A /* RegisterLoginModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = RegisterLoginModule.xcassets; sourceTree = "<group>"; };
 		A7931E0C22AF874600297D0A /* GenderSelectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenderSelectionViewController.swift; sourceTree = "<group>"; };
 		A7931E1022AF989B00297D0A /* TopicSelectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopicSelectionViewController.swift; sourceTree = "<group>"; };
 		A7931E1322AF9E4000297D0A /* TopicSelectionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopicSelectionCollectionViewCell.swift; sourceTree = "<group>"; };
@@ -1085,6 +1096,15 @@
 		A7D5F26022C0C2F300F8E9AF /* UserFollowsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserFollowsModel.swift; sourceTree = "<group>"; };
 		A7D5F26222C0CF8600F8E9AF /* UserFansModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserFansModel.swift; sourceTree = "<group>"; };
 		A7D5F26422C118F100F8E9AF /* CMSMemberListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMSMemberListModel.swift; sourceTree = "<group>"; };
+		A7D77DE322DDB4B20048D5F6 /* RedemptionAreaBannerTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaBannerTableViewCell.swift; sourceTree = "<group>"; };
+		A7D77DE622DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaBannerCollectionViewCell.swift; sourceTree = "<group>"; };
+		A7D77DE822DDBEF70048D5F6 /* RedemptionAreaModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = RedemptionAreaModule.xcassets; sourceTree = "<group>"; };
+		A7D77DEA22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaFSPagerViewCell.swift; sourceTree = "<group>"; };
+		A7D77DED22DDDDDB0048D5F6 /* RedemptionAreaViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaViewModel.swift; sourceTree = "<group>"; };
+		A7D77DF022DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserMemberTotalBeanViewModel.swift; sourceTree = "<group>"; };
+		A7D77DF322DDEED10048D5F6 /* FloorHeaderViewFloorHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FloorHeaderViewFloorHeaderView.swift; sourceTree = "<group>"; };
+		A7D77DF622DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaFloorTableViewCell.swift; sourceTree = "<group>"; };
+		A7D77DF822DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaProductCollectionViewCell.swift; sourceTree = "<group>"; };
 		A7DAB33222D881F5005B964E /* H5RouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = H5RouterModuleType.swift; sourceTree = "<group>"; };
 		A7DAB33422D8D3AC005B964E /* RegisterLoginRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterLoginRouterModuleType.swift; sourceTree = "<group>"; };
 		A7DAB33822DC2B83005B964E /* ShareRouterModuleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareRouterModuleType.swift; sourceTree = "<group>"; };
@@ -1765,6 +1785,34 @@
 			path = ProcuctDetailSelectSku;
 			sourceTree = "<group>";
 		};
+		A714348522DD9CD000132DA9 /* RedemptionAreaModule */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DEC22DDDDA40048D5F6 /* ViewModel */,
+				A714348A22DD9E4C00132DA9 /* View */,
+				A714348822DD9E2800132DA9 /* ViewController */,
+			);
+			path = RedemptionAreaModule;
+			sourceTree = "<group>";
+		};
+		A714348822DD9E2800132DA9 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A714348622DD9D4700132DA9 /* RedemptionAreaViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A714348A22DD9E4C00132DA9 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DF522DDF3940048D5F6 /* FloorCell */,
+				A7D77DF222DDEEAA0048D5F6 /* FloorHeader */,
+				A7D77DE522DDB4B50048D5F6 /* Banner */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		A7146346228EFCE20066099B /* SKUDataFilter */ = {
 			isa = PBXGroup;
 			children = (
@@ -2014,6 +2062,7 @@
 		A71CAB3F22CB32A300D908A8 /* ViewModel */ = {
 			isa = PBXGroup;
 			children = (
+				A7D77DEF22DDE64B0048D5F6 /* UserMemberTotalBeanViewModel */,
 				A71CAB4322CB36C300D908A8 /* Community */,
 				A71CAB4222CB344E00D908A8 /* Virus */,
 			);
@@ -3075,6 +3124,7 @@
 		A77F2CA22232010F001BD3F6 /* Modules */ = {
 			isa = PBXGroup;
 			children = (
+				A714348522DD9CD000132DA9 /* RedemptionAreaModule */,
 				A77F2CAE2232010F001BD3F6 /* RegisterLoginModule */,
 				A719EE6622AF4374001AAC98 /* CommunityModule */,
 				A77F2CA32232010F001BD3F6 /* ShoppingMallModule */,
@@ -3175,10 +3225,10 @@
 			isa = PBXGroup;
 			children = (
 				A77F2C672231FB4A001BD3F6 /* Assets.xcassets */,
+				A7D77DE822DDBEF70048D5F6 /* RedemptionAreaModule.xcassets */,
 				A71AF0BD226F1792001730FE /* ShoppingMallModule.xcassets */,
 				A7CC74DD22703B4A003C4F38 /* MineModule.xcassets */,
 				A7FF1576228C824300A85748 /* OrderModule.xcassets */,
-				A7931E0722AF855E00297D0A /* RegisterLoginModule.xcassets */,
 				A7BF202322B392D600396DB3 /* CommunityModule.xcassets */,
 				A7BF202622B3930100396DB3 /* MessageModule.xcassets */,
 				BD24FABA22B509CF00C7AA3B /* PublishModule.xcassets */,
@@ -3559,6 +3609,7 @@
 				A7B4E739228192D10012914A /* CMSTemplateModel.swift */,
 				A7B4E7342281907A0012914A /* CMSModel.swift */,
 				A7D5F26422C118F100F8E9AF /* CMSMemberListModel.swift */,
+				A714348B22DDA3E300132DA9 /* CMSRedemptionAreaModel.swift */,
 			);
 			path = CMSModel;
 			sourceTree = "<group>";
@@ -4104,6 +4155,49 @@
 			path = CommunityModel;
 			sourceTree = "<group>";
 		};
+		A7D77DE522DDB4B50048D5F6 /* Banner */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DE322DDB4B20048D5F6 /* RedemptionAreaBannerTableViewCell.swift */,
+				A7D77DEA22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift */,
+				A7D77DE622DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift */,
+			);
+			path = Banner;
+			sourceTree = "<group>";
+		};
+		A7D77DEC22DDDDA40048D5F6 /* ViewModel */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DED22DDDDDB0048D5F6 /* RedemptionAreaViewModel.swift */,
+			);
+			path = ViewModel;
+			sourceTree = "<group>";
+		};
+		A7D77DEF22DDE64B0048D5F6 /* UserMemberTotalBeanViewModel */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DF022DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift */,
+			);
+			path = UserMemberTotalBeanViewModel;
+			sourceTree = "<group>";
+		};
+		A7D77DF222DDEEAA0048D5F6 /* FloorHeader */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DF322DDEED10048D5F6 /* FloorHeaderViewFloorHeaderView.swift */,
+			);
+			path = FloorHeader;
+			sourceTree = "<group>";
+		};
+		A7D77DF522DDF3940048D5F6 /* FloorCell */ = {
+			isa = PBXGroup;
+			children = (
+				A7D77DF622DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift */,
+				A7D77DF822DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift */,
+			);
+			path = FloorCell;
+			sourceTree = "<group>";
+		};
 		A7DAB33122D875C0005B964E /* CommunityVideoSubCommentController */ = {
 			isa = PBXGroup;
 			children = (
@@ -5706,6 +5800,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A7D77DE922DDBEF70048D5F6 /* RedemptionAreaModule.xcassets in Resources */,
 				BDD5483422C31752005BBE19 /* AlivcShortVideoImage.bundle in Resources */,
 				A7CC74DE22703B4A003C4F38 /* MineModule.xcassets in Resources */,
 				A7BF202422B392D600396DB3 /* CommunityModule.xcassets in Resources */,
@@ -5722,7 +5817,6 @@
 				BD108C9B22A60C3300837DAB /* HGImage.storyboard in Resources */,
 				A7FF1577228C824300A85748 /* OrderModule.xcassets in Resources */,
 				BD4B50AC22BC7DEA0073B516 /* FilterResource.bundle in Resources */,
-				A7931E0822AF855E00297D0A /* RegisterLoginModule.xcassets in Resources */,
 				A7778C9922438F5D00C7C47A /* README.txt in Resources */,
 				BDD54A2922C31D60005BBE19 /* LocalMV.json in Resources */,
 				A7BF202722B3930100396DB3 /* MessageModule.xcassets in Resources */,
@@ -5849,6 +5943,7 @@
 				A74322A422B8E7F60017C367 /* MyFollowAndFanHeaderView.swift in Sources */,
 				A73911AD229CD62F0033177E /* AlamofireReachabilityManager.swift in Sources */,
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
+				A7D77DF922DDF8FB0048D5F6 /* RedemptionAreaProductCollectionViewCell.swift in Sources */,
 				A7B4E7352281907A0012914A /* CMSModel.swift in Sources */,
 				A770E60522D64CD700CBD0A4 /* WKWebView+SwCapture.swift in Sources */,
 				BD13B6DB22BA03BC008BB323 /* PublishAddressPOIView.swift in Sources */,
@@ -5860,6 +5955,7 @@
 				BD108C9522A60C2100837DAB /* HGImageCollectionViewCell.swift in Sources */,
 				A7FF1589228C854900A85748 /* OrderDetailBottomView.swift in Sources */,
 				A770E5DB22CED8C600CBD0A4 /* RouterManager.swift in Sources */,
+				A714348722DD9D4700132DA9 /* RedemptionAreaViewController.swift in Sources */,
 				A73A56DE22DC9CCE004920FE /* UpdateVersionManager.swift in Sources */,
 				A7D5F22B22BB687100F8E9AF /* BaseJSWebViewController.swift in Sources */,
 				BD1DC6C5228CFD0B00B89C57 /* SwiftMoyaNetWorkServiceOrder.swift in Sources */,
@@ -5947,6 +6043,7 @@
 				BD61229A22C3605C00D3F513 /* AliyunEffectFilterCell.m in Sources */,
 				A7BF202B22B396F300396DB3 /* CardContentTitleTableViewCell.swift in Sources */,
 				A70B2C1D2286B52400B2449F /* ProductDetailViewController.swift in Sources */,
+				A7D77DE422DDB4B20048D5F6 /* RedemptionAreaBannerTableViewCell.swift in Sources */,
 				A72623EE22C4CFD800AEF875 /* WaterFallLayout.m in Sources */,
 				A7D5F25A22C05D1400F8E9AF /* SwiftMoyaServiceCommunityApi.swift in Sources */,
 				A7CC75332271ABB0003C4F38 /* AddressManagerViewController.swift in Sources */,
@@ -6013,6 +6110,7 @@
 				A71AF0BA226F00F8001730FE /* SearchResultView.swift in Sources */,
 				A7297C6622D72FA4001A7AE6 /* KeyBoardCommentView.swift in Sources */,
 				A77F2CB52232010F001BD3F6 /* ShoppingMallViewController.swift in Sources */,
+				A7D77DEB22DDC5900048D5F6 /* RedemptionAreaFSPagerViewCell.swift in Sources */,
 				A7D07CD622B78BC300186014 /* PersonViewUserAndOtherListCollectionViewCell.swift in Sources */,
 				A71AA513227215B5008FF1A5 /* ExpressAddressListView.swift in Sources */,
 				A7B4E723228154750012914A /* ProductFloorBannerView.swift in Sources */,
@@ -6038,6 +6136,7 @@
 				BD01B20222BC677900CE9F36 /* PublishVideoView.swift in Sources */,
 				A7C0FDF322B65E5400BC1E86 /* FeaturedTopicsTableViewCell.swift in Sources */,
 				A770E61322D6625700CBD0A4 /* ShareCommunityViewCollectionViewCell.swift in Sources */,
+				A7D77DEE22DDDDDB0048D5F6 /* RedemptionAreaViewModel.swift in Sources */,
 				A7A98E0B227EBD04005306E9 /* CategorySearchView.swift in Sources */,
 				A72A73142232475E00B21995 /* AlipayManager.swift in Sources */,
 				A7824B042271F10300ABA381 /* EditSelfMentionContactsView.swift in Sources */,
@@ -6103,6 +6202,7 @@
 				A70B2C6D2288815E00B2449F /* PickViewOneComponentsView.swift in Sources */,
 				BDD4FB1422840954006FE833 /* ShoppingCartOrderPayView.swift in Sources */,
 				A70B2C222286BF5900B2449F /* ProductDetailTableViewHeaderView.swift in Sources */,
+				A7D77DE722DDBE4D0048D5F6 /* RedemptionAreaBannerCollectionViewCell.swift in Sources */,
 				A7D5F24D22BC720000F8E9AF /* WVJBModel.swift in Sources */,
 				A74322A222B8D5A90017C367 /* SearchUserLitTableViewCell.swift in Sources */,
 				A72623E522C39C7000AEF875 /* FMLinkLabel.m in Sources */,
@@ -6140,6 +6240,7 @@
 				A72A72AA22321DE000B21995 /* Log.swift in Sources */,
 				BD6122ED22C367E900D3F513 /* AliAssetImageGenerator.m in Sources */,
 				BD61226A22C3595B00D3F513 /* AlivcEditUIConfig.m in Sources */,
+				A7D77DF122DDE6600048D5F6 /* UserMemberTotalBeanViewModel.swift in Sources */,
 				A7AA9F6522C63DCD0086498B /* CommunityFollowFeedModel.swift in Sources */,
 				A72A72B622321DE000B21995 /* Extension+NSRange.swift in Sources */,
 				BD0E678522A4C23B00B980BA /* ShoppingCartOrderPayFreightCell.swift in Sources */,
@@ -6327,6 +6428,7 @@
 				A729B5A82266F2E0004AE098 /* AlertSheetView.swift in Sources */,
 				A7D07CC322B745C800186014 /* PersonViewUserAndOtherHeaderView.swift in Sources */,
 				A7CC75382271ADD6003C4F38 /* AddressManagerSelfMentionExpressHeaderView.swift in Sources */,
+				A714348C22DDA3E400132DA9 /* CMSRedemptionAreaModel.swift in Sources */,
 				A738D66F225D9BD900EEE860 /* UMLoginModel.swift in Sources */,
 				A7FF156C228C6E5E00A85748 /* OrderTotalAmountTableViewCell.swift in Sources */,
 				A71738A622897892000AEA6A /* SwiftMoyaServiceShopApi.swift in Sources */,
@@ -6338,6 +6440,7 @@
 				BD6122E722C3654500D3F513 /* AliyunTimelineFilterItem.m in Sources */,
 				BD10CD0C22BFCC7C0040796E /* PublishMusicView.swift in Sources */,
 				A7F2D6DF22B25B5D0093000B /* CardContentPicVideoCollectionViewLayout.swift in Sources */,
+				A7D77DF422DDEED10048D5F6 /* FloorHeaderViewFloorHeaderView.swift in Sources */,
 				A72623E722C469B700AEF875 /* SearchMemberListModel.swift in Sources */,
 				A7A98E10227EC531005306E9 /* ProductHSmallTableViewCell.swift in Sources */,
 				A7A98DFD227E84F4005306E9 /* SwiftMoyaServiceProductApi.swift in Sources */,
@@ -6413,6 +6516,7 @@
 				BD12204422AF996E0051C7C2 /* MessageListController.swift in Sources */,
 				A73A56D922DC8378004920FE /* UpdateVersionView.swift in Sources */,
 				BD477F6322C23D66008BE2CB /* AliyunReachability.m in Sources */,
+				A7D77DF722DDF3DB0048D5F6 /* RedemptionAreaFloorTableViewCell.swift in Sources */,
 				A7778CDD2246121500C7C47A /* PhoneCountryAreaListMdoel.swift in Sources */,
 				A72A733522325A4B00B21995 /* AppDelegate+HandleOpen.swift in Sources */,
 				A7FF156E228C6EAE00A85748 /* OrderDeliveryModeTableViewCell.swift in Sources */,

+ 3 - 1
RainbowPlanet/RainbowPlanet/AppDelegate/AppDelegate.swift

@@ -12,7 +12,7 @@ import UIKit
 class AppDelegate: UIResponder, UIApplicationDelegate {
 
     var window: UIWindow?
-
+    
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         //初始化窗口
         initWindow()
@@ -45,5 +45,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
             
         }
     }
+    
+    
 
 }

+ 3 - 1
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -15,7 +15,9 @@ class BaseTabbarViewController: UITabBarController {
     /// 社区
     let v1 = CommunityViewController()
     /// 商城
-    let v2 = ShoppingMallViewController()
+//    let v2 = ShoppingMallViewController()
+    /// 兑换专区
+    let v2 = RedemptionAreaViewController()
     /// 发布
     let v3 = BaseViewController()
     /// 消息

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/ColorMacro.swift

@@ -88,6 +88,8 @@ let kf5f5f5Color = UIColor(hexString: "f5f5f5")
 
 let kf6f6f6Color = UIColor(hexString: "f6f6f6")
 
+let kF6FCF7Color = UIColor(hexString: "F6FCF7")
+
 let kf9f9f9Color = UIColor(hexString: "f9f9f9")
 
 let k9F9F9FColor = UIColor(hexString: "9F9F9F")

+ 16 - 0
RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift

@@ -196,3 +196,19 @@ enum CommunityBannerType : Int {
     case activity = 3
     case topic = 4
 }
+
+
+/// 兑换商城
+///
+/// - none: 纯展示
+/// - special: 专题
+/// - link: 链接
+/// - activity: 活动
+/// - commodity: 商品
+enum RedemptionAreaBannerType : Int {
+    case none = 0
+    case special = 1
+    case link = 2
+    case activity = 3
+    case commodity = 4
+}

+ 2 - 0
RainbowPlanet/RainbowPlanet/Macro/FontMacro.swift

@@ -34,10 +34,12 @@ let kMediumFont15 = UIFont(name: "PingFang-SC-Medium", size: 15)
 let kMediumFont16 = UIFont(name: "PingFang-SC-Medium", size: 16)
 let kMediumFont17 = UIFont(name: "PingFang-SC-Medium", size: 17)
 let kMediumFont18 = UIFont(name: "PingFang-SC-Medium", size: 18)
+let kMediumFont20 = UIFont(name: "PingFang-SC-Medium", size: 20)
 let kMediumFont21 = UIFont(name: "PingFang-SC-Medium", size: 21)
 let kMediumFont23 = UIFont(name: "PingFang-SC-Medium", size: 23)
 let kMediumFont24 = UIFont(name: "PingFang-SC-Medium", size: 24)
 let kMediumFont25 = UIFont(name: "PingFang-SC-Medium", size: 25)
+let kMediumFont26 = UIFont(name: "PingFang-SC-Medium", size: 26)
 let kMediumFont27 = UIFont(name: "PingFang-SC-Medium", size: 27)
 let kMediumFont30 = UIFont(name: "PingFang-SC-Medium", size: 30)
 let kMediumFont35 = UIFont(name: "PingFang-SC-Medium", size: 35)

+ 122 - 0
RainbowPlanet/RainbowPlanet/Model/CMSModel/CMSRedemptionAreaModel.swift

@@ -0,0 +1,122 @@
+//
+//	RedemptionAreaModel.swift
+//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+
+import Foundation 
+import ObjectMapper
+
+
+class CMSRedemptionAreaModel : NSObject, Mappable{
+
+	var applyType : String?
+	var content : [CMSRedemptionAreaContent]?
+	var title : String?
+
+
+	class func newInstance(map: Map) -> Mappable?{
+		return CMSRedemptionAreaModel()
+	}
+	required init?(map: Map){}
+	private override init(){}
+
+	func mapping(map: Map)
+	{
+		applyType <- map["apply_type"]
+		content <- map["content"]
+		title <- map["title"]
+		
+	}
+
+}
+
+enum CMSRedemptionAreaContentType : String {
+    case none = ""
+    case banner = "banner"
+    case specialOne = "specialOne"
+    case specialTwo = "special_two"
+    case floor = "floor"
+}
+
+class CMSRedemptionAreaContent : NSObject, Mappable{
+    
+    var cmsRedemptionAreaContentType : CMSRedemptionAreaContentType?
+    var areaType : String? {
+        didSet{
+            cmsRedemptionAreaContentType = CMSRedemptionAreaContentType(rawValue: areaType ?? "")
+        }
+    }
+    var floorImg : String?
+    var id : Int?
+    var linkType : Int?
+    var linkUrl : String?
+    var rule : [CMSRedemptionAreaRule]?
+    var showType : Int?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CMSRedemptionAreaContent()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        areaType <- map["area_type"]
+        floorImg <- map["floor_img"]
+        id <- map["id"]
+        linkType <- map["link_type"]
+        linkUrl <- map["link_url"]
+        rule <- map["rule"]
+        showType <- map["show_type"]
+        
+    }
+    
+}
+
+class CMSRedemptionAreaRule : NSObject, Mappable{
+    
+    // banner
+    var url : String?
+    var linkUrl : String?
+    var redemptionAreaBannerType : RedemptionAreaBannerType?
+    var linkType : Int? {
+        didSet {
+            redemptionAreaBannerType = RedemptionAreaBannerType(rawValue: linkType ?? 0)
+        }
+    }
+
+    // floor
+    var id : Int?
+    var img : String?
+    var price : Int?
+    var saleName : String?
+    var stock : Int?
+    var subtitle : String?
+    var totalCount : Int?
+    
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return CMSRedemptionAreaRule()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        // banner
+        url <- map["url"]
+        linkUrl <- map["link_url"]
+        linkType <- map["link_type"]
+        
+        // floor
+        id <- map["id"]
+        img <- map["img"]
+        price <- map["price"]
+        saleName <- map["sale_name"]
+        stock <- map["stock"]
+        subtitle <- map["subtitle"]
+        totalCount <- map["total_count"]
+        
+    }
+    
+}

+ 18 - 30
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/View/CommunityNavigationBarView.swift

@@ -12,6 +12,13 @@ import RxSwift
 
 class CommunityNavigationBarView: BaseView {
     
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+    
     typealias SearchClosure = () -> Void
     var searchClosure:SearchClosure?
     
@@ -22,8 +29,17 @@ class CommunityNavigationBarView: BaseView {
         addSubview(searchBgView)
         searchBgView.addSubview(searchIconImageView)
         searchBgView.addSubview(searchTextField)
-        userMemberGetTotalBeanApi()
-        userMemberGetTotalBeanApiInterval()
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("userMemberGetTotalBean"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
+            let totalBeanModel = notification.object as? TotalBeanModel
+            self?.scrollNumberLabel.change(to: NSNumber(integerLiteral: totalBeanModel?.todayBean ?? 0) , animated: true)
+            self?.scrollNumberLabel.snp_remakeConstraints { (make) in
+                make.centerY.equalToSuperview()
+                make.size.equalTo((self?.scrollNumberLabel.frame.size)!)
+                make.right.equalToSuperview().offset(-14)
+            }
+        }
+        UserMemberTotalBeanViewModel.shared.userMemberGetTotalBeanApi()
+        UserMemberTotalBeanViewModel.shared.userMemberGetTotalBeanApiInterval()
     }
     
     override func setupLayouts() {
@@ -130,31 +146,3 @@ class CommunityNavigationBarView: BaseView {
     }
 
 }
-
-extension CommunityNavigationBarView {
-    
-    func userMemberGetTotalBeanApi() {
-        SwiftMoyaNetWorkServiceUser.shared().userMemberGetTotalBeanApi(completion: { [weak self] (totalBeanModel) -> (Void) in
-            let totalBeanModel = totalBeanModel as? TotalBeanModel
-            self?.scrollNumberLabel.change(to: NSNumber(integerLiteral: totalBeanModel?.todayBean ?? 0) , animated: true)
-            self?.scrollNumberLabel.snp_remakeConstraints { (make) in
-                make.centerY.equalToSuperview()
-                make.size.equalTo((self?.scrollNumberLabel.frame.size)!)
-                make.right.equalToSuperview().offset(-14)
-            }
-        })
-    }
-    func userMemberGetTotalBeanApiInterval() {
-        Observable<Int>.interval(60, scheduler: MainScheduler.instance).subscribe(onNext: { _ in
-            SwiftMoyaNetWorkServiceUser.shared().userMemberGetTotalBeanApi(completion: { [weak self] (totalBeanModel) -> (Void) in
-                let totalBeanModel = totalBeanModel as? TotalBeanModel
-                self?.scrollNumberLabel.change(to: NSNumber(integerLiteral: totalBeanModel?.todayBean ?? 0) , animated: true)
-                self?.scrollNumberLabel.snp_remakeConstraints { (make) in
-                    make.centerY.equalToSuperview()
-                    make.size.equalTo((self?.scrollNumberLabel.frame.size)!)
-                    make.right.equalToSuperview().offset(-14)
-                }
-            })
-        }).disposed(by: disposeBag)
-    }
-}

+ 72 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaBannerCollectionViewCell.swift

@@ -0,0 +1,72 @@
+//
+//  RedemptionAreaBannerCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class RedemptionAreaBannerCollectionViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> RedemptionAreaBannerCollectionViewCell {
+        let ID = "RedemptionAreaBannerCollectionViewCell"
+        collectionView.register(RedemptionAreaBannerCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : RedemptionAreaBannerCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! RedemptionAreaBannerCollectionViewCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    let images = ["exchange_ico_cheats","exchange_ico_detail","exchange_ico_indent"]
+    
+    let titles = ["赚豆攻略","赚豆明细","我的订单"]
+    //MARK: - indexPath
+    var indexPath: IndexPath?{
+        didSet {
+            iconImageView.image = kImage(name: images[(indexPath?.row)!])
+            titleLabel.text = titles[(indexPath?.row)!]
+        }
+    }
+    //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() {
+        //        backgroundColor = UIColor.white
+        addSubview(iconImageView)
+        addSubview(titleLabel)
+    }
+    
+    private func setupLayouts() {
+        iconImageView.snp.makeConstraints { (make) in
+            make.top.equalTo(21)
+            make.size.equalTo(44)
+            make.centerX.equalToSuperview()
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.centerX.equalToSuperview()
+            make.bottom.equalTo(-21)
+            make.height.equalTo(20)
+        }
+    }
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.isUserInteractionEnabled = true
+        return iconImageView
+    }()
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        return titleLabel
+    }()
+}

+ 295 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaBannerTableViewCell.swift

@@ -0,0 +1,295 @@
+//
+//  RedemptionAreaBannerTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import FSPagerView
+import SwiftyMediator
+import FlickerNumber
+
+class RedemptionAreaBannerTableViewCell: UITableViewCell {
+    
+    deinit {
+        if observe != nil {
+            NotificationCenter.default.removeObserver(observe!)
+        }
+    }
+    weak var observe : NSObjectProtocol?
+
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> RedemptionAreaBannerTableViewCell {
+        let ID = "RedemptionAreaBannerTableViewCell"
+        tableView.register(RedemptionAreaBannerTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : RedemptionAreaBannerTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! RedemptionAreaBannerTableViewCell
+        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)
+        pagerView.addSubview(pageControl)
+        addSubview(leftBgView)
+        leftBgView.addSubview(titleLabel)
+        leftBgView.addSubview(beanNumberLabel)
+        leftBgView.addSubview(iconImagView)
+        leftBgView.addSubview(triangleView)
+        addSubview(collectionView)
+        
+        observe = NotificationCenter.default.addObserver(forName: NSNotification.Name("userMemberGetTotalBean"), object: nil, queue: OperationQueue.main) {[weak self] (notification) in
+            let totalBeanModel = notification.object as? TotalBeanModel
+            self?.beanNumberLabel.fn_setNumber(NSNumber(integerLiteral: totalBeanModel?.totalBean ?? 0))
+           
+        }
+        UserMemberTotalBeanViewModel.shared.userMemberGetTotalBeanApi()
+
+    }
+    
+    private func setupLayouts() {
+        pagerView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(150*kScaleWidth)
+        }
+        leftBgView.snp.makeConstraints { (make) in
+            make.top.equalTo(pagerView.snp.bottom)
+            make.left.equalToSuperview()
+            make.height.equalTo(110)
+            make.width.equalTo(105)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-22)
+            make.left.equalTo(14)
+            make.height.equalTo(18)
+        }
+        beanNumberLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(titleLabel.snp.top).offset(2)
+            make.height.equalTo(26)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+        }
+        iconImagView.snp.makeConstraints { (make) in
+            make.top.equalTo(27)
+            make.left.equalTo(14)
+            make.size.equalTo(14)
+        }
+    }
+    
+    private lazy var pagerView: FSPagerView = {
+        let pagerView = FSPagerView(frame: CGRect.zero)
+        pagerView.backgroundColor = kf7f8faColor
+        pagerView.delegate = self
+        pagerView.dataSource = self
+        pagerView.scrollDirection = .horizontal
+        return pagerView
+    }()
+    
+    private lazy var pageControl: NXLPageControl = {
+        let pageControl = NXLPageControl()
+        pageControl.pointSize = CGSize.init(width: kScaleValue(value: 4), height: 4)
+        pageControl.currentWidthMultiple = 1//当前点的宽度为其他点的4倍
+        pageControl.localPointSpace = 5
+        pageControl.currentColor = kThemeColor
+        pageControl.otherColor = UIColor(white: 1, alpha: 0.8)
+        pageControl.clickPoint { [weak self] (index) in
+            
+        }
+        return pageControl
+    }()
+    
+    lazy var leftBgView: UIView = {
+        let leftBgView = UIView()
+        leftBgView.backgroundColor = kF6FCF7Color
+        return leftBgView
+    }()
+    
+    private lazy var triangleView: UIView = {
+        let triangleView = UIView(frame: CGRect(x: 105-10, y: 10, width: 10, height: 16))
+        triangleView.backgroundColor = UIColor.clear
+        
+        // 画三角
+        let trianglePath = UIBezierPath()
+        var point = CGPoint(x: 0, y: 16/2)
+        trianglePath.move(to: point)
+        point = CGPoint(x: 10, y: 16)
+        trianglePath.addLine(to: point)
+        point = CGPoint(x: 10, y: 0)
+        trianglePath.addLine(to: point)
+        trianglePath.close()
+        let triangleLayer = CAShapeLayer()
+        triangleLayer.path = trianglePath.cgPath
+        triangleLayer.fillColor = UIColor.white.cgColor
+        triangleView.layer.addSublayer(triangleLayer)
+        return triangleView
+    }()
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "我的彩虹豆"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        return titleLabel
+    }()
+    
+    lazy var beanNumberLabel: UILabel = {
+        let beanNumberLabel = UILabel()
+        beanNumberLabel.text = "88888"
+        beanNumberLabel.textColor = k333333Color
+        beanNumberLabel.font = kMediumFont26
+        beanNumberLabel.adjustsFontSizeToFitWidth = true
+        return beanNumberLabel
+    }()
+    
+    lazy var iconImagView: UIImageView = {
+        let iconImagView = UIImageView()
+        iconImagView.image = kImage(name: "exchange_ico_bean")
+        return iconImagView
+    }()
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect(x: 105, y: 150*kScaleWidth, width: kScreenWidth-105, height: 110), collectionViewLayout: collectionViewLayout)
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 0
+        collectionViewLayout.minimumInteritemSpacing = 0
+        collectionViewLayout.scrollDirection = .horizontal
+        return collectionViewLayout
+    }()
+    
+
+    var cmsRedemptionAreaContent: CMSRedemptionAreaContent? {
+        didSet{
+            if !(cmsRedemptionAreaContent?.rule?.isEmpty ?? true) {
+                if cmsRedemptionAreaContent?.rule?.count ?? 0 > 1 {
+                    pagerView.isInfinite = true
+                }else{
+                    pagerView.isInfinite = false
+                }
+                
+                let pageControlWidth = CGFloat((cmsRedemptionAreaContent?.rule?.count)!) * kScaleValue(value: 4) +  CGFloat((cmsRedemptionAreaContent?.rule?.count)! - 1) * kScaleValue(value: 5)
+                
+                pageControl.snp.remakeConstraints { (make) in
+                    make.bottom.equalTo(-7)
+                    make.height.equalTo(4)
+                    make.centerX.equalToSuperview()
+                    make.width.equalTo(pageControlWidth)
+                }
+                pageControl.numberOfPages = (cmsRedemptionAreaContent?.rule?.count)!
+                if  pageControl.numberOfPages > 1 {
+                    pageControl.isHidden = false
+                    pagerView.automaticSlidingInterval = 5.0
+                    pagerView.isInfinite = true
+                }else {
+                    pageControl.isHidden = true
+                    pagerView.automaticSlidingInterval = 0.0
+                    pagerView.isInfinite = false
+                }
+            
+                pagerView.reloadData()
+            }
+        }
+    }
+
+}
+
+extension RedemptionAreaBannerTableViewCell:FSPagerViewDataSource,FSPagerViewDelegate {
+    func numberOfItems(in pagerView: FSPagerView) -> Int {
+        if !(cmsRedemptionAreaContent?.rule?.isEmpty ?? true) {
+            return cmsRedemptionAreaContent?.rule?.count ?? 0
+        }else {
+            return 0
+        }
+    }
+    func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
+        let cell  = RedemptionAreaFSPagerViewCell.cellWith(collectionView: pagerView, index: index)
+        cell.cmsRedemptionAreaRule = cmsRedemptionAreaContent?.rule?[index]
+        return cell
+    }
+    
+    func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
+        let cmsRedemptionAreaRule = cmsRedemptionAreaContent?.rule?[index]
+        RedemptionAreaViewModel.shared.pushVC(cmsRedemptionAreaRule: cmsRedemptionAreaRule)
+    }
+    
+    func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) {
+        self.pageControl.currentPage = targetIndex
+    }
+    
+    func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) {
+        self.pageControl.currentPage = pagerView.currentIndex
+    }
+    
+}
+
+
+extension RedemptionAreaBannerTableViewCell: 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 = RedemptionAreaBannerCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        
+        switch indexPath.row {
+        case 0:
+            Mediator.push(H5RouterModuleType.pushContentId4)
+            break
+        case 1:
+            Mediator.push(H5RouterModuleType.pushBeanRecord)
+            break
+        case 2:
+            Mediator.push(H5RouterModuleType.pushOrder)
+            break
+        default:
+            break
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-105)/3, height: 110)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top:0, left: 0, bottom: 0, right: 0)
+    }
+    
+}
+
+

+ 61 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/Banner/RedemptionAreaFSPagerViewCell.swift

@@ -0,0 +1,61 @@
+//
+//  RedemptionAreaFSPagerViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import FSPagerView
+
+class RedemptionAreaFSPagerViewCell: FSPagerViewCell {
+    class func cellWith(collectionView:FSPagerView,index:Int) -> RedemptionAreaFSPagerViewCell {
+        let ID = "RedemptionAreaFSPagerViewCell"
+        collectionView.register(RedemptionAreaFSPagerViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : RedemptionAreaFSPagerViewCell =
+            collectionView.dequeueReusableCell(withReuseIdentifier: ID, at: index) as! RedemptionAreaFSPagerViewCell
+        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()
+        bgImageView.isUserInteractionEnabled = true
+        return bgImageView
+    }()
+    
+    var cmsRedemptionAreaRule : CMSRedemptionAreaRule? {
+        didSet {
+            bgImageView.kf.setImage(with: kURLImage(name: cmsRedemptionAreaRule?.url ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
+        }
+    }
+    
+}

+ 117 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorCell/RedemptionAreaFloorTableViewCell.swift

@@ -0,0 +1,117 @@
+//
+//  RedemptionAreaFloorTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class RedemptionAreaFloorTableViewCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> RedemptionAreaFloorTableViewCell {
+        let ID = "RedemptionAreaFloorTableViewCell"
+        tableView.register(RedemptionAreaFloorTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : RedemptionAreaFloorTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! RedemptionAreaFloorTableViewCell
+        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 {
+            
+        }
+    }
+    //MARK: - 设置view
+    private func setupViews() {
+        self.selectionStyle = .none
+        addSubview(collectionView)
+
+    }
+    
+    private func setupLayouts() {
+        collectionView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        collectionView.backgroundColor = UIColor.white
+        collectionView.contentInset = UIEdgeInsets(top: 0, left: 5, bottom: 5, right: 5)
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 5
+        collectionViewLayout.minimumInteritemSpacing = 5
+        return collectionViewLayout
+    }()
+    
+    var cmsRedemptionAreaContent: CMSRedemptionAreaContent? {
+        didSet{
+            collectionView.reloadData()
+        }
+    }
+
+}
+
+extension RedemptionAreaFloorTableViewCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        if !(cmsRedemptionAreaContent?.rule?.isEmpty ?? true) {
+            return 1
+        }else {
+            return 0
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        if !(cmsRedemptionAreaContent?.rule?.isEmpty ?? true) {
+            return cmsRedemptionAreaContent?.rule?.count ?? 0
+        }else {
+            return 0
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cmsRedemptionAreaRule = cmsRedemptionAreaContent?.rule?[indexPath.row]
+        let cell = RedemptionAreaProductCollectionViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        cell.cmsRedemptionAreaRule = cmsRedemptionAreaRule
+        return cell
+        
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        let cmsRedemptionAreaRule = cmsRedemptionAreaContent?.rule?[indexPath.row]
+        Mediator.push(H5RouterModuleType.pushDetail(id: "\(cmsRedemptionAreaRule?.id ?? 0)"))
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-15)/2, height: (kScreenWidth-15)/2 + 116)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top:0, left: 0, bottom: 0, right: 0)
+    }
+    
+}
+
+
+

+ 138 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorCell/RedemptionAreaProductCollectionViewCell.swift

@@ -0,0 +1,138 @@
+//
+//  RedemptionAreaProductCollectionViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class RedemptionAreaProductCollectionViewCell: UICollectionViewCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> RedemptionAreaProductCollectionViewCell {
+        let ID = "RedemptionAreaProductCollectionViewCell"
+        collectionView.register(RedemptionAreaProductCollectionViewCell.self, forCellWithReuseIdentifier: ID)
+        let cell : RedemptionAreaProductCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! RedemptionAreaProductCollectionViewCell
+        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")
+    }
+    
+
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.cornerRadius = 4
+        self.masksToBounds = true
+        self.layer.borderColor = keeeeeeColor.cgColor
+        self.layer.borderWidth = 0.5
+        addSubview(iconImageView)
+        addSubview(titleLabel)
+        addSubview(detatileTitleLabel)
+        addSubview(beanLabel)
+        addSubview(beanNameLabel)
+        addSubview(numberPersonLabel)
+    }
+    
+    private func setupLayouts() {
+        iconImageView.snp.makeConstraints { (make) in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo((kScreenWidth-15)/2)
+        }
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(iconImageView.snp.bottom).offset(10)
+            make.height.equalTo(20)
+            make.left.equalTo(6)
+            make.right.equalTo(-6)
+        }
+        detatileTitleLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp.bottom)
+            make.height.equalTo(17)
+            make.left.equalTo(6)
+            make.right.equalTo(-6)
+        }
+        beanLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-15)
+            make.left.equalTo(6)
+            make.right.equalTo(numberPersonLabel.snp.left).offset(-5)
+            make.height.equalTo(22)
+        }
+        beanNameLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(beanLabel.snp.top)
+            make.left.equalTo(6)
+        }
+        numberPersonLabel.snp.makeConstraints { (make) in
+            make.bottom.equalTo(-15)
+            make.right.equalTo(-6)
+            make.height.equalTo(17)
+            make.left.lessThanOrEqualTo(beanLabel.snp.right).offset(5)
+        }
+    }
+    
+    lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "pic_preload")
+        return iconImageView
+    }()
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        return titleLabel
+    }()
+    
+    lazy var detatileTitleLabel: UILabel = {
+        let detatileTitleLabel = UILabel()
+        detatileTitleLabel.textColor = k999999Color
+        detatileTitleLabel.font = kRegularFont12
+        return detatileTitleLabel
+    }()
+    
+    lazy var beanLabel: UILabel = {
+        let beanLabel = UILabel()
+        beanLabel.textColor = kFFA42FColor
+        beanLabel.font = kMediumFont20
+        return beanLabel
+    }()
+    
+    lazy var beanNameLabel: UILabel = {
+        let beanNameLabel = UILabel()
+        beanNameLabel.textColor = kFFA42FColor
+        beanNameLabel.font = kRegularFont12
+        beanNameLabel.text = "彩虹豆"
+        return beanNameLabel
+    }()
+    
+    lazy var numberPersonLabel: UILabel = {
+        let numberPersonLabel = UILabel()
+        numberPersonLabel.textColor = k999999Color
+        numberPersonLabel.font = kRegularFont12
+        return numberPersonLabel
+    }()
+    
+    var cmsRedemptionAreaRule : CMSRedemptionAreaRule? {
+        didSet {
+            iconImageView.kf.setImage(with: kURLImage(name: cmsRedemptionAreaRule?.img ?? ""), placeholder: kImage(name: "pic_preload"))
+            titleLabel.text = cmsRedemptionAreaRule?.saleName
+            detatileTitleLabel.text = cmsRedemptionAreaRule?.subtitle
+            beanLabel.text = "\(cmsRedemptionAreaRule?.price ?? 0)"
+            numberPersonLabel.text = "\(cmsRedemptionAreaRule?.totalCount ?? 0)人已兑换"
+        }
+    }
+}

+ 40 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/View/FloorHeader/FloorHeaderViewFloorHeaderView.swift

@@ -0,0 +1,40 @@
+//
+//  FloorHeaderView.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+
+class FloorHeaderViewFloorHeaderView: BaseView {
+    
+    override func setupViews() {
+        addSubview(imageView)
+    }
+    
+    override func setupLayouts() {
+        imageView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.height.equalTo(78*kScaleWidth)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+        }
+    }
+    
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView()
+        imageView.image = kImage(name: "pic_preload")
+        imageView.contentMode =  .scaleAspectFill
+        imageView.clipsToBounds = true
+        return imageView
+    }()
+    
+    var cmsRedemptionAreaContent : CMSRedemptionAreaContent? {
+        didSet {
+            imageView.kf.setImage(with: kURLImage(name: cmsRedemptionAreaContent?.floorImg ?? ""), placeholder: kImage(name: "pic_preload"))
+        }
+    }
+    
+}

+ 181 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/ViewController/RedemptionAreaViewController.swift

@@ -0,0 +1,181 @@
+//
+//  RedemptionAreaViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class RedemptionAreaViewController: BaseViewController {
+
+    var cmsRedemptionAreaModel : CMSRedemptionAreaModel?
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+
+    }
+    
+    override func setupViews() {
+        view.addSubview(tableView)
+        navigationBar.wr_setRightButton(image: kImage(name: "navbar_class_black")!)
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect(x: 0, y: kNavBarTotalHeight, width: kScreenWidth, height: kScreenHeight - kNavBarTotalHeight - kTabBarTotalHeight), style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kf7f8faColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0
+        tableView.estimatedSectionFooterHeight = 0
+        tableView.estimatedSectionHeaderHeight = 0
+        return tableView
+    }()
+    
+    override func setupData() {
+        tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) {
+            [weak self] (page) in
+            self?.cmsTemplateExchangeApi()
+        }
+        navigationBar.onClickRightButton = {
+            Mediator.push(H5RouterModuleType.pushCategory)
+        }
+    }
+    
+}
+
+extension RedemptionAreaViewController {
+    
+    /// 加载cms
+    func cmsTemplateExchangeApi() {
+        SwiftMoyaNetWorkServiceCMS.shared().cmsTemplateExchangeApi {
+            [weak self] (cmsRedemptionAreaModel) -> (Void) in
+            self?.cmsRedemptionAreaModel = cmsRedemptionAreaModel as? CMSRedemptionAreaModel
+            self?.navigationBar.title = self?.cmsRedemptionAreaModel?.title
+            self?.tableView.reloadData()
+        }
+    }
+    
+}
+
+extension RedemptionAreaViewController : UITableViewDelegate, UITableViewDataSource {
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return self.cmsRedemptionAreaModel?.content?.isEmpty ?? true ? 0 : (self.cmsRedemptionAreaModel?.content?.count)!
+//          return self.cmsRedemptionAreaModel?.content?.isEmpty ?? true ? 0 : 1
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.cmsRedemptionAreaModel?.content?[section].rule?.isEmpty ?? true ? 0 : 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        
+        let cmsRedemptionAreaContent = self.cmsRedemptionAreaModel?.content?[indexPath.section]
+        
+        switch cmsRedemptionAreaContent?.cmsRedemptionAreaContentType {
+        case .banner?:
+            let cell = RedemptionAreaBannerTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.cmsRedemptionAreaContent = cmsRedemptionAreaContent
+            return cell
+        case .specialOne?:
+            let cell = RedemptionAreaBannerTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return cell
+        case .specialTwo?:
+            let cell = RedemptionAreaBannerTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return cell
+        case .floor?:
+            let cell = RedemptionAreaFloorTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+            cell.cmsRedemptionAreaContent = cmsRedemptionAreaContent
+            return cell
+//        case "category":
+//            let cell = ShoppingMallCategoryTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+//            cell.cmsRuleModels = cmsSectionModel?.rule
+//            cell.frame = tableView.bounds
+//            cell.layoutIfNeeded()
+//            cell.reloadData()
+//            return cell
+//        case "special":
+//            let cell = ShoppingMallSepcialTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+//            cell.cmsRuleModels = cmsSectionModel?.rule
+//            return cell
+        default:
+            return UITableViewCell()
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        let cmsRedemptionAreaContent = self.cmsRedemptionAreaModel?.content?[indexPath.section]
+        switch cmsRedemptionAreaContent?.cmsRedemptionAreaContentType {
+        case .banner?:
+            if cmsRedemptionAreaContent?.rule?.isEmpty ?? true {
+                return  105
+            }else {
+                return  (150 * kScaleWidth) + 105
+            }
+        case .specialOne?:
+            return 0
+        case .specialTwo?:
+            return 0
+        case .floor?:
+            if cmsRedemptionAreaContent?.rule?.isEmpty ?? true {
+                return  0
+            }else {
+                let count = Int((cmsRedemptionAreaContent?.rule?.count ?? 0) / 2)
+                if ((cmsRedemptionAreaContent?.rule?.count ?? 0) % 2) == 0 {
+                    return  CGFloat(CGFloat(count) * ((kScreenWidth-15)/2 + 116.0))
+                }else {
+                    return  CGFloat(CGFloat(count) * ((kScreenWidth-15)/2 + 116.0)) + CGFloat((kScreenWidth-15)/2 + 116.0)
+                }
+            }
+        default:
+            return 0
+        }
+        
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        let cmsRedemptionAreaContent = self.cmsRedemptionAreaModel?.content?[section]
+        switch cmsRedemptionAreaContent?.cmsRedemptionAreaContentType {
+        case .banner?:
+            return 0.000001
+        default:
+            if cmsRedemptionAreaContent?.floorImg != nil &&  cmsRedemptionAreaContent?.floorImg != "" {
+                return 88*kScaleWidth
+            }else {
+                return 0.000001
+            }
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        let cmsRedemptionAreaContent = self.cmsRedemptionAreaModel?.content?[section]
+        switch cmsRedemptionAreaContent?.cmsRedemptionAreaContentType {
+        case .banner?:
+            return nil
+        default:
+            if cmsRedemptionAreaContent?.floorImg != nil &&  cmsRedemptionAreaContent?.floorImg != "" {
+                let headerView = FloorHeaderViewFloorHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWidth, height: 88*kScaleWidth))
+                headerView.cmsRedemptionAreaContent = cmsRedemptionAreaContent
+                return headerView
+            }else {
+                return nil
+            }
+            
+        }
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 10
+    }
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}

+ 36 - 0
RainbowPlanet/RainbowPlanet/Modules/RedemptionAreaModule/ViewModel/RedemptionAreaViewModel.swift

@@ -0,0 +1,36 @@
+//
+//  RedemptionAreaViewModel.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import SwiftyMediator
+
+class RedemptionAreaViewModel: NSObject {
+    static let shared : RedemptionAreaViewModel = RedemptionAreaViewModel()
+    
+    func pushVC(cmsRedemptionAreaRule:CMSRedemptionAreaRule?) {
+        switch cmsRedemptionAreaRule?.redemptionAreaBannerType {
+        case .none?:
+            break
+        case .special?:
+            Mediator.push(H5RouterModuleType.pushSubject(id: cmsRedemptionAreaRule?.linkUrl ?? ""))
+            break
+        case .link?:
+            Mediator.push(H5RouterModuleType.pushWeb(URLString: cmsRedemptionAreaRule?.linkUrl ?? ""))
+            break
+        case .activity?:
+            Mediator.push(H5RouterModuleType.pushActivityId(id: cmsRedemptionAreaRule?.linkUrl ?? ""))
+            break
+        case .commodity?:
+            Mediator.push(H5RouterModuleType.pushDetail(id: cmsRedemptionAreaRule?.linkUrl ?? ""))
+            break
+        default:
+            break
+        }
+    }
+    
+}

+ 45 - 3
RainbowPlanet/RainbowPlanet/Router/H5RouterModuleType.swift

@@ -10,25 +10,67 @@ import UIKit
 import SwiftyMediator
 
 
-/// <#Description#>
+/// h5路由
 ///
 /// - pushWeb: 公共的h5
 /// - publish: 发布页面
+/// - pushCategory: 兑换商品分类页面
+/// - pushContentId4:  赚豆秘籍
+/// - pushBeanRecord:  赚豆明细
+/// - pushOrder:  我的订单
+/// - pushSubject: 兑换商品专题页面
+/// - pushDetail: 兑换商品详情页面
+/// - pushActivityId: 兑换活动
 public enum H5RouterModuleType: MediatorTargetType {
     case pushWeb(URLString: String)
     case presentPublish
+    case pushCategory
+    case pushContentId4
+    case pushBeanRecord
+    case pushOrder
+    case pushSubject(id:String)
+    case pushDetail(id:String)
+    case pushActivityId(id:String)
 }
 
 extension H5RouterModuleType: MediatorSourceType {
     public var viewController: UIViewController? {
         switch self {
-        case .pushWeb(let URLString):
+        case .pushWeb(let URLString): //公共的h5
             let vc = H5CommonViewController()
             vc.URLString = URLString
             return vc
-        case .presentPublish:
+        case .presentPublish: //发布页面
             let vc = PublishViewController()
             return vc
+        case .pushCategory: //兑换商品分类页面
+            let vc = H5CommonViewController()
+            vc.URLString = kH5CategoryUrl
+            return vc
+        case .pushContentId4: //赚豆秘籍
+            let vc = H5CommonViewController()
+            vc.URLString = kH5ContentId4Url
+            return vc
+        case .pushBeanRecord: //赚豆明细
+            let vc = H5CommonViewController()
+            vc.URLString = kH5BeanRecordUrl
+            return vc
+        case .pushOrder: //我的订单
+            let vc = H5CommonViewController()
+            vc.URLString = kH5BeanRecordUrl
+            return vc
+        case .pushSubject(let id): //兑换商品专题页面
+            let vc = H5CommonViewController()
+            vc.URLString = kH5SubjectUrl + id
+            return vc
+        case .pushDetail(let id): //兑换商品详情页面
+            let vc = H5CommonViewController()
+            vc.URLString = kH5DetailUrl + id
+            return vc
+        case .pushActivityId(let id): //活动只有Id
+            let vc = H5CommonViewController()
+            vc.URLString = kH5ActivityIdUrl + id
+            return vc
         }
     }
 }

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

@@ -90,4 +90,16 @@ class SwiftMoyaNetWorkServiceCMS: NSObject {
             completion(cmsMemberListModel)
         }
     }
+    
+    /// cms兑换模板展示
+    ///
+    /// - Parameters:
+    ///   - completion: 回调
+    func cmsTemplateExchangeApi(completion: @escaping apiCallBack) {
+        let parameters = Dictionary<String,Any>()
+        SwiftMoyaNetWorkManager.shared.requestObject(CMSRedemptionAreaModel.self,target: MultiTarget(SwiftMoyaServiceCMSApi.cmsTemplateExchange(parameters: parameters))) {
+            (cmsRedemptionAreaModel) in
+            completion(cmsRedemptionAreaModel)
+        }
+    }
 }

+ 16 - 4
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceApi/SwiftMoyaServiceCMS/SwiftMoyaServiceCMSApi.swift

@@ -26,6 +26,10 @@ public let kCMSTemplateSetProductListApi = "/cms/templateSet/productList"
 /// 默认推荐用户组
 public let kCMSMemberListApi = "/cms/v2/memberList"
 
+// MARK: - 兑换专区
+/// 兑换专区
+public let kCMSTemplateExchangeApi = "/cms/template/exchange"
+
 
 /// CMS
 ///
@@ -33,11 +37,13 @@ public let kCMSMemberListApi = "/cms/v2/memberList"
 /// - configTemplateSetPreview: 获取首页
 /// - configTemplateSetProductList: 获取商品列表
 /// - cmsMemberList: 默认推荐用户组
+/// - cmsTemplateExchange: 兑换专区
 public enum SwiftMoyaServiceCMSApi {
     case cmsTemplateSetTemplateName(parameters:Dictionary<String, Any>)
     case cmsTemplateSetPreview(parameters:Dictionary<String, Any>)
     case cmsTemplateSetProductList(parameters:Dictionary<String, Any>)
     case cmsMemberList(parameters:Dictionary<String, Any>)
+    case cmsTemplateExchange(parameters:Dictionary<String, Any>)
 }
 
 extension SwiftMoyaServiceCMSApi: TargetType {
@@ -47,7 +53,8 @@ extension SwiftMoyaServiceCMSApi: TargetType {
         case .cmsTemplateSetTemplateName,
              .cmsTemplateSetPreview,
              .cmsTemplateSetProductList,
-             .cmsMemberList
+             .cmsMemberList,
+             .cmsTemplateExchange
             :
             return URL(string: kApiDataPrefix())!
         }
@@ -63,6 +70,8 @@ extension SwiftMoyaServiceCMSApi: TargetType {
             return kCMSTemplateSetProductListApi
         case .cmsMemberList:
             return kCMSMemberListApi
+        case .cmsTemplateExchange:
+            return kCMSTemplateExchangeApi
         }
     }
     
@@ -73,7 +82,8 @@ extension SwiftMoyaServiceCMSApi: TargetType {
             return .post
         case .cmsTemplateSetTemplateName,
              .cmsTemplateSetProductList,
-             .cmsMemberList
+             .cmsMemberList,
+             .cmsTemplateExchange
             :
             return .get
         }
@@ -85,7 +95,8 @@ extension SwiftMoyaServiceCMSApi: TargetType {
         case .cmsTemplateSetTemplateName(var parameters),
              .cmsTemplateSetPreview(var parameters),
              .cmsTemplateSetProductList(var parameters),
-             .cmsMemberList(var parameters)
+             .cmsMemberList(var parameters),
+             .cmsTemplateExchange(var parameters)
             :
             let sign = SwiftSign.shared().sign(signType:.AccessToken, parameters: parameters)
             parameters.updateValue(sign, forKey: "sign")
@@ -111,7 +122,8 @@ extension SwiftMoyaServiceCMSApi: TargetType {
         case .cmsTemplateSetTemplateName,
              .cmsTemplateSetPreview,
              .cmsTemplateSetProductList,
-             .cmsMemberList
+             .cmsMemberList,
+             .cmsTemplateExchange
             :
             return (headerParameters(headerType: .tokenHeader) as! [String : String])
         }

+ 6 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -9,8 +9,8 @@
 import Foundation
 
 let kPersonalService = false
-let kDevelopSever = false
-let kBetaSever = true
+let kDevelopSever = true
+let kBetaSever = false
 let kProductSever = false
 
 // MARK: - 数据服务器
@@ -29,8 +29,8 @@ public func kApiDataPrefix() -> String {
 }
 
 let kVirusPersonalService = false
-let kVirusDevelopSever = false
-let kVirusBetaSever = true
+let kVirusDevelopSever = true
+let kVirusBetaSever = false
 let kVirusProductSever = false
 
 // MARK: - Virus
@@ -49,8 +49,8 @@ public func kApiVirusPrefix() -> String {
 }
 
 let kH5PersonalService = false
-let kH5DevelopSever = false
-let kH5BetaSever = true
+let kH5DevelopSever = true
+let kH5BetaSever = false
 let kH5ProductSever = false
 
 // MARK: - H5

+ 23 - 0
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/SwiftMoyaNetWorkH5Manager.swift

@@ -29,6 +29,12 @@ let kH5ContentId5Url = kApiH5Prefix() + "/content?id=5"
 /// 用户协议
 let kH5ContentId6Url = kApiH5Prefix() + "/content?id=6"
 
+/// 内容授权协议
+let kH5ContentId7Url = kApiH5Prefix() + "/content?id=7"
+
+/// 赚豆明细
+let kH5BeanRecordUrl = kApiH5Prefix() + "/bean/record"
+
 /// 消息详情
 let kH5ActivityUrl = kApiH5Prefix() + "/activity?"
 
@@ -37,3 +43,20 @@ let kH5ArticleUrl = kApiH5Prefix() + "/article?"
 
 /// 邀请页面
 let kH5InviteUrl = kApiH5Prefix() + "/invite?invite_code="
+
+
+// MARK : 兑换商城
+/// 兑换商品分类页面
+let kH5CategoryUrl = kApiH5Prefix() + "/category"
+
+/// 我的订单页面
+let kH5OrderUrl = kApiH5Prefix() + "/order"
+
+/// 兑换商品专题页面
+let kH5SubjectUrl = kApiH5Prefix() + "/subject?id="
+
+/// 兑换商品详情页面
+let kH5DetailUrl = kApiH5Prefix() + "/detail?id="
+
+/// 活动只有Id
+let kH5ActivityIdUrl = kApiH5Prefix() + "/activity?id="

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/navbar_class_black@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/navbar_class_black.imageset/navbar_class_black@3x.png


+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/exchange_ico_bean@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_bean.imageset/exchange_ico_bean@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/exchange_ico_cheats@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_cheats.imageset/exchange_ico_cheats@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/exchange_ico_detail@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_detail.imageset/exchange_ico_detail@3x.png


+ 22 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/Contents.json

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

BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/exchange_ico_indent@2x.png


BIN
RainbowPlanet/RainbowPlanet/Supporting Files/RedemptionAreaModule.xcassets/exchange_ico_indent.imageset/exchange_ico_indent@3x.png


+ 33 - 0
RainbowPlanet/RainbowPlanet/ViewModel/UserMemberTotalBeanViewModel/UserMemberTotalBeanViewModel.swift

@@ -0,0 +1,33 @@
+//
+//  UserMemberTotalBeanViewModel.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/7/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class UserMemberTotalBeanViewModel: NSObject {
+    
+    let disposeBag = DisposeBag()
+    
+    static let shared : UserMemberTotalBeanViewModel = UserMemberTotalBeanViewModel()
+    
+    func userMemberGetTotalBeanApi() {
+        SwiftMoyaNetWorkServiceUser.shared().userMemberGetTotalBeanApi(completion: { (totalBeanModel) -> (Void) in
+            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "userMemberGetTotalBean"), object: totalBeanModel)
+        })
+    }
+    
+    func userMemberGetTotalBeanApiInterval() {
+        Observable<Int>.interval(60, scheduler: MainScheduler.instance).subscribe(onNext: { _ in
+            SwiftMoyaNetWorkServiceUser.shared().userMemberGetTotalBeanApi(completion: { (totalBeanModel) -> (Void) in
+                NotificationCenter.default.post(name: NSNotification.Name(rawValue: "userMemberGetTotalBean"), object: totalBeanModel)
+                
+            })
+        }).disposed(by: disposeBag)
+    }
+    
+}