浏览代码

Merge branch 'feature/jeremy' into develop

南鑫林 5 年之前
父节点
当前提交
5b8e3a0664
共有 40 个文件被更改,包括 921 次插入228 次删除
  1. 2 0
      RainbowPlanet/Podfile
  2. 119 11
      RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj
  3. 13 0
      RainbowPlanet/RainbowPlanet/Macro/EnumMacro.swift
  4. 0 138
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/SearchResult/ViewController/SearchResultViewController.swift
  5. 8 5
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/CommunityViewController.swift
  6. 1 1
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift
  7. 2 2
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendSimilarCell.swift
  8. 1 1
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift
  9. 6 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift
  10. 12 0
      RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift
  11. 0 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/View/SearchCollectionViewCell.swift
  12. 15 0
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchHeaderCollectionReusableView.swift
  13. 8 7
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchNavigationbarView.swift
  14. 0 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/View/SearchView.swift
  15. 0 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/ViewController/SearchViewController.swift
  16. 4 4
      RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendSimilarCollectionCell.swift
  17. 86 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchContentList/ViewController/SearchContentListViewController.swift
  18. 86 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchProduct/ViewController/SearchProductListViewController.swift
  19. 11 46
      RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/SearchResult/View/SearchResultNavigationbarView.swift
  20. 0 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchResult/View/SearchResultView.swift
  21. 170 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchResult/ViewController/SearchResultViewController.swift
  22. 118 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/View/SearchTopicListTableViewCell.swift
  23. 74 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/ViewController/SearchTopicListViewController.swift
  24. 5 5
      RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/View/MyFollowAndFanTableViewCell.swift
  25. 74 0
      RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/ViewController/SearchUserListViewController.swift
  26. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/ViewController/ProductAllCommentViewController.swift
  27. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailEvaluation/ProductDetailEvaluationTableViewCell.swift
  28. 1 1
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailProductLabel/ProductDetailProductLabelTableViewCell.swift
  29. 2 0
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHBigTableViewCell.swift
  30. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_black.imageset/Contents.json
  31. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_black.imageset/nav_search_black@2x.png
  32. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_black.imageset/nav_search_black@3x.png
  33. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_gray.imageset/Contents.json
  34. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_gray.imageset/nav_search_gray@2x.png
  35. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_gray.imageset/nav_search_gray@3x.png
  36. 22 0
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/search_ico_delete.imageset/Contents.json
  37. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/search_ico_delete.imageset/search_ico_delete@2x.png
  38. 二进制
      RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/search_ico_delete.imageset/search_ico_delete@3x.png
  39. 0 0
      RainbowPlanet/RainbowPlanet/Tools/BrowsePictures/View/BrowsePicturesPagerViewCell.swift
  40. 35 5
      RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/ViewController/BrowsePicturesViewController.swift

+ 2 - 0
RainbowPlanet/Podfile

@@ -48,6 +48,8 @@ target 'RainbowPlanet' do
   pod 'FWPopupView'
   # 存储数据Keychain
   pod 'KeychainAccess'
+  # js交互
+  pod 'WebViewJavascriptBridge'
   # mvvm
 #  pod 'ReactorKit'
   # 富文本

+ 119 - 11
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -161,7 +161,7 @@
 		A743229422B88ED30017C367 /* EnumMacro.swift in Sources */ = {isa = PBXBuildFile; fileRef = A743229322B88ED30017C367 /* EnumMacro.swift */; };
 		A743229B22B8C1510017C367 /* AppStoreReview.swift in Sources */ = {isa = PBXBuildFile; fileRef = A743229A22B8C1510017C367 /* AppStoreReview.swift */; };
 		A74322A022B8D1F30017C367 /* MyFollowAndFanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A743229F22B8D1F30017C367 /* MyFollowAndFanViewController.swift */; };
-		A74322A222B8D5A90017C367 /* MyFollowAndFanTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74322A122B8D5A90017C367 /* MyFollowAndFanTableViewCell.swift */; };
+		A74322A222B8D5A90017C367 /* SearchUserLitTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74322A122B8D5A90017C367 /* SearchUserLitTableViewCell.swift */; };
 		A74322A422B8E7F60017C367 /* MyFollowAndFanHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74322A322B8E7F60017C367 /* MyFollowAndFanHeaderView.swift */; };
 		A74322A922B900180017C367 /* CommunityFindFriendsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74322A822B900180017C367 /* CommunityFindFriendsViewController.swift */; };
 		A74322AB22B900F00017C367 /* CommunityFindFriendsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A74322AA22B900F00017C367 /* CommunityFindFriendsView.swift */; };
@@ -343,6 +343,11 @@
 		A7DF50D822A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50D722A4FAFC00998908 /* ProductDetailEvaluationImageCollectionViewCell.swift */; };
 		A7DF50DF22A5590200998908 /* BrowsePicturesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */; };
 		A7DF50E322A55AB600998908 /* BrowsePicturesPagerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */; };
+		A7E19FA822BA2CDF009BCCE1 /* SearchProductListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FA722BA2CDF009BCCE1 /* SearchProductListViewController.swift */; };
+		A7E19FAA22BA2CF1009BCCE1 /* SearchUserListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FA922BA2CF1009BCCE1 /* SearchUserListViewController.swift */; };
+		A7E19FAC22BA2D01009BCCE1 /* SearchTopicListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FAB22BA2D01009BCCE1 /* SearchTopicListViewController.swift */; };
+		A7E19FAE22BA2D16009BCCE1 /* SearchContentListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FAD22BA2D16009BCCE1 /* SearchContentListViewController.swift */; };
+		A7E19FB122BA3A0D009BCCE1 /* SearchTopicListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7E19FB022BA3A0D009BCCE1 /* SearchTopicListTableViewCell.swift */; };
 		A7F2D6BD22B09F930093000B /* CommunityNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6BC22B09F930093000B /* CommunityNavigationBarView.swift */; };
 		A7F2D6C122B0D1CB0093000B /* CommunityFollowTableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6C022B0D1CB0093000B /* CommunityFollowTableHeaderView.swift */; };
 		A7F2D6C622B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7F2D6C522B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift */; };
@@ -484,7 +489,7 @@
 		BDAA40FD228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FC228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift */; };
 		BDAA40FF228EA37900CF841D /* OrderApplyRefundPhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FE228EA37900CF841D /* OrderApplyRefundPhotoCell.swift */; };
 		BDAF83A222B330540004BCC3 /* RecommendSimilarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83A122B330540004BCC3 /* RecommendSimilarCell.swift */; };
-		BDAF83A622B334D90004BCC3 /* RecommendSimilarCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83A522B334D90004BCC3 /* RecommendSimilarCollectionCell.swift */; };
+		BDAF83A622B334D90004BCC3 /* SearchContentListCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83A522B334D90004BCC3 /* SearchContentListCollectionCell.swift */; };
 		BDAF83A822B343C50004BCC3 /* RecommendBottomCommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83A722B343C50004BCC3 /* RecommendBottomCommentView.swift */; };
 		BDAF83AA22B388F20004BCC3 /* RecommendDefaultBackCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83A922B388F20004BCC3 /* RecommendDefaultBackCell.swift */; };
 		BDAF83B022B3B63B0004BCC3 /* RecommendCommentHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAF83AF22B3B63B0004BCC3 /* RecommendCommentHeader.swift */; };
@@ -693,7 +698,7 @@
 		A743229322B88ED30017C367 /* EnumMacro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumMacro.swift; sourceTree = "<group>"; };
 		A743229A22B8C1510017C367 /* AppStoreReview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStoreReview.swift; sourceTree = "<group>"; };
 		A743229F22B8D1F30017C367 /* MyFollowAndFanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyFollowAndFanViewController.swift; sourceTree = "<group>"; };
-		A74322A122B8D5A90017C367 /* MyFollowAndFanTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyFollowAndFanTableViewCell.swift; sourceTree = "<group>"; };
+		A74322A122B8D5A90017C367 /* SearchUserLitTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchUserLitTableViewCell.swift; sourceTree = "<group>"; };
 		A74322A322B8E7F60017C367 /* MyFollowAndFanHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyFollowAndFanHeaderView.swift; sourceTree = "<group>"; };
 		A74322A822B900180017C367 /* CommunityFindFriendsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFindFriendsViewController.swift; sourceTree = "<group>"; };
 		A74322AA22B900F00017C367 /* CommunityFindFriendsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFindFriendsView.swift; sourceTree = "<group>"; };
@@ -888,6 +893,11 @@
 		A7DF50DE22A5590200998908 /* BrowsePicturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesViewController.swift; sourceTree = "<group>"; };
 		A7DF50E222A55AB600998908 /* BrowsePicturesPagerViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowsePicturesPagerViewCell.swift; sourceTree = "<group>"; };
 		A7E03A30F40582782EC5DA89 /* Pods_RainbowPlanetTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RainbowPlanetTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		A7E19FA722BA2CDF009BCCE1 /* SearchProductListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchProductListViewController.swift; sourceTree = "<group>"; };
+		A7E19FA922BA2CF1009BCCE1 /* SearchUserListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchUserListViewController.swift; sourceTree = "<group>"; };
+		A7E19FAB22BA2D01009BCCE1 /* SearchTopicListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTopicListViewController.swift; sourceTree = "<group>"; };
+		A7E19FAD22BA2D16009BCCE1 /* SearchContentListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchContentListViewController.swift; sourceTree = "<group>"; };
+		A7E19FB022BA3A0D009BCCE1 /* SearchTopicListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTopicListTableViewCell.swift; sourceTree = "<group>"; };
 		A7F2D6BC22B09F930093000B /* CommunityNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityNavigationBarView.swift; sourceTree = "<group>"; };
 		A7F2D6C022B0D1CB0093000B /* CommunityFollowTableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityFollowTableHeaderView.swift; sourceTree = "<group>"; };
 		A7F2D6C522B0DC7B0093000B /* CommunityCommonSectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityCommonSectionHeaderView.swift; sourceTree = "<group>"; };
@@ -1039,7 +1049,7 @@
 		BDAA40FC228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundPhoneCell.swift; sourceTree = "<group>"; };
 		BDAA40FE228EA37900CF841D /* OrderApplyRefundPhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundPhotoCell.swift; sourceTree = "<group>"; };
 		BDAF83A122B330540004BCC3 /* RecommendSimilarCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendSimilarCell.swift; sourceTree = "<group>"; };
-		BDAF83A522B334D90004BCC3 /* RecommendSimilarCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendSimilarCollectionCell.swift; sourceTree = "<group>"; };
+		BDAF83A522B334D90004BCC3 /* SearchContentListCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchContentListCollectionCell.swift; sourceTree = "<group>"; };
 		BDAF83A722B343C50004BCC3 /* RecommendBottomCommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendBottomCommentView.swift; sourceTree = "<group>"; };
 		BDAF83A922B388F20004BCC3 /* RecommendDefaultBackCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendDefaultBackCell.swift; sourceTree = "<group>"; };
 		BDAF83AF22B3B63B0004BCC3 /* RecommendCommentHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendCommentHeader.swift; sourceTree = "<group>"; };
@@ -1465,8 +1475,8 @@
 		A719EE6622AF4374001AAC98 /* CommunityModule */ = {
 			isa = PBXGroup;
 			children = (
-				A74322A522B8FE5F0017C367 /* CommunityFindFriends */,
 				A719EE6722AF438E001AAC98 /* Community */,
+				A74322A522B8FE5F0017C367 /* CommunityFindFriends */,
 				A7C0FDFC22B66B3C00BC1E86 /* CommunityFeaturedTopics */,
 				BD1FC18222B09F4700D55081 /* CommunitySubComment */,
 				BD2FCBDE22B21BE00006D974 /* CommunityRecommendDetail */,
@@ -1576,6 +1586,10 @@
 		A71AF0A3226E9D8A001730FE /* SearchModule */ = {
 			isa = PBXGroup;
 			children = (
+				A7E19F9A22BA2403009BCCE1 /* SearchContentList */,
+				A7E19F9B22BA241F009BCCE1 /* SearchTopicList */,
+				A7E19F9C22BA242C009BCCE1 /* SearchUser */,
+				A7E19F9D22BA2437009BCCE1 /* SearchProduct */,
 				A71AF0B2226EF953001730FE /* SearchResult */,
 				A71AF0B1226EF947001730FE /* Search */,
 			);
@@ -1737,7 +1751,6 @@
 				A70B2C502288581600B2449F /* ShareModule */,
 				A72C011F2275399D0065E0C3 /* ProvinceCityAreaModules */,
 				A7636ABD2268123B00374F9E /* LocationModule */,
-				A71AF0A3226E9D8A001730FE /* SearchModule */,
 			);
 			path = CommonModules;
 			sourceTree = "<group>";
@@ -2089,7 +2102,6 @@
 		A743229E22B8D1D50017C367 /* View */ = {
 			isa = PBXGroup;
 			children = (
-				A74322A122B8D5A90017C367 /* MyFollowAndFanTableViewCell.swift */,
 				A74322A322B8E7F60017C367 /* MyFollowAndFanHeaderView.swift */,
 			);
 			path = View;
@@ -2451,6 +2463,7 @@
 				BD3AA45422AE635700EF4F20 /* MessageModule */,
 				A77F2CA92232010F001BD3F6 /* MineModule */,
 				A7FF155A228C689C00A85748 /* OrderModule */,
+				A71AF0A3226E9D8A001730FE /* SearchModule */,
 				A729B5A52266DBC9004AE098 /* CommonModules */,
 			);
 			path = Modules;
@@ -2461,7 +2474,6 @@
 			children = (
 				A77F2CA42232010F001BD3F6 /* ShoppingMall */,
 				A77F2CB02232010F001BD3F6 /* ShoppingCart */,
-				A7DF50D922A556C300998908 /* BrowsePictures */,
 				A7FF1550228AC22700A85748 /* ProductAllComment */,
 				A70B2C122286B14C00B2449F /* ProductView */,
 				A70B2C112286B10000B2449F /* ProductDetail */,
@@ -2576,6 +2588,7 @@
 		A77F2CBC2232022A001BD3F6 /* Tools */ = {
 			isa = PBXGroup;
 			children = (
+				A7DF50D922A556C300998908 /* BrowsePictures */,
 				A790706222B9DF81008CE279 /* TextLimitTool */,
 				A743229922B8C1440017C367 /* AppStoreReview */,
 				BD1FC19022B1075E00D55081 /* CommentKeyboard */,
@@ -3354,6 +3367,14 @@
 			path = FMDB;
 			sourceTree = "<group>";
 		};
+		A7D5F21922BA460100F8E9AF /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BDAF83A522B334D90004BCC3 /* SearchContentListCollectionCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		A7DF50D922A556C300998908 /* BrowsePictures */ = {
 			isa = PBXGroup;
 			children = (
@@ -3379,6 +3400,89 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
+		A7E19F9A22BA2403009BCCE1 /* SearchContentList */ = {
+			isa = PBXGroup;
+			children = (
+				A7D5F21922BA460100F8E9AF /* View */,
+				A7E19F9E22BA2C8F009BCCE1 /* ViewController */,
+			);
+			path = SearchContentList;
+			sourceTree = "<group>";
+		};
+		A7E19F9B22BA241F009BCCE1 /* SearchTopicList */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FAF22BA39F2009BCCE1 /* View */,
+				A7E19F9F22BA2C9A009BCCE1 /* ViewController */,
+			);
+			path = SearchTopicList;
+			sourceTree = "<group>";
+		};
+		A7E19F9C22BA242C009BCCE1 /* SearchUser */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FB222BA41AB009BCCE1 /* View */,
+				A7E19FA022BA2C9D009BCCE1 /* ViewController */,
+			);
+			path = SearchUser;
+			sourceTree = "<group>";
+		};
+		A7E19F9D22BA2437009BCCE1 /* SearchProduct */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FA122BA2CA1009BCCE1 /* ViewController */,
+			);
+			path = SearchProduct;
+			sourceTree = "<group>";
+		};
+		A7E19F9E22BA2C8F009BCCE1 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FAD22BA2D16009BCCE1 /* SearchContentListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7E19F9F22BA2C9A009BCCE1 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FAB22BA2D01009BCCE1 /* SearchTopicListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7E19FA022BA2C9D009BCCE1 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FA922BA2CF1009BCCE1 /* SearchUserListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7E19FA122BA2CA1009BCCE1 /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FA722BA2CDF009BCCE1 /* SearchProductListViewController.swift */,
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		A7E19FAF22BA39F2009BCCE1 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A7E19FB022BA3A0D009BCCE1 /* SearchTopicListTableViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		A7E19FB222BA41AB009BCCE1 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				A74322A122B8D5A90017C367 /* SearchUserLitTableViewCell.swift */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		A7F2D6C322B0DBBB0093000B /* Header */ = {
 			isa = PBXGroup;
 			children = (
@@ -3917,7 +4021,6 @@
 				BD2FCBE522B2586C0006D974 /* CommunityTagCollectionCell.swift */,
 				BD2FCBE922B267280006D974 /* RecommendNoneCommentCell.swift */,
 				BDAF83A122B330540004BCC3 /* RecommendSimilarCell.swift */,
-				BDAF83A522B334D90004BCC3 /* RecommendSimilarCollectionCell.swift */,
 				BDAF83A722B343C50004BCC3 /* RecommendBottomCommentView.swift */,
 			);
 			path = View;
@@ -4503,6 +4606,7 @@
 				BDF862A2228E41CC000DEF84 /* OrderLogisticsInfoCell.swift in Sources */,
 				A739121D229F75F50033177E /* JXPagingListContainerView.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
+				A7E19FAA22BA2CF1009BCCE1 /* SearchUserListViewController.swift in Sources */,
 				A7D07CCD22B77D2E00186014 /* UserPersonalCenterOrderView.swift in Sources */,
 				A70B2C252286C03800B2449F /* NXLPageControl.swift in Sources */,
 				A7F2D6C122B0D1CB0093000B /* CommunityFollowTableHeaderView.swift in Sources */,
@@ -4583,7 +4687,7 @@
 				A7FF156A228C6E3600A85748 /* OrderProductTableViewCell.swift in Sources */,
 				A7931DF022AF4C9100297D0A /* BaseBouncesContentView.swift in Sources */,
 				A715333E22980CC60017C861 /* ConfigModel.swift in Sources */,
-				BDAF83A622B334D90004BCC3 /* RecommendSimilarCollectionCell.swift in Sources */,
+				BDAF83A622B334D90004BCC3 /* SearchContentListCollectionCell.swift in Sources */,
 				A70EBBC022561179000AD74F /* Extension+UITableView.swift in Sources */,
 				A72A72B022321DE000B21995 /* CGView.swift in Sources */,
 				A7C0FDF322B65E5400BC1E86 /* FeaturedTopicsTableViewCell.swift in Sources */,
@@ -4644,7 +4748,7 @@
 				A70B2C6D2288815E00B2449F /* PickViewOneComponentsView.swift in Sources */,
 				BDD4FB1422840954006FE833 /* ShoppingCartOrderPayView.swift in Sources */,
 				A70B2C222286BF5900B2449F /* ProductDetailTableViewHeaderView.swift in Sources */,
-				A74322A222B8D5A90017C367 /* MyFollowAndFanTableViewCell.swift in Sources */,
+				A74322A222B8D5A90017C367 /* SearchUserLitTableViewCell.swift in Sources */,
 				A7CC75432271E038003C4F38 /* SelfMentionContactsListViewController.swift in Sources */,
 				BDF47D872282C92200941AB9 /* ShoppingCartListTableViewHeader.swift in Sources */,
 				BD13B6E122BA03BC008BB323 /* PublishSelTopicCollectionCell.swift in Sources */,
@@ -4659,6 +4763,7 @@
 				A7F2D6D722B1ED370093000B /* CardContentUserTableViewCell.swift in Sources */,
 				A7CC751A22716254003C4F38 /* SetTableViewCell.swift in Sources */,
 				BD20F1D32283D0ED00677D8E /* OrderFinishPaySuccessCell.swift in Sources */,
+				A7E19FAC22BA2D01009BCCE1 /* SearchTopicListViewController.swift in Sources */,
 				A71AA52822732173008FF1A5 /* SwiftMoyaNetWorkServiceConfig.swift in Sources */,
 				A70B2C732289019200B2449F /* ProductDetailSkuView.swift in Sources */,
 				A70B2C4322883B4E00B2449F /* ProductDetailShopTableViewCell.swift in Sources */,
@@ -4678,6 +4783,7 @@
 				BD929CCE22B904A30098C139 /* PublishViewController.swift in Sources */,
 				A71738AD228AB7B2000AEA6A /* ProductCommentListModel.swift in Sources */,
 				A7C0FDF822B6671C00BC1E86 /* PopularVideoCollectionViewCell.swift in Sources */,
+				A7E19FA822BA2CDF009BCCE1 /* SearchProductListViewController.swift in Sources */,
 				BD929CCA22B8CFB10098C139 /* AliyunPathManager.m in Sources */,
 				BD13B6C522BA034D008BB323 /* PublishEditAddAddressCell.swift in Sources */,
 				A7B4E71F228131720012914A /* ProductSlidingLeftRightCollectionViewCell.swift in Sources */,
@@ -4739,6 +4845,7 @@
 				A7D07CD222B784B800186014 /* UserPersonalCenterHeaderView.swift in Sources */,
 				A7CC751822716202003C4F38 /* SetView.swift in Sources */,
 				BD2FCBEA22B267280006D974 /* RecommendNoneCommentCell.swift in Sources */,
+				A7E19FB122BA3A0D009BCCE1 /* SearchTopicListTableViewCell.swift in Sources */,
 				A7FF1594228C919A00A85748 /* OrderRefunddetailsTipsTableViewCell.swift in Sources */,
 				A7B4E73A228192D20012914A /* CMSTemplateModel.swift in Sources */,
 				A72A72C622321DE000B21995 /* WebView.swift in Sources */,
@@ -4839,6 +4946,7 @@
 				A79057062276EA3D0037F823 /* OpenCityListModel.swift in Sources */,
 				BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */,
 				A7824B002271F0DD00ABA381 /* EditSelfMentionContactsViewController.swift in Sources */,
+				A7E19FAE22BA2D16009BCCE1 /* SearchContentListViewController.swift in Sources */,
 				A7CC751F227190C5003C4F38 /* AccountSecurityViewController.swift in Sources */,
 				BD13B6C422BA034D008BB323 /* PublishEditDefaultCollectionCell.swift in Sources */,
 				A739121C229F75F50033177E /* JXPagingListRefreshView.swift in Sources */,

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

@@ -16,3 +16,16 @@ enum JumpModeType {
     case none
     case push
 }
+
+/// 搜索类型
+///
+/// - content: 内容
+/// - topic: 话题
+/// - user: 用户
+/// - product: 商品
+enum SearchType {
+    case content
+    case topic
+    case user
+    case product
+}

+ 0 - 138
RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/SearchResult/ViewController/SearchResultViewController.swift

@@ -1,138 +0,0 @@
-//
-//  SearchResultViewController.swift
-//  RainbowPlanet
-//
-//  Created by 南鑫林 on 2019/4/23.
-//  Copyright © 2019 南鑫林. All rights reserved.
-//
-
-import UIKit
-
-class SearchResultViewController: BaseViewController {
-    
-    var keyWord : String!
-    
-    var productSearchModelArray = Array<ProductSearchModel>()
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupViews()
-        setupLayouts()
-        setupData()
-    }
-    
-    override func setupViews() {
-        navigationBar.leftButton.isHidden = true
-        navigationBar.addSubview(navigationBarView)
-        view.addSubview(searchResultView)
-        
-    }
-    
-    override func setupLayouts() {
-        navigationBarView.snp.makeConstraints { (make) in
-            make.top.equalTo(kSafeStatusBarHeight)
-            make.bottom.left.right.equalToSuperview()
-        }
-        searchResultView.snp.makeConstraints { (make) in
-            make.top.equalTo(kNavBarTotalHeight)
-            make.left.right.bottom.equalToSuperview()
-        }
-    }
-    
-    override func setupData() {
-        searchResultView.tableView.addHeaderWithHeader(withBeginRefresh: true, animation: false) {
-            [weak self] (page) in
-            self?.productSearchApi(page: page)
-            self?.productGetCartCountApi()
-        }
-        searchResultView.tableView.addFooterWithWithHeader(withAutomaticallyRefresh: true) {
-            [weak self] (page) in
-            self?.productSearchApi(page: page)
-        }
-        navigationBarView.backBlock = {
-            [weak self] in
-            self?.navigationController?.popViewController(animated: true)
-        }
-        navigationBarView.searchResultBlock = {
-            [weak self] keyword in
-            self?.keyWord = keyword
-            self?.productSearchApi(page: 1)
-        }
-        navigationBarView.shoppingCarBlock = {
-            [weak self] in
-            
-            let vc = ShoppingCartViewController()
-            vc.shoppingCartVCType = .push
-            self?.navigationController?.pushViewController(vc, animated: true)
-        }
-        
-        searchResultView.didSelectRow = {
-            [weak self] indexPath in
-            let productSearch = self?.productSearchModelArray[indexPath.row]
-
-            let vc = ProductDetailViewController()
-            vc.productId = productSearch?.id
-            vc.shopId = productSearch?.shopId
-            self?.navigationController?.pushViewController(vc, animated: true)
-            
-        }
-        searchResultView.addCartClosure = {
-            [weak self]  (productSearchModel,indexPath) in
-            self?.addCart(productSearchModel: productSearchModel, indexPath: indexPath)
-        }
-    }
-    
-    private lazy var navigationBarView: SearchResultNavigationbarView = {
-        let navigationBarView = SearchResultNavigationbarView()
-        navigationBarView.searchTextField.text = keyWord
-        return navigationBarView
-    }()
-    
-    private lazy var searchResultView: SearchResultView = {
-        let searchResultView = SearchResultView()
-        return searchResultView
-    }()
-    
-    
-    /// 搜索结果
-    func productSearchApi(page:Int = 1) {
-        SwiftProgressHUD.shared().showWait()
-        SwiftMoyaNetWorkServiceProduct.shared().productListApi(page:page ,keyword: self.keyWord) {
-            [weak self] (productSearchListModel) -> (Void) in
-            let productSearchListModel = productSearchListModel as? ProductSearchListModel
-            if productSearchListModel?.pagination?.currentPage ?? 1  <= productSearchListModel?.pagination?.totalPages ?? 1 {
-                if productSearchListModel?.pagination?.currentPage == 1{
-                    self?.productSearchModelArray.removeAll()
-                }
-                self?.productSearchModelArray = (self?.productSearchModelArray)! + (productSearchListModel?.data!)!
-                self?.searchResultView.productSearchModelArray = self?.productSearchModelArray
-            }else {
-                self?.searchResultView.tableView.endFooterNoMoreData()
-            }
-            SwiftProgressHUD.shared().hide()
-        }
-    }
-    
-    /// 获取购物车数量
-    func productGetCartCountApi() {
-        SwiftMoyaNetWorkServiceProduct.shared().productGetCartCountApi {
-            [weak self] (productCartCountModel) -> (Void) in
-            self?.navigationBarView.productCartCountModel = productCartCountModel as? ProductCartCountModel
-        }
-    }
-    
-    /// 添加购物车
-    ///
-    /// - Returns:
-    func addCart(productSearchModel:ProductSearchModel,indexPath:IndexPath) {
-        
-        
-        productSearchModel.isSelect = 1
-        SwiftMoyaNetWorkServiceProduct.shared().productCartListAddApi(productSearchModel: productSearchModel, completion: {
-            [weak self] (cartAmountModel) -> (Void) in
-            self?.searchResultView.tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
-            SwiftProgressHUD.shared().showText("已加入购物车")
-            self?.productGetCartCountApi()
-        })
-    }
-}

+ 8 - 5
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/Community/ViewController/CommunityViewController.swift

@@ -42,8 +42,8 @@ class CommunityViewController: BaseViewController {
         }
         
         segmentedView.snp.makeConstraints { (make) in
-            make.left.equalToSuperview().offset(100)
-            make.right.equalToSuperview().offset(-100)
+            make.left.equalToSuperview()
+            make.right.equalToSuperview()
             make.height.equalTo(48)
             make.top.equalTo(kNavBarTotalHeight)
         }
@@ -61,7 +61,12 @@ class CommunityViewController: BaseViewController {
         }).disposed(by: disposeBag)
         //搜索
         communityNavigationBarView.searchClosure = {
-            
+            [weak self] in
+            let vc = SearchViewController()
+            let nav = BaseNavigationViewController.init(rootViewController: vc)
+            self?.present(nav, animated: true, completion: {
+                
+            })
         }
         //彩虹豆
         communityNavigationBarView.rightButton.rx.tap.subscribe(onNext: { (data) in
@@ -117,8 +122,6 @@ class CommunityViewController: BaseViewController {
         segmentedView.contentScrollView = listContainerView.scrollView
         segmentedView.selectItemAt(index: 0)
         segmentedView.defaultSelectedIndex = 0
-        segmentedView.contentEdgeInsetLeft = 4
-        segmentedView.contentEdgeInsetRight = 4
         return segmentedView
     }()
     

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityFindFriends/ViewController/CommunityFindFriendsViewController.swift

@@ -59,7 +59,7 @@ extension CommunityFindFriendsViewController: UITableViewDataSource, UITableView
     }
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = MyFollowAndFanTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        let cell = SearchUserLitTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
         cell.followType = .alreadyFollow
         return cell
     }

+ 2 - 2
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendSimilarCell.swift

@@ -80,7 +80,7 @@ class RecommendSimilarCell: UITableViewCell {
     }()
     
     private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
-        let collectionViewLayout = UICollectionViewLeftAlignedLayout.init()
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
         collectionViewLayout.minimumLineSpacing = 5
         collectionViewLayout.minimumInteritemSpacing =  5
                 collectionViewLayout.sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0)
@@ -117,7 +117,7 @@ extension RecommendSimilarCell: UICollectionViewDelegateFlowLayout,UICollectionV
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let cell = RecommendSimilarCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        let cell = SearchContentListCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
         return cell
     }
     

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/ViewController/MyFollowAndFanViewController.swift

@@ -107,7 +107,7 @@ extension MyFollowAndFanViewController: UITableViewDataSource, UITableViewDelega
     }
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = MyFollowAndFanTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        let cell = SearchUserLitTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
         cell.followType = .alreadyFollow
         return cell
     }

+ 6 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/PersonalCenterView/PersonViewUserAndOtherHeaderView.swift

@@ -158,6 +158,12 @@ class PersonViewUserAndOtherHeaderView: BaseView {
         avatarButton.setBackgroundImage(kImage(name: "defaul_tavatar"), for: UIControl.State.normal)
         avatarButton.cornerRadius = 30
         avatarButton.masksToBounds = true
+        avatarButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+            let currentVC = avatarButton.findViewController() as? BaseViewController
+            let vc = BrowsePicturesViewController.init(images: [avatarButton.currentBackgroundImage!], index: 0)
+            currentVC?.navigationController?.pushViewController(vc, animated: true)
+        }).disposed(by: disposeBag)
+
         return avatarButton
     }()
     

+ 12 - 0
RainbowPlanet/RainbowPlanet/Modules/MineModule/PersonalCenter/UserPersonalCenter/ViewController/UserPersonalCenterViewController.swift

@@ -99,10 +99,19 @@ class UserPersonalCenterViewController: BaseViewController {
         self.pagingView.reloadData()
     }
     
+    /// 编辑
+    func pushModifyData() {
+        let vc = ModifyDataViewController()
+        self.navigationController?.pushViewController(vc, animated: true)
+    }
+    
     lazy var avatarButton: UIButton = {
         let avatarButton = UIButton(type: UIButton.ButtonType.custom)
         avatarButton.setImage(kImage(name: "defaul_tavatar"), for: UIControl.State.normal)
         avatarButton.alpha = 0
+        avatarButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+            self?.pushModifyData()
+        }).disposed(by: disposeBag)
         return avatarButton
     }()
     
@@ -112,6 +121,9 @@ class UserPersonalCenterViewController: BaseViewController {
         nameButton.setTitleColor(kffffffColor, for: UIControl.State.normal)
         nameButton.titleLabel?.font = kBoldFont18
         nameButton.alpha = 0
+        nameButton.rx.tap.subscribe(onNext: {[weak self] (data) in
+           self?.pushModifyData()
+        }).disposed(by: disposeBag)
         return nameButton
     }()
     

RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchCollectionViewCell.swift → RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/View/SearchCollectionViewCell.swift


+ 15 - 0
RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchHeaderCollectionReusableView.swift

@@ -45,6 +45,7 @@ class SearchHeaderCollectionReusableView: UICollectionReusableView {
     //MARK: - 设置View
     private func setupViews() {
         addSubview(titleLabel)
+        addSubview(deleteButton)
     }
     
     private func setupLayouts() {
@@ -53,6 +54,11 @@ class SearchHeaderCollectionReusableView: UICollectionReusableView {
             make.left.equalToSuperview().offset(14)
             make.height.equalTo(21)
         }
+        deleteButton.snp_makeConstraints { (make) in
+            make.centerY.equalTo(titleLabel)
+            make.right.equalTo(-14)
+        }
+        deleteButton.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 3)
     }
     
     private lazy var titleLabel: UILabel = {
@@ -61,4 +67,13 @@ class SearchHeaderCollectionReusableView: UICollectionReusableView {
         titleLabel.font = kMediumFont15
         return titleLabel
     }()
+    
+    private lazy var deleteButton: UIButton = {
+        let deleteButton = UIButton(type: UIButton.ButtonType.custom)
+        deleteButton.setImage(kImage(name: "search_ico_delete"), for: UIControl.State.normal)
+        deleteButton.setTitle("清除记录", for: UIControl.State.normal)
+        deleteButton.setTitleColor(kCCCCCCColor, for: UIControl.State.normal)
+        deleteButton.titleLabel?.font = kRegularFont12
+        return deleteButton
+    }()
 }

+ 8 - 7
RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchNavigationbarView.swift

@@ -45,8 +45,8 @@ class SearchNavigationbarView: BaseView {
         
         searchTextField.snp.makeConstraints { (make) in
             make.centerY.equalToSuperview()
-            make.left.equalTo(searchIconImageView.snp.right).offset( 8)
-            make.right.equalToSuperview().offset(8)
+            make.left.equalTo(searchIconImageView.snp.right).offset(8)
+            make.right.equalToSuperview()
             make.height.equalTo(30)
             
         }
@@ -62,18 +62,19 @@ class SearchNavigationbarView: BaseView {
     
     private lazy var searchIconImageView: UIImageView = {
         let searchIconImageView = UIImageView()
-        searchIconImageView.image = kImage(name: "navbar_search")
+        searchIconImageView.image = kImage(name: "nav_search_gray")
         return searchIconImageView
     }()
     
     private lazy var searchTextField: UITextField = {
         let searchTextField = UITextField()
-        searchTextField.placeholder = "请输入商品名称"
-        searchTextField.tintColor = kFFA42FColor
+        searchTextField.placeholder = "请输入内容"
+        searchTextField.tintColor = kThemeColor
         searchTextField.textColor = k333333Color
         searchTextField.returnKeyType = .search
-        searchTextField.font = kScaleRegularFont14
+        searchTextField.font = kRegularFont14
         searchTextField.borderStyle = .none
+        searchTextField.clearButtonMode = UITextField.ViewMode.whileEditing
         searchTextField.rx.controlEvent([.editingDidEndOnExit]).asObservable().subscribe(onNext: {
             [weak self] (text) in
             
@@ -94,7 +95,7 @@ class SearchNavigationbarView: BaseView {
                     searchBlock(searchTextField.text ?? "")
                 }
             }else {
-                SwiftProgressHUD.shared().showText("搜索商品不能为空")
+                SwiftProgressHUD.shared().showText("搜索内容不能为空")
             }
             
             

RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/View/SearchView.swift → RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/View/SearchView.swift


RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/Search/ViewController/SearchViewController.swift → RainbowPlanet/RainbowPlanet/Modules/SearchModule/Search/ViewController/SearchViewController.swift


+ 4 - 4
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityRecommendDetail/View/RecommendSimilarCollectionCell.swift

@@ -9,17 +9,17 @@
 import UIKit
 import RxSwift
 
-class RecommendSimilarCollectionCell: UICollectionViewCell {
+class SearchContentListCollectionCell: UICollectionViewCell {
     
     let disposeBag = DisposeBag()
     
     typealias LikeSelectBlock = (_ isLiked: Int) -> Void
     var likeSelectBlock : LikeSelectBlock?
     
-    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> RecommendSimilarCollectionCell {
+    class func cellWith(collectionView:UICollectionView,indexPath:IndexPath) -> SearchContentListCollectionCell {
         let ID = "RecommendSimilarCollectionCell"
-        collectionView.register(RecommendSimilarCollectionCell.self, forCellWithReuseIdentifier: ID)
-        let cell : RecommendSimilarCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! RecommendSimilarCollectionCell
+        collectionView.register(SearchContentListCollectionCell.self, forCellWithReuseIdentifier: ID)
+        let cell : SearchContentListCollectionCell = collectionView.dequeueReusableCell(withReuseIdentifier: ID, for: indexPath) as! SearchContentListCollectionCell
         cell.indexPath = indexPath
         return cell
     }

+ 86 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchContentList/ViewController/SearchContentListViewController.swift

@@ -0,0 +1,86 @@
+//
+//  SearchContentListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+class SearchContentListViewController: UIViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+
+        // Do any additional setup after loading the view.
+    }
+    
+    private func setupViews() {
+        view.backgroundColor = kf7f8faColor
+        view.addSubview(collectionView)
+        let emptyView = DIYEmptyView.empty(with: kImage(name: "default_page_content"), titleStr: "没有找到相关,去看看别人都在看什么吧~", detailStr: nil)
+        emptyView!.contentViewY = kScaleValue(value: 141)
+        collectionView.ly_emptyView = emptyView
+        collectionView.ly_startLoading()
+    }
+    
+    private func setupLayouts() {
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.left.equalTo(0)
+            make.right.equalTo(5)
+            make.bottom.equalTo(0)
+        }
+    }
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kf7f8faColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 5
+        collectionViewLayout.minimumInteritemSpacing =  5
+        collectionViewLayout.scrollDirection = UICollectionView.ScrollDirection.vertical
+        collectionViewLayout.itemSize = CGSize(width: (kScreenWidth - 10)/2, height: 250)
+        collectionViewLayout.sectionInset = UIEdgeInsets(top: 0, left: 5, bottom: kSafeTabBarHeight, right: 5)
+
+        return collectionViewLayout
+    }()
+    
+}
+
+extension SearchContentListViewController: 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 = SearchContentListCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+        return cell
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        
+    }
+    
+}
+
+extension SearchContentListViewController : JXSegmentedListContainerViewListDelegate {
+    func listView() -> UIView {
+        return view
+    }
+}

+ 86 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchProduct/ViewController/SearchProductListViewController.swift

@@ -0,0 +1,86 @@
+//
+//  SearchProductListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+class SearchProductListViewController: UIViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+    }
+
+    func setupViews() {
+        view.backgroundColor = kf7f8faColor
+        view.addSubview(tableView)
+        let emptyView = DIYEmptyView.empty(with: kImage(name: "default_page_content"), titleStr: "没有找到相关,去看看别人都在看什么吧~", detailStr: nil)
+        emptyView!.contentViewY = kScaleValue(value: 141)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+    }
+        
+    func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.left.equalTo(14)
+            make.right.equalTo(-14)
+            make.bottom.equalTo(-kSafeTabBarHeight - 10)
+        }
+    }
+        
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.plain)
+        tableView.backgroundColor = UIColor.white
+        tableView.separatorStyle = .none
+        tableView.rowHeight = 140
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.cornerRadius = 10
+        tableView.masksToBounds = true
+        return tableView
+    }()
+        
+    typealias DidSelectRow = (_ indexPath: IndexPath) -> Void
+    var didSelectRow : DidSelectRow?
+    
+    typealias AddCartClosure = (ProductSearchModel,IndexPath) -> Void
+    var addCartClosure : AddCartClosure?
+}
+    
+extension SearchProductListViewController :UITableViewDataSource,UITableViewDelegate  {
+    
+    
+    func numberOfSections(in tableView: UITableView) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 10
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = ProductHBigTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        if let didSelectRow = self.didSelectRow {
+            didSelectRow(indexPath)
+        }
+    }
+    
+}
+    
+
+extension SearchProductListViewController : JXSegmentedListContainerViewListDelegate {
+    func listView() -> UIView {
+        return view
+    }
+}

+ 11 - 46
RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/SearchResult/View/SearchResultNavigationbarView.swift

@@ -16,17 +16,12 @@ class SearchResultNavigationbarView: BaseView {
     typealias BackBlock = () -> Void
     var backBlock : BackBlock?
     
-    /// 购物车
-    typealias ShoppingCarBlock = () -> Void
-    var shoppingCarBlock : ShoppingCarBlock?
-    
     /// 搜索
     typealias SearchResultBlock = (_ keyWord:String) -> Void
     var searchResultBlock : SearchResultBlock?
      
     override func setupViews() {
         addSubview(backButton)
-        addSubview(shoppingCarButton)
         addSubview(searchbgView)
         searchbgView.addSubview(searchIconImageView)
         searchbgView.addSubview(searchTextField)
@@ -39,29 +34,22 @@ class SearchResultNavigationbarView: BaseView {
             make.left.equalTo(14)
             make.size.equalTo(22)
         }
-        
-        shoppingCarButton.snp.makeConstraints { (make) in
-            make.centerY.equalToSuperview()
-            make.right.equalToSuperview().offset(-14)
-            make.width.equalTo(24)
-            make.height.equalTo(21)
-        }
         searchbgView.snp.makeConstraints { (make) in
             make.centerY.equalToSuperview()
-            make.left.equalTo(backButton.snp.right).offset(4)
-            make.right.equalTo(shoppingCarButton.snp.left).offset(-10)
+            make.left.equalTo(backButton.snp.right).offset(10)
+            make.right.equalTo(-14)
             make.height.equalTo(30)
         }
         searchIconImageView.snp.makeConstraints { (make) in
             make.centerY.equalToSuperview()
-            make.left.equalTo(12)
-            make.size.equalTo(18)
+            make.left.equalTo(10)
+            make.size.equalTo(16)
         }
         
         searchTextField.snp.makeConstraints { (make) in
             make.centerY.equalToSuperview()
             make.left.equalTo(searchIconImageView.snp.right).offset(8)
-            make.right.equalToSuperview().offset(8)
+            make.right.equalToSuperview()
             make.height.equalTo(30)
             
         }
@@ -88,18 +76,20 @@ class SearchResultNavigationbarView: BaseView {
     
     private lazy var searchIconImageView: UIImageView = {
         let searchIconImageView = UIImageView()
-        searchIconImageView.image = kImage(name: "navbar_search")
+        searchIconImageView.image = kImage(name: "nav_search_black")
         return searchIconImageView
     }()
     
     lazy var searchTextField: UITextField = {
         let searchTextField = UITextField()
-        searchTextField.placeholder = "请输入商品名称"
-        searchTextField.tintColor = kFFA42FColor
+        searchTextField.placeholder = "请输入内容"
+        searchTextField.tintColor = kThemeColor
         searchTextField.textColor = k333333Color
         searchTextField.returnKeyType = .search
-        searchTextField.font = kScaleRegularFont14
+        searchTextField.font = kRegularFont14
         searchTextField.borderStyle = .none
+        searchTextField.clearButtonMode = UITextField.ViewMode.whileEditing
+
         searchTextField.rx.controlEvent([.editingDidEndOnExit]).asObservable().subscribe(onNext: {  [weak self] (text) in
             
             if searchTextField.text?.count ?? 0 > 0 {
@@ -126,29 +116,4 @@ class SearchResultNavigationbarView: BaseView {
         return searchTextField
     }()
     
-    private lazy var shoppingCarButton: UIButton = {
-        let shoppingCarButton = UIButton(type: UIButton.ButtonType.custom)
-        shoppingCarButton.setImage(kImage(name: "navbar_shopping"), for: UIControl.State.normal)
-        shoppingCarButton.rx.tap.subscribe(onNext: { [weak self] (data) in
-            if let shoppingCarBlock = self?.shoppingCarBlock {
-                shoppingCarBlock()
-            }
-        }).disposed(by: disposeBag)
-//        shoppingCarButton.pp.setBadge(height: 14)
-//        shoppingCarButton.pp.badgeView.font = kRegularFont10
-        shoppingCarButton.pp.badgeView.backgroundColor = kfe352bColor
-        shoppingCarButton.pp.moveBadge(x: -2, y: 2)
-        return shoppingCarButton
-    }()
-    
-    var productCartCountModel : ProductCartCountModel? {
-        didSet {
-            
-            if productCartCountModel?.count == 0 {
-                shoppingCarButton.pp.hiddenBadge()
-            }else {
-                shoppingCarButton.pp.addBadge(number: productCartCountModel?.count ?? 0)
-            }
-        }
-    }
 }

RainbowPlanet/RainbowPlanet/Modules/CommonModules/SearchModule/SearchResult/View/SearchResultView.swift → RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchResult/View/SearchResultView.swift


+ 170 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchResult/ViewController/SearchResultViewController.swift

@@ -0,0 +1,170 @@
+//
+//  SearchResultViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/4/23.
+//  Copyright © 2019 南鑫林. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+
+class SearchResultViewController: BaseViewController {
+    
+    var keyWord : String!
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+        setupData()
+    }
+    
+    override func setupViews() {
+        navigationBar.leftButton.isHidden = true
+        navigationBar.addSubview(navigationBarView)
+        view.addSubview(segmentedView)
+        view.addSubview(listContainerView)
+        
+    }
+    
+    override func setupLayouts() {
+        navigationBarView.snp.makeConstraints { (make) in
+            make.top.equalTo(kSafeStatusBarHeight)
+            make.bottom.left.right.equalToSuperview()
+        }
+        
+        segmentedView.snp.makeConstraints { (make) in
+            make.left.equalToSuperview()
+            make.right.equalToSuperview()
+            make.height.equalTo(48)
+            make.top.equalTo(kNavBarTotalHeight)
+        }
+        
+        listContainerView.snp.makeConstraints { (make) in
+            make.top.equalTo(segmentedView.snp.bottom)
+            make.left.right.bottom.equalToSuperview()
+        }
+    }
+    
+    override func setupData() {
+        navigationBarView.backBlock = {
+            [weak self]  in
+            self?.navigationController?.popViewController(animated: true)
+        }
+    }
+    
+    private lazy var navigationBarView: SearchResultNavigationbarView = {
+        let navigationBarView = SearchResultNavigationbarView()
+        navigationBarView.searchTextField.text = keyWord
+        return navigationBarView
+    }()
+    
+    //1.初始化JXSegmentedViewx
+    private lazy var segmentedView: JXSegmentedView = {
+        let segmentedView = JXSegmentedView()
+        segmentedView.delegate = self
+        segmentedView.dataSource = segmentedDataSource
+        segmentedView.indicators = [indicator]
+        segmentedView.contentScrollView = listContainerView.scrollView
+        segmentedView.selectItemAt(index: 0)
+        segmentedView.defaultSelectedIndex = 0
+        return segmentedView
+    }()
+    
+    //2.初始化dataSource
+    private lazy var segmentedDataSource: JXSegmentedTitleDataSource = {
+        let segmentedDataSource = JXSegmentedTitleDataSource()
+        segmentedDataSource.titles = ["内容","话题","用户","商品"]
+        segmentedDataSource.isTitleColorGradientEnabled = true
+        segmentedDataSource.isItemSpacingAverageEnabled = true
+        segmentedDataSource.isTitleZoomEnabled = true
+        segmentedDataSource.itemSpacing = 30
+        segmentedDataSource.titleNormalColor = kbbbbbbColor
+        segmentedDataSource.titleSelectedColor = k333333Color
+        segmentedDataSource.titleNormalFont = kRegularFont14!
+        segmentedDataSource.titleSelectedFont = kBoldFont22
+        
+        //reloadData(selectedIndex:)方法一定要调用,方法内部会刷新数据源数组
+        segmentedDataSource.reloadData(selectedIndex: 0)
+        
+        return segmentedDataSource
+    }()
+    //3.初始化指示器indicator
+    private lazy var indicator: JXSegmentedIndicatorLineView = {
+        let indicator = JXSegmentedIndicatorLineView()
+        indicator.indicatorColor = kThemeColor
+        indicator.indicatorHeight = 4
+        indicator.indicatorWidth = 20
+        return indicator
+    }()
+    
+    //4.初始化JXSegmentedListContainerView
+    private lazy var listContainerView: JXSegmentedListContainerView = {
+        let listContainerView = JXSegmentedListContainerView(dataSource: self)
+        listContainerView.didAppearPercent = 0.01
+        listContainerView.defaultSelectedIndex = 0
+        return listContainerView
+    }()
+    
+}
+
+extension SearchResultViewController : JXSegmentedViewDelegate {
+    //点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,而不关心具体是点击还是滚动选中的情况。
+    func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
+        
+    }
+    
+    // 点击选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didClickSelectedItemAt index: Int) {
+        //传递didClickSelectedItemAt事件给listContainerView,必须调用!!!
+        listContainerView.didClickSelectedItem(at: index)
+    }
+    
+    // 滚动选中的情况才会调用该方法
+    func segmentedView(_ segmentedView: JXSegmentedView, didScrollSelectedItemAt index: Int) {
+        
+    }
+    
+    // 正在滚动中的回调
+    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)
+    }
+    
+    /// 是否允许点击选中目标index的item
+    func segmentedView(_ segmentedView: JXSegmentedView, canClickItemAt index: Int) -> Bool {
+        return true
+    }
+}
+
+extension SearchResultViewController :JXSegmentedListContainerViewDataSource {
+    
+    func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
+        if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
+            return titleDataSource.dataSource.count
+        }
+        return 0
+    }
+    func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
+        switch index {
+        /// 内容
+        case 0:
+            let vc = SearchContentListViewController()
+            return vc
+        /// 话题
+        case 1:
+            let vc = SearchTopicListViewController()
+            return vc
+        /// 用户
+        case 2:
+            let vc = SearchUserListViewController()
+            return vc
+        /// 商品
+        default:
+            let vc = SearchProductListViewController()
+            return vc
+        }
+    }
+}
+

+ 118 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/View/SearchTopicListTableViewCell.swift

@@ -0,0 +1,118 @@
+//
+//  SearchTopicListTableViewCell.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class SearchTopicListTableViewCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> SearchTopicListTableViewCell {
+        let ID = "SearchTopicListTableViewCell"
+        tableView.register(SearchTopicListTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : SearchTopicListTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! SearchTopicListTableViewCell
+        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
+        addSubview(iconButton)
+        addSubview(titleLabel)
+        addSubview(subtitleLabel)
+        addSubview(goButton)
+        addSubview(lineLabel)
+    }
+    
+    private func setupLayouts() {
+        iconButton.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.left.equalToSuperview().offset(14)
+            make.size.equalTo(70)
+        }
+        titleLabel.snp_makeConstraints { (make) in
+            make.left.equalTo(iconButton.snp_right).offset(15)
+            make.right.equalToSuperview().offset(-14)
+            make.height.equalTo(23)
+            make.top.equalTo(iconButton).offset(11)
+        }
+        subtitleLabel.snp_makeConstraints { (make) in
+            make.left.equalTo(iconButton.snp_right).offset(15)
+            make.right.equalToSuperview().offset(-14)
+            make.height.equalTo(23)
+            make.bottom.equalTo(iconButton).offset(-11)
+        }
+        goButton.snp_makeConstraints { (make) in
+            make.centerY.equalToSuperview()
+            make.right.equalTo(-14)
+        }
+        
+        lineLabel.snp_makeConstraints { (make) in
+            make.bottom.equalToSuperview()
+            make.right.equalToSuperview()
+            make.height.equalTo(1)
+            make.left.equalTo(14)
+        }
+    }
+    
+    lazy var iconButton: UIButton = {
+        let iconButton = UIButton(type: UIButton.ButtonType.custom)
+        iconButton.setImage(kImage(name: "pic_preload"), for: UIControl.State.normal)
+        iconButton.cornerRadius = 4
+        iconButton.masksToBounds = true
+        iconButton.isUserInteractionEnabled = false
+        return iconButton
+    }()
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "电影里教会我的事"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kMediumFont16
+        return titleLabel
+    }()
+
+    
+    lazy var subtitleLabel: UILabel = {
+        let subtitleLabel = UILabel()
+        subtitleLabel.text = "9999人参与"
+        subtitleLabel.textColor = k999999Color
+        subtitleLabel.font = kRegularFont13
+        return subtitleLabel
+    }()
+    
+    lazy var goButton: UIButton = {
+        let goButton = UIButton(type: UIButton.ButtonType.custom)
+        goButton.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
+        goButton.isUserInteractionEnabled = false
+        return goButton
+    }()
+    
+    lazy var lineLabel: UILabel = {
+        let lineLabel = UILabel()
+        lineLabel.backgroundColor = kf5f5f5Color
+        return lineLabel
+    }()
+    
+    
+
+}

+ 74 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchTopicList/ViewController/SearchTopicListViewController.swift

@@ -0,0 +1,74 @@
+//
+//  SearchTopicListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+class SearchTopicListViewController: UIViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+    }
+    
+
+    func setupViews() {
+        view.backgroundColor = kf7f8faColor
+        view.addSubview(tableView)
+        let emptyView = DIYEmptyView.empty(with: kImage(name: "default_page_content"), titleStr: "没有找到相关,去看看别人都在看什么吧~", detailStr: nil)
+        emptyView!.contentViewY = kScaleValue(value: 141)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+    }
+    
+    func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.left.equalTo(0)
+            make.right.equalTo(0)
+            make.bottom.equalTo(0)
+        }
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.plain)
+        tableView.backgroundColor = UIColor.white
+        tableView.separatorStyle = .none
+        tableView.rowHeight = 100
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+}
+
+extension SearchTopicListViewController :UITableViewDataSource,UITableViewDelegate  {
+    
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 10
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = SearchTopicListTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        
+    }
+    
+}
+
+
+
+extension SearchTopicListViewController : JXSegmentedListContainerViewListDelegate {
+    func listView() -> UIView {
+        return view
+    }
+}

+ 5 - 5
RainbowPlanet/RainbowPlanet/Modules/MineModule/MyFollowAndFan/View/MyFollowAndFanTableViewCell.swift

@@ -9,14 +9,14 @@
 import UIKit
 import RxSwift
 
-class MyFollowAndFanTableViewCell: UITableViewCell {
+class SearchUserLitTableViewCell: UITableViewCell {
     
     let disposeBag = DisposeBag()
 
-    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> MyFollowAndFanTableViewCell {
-        let ID = "MyFollowAndFanTableViewCell"
-        tableView.register(MyFollowAndFanTableViewCell.self, forCellReuseIdentifier: ID)
-        let cell : MyFollowAndFanTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! MyFollowAndFanTableViewCell
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> SearchUserLitTableViewCell {
+        let ID = "SearchUserLitTableViewCell"
+        tableView.register(SearchUserLitTableViewCell.self, forCellReuseIdentifier: ID)
+        let cell : SearchUserLitTableViewCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! SearchUserLitTableViewCell
         cell.indexPath = indexPath
         return cell
     }

+ 74 - 0
RainbowPlanet/RainbowPlanet/Modules/SearchModule/SearchUser/ViewController/SearchUserListViewController.swift

@@ -0,0 +1,74 @@
+//
+//  SearchUserListViewController.swift
+//  RainbowPlanet
+//
+//  Created by 南鑫林 on 2019/6/19.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import JXSegmentedView
+class SearchUserListViewController: UIViewController {
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupLayouts()
+    }
+    
+    func setupViews() {
+        view.backgroundColor = kf7f8faColor
+        view.addSubview(tableView)
+        let emptyView = DIYEmptyView.empty(with: kImage(name: "default_page_content"), titleStr: "没有找到相关,去看看别人都在看什么吧~", detailStr: nil)
+        emptyView!.contentViewY = kScaleValue(value: 141)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+    }
+    
+    func setupLayouts() {
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(5)
+            make.left.equalTo(0)
+            make.right.equalTo(0)
+            make.bottom.equalTo(0)
+        }
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.plain)
+        tableView.backgroundColor = UIColor.white
+        tableView.separatorStyle = .none
+        tableView.rowHeight = 81
+        tableView.dataSource = self
+        tableView.delegate = self
+        return tableView
+    }()
+    
+}
+
+extension SearchUserListViewController :UITableViewDataSource,UITableViewDelegate  {
+    
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 10
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell = SearchUserLitTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        cell.followType = .alreadyFollow
+        return cell
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        
+    }
+    
+}
+
+
+
+extension SearchUserListViewController : JXSegmentedListContainerViewListDelegate {
+    func listView() -> UIView {
+        return view
+    }
+}

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductAllComment/ViewController/ProductAllCommentViewController.swift

@@ -49,7 +49,7 @@ class ProductAllCommentViewController: BaseViewController {
         }
         productAllCommentView.didSelectItemAtClosure = {
             [weak self] (images,indexPath) in
-            let vc = BrowsePicturesViewController.init(images: images, index: indexPath.row)
+            let vc = BrowsePicturesViewController.init(imageStrs: images, index: indexPath.row)
             self?.navigationController?.pushViewController(vc, animated: true)
         }
     }

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailEvaluation/ProductDetailEvaluationTableViewCell.swift

@@ -170,7 +170,7 @@ extension ProductDetailEvaluationTableViewCell: UICollectionViewDelegateFlowLayo
     }
     
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        let vc = BrowsePicturesViewController.init(images: commentImages, index: indexPath.row)
+        let vc = BrowsePicturesViewController.init(imageStrs: commentImages, index: indexPath.row)
         responderViewController()?.navigationController?.pushViewController(vc, animated: true)
     }
     

+ 1 - 1
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductDetail/View/Cell/ProductDetailProductLabel/ProductDetailProductLabelTableViewCell.swift

@@ -78,7 +78,7 @@ class ProductDetailProductLabelTableViewCell: UITableViewCell {
         bgView.rx.tap.subscribe(onNext: {
             [weak self] (data) in
             if !(self?.productDetailModel?.report?.isEmpty ?? true) {
-                let vc = BrowsePicturesViewController.init(images: (self?.productDetailModel?.report)!, index: 0)
+                let vc = BrowsePicturesViewController.init(imageStrs: (self?.productDetailModel?.report)!, index: 0)
                 self?.responderViewController()?.navigationController?.pushViewController(vc, animated: true)
             }
         }).disposed(by: disposeBag)

+ 2 - 0
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/ProductView/TableViewCell/ProductHBigTableViewCell.swift

@@ -102,6 +102,7 @@ class ProductHBigTableViewCell: UITableViewCell {
         let iconImagView = UIImageView()
         iconImagView.contentMode = .scaleAspectFill
         iconImagView.masksToBounds = true
+        iconImagView.image = kImage(name: "pic_preload")
         return iconImagView
     }()
     
@@ -146,6 +147,7 @@ class ProductHBigTableViewCell: UITableViewCell {
     private lazy var plusButton: UIButton = {
         let plusButton = UIButton(type: UIButton.ButtonType.custom)
         plusButton.setImage(kImage(name: "shopping_mall_plus"), for: UIControl.State.normal)
+        plusButton.isHidden = true
         plusButton.rx.tap.subscribe(onNext: {
             [weak self] (data) in
             if let plusClosure = self?.plusClosure {

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

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

二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_black.imageset/nav_search_black@2x.png


二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_black.imageset/nav_search_black@3x.png


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

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

二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_gray.imageset/nav_search_gray@2x.png


二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/NavigationBarIcons/nav_search_gray.imageset/nav_search_gray@3x.png


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

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

二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/search_ico_delete.imageset/search_ico_delete@2x.png


二进制
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/search_ico_delete.imageset/search_ico_delete@3x.png


RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/View/BrowsePicturesPagerViewCell.swift → RainbowPlanet/RainbowPlanet/Tools/BrowsePictures/View/BrowsePicturesPagerViewCell.swift


+ 35 - 5
RainbowPlanet/RainbowPlanet/Modules/ShoppingMallModule/BrowsePictures/ViewController/BrowsePicturesViewController.swift

@@ -10,8 +10,11 @@ import UIKit
 
 class BrowsePicturesViewController: BaseViewController {
     
+    //存储图片Str数组
+    var imageStrs:[String]
+    
     //存储图片数组
-    var images:[String]
+    var images:[UIImage]
     
     //默认显示的图片索引
     var index:Int
@@ -26,7 +29,8 @@ class BrowsePicturesViewController: BaseViewController {
     var pageControl : UIPageControl!
     
     //初始化
-    init(images:[String], index:Int = 0){
+    init(imageStrs:Array<String> = [],images:Array<UIImage> = [], index:Int = 0){
+        self.imageStrs = imageStrs
         self.images = images
         self.index = index
         
@@ -84,7 +88,22 @@ class BrowsePicturesViewController: BaseViewController {
         pageControl = UIPageControl()
         pageControl.center = CGPoint(x: UIScreen.main.bounds.width/2,
                                      y: UIScreen.main.bounds.height - 20 -  kSafeTabBarHeight)
-        pageControl.numberOfPages = images.count
+        if !(imageStrs.isEmpty ){
+             pageControl.numberOfPages = imageStrs.count
+            if imageStrs.count == 1 {
+                pageControl.isHidden = true
+            }else {
+                pageControl.isHidden = true
+            }
+        }
+        if !(images.isEmpty ){
+            pageControl.numberOfPages = images.count
+            if images.count == 1 {
+                pageControl.isHidden = true
+            }else {
+                pageControl.isHidden = true
+            }
+        }
         pageControl.isUserInteractionEnabled = false
         pageControl.currentPage = index
         view.addSubview(self.pageControl)
@@ -132,14 +151,25 @@ UICollectionViewDelegateFlowLayout{
                         cellForItemAt indexPath: IndexPath)
         -> UICollectionViewCell {
             let cell = BrowsePicturesPagerViewCell.cellWith(collectionView: collectionView, indexPath: indexPath)
-            cell.iconImageView.kf.setImage(with: kURLImage(name: images[indexPath.row]), placeholder: kImage(name: ""))
+            if !(imageStrs.isEmpty){
+                cell.iconImageView.kf.setImage(with: kURLImage(name: imageStrs[indexPath.row]), placeholder: kImage(name: ""))
+            }
+            if !(images.isEmpty){
+                cell.iconImageView.image = images[indexPath.row]
+            }
             return cell
     }
     
     //collectionView单元格数量
     func collectionView(_ collectionView: UICollectionView,
                         numberOfItemsInSection section: Int) -> Int {
-        return self.images.count
+        if !(imageStrs.isEmpty){
+            return self.imageStrs.count
+        }
+        if !(images.isEmpty){
+            return self.images.count
+        }
+        return 0
     }
     
     //collectionView单元格尺寸