瀏覽代碼

no message

HF_Q 4 年之前
父節點
當前提交
751b292e63
共有 100 個文件被更改,包括 5200 次插入264 次删除
  1. 130 0
      smartRhino.xcodeproj/project.pbxproj
  2. 二進制
      smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/UserInterfaceState.xcuserstate
  3. 153 0
      smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 16 7
      smartRhino/AppConfig.h
  5. 4 1
      smartRhino/AppDelegate.m
  6. 3 3
      smartRhino/Assets.xcassets/Contents.json
  7. 22 0
      smartRhino/Assets.xcassets/HomeSchool_Play.imageset/Contents.json
  8. 二進制
      smartRhino/Assets.xcassets/HomeSchool_Play.imageset/HomeSchool_Play@2x.png
  9. 二進制
      smartRhino/Assets.xcassets/HomeSchool_Play.imageset/HomeSchool_Play@3x.png
  10. 22 0
      smartRhino/Assets.xcassets/book_lock.imageset/Contents.json
  11. 二進制
      smartRhino/Assets.xcassets/book_lock.imageset/book_lock@2x.png
  12. 二進制
      smartRhino/Assets.xcassets/book_lock.imageset/book_lock@3x.png
  13. 21 0
      smartRhino/Assets.xcassets/center_bg.imageset/Contents.json
  14. 二進制
      smartRhino/Assets.xcassets/center_bg.imageset/center_bg.jpg
  15. 5 1
      smartRhino/FwzAppConfig.h
  16. 31 8
      smartRhino/Project/Other/Third/Calender/NSDate+Extension.m
  17. 9 0
      smartRhino/Project/Tools/ZYCTool.m
  18. 2 2
      smartRhino/Project/VCModel/ChatMessage/Chat/EMChatViewController.h
  19. 39 0
      smartRhino/Project/VCModel/ChatMessage/Chat/EMChatViewController.m
  20. 18 1
      smartRhino/Project/VCModel/ChatMessage/Chat/MessageCell/BubbleView/EMMsgExtSmartBubbleView.m
  21. 6 3
      smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/MoveViewController.m
  22. 1 1
      smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/ShareListVC.h
  23. 5 0
      smartRhino/Project/VCModel/Home/Model/HomeSubItemModel.h
  24. 1 0
      smartRhino/Project/VCModel/Home/Model/HomeSubModel.h
  25. 0 1
      smartRhino/Project/VCModel/Home/OtherHomeVC/HomeSearch/HomeSearchController.m
  26. 1 15
      smartRhino/Project/VCModel/Home/OtherHomeVC/HomeSearch/View/SearchTypeSection.m
  27. 172 16
      smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m
  28. 157 39
      smartRhino/Project/VCModel/Home/VC/BookStore/BookDetail.storyboard
  29. 1 1
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookChanelSubListVC.m
  30. 1 1
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookContentNavVC.m
  31. 59 6
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookListDetailVC.m
  32. 15 11
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookListenVC.m
  33. 2 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/BookReadVC.h
  34. 93 29
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/BookReadVC.m
  35. 6 6
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/DCContentVC.m
  36. 19 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookLabelAllVC.h
  37. 233 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookLabelAllVC.m
  38. 19 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookSearchSubVC.h
  39. 291 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookSearchSubVC.m
  40. 17 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearchVC.h
  41. 467 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearchVC.m
  42. 6 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookStoreHome.m
  43. 17 13
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookTeacherDetailVC.m
  44. 3 0
      smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookWCDetailVC.m
  45. 24 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.h
  46. 164 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.m
  47. 82 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.xib
  48. 21 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.h
  49. 31 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.m
  50. 60 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.xib
  51. 2 0
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.h
  52. 9 8
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.m
  53. 13 11
      smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.xib
  54. 249 2
      smartRhino/Project/VCModel/Home/VC/IndexSearchVC.m
  55. 21 8
      smartRhino/Project/VCModel/Home/VC/IndexViewController.m
  56. 67 0
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeBigshotVC.m
  57. 35 4
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeDayGoodArticeVC.m
  58. 62 5
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeDayGoodBookVC.m
  59. 17 0
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeSCDetailVC.h
  60. 410 0
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeSCDetailVC.m
  61. 18 0
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeSchoolVC.h
  62. 99 0
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeSchoolVC.m
  63. 27 2
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeSpeakVC.m
  64. 81 3
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeUserVC.m
  65. 84 5
      smartRhino/Project/VCModel/Home/VC/SubVC/HomeWeiCousreVC.m
  66. 5 2
      smartRhino/Project/VCModel/Home/VC/SubVC/IndexAllVC.m
  67. 40 1
      smartRhino/Project/VCModel/Home/VC/SubVC/IndexSubVC.m
  68. 2 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeBigshotCell.h
  69. 11 1
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeBigshotCell.m
  70. 4 2
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeGoodBookCell.h
  71. 5 2
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeGoodBookCell.m
  72. 1 1
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolCell.h
  73. 19 4
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolCell.m
  74. 19 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.h
  75. 42 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.m
  76. 40 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.xib
  77. 2 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeUserPrivilegeCell.h
  78. 9 0
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeUserPrivilegeCell.m
  79. 23 33
      smartRhino/Project/VCModel/Home/VC/View/Cell/HomeWeiCousreCell.xib
  80. 3 1
      smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.h
  81. 56 3
      smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.m
  82. 69 1
      smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.xib
  83. 13 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/CenterTouchTableView.h
  84. 16 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/CenterTouchTableView.m
  85. 13 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/FirstViewController.h
  86. 96 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/FirstViewController.m
  87. 20 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchollVideoVC.h
  88. 161 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchollVideoVC.m
  89. 28 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchoolHeadView.h
  90. 224 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchoolHeadView.m
  91. 13 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SecondViewController.h
  92. 139 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SecondViewController.m
  93. 23 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentHeaderView.h
  94. 257 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentHeaderView.m
  95. 14 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentVController.h
  96. 80 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentVController.m
  97. 16 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentView.h
  98. 81 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentView.m
  99. 13 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/ThirdViewController.h
  100. 0 0
      smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/ThirdViewController.m

+ 130 - 0
smartRhino.xcodeproj/project.pbxproj

@@ -1296,6 +1296,13 @@
 		EBB83E4E23B35FD300A8C4BC /* ChangeTopicCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EBB83E4C23B35FD300A8C4BC /* ChangeTopicCell.m */; };
 		EBB83E4F23B35FD300A8C4BC /* ChangeTopicCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EBB83E4D23B35FD300A8C4BC /* ChangeTopicCell.xib */; };
 		EBB83E5223B3668C00A8C4BC /* ChangeTopicModel.m in Sources */ = {isa = PBXBuildFile; fileRef = EBB83E5123B3668C00A8C4BC /* ChangeTopicModel.m */; };
+		EBBD5E612519A2D8007B174E /* BookSearchVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBD5E5F2519A2D8007B174E /* BookSearchVC.m */; };
+		EBBD5E662519A393007B174E /* BookSearchSubVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBD5E642519A392007B174E /* BookSearchSubVC.m */; };
+		EBBD5E6A2519CB4E007B174E /* BookLabelAllVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBD5E692519CB4E007B174E /* BookLabelAllVC.m */; };
+		EBBD5E6F2519D66A007B174E /* BookListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBD5E6D2519D66A007B174E /* BookListCell.m */; };
+		EBBD5E702519D66A007B174E /* BookListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EBBD5E6E2519D66A007B174E /* BookListCell.xib */; };
+		EBBD5E752519D8BD007B174E /* BookListSubCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBD5E732519D8BD007B174E /* BookListSubCell.m */; };
+		EBBD5E762519D8BD007B174E /* BookListSubCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EBBD5E742519D8BD007B174E /* BookListSubCell.xib */; };
 		EBBE1CB424E786F200041E04 /* GroupInfoVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBE1CB224E786F200041E04 /* GroupInfoVC.m */; };
 		EBBE1CB724E78CE000041E04 /* GroupEditerVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBE1CB624E78CE000041E04 /* GroupEditerVC.m */; };
 		EBBE1CBA24E7C7F100041E04 /* TDGroupDraftListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBBE1CB924E7C7F100041E04 /* TDGroupDraftListVC.m */; };
@@ -1333,6 +1340,9 @@
 		EBCFA0F723AC6CBC00A62645 /* MyTDTopicUserMoveVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBCFA0F623AC6CBC00A62645 /* MyTDTopicUserMoveVC.m */; };
 		EBCFA0FA23ACEBE600A62645 /* MyTDTopicCreateVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBCFA0F923ACEBE600A62645 /* MyTDTopicCreateVC.m */; };
 		EBCFA0FD23ACF06A00A62645 /* MyTDTopicSelectExtentVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBCFA0FC23ACF06A00A62645 /* MyTDTopicSelectExtentVC.m */; };
+		EBCFCDE325184621002CD1B8 /* HomeSchoolContentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = EBCFCDE125184621002CD1B8 /* HomeSchoolContentCell.m */; };
+		EBCFCDE425184621002CD1B8 /* HomeSchoolContentCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EBCFCDE225184621002CD1B8 /* HomeSchoolContentCell.xib */; };
+		EBCFCDE825185002002CD1B8 /* HomeSchollVideoVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBCFCDE725185001002CD1B8 /* HomeSchollVideoVC.m */; };
 		EBD29F2825021AF400AEB04C /* BookListDetailVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD29F2625021AF300AEB04C /* BookListDetailVC.m */; };
 		EBD29F2A25022A1600AEB04C /* BookDetail.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EBD29F2925022A1600AEB04C /* BookDetail.storyboard */; };
 		EBD29F2D25022B8C00AEB04C /* BookListenVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD29F2C25022B8C00AEB04C /* BookListenVC.m */; };
@@ -1373,6 +1383,16 @@
 		EBD623C025159A66007FF6BC /* WMZPageScroller.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623B625159A66007FF6BC /* WMZPageScroller.m */; };
 		EBD623C125159A66007FF6BC /* UIView+PageRect.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623B925159A66007FF6BC /* UIView+PageRect.m */; };
 		EBD623C225159A66007FF6BC /* PageController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EBD623BA25159A66007FF6BC /* PageController.bundle */; };
+		EBD623C62515A9BE007FF6BC /* HomeSchoolVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623C52515A9BE007FF6BC /* HomeSchoolVC.m */; };
+		EBD623DD2515CBA3007FF6BC /* SegmentHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623D72515CBA3007FF6BC /* SegmentHeaderView.m */; };
+		EBD623DE2515CBA3007FF6BC /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623D82515CBA3007FF6BC /* SecondViewController.m */; };
+		EBD623DF2515CBA3007FF6BC /* ThirdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623D92515CBA3007FF6BC /* ThirdViewController.m */; };
+		EBD623E02515CBA3007FF6BC /* SegmentView.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623DB2515CBA3007FF6BC /* SegmentView.m */; };
+		EBD623E42515CC41007FF6BC /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623E22515CC41007FF6BC /* FirstViewController.m */; };
+		EBD623E82515CE24007FF6BC /* HomeSchoolHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623E72515CE24007FF6BC /* HomeSchoolHeadView.m */; };
+		EBD623EC2515FF8F007FF6BC /* HomeSCDetailVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623EA2515FF8F007FF6BC /* HomeSCDetailVC.m */; };
+		EBD623F0251603CD007FF6BC /* SegmentVController.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623EF251603CD007FF6BC /* SegmentVController.m */; };
+		EBD623F4251605F7007FF6BC /* CenterTouchTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD623F3251605F7007FF6BC /* CenterTouchTableView.m */; };
 		EBD627D52429DD6500D91C9E /* ChatQrcodeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBD627D42429DD6500D91C9E /* ChatQrcodeVC.m */; };
 		EBDD70BB23B4876F00AC0BF4 /* MyWorkCarVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBDD70BA23B4876F00AC0BF4 /* MyWorkCarVC.m */; };
 		EBDE08B02458179B005D426C /* CommonHomeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EBDE08AF2458179B005D426C /* CommonHomeVC.m */; };
@@ -3735,6 +3755,18 @@
 		EBB83E4D23B35FD300A8C4BC /* ChangeTopicCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ChangeTopicCell.xib; sourceTree = "<group>"; };
 		EBB83E5023B3668C00A8C4BC /* ChangeTopicModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChangeTopicModel.h; sourceTree = "<group>"; };
 		EBB83E5123B3668C00A8C4BC /* ChangeTopicModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChangeTopicModel.m; sourceTree = "<group>"; };
+		EBBD5E5F2519A2D8007B174E /* BookSearchVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookSearchVC.m; sourceTree = "<group>"; };
+		EBBD5E602519A2D8007B174E /* BookSearchVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookSearchVC.h; sourceTree = "<group>"; };
+		EBBD5E642519A392007B174E /* BookSearchSubVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookSearchSubVC.m; sourceTree = "<group>"; };
+		EBBD5E652519A392007B174E /* BookSearchSubVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookSearchSubVC.h; sourceTree = "<group>"; };
+		EBBD5E682519CB4E007B174E /* BookLabelAllVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookLabelAllVC.h; sourceTree = "<group>"; };
+		EBBD5E692519CB4E007B174E /* BookLabelAllVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookLabelAllVC.m; sourceTree = "<group>"; };
+		EBBD5E6C2519D66A007B174E /* BookListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BookListCell.h; sourceTree = "<group>"; };
+		EBBD5E6D2519D66A007B174E /* BookListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BookListCell.m; sourceTree = "<group>"; };
+		EBBD5E6E2519D66A007B174E /* BookListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookListCell.xib; sourceTree = "<group>"; };
+		EBBD5E722519D8BD007B174E /* BookListSubCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BookListSubCell.h; sourceTree = "<group>"; };
+		EBBD5E732519D8BD007B174E /* BookListSubCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BookListSubCell.m; sourceTree = "<group>"; };
+		EBBD5E742519D8BD007B174E /* BookListSubCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookListSubCell.xib; sourceTree = "<group>"; };
 		EBBE1CB224E786F200041E04 /* GroupInfoVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupInfoVC.m; sourceTree = "<group>"; };
 		EBBE1CB324E786F200041E04 /* GroupInfoVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupInfoVC.h; sourceTree = "<group>"; };
 		EBBE1CB524E78CE000041E04 /* GroupEditerVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupEditerVC.h; sourceTree = "<group>"; };
@@ -3803,6 +3835,11 @@
 		EBCFA0F923ACEBE600A62645 /* MyTDTopicCreateVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyTDTopicCreateVC.m; sourceTree = "<group>"; };
 		EBCFA0FB23ACF06A00A62645 /* MyTDTopicSelectExtentVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyTDTopicSelectExtentVC.h; sourceTree = "<group>"; };
 		EBCFA0FC23ACF06A00A62645 /* MyTDTopicSelectExtentVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyTDTopicSelectExtentVC.m; sourceTree = "<group>"; };
+		EBCFCDE025184621002CD1B8 /* HomeSchoolContentCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSchoolContentCell.h; sourceTree = "<group>"; };
+		EBCFCDE125184621002CD1B8 /* HomeSchoolContentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSchoolContentCell.m; sourceTree = "<group>"; };
+		EBCFCDE225184621002CD1B8 /* HomeSchoolContentCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeSchoolContentCell.xib; sourceTree = "<group>"; };
+		EBCFCDE625185001002CD1B8 /* HomeSchollVideoVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSchollVideoVC.h; sourceTree = "<group>"; };
+		EBCFCDE725185001002CD1B8 /* HomeSchollVideoVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSchollVideoVC.m; sourceTree = "<group>"; };
 		EBD29F2625021AF300AEB04C /* BookListDetailVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BookListDetailVC.m; sourceTree = "<group>"; };
 		EBD29F2725021AF300AEB04C /* BookListDetailVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BookListDetailVC.h; sourceTree = "<group>"; };
 		EBD29F2925022A1600AEB04C /* BookDetail.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BookDetail.storyboard; sourceTree = "<group>"; };
@@ -3862,6 +3899,26 @@
 		EBD623B825159A66007FF6BC /* WMZPageParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMZPageParam.h; sourceTree = "<group>"; };
 		EBD623B925159A66007FF6BC /* UIView+PageRect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+PageRect.m"; sourceTree = "<group>"; };
 		EBD623BA25159A66007FF6BC /* PageController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = PageController.bundle; sourceTree = "<group>"; };
+		EBD623C42515A9BD007FF6BC /* HomeSchoolVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSchoolVC.h; sourceTree = "<group>"; };
+		EBD623C52515A9BE007FF6BC /* HomeSchoolVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSchoolVC.m; sourceTree = "<group>"; };
+		EBD623D22515CBA3007FF6BC /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = "<group>"; };
+		EBD623D32515CBA3007FF6BC /* SegmentHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SegmentHeaderView.h; sourceTree = "<group>"; };
+		EBD623D42515CBA3007FF6BC /* SegmentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SegmentView.h; sourceTree = "<group>"; };
+		EBD623D62515CBA3007FF6BC /* ThirdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdViewController.h; sourceTree = "<group>"; };
+		EBD623D72515CBA3007FF6BC /* SegmentHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SegmentHeaderView.m; sourceTree = "<group>"; };
+		EBD623D82515CBA3007FF6BC /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = "<group>"; };
+		EBD623D92515CBA3007FF6BC /* ThirdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThirdViewController.m; sourceTree = "<group>"; };
+		EBD623DB2515CBA3007FF6BC /* SegmentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SegmentView.m; sourceTree = "<group>"; };
+		EBD623E22515CC41007FF6BC /* FirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = "<group>"; };
+		EBD623E32515CC41007FF6BC /* FirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = "<group>"; };
+		EBD623E62515CE24007FF6BC /* HomeSchoolHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeSchoolHeadView.h; sourceTree = "<group>"; };
+		EBD623E72515CE24007FF6BC /* HomeSchoolHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeSchoolHeadView.m; sourceTree = "<group>"; };
+		EBD623EA2515FF8F007FF6BC /* HomeSCDetailVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeSCDetailVC.m; sourceTree = "<group>"; };
+		EBD623EB2515FF8F007FF6BC /* HomeSCDetailVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeSCDetailVC.h; sourceTree = "<group>"; };
+		EBD623EE251603CD007FF6BC /* SegmentVController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SegmentVController.h; sourceTree = "<group>"; };
+		EBD623EF251603CD007FF6BC /* SegmentVController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SegmentVController.m; sourceTree = "<group>"; };
+		EBD623F2251605F7007FF6BC /* CenterTouchTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CenterTouchTableView.h; sourceTree = "<group>"; };
+		EBD623F3251605F7007FF6BC /* CenterTouchTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CenterTouchTableView.m; sourceTree = "<group>"; };
 		EBD627D32429DD6500D91C9E /* ChatQrcodeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatQrcodeVC.h; sourceTree = "<group>"; };
 		EBD627D42429DD6500D91C9E /* ChatQrcodeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatQrcodeVC.m; sourceTree = "<group>"; };
 		EBDD70B923B4876F00AC0BF4 /* MyWorkCarVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyWorkCarVC.h; sourceTree = "<group>"; };
@@ -6209,6 +6266,9 @@
 		C7811F5B23603F64000CC76A /* Cell */ = {
 			isa = PBXGroup;
 			children = (
+				EBCFCDE025184621002CD1B8 /* HomeSchoolContentCell.h */,
+				EBCFCDE125184621002CD1B8 /* HomeSchoolContentCell.m */,
+				EBCFCDE225184621002CD1B8 /* HomeSchoolContentCell.xib */,
 				C7AB843F235EE65600F2363F /* WorkListCell.h */,
 				C7AB8440235EE65600F2363F /* WorkListCell.m */,
 				C7D6BA2E235DA18700770E7C /* HomeTableViewCell.h */,
@@ -6847,6 +6907,7 @@
 		C7D6BA29235DA18700770E7C /* View */ = {
 			isa = PBXGroup;
 			children = (
+				EBD623D12515CBA3007FF6BC /* HomeSchoolSubVC */,
 				C57264782382A3570054EE66 /* ArticleDetailCell */,
 				C7811F5B23603F64000CC76A /* Cell */,
 				C7811F5A23603EE2000CC76A /* HomeDetail */,
@@ -7821,7 +7882,10 @@
 		EB415136246BC5D800030371 /* VC */ = {
 			isa = PBXGroup;
 			children = (
+				EBBD5E632519A2E7007B174E /* BookSearch */,
 				EB95266D248A0B19003EFCCE /* BookRead */,
+				EBBD5E602519A2D8007B174E /* BookSearchVC.h */,
+				EBBD5E5F2519A2D8007B174E /* BookSearchVC.m */,
 				EB41513C246BC71500030371 /* BookStoreHome.h */,
 				EB41513D246BC71500030371 /* BookStoreHome.m */,
 				EB5F450324750765008D316D /* BookChanelVC.h */,
@@ -7988,6 +8052,12 @@
 				EB9F24DD2509CD0C0017479A /* PlayModelVC.m */,
 				EB9F24E42509F3EF0017479A /* CusPopoverBackgroundView.h */,
 				EB9F24E52509F3EF0017479A /* CusPopoverBackgroundView.m */,
+				EBBD5E6C2519D66A007B174E /* BookListCell.h */,
+				EBBD5E6D2519D66A007B174E /* BookListCell.m */,
+				EBBD5E6E2519D66A007B174E /* BookListCell.xib */,
+				EBBD5E722519D8BD007B174E /* BookListSubCell.h */,
+				EBBD5E732519D8BD007B174E /* BookListSubCell.m */,
+				EBBD5E742519D8BD007B174E /* BookListSubCell.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -8011,6 +8081,10 @@
 				EBF2FB0F24A3498C0028EA09 /* HomeMingShiVC.m */,
 				EBF2FB1224A34DD10028EA09 /* HomeUserVC.h */,
 				EBF2FB1324A34DD10028EA09 /* HomeUserVC.m */,
+				EBD623C42515A9BD007FF6BC /* HomeSchoolVC.h */,
+				EBD623C52515A9BE007FF6BC /* HomeSchoolVC.m */,
+				EBD623EB2515FF8F007FF6BC /* HomeSCDetailVC.h */,
+				EBD623EA2515FF8F007FF6BC /* HomeSCDetailVC.m */,
 				EB6A3D5024A864730067DBFA /* HomeProblemVC.h */,
 				EB6A3D5124A864740067DBFA /* HomeProblemVC.m */,
 				EBF3C52C25133FB900D40A66 /* IndexAllVC.h */,
@@ -9145,6 +9219,17 @@
 			path = categories;
 			sourceTree = "<group>";
 		};
+		EBBD5E632519A2E7007B174E /* BookSearch */ = {
+			isa = PBXGroup;
+			children = (
+				EBBD5E652519A392007B174E /* BookSearchSubVC.h */,
+				EBBD5E642519A392007B174E /* BookSearchSubVC.m */,
+				EBBD5E682519CB4E007B174E /* BookLabelAllVC.h */,
+				EBBD5E692519CB4E007B174E /* BookLabelAllVC.m */,
+			);
+			path = BookSearch;
+			sourceTree = "<group>";
+		};
 		EBBEE5582498599300B135E4 /* Circle */ = {
 			isa = PBXGroup;
 			children = (
@@ -9221,6 +9306,31 @@
 			path = Controller;
 			sourceTree = "<group>";
 		};
+		EBD623D12515CBA3007FF6BC /* HomeSchoolSubVC */ = {
+			isa = PBXGroup;
+			children = (
+				EBCFCDE625185001002CD1B8 /* HomeSchollVideoVC.h */,
+				EBCFCDE725185001002CD1B8 /* HomeSchollVideoVC.m */,
+				EBD623F2251605F7007FF6BC /* CenterTouchTableView.h */,
+				EBD623F3251605F7007FF6BC /* CenterTouchTableView.m */,
+				EBD623EE251603CD007FF6BC /* SegmentVController.h */,
+				EBD623EF251603CD007FF6BC /* SegmentVController.m */,
+				EBD623E32515CC41007FF6BC /* FirstViewController.h */,
+				EBD623E22515CC41007FF6BC /* FirstViewController.m */,
+				EBD623D22515CBA3007FF6BC /* SecondViewController.h */,
+				EBD623D82515CBA3007FF6BC /* SecondViewController.m */,
+				EBD623D32515CBA3007FF6BC /* SegmentHeaderView.h */,
+				EBD623D72515CBA3007FF6BC /* SegmentHeaderView.m */,
+				EBD623D42515CBA3007FF6BC /* SegmentView.h */,
+				EBD623DB2515CBA3007FF6BC /* SegmentView.m */,
+				EBD623D62515CBA3007FF6BC /* ThirdViewController.h */,
+				EBD623D92515CBA3007FF6BC /* ThirdViewController.m */,
+				EBD623E62515CE24007FF6BC /* HomeSchoolHeadView.h */,
+				EBD623E72515CE24007FF6BC /* HomeSchoolHeadView.m */,
+			);
+			path = HomeSchoolSubVC;
+			sourceTree = "<group>";
+		};
 		EBDE08AD24581782005D426C /* common */ = {
 			isa = PBXGroup;
 			children = (
@@ -9475,10 +9585,12 @@
 				3264782723BF0B9600E0DC2D /* ArtticleComentCell.xib in Resources */,
 				EB8E2D5C239666A900CDFBDA /* chatbar_call_blue@2x.png in Resources */,
 				C7799F0423AB2C6E00270988 /* WorkFlowOrderController.xib in Resources */,
+				EBBD5E702519D66A007B174E /* BookListCell.xib in Resources */,
 				EB8E2D0E239666A900CDFBDA /* MWPhotoBrowser.bundle in Resources */,
 				C622708D236C09FC00E2E3BF /* mj_house_black@3x.png in Resources */,
 				EBBEE5632498763600B135E4 /* SynopsisCollectCell.xib in Resources */,
 				C703801223701018008EA3E4 /* MyApprovalDetailCell.xib in Resources */,
+				EBCFCDE425184621002CD1B8 /* HomeSchoolContentCell.xib in Resources */,
 				EBC2E146243C70520054E422 /* msg_bg_app@3x.png in Resources */,
 				C6227095236C09FC00E2E3BF /* mj_house@2x.png in Resources */,
 				EB8E2D96239666A900CDFBDA /* msg_img_broken@2x.png in Resources */,
@@ -9770,6 +9882,7 @@
 				C7D6BCA4235DA1CE00770E7C /* MyTableViewCell.xib in Resources */,
 				C7D6BC8D235DA1CE00770E7C /* MyClubApplicationViewController.xib in Resources */,
 				EB8E2D5F239666A900CDFBDA /* chatbar_camera@3x.png in Resources */,
+				EBBD5E762519D8BD007B174E /* BookListSubCell.xib in Resources */,
 				EB8E2D33239666A900CDFBDA /* icon_029_cover.png in Resources */,
 				EB1810992488C0DB009EDEF5 /* BookTextBookCell.xib in Resources */,
 				C7404E70238D23A600DB19AC /* AddPictureCell.xib in Resources */,
@@ -9865,6 +9978,7 @@
 				EBA25D5024D7FA3800CBEBF2 /* ShowSysVC.m in Sources */,
 				C59D0C0623825DE1007D0760 /* YYFrameImage.m in Sources */,
 				EB0DBF0A23AE1EF200E977ED /* NewWaitWorkVC.m in Sources */,
+				EBBD5E6F2519D66A007B174E /* BookListCell.m in Sources */,
 				324D961923A233A300C7D9E8 /* MyFavoriteVC.m in Sources */,
 				EB92E88C23B09AD4008E94CF /* GFCalendarView.m in Sources */,
 				C7D6BB45235DA18A00770E7C /* CommentModel.m in Sources */,
@@ -9979,6 +10093,7 @@
 				C7404E73238D2FA700DB19AC /* SelectImageModel.m in Sources */,
 				EB8E2D06239666A900CDFBDA /* PSTCollectionViewUpdateItem.m in Sources */,
 				326B92DC239F8EFD004230EB /* NoticeFindModel.m in Sources */,
+				EBD623DF2515CBA3007FF6BC /* ThirdViewController.m in Sources */,
 				EB9D659D248E032C00636BAC /* BookReadStlyeModel.m in Sources */,
 				C7EE367323BAFE6E002EB3BF /* FecordDetailsGoodsCell.m in Sources */,
 				C69A8E3D23754A660098FA26 /* FindPhotoOrVideoHeaderView.m in Sources */,
@@ -10075,6 +10190,7 @@
 				EB8E2CFA239666A900CDFBDA /* MWTapDetectingImageView.m in Sources */,
 				C7D6BCBE235DA1CE00770E7C /* BindMobileViewController.m in Sources */,
 				EBABAC85248B2FDF0033B985 /* CLSlider.m in Sources */,
+				EBCFCDE325184621002CD1B8 /* HomeSchoolContentCell.m in Sources */,
 				EBF7175724722D4B00ED1838 /* BookWCDetailVC.m in Sources */,
 				EBF2D55D23C2E9AC00EC35C4 /* MHCommentReply.m in Sources */,
 				C770406D23AC9F7300BFF1B0 /* MeetingListModel.m in Sources */,
@@ -10235,6 +10351,7 @@
 				EB095CE324D175DA00493536 /* ReplayLikeSearchVC.m in Sources */,
 				EB92E87523B061E8008E94CF /* WaitWorkLabelVC.m in Sources */,
 				C59D0C4723825DE1007D0760 /* YYDispatchQueuePool.m in Sources */,
+				EBD623C62515A9BE007FF6BC /* HomeSchoolVC.m in Sources */,
 				EB1810942488A5DF009EDEF5 /* BookTextBookModel.m in Sources */,
 				C788F19A236963980070A6B3 /* FavoriteTextCell.m in Sources */,
 				C7D6BCA5235DA1CE00770E7C /* AboutViewController.m in Sources */,
@@ -10257,6 +10374,7 @@
 				C7D6BBB8235DA18A00770E7C /* TabBar.m in Sources */,
 				C69A8E1D23753A150098FA26 /* CalenderWeekView.m in Sources */,
 				EBB6888123C9C1C900E24DD9 /* RichTextEditViewController.m in Sources */,
+				EBD623E02515CBA3007FF6BC /* SegmentView.m in Sources */,
 				C62270A1236C09FC00E2E3BF /* GHRefreshCollectionView.m in Sources */,
 				C625AACF2370125D0010E967 /* ChatMsgNoticeVC.m in Sources */,
 				EBD623192514A21C007FF6BC /* IndexMoreVC.m in Sources */,
@@ -10287,11 +10405,13 @@
 				EBCC209124B6EC7F001BDCDC /* GroupSquareSubModel.m in Sources */,
 				EB85BF53243DDD38006C7A82 /* ChatMsgTopSearchVC.m in Sources */,
 				EB8E2D78239666A900CDFBDA /* EMMsgRecallBubbleView.m in Sources */,
+				EBD623E82515CE24007FF6BC /* HomeSchoolHeadView.m in Sources */,
 				32C384D223B3636100BBC733 /* CreateInterLeterVC.m in Sources */,
 				EBD29F2D25022B8C00AEB04C /* BookListenVC.m in Sources */,
 				EBF2D56023C2EC1800EC35C4 /* MHDivider.m in Sources */,
 				EB8E2D12239666A900CDFBDA /* EMRefreshViewController.m in Sources */,
 				324D962523A245A100C7D9E8 /* MyFavoriteViewCell.m in Sources */,
+				EBBD5E662519A393007B174E /* BookSearchSubVC.m in Sources */,
 				C59D0C0523825DE1007D0760 /* YYImageCoder.m in Sources */,
 				EB440029247CB7AE0094C333 /* BookMingDetailVC.m in Sources */,
 				C7D6BB4E235DA18A00770E7C /* HorizonScroll.m in Sources */,
@@ -10318,6 +10438,7 @@
 				C72F3900236DADDC00933828 /* MyAboutVC.m in Sources */,
 				C62270A5236C09FC00E2E3BF /* DGThumbUpButton.m in Sources */,
 				EBD627D52429DD6500D91C9E /* ChatQrcodeVC.m in Sources */,
+				EBBD5E612519A2D8007B174E /* BookSearchVC.m in Sources */,
 				C7D6BB43235DA18A00770E7C /* HomeDetailController.m in Sources */,
 				EB92E87923B063AF008E94CF /* WaitWorkLabelCell.m in Sources */,
 				C69A8E4223754F7A0098FA26 /* ChatSearchFindbyFuJCell.m in Sources */,
@@ -10330,6 +10451,7 @@
 				EBF3C5192513356400D40A66 /* IndexSearchVC.m in Sources */,
 				EB8E2D21239666A900CDFBDA /* EMTextViewController.m in Sources */,
 				C701EE4A23C2D97800082463 /* InPutGongWenImageCell.m in Sources */,
+				EBD623F0251603CD007FF6BC /* SegmentVController.m in Sources */,
 				C7799EF423AB19EA00270988 /* WorkFlowOrderTopCell.m in Sources */,
 				EBCCD86424C2D7CD000D6689 /* MailGroupVC.m in Sources */,
 				EB8E2DA5239666A900CDFBDA /* EMChatViewController.m in Sources */,
@@ -10348,6 +10470,7 @@
 				C7D6BC95235DA1CE00770E7C /* ClubApplicationTableViewCell.m in Sources */,
 				C625AAA6236FEF130010E967 /* ZLCollectionReusableView.m in Sources */,
 				EBF2FB1424A34DD10028EA09 /* HomeUserVC.m in Sources */,
+				EBBD5E6A2519CB4E007B174E /* BookLabelAllVC.m in Sources */,
 				C7D6BC89235DA1CE00770E7C /* MyPaperViewController.m in Sources */,
 				C7D6BBAA235DA18A00770E7C /* TDTextView.m in Sources */,
 				C772299B23B5A7A700007B21 /* MyMeetingListModel.m in Sources */,
@@ -10475,11 +10598,13 @@
 				EBB6887423C9C0C300E24DD9 /* MMRichTextModel.m in Sources */,
 				C69A8DBF2372CFE70098FA26 /* ChineseString.m in Sources */,
 				EB8E2D2D239666A900CDFBDA /* EMReadReceiptMsgViewController.m in Sources */,
+				EBD623E42515CC41007FF6BC /* FirstViewController.m in Sources */,
 				EBB6887923C9C0C300E24DD9 /* MMRichTextCell.m in Sources */,
 				EB8E2D01239666A900CDFBDA /* PSTCollectionViewFlowLayout.m in Sources */,
 				C625AA7A236FB5A40010E967 /* ChatMsgCollectionCell.m in Sources */,
 				C75958A6237FFCC200AE85C0 /* Item.m in Sources */,
 				C77E217F23ADEE51009A230C /* WorkFlowOrderSelectedCell.m in Sources */,
+				EBD623DD2515CBA3007FF6BC /* SegmentHeaderView.m in Sources */,
 				EBD623BF25159A66007FF6BC /* WMZPageController.m in Sources */,
 				C75ACEDA236AAE5F00CB6374 /* MyTDGroupViewController.m in Sources */,
 				326B92D9239F78B8004230EB /* MoveViewController.m in Sources */,
@@ -10494,6 +10619,7 @@
 				EB568FC8239B7470000827B0 /* ChatJoinGroupVC.m in Sources */,
 				32580E5323AB9977005DF500 /* NoteBookDetailVC.m in Sources */,
 				EB96B89D23BF573B00EE09D7 /* NoteBookDetailCell.m in Sources */,
+				EBCFCDE825185002002CD1B8 /* HomeSchollVideoVC.m in Sources */,
 				EB629DFF2416206200A5E0EE /* _NoInputAccessoryView.m in Sources */,
 				EBF1A8C823B1EF6700FA6F4B /* WaitWorkModel.m in Sources */,
 				EB8E2D09239666A900CDFBDA /* PSTCollectionView.m in Sources */,
@@ -10527,6 +10653,7 @@
 				EB0F64D923AA529400AD56A0 /* TopicListSubModel.m in Sources */,
 				EBDE08B02458179B005D426C /* CommonHomeVC.m in Sources */,
 				C59D0C3623825DE1007D0760 /* NSData+YYAdd.m in Sources */,
+				EBD623EC2515FF8F007FF6BC /* HomeSCDetailVC.m in Sources */,
 				C7743F9D23A8B2D800973D70 /* WorkFlowHomeCell.m in Sources */,
 				EBF2D55423C2E8A000EC35C4 /* MHComment.m in Sources */,
 				EB38514624653A2200E28172 /* TDGroupLabelCell.m in Sources */,
@@ -10555,6 +10682,7 @@
 				EB568FC5239B47A3000827B0 /* ChatResultVC.m in Sources */,
 				C76FD29C238506E100E858F6 /* NodesModel.m in Sources */,
 				EB415146246BD1CB00030371 /* BookHomeModel.m in Sources */,
+				EBBD5E752519D8BD007B174E /* BookListSubCell.m in Sources */,
 				EB44409A24A1FF7400B2E212 /* HomeRecommendVC.m in Sources */,
 				C7D6BCB1235DA1CE00770E7C /* AccountAndSecurityViewController.m in Sources */,
 				C77E218323ADF55F009A230C /* SelectedTimeModel.m in Sources */,
@@ -10775,6 +10903,7 @@
 				EBFA3765240391A900A584FC /* WebDetailCell.m in Sources */,
 				C7D6BB3E235DA18A00770E7C /* HomeSearchController.m in Sources */,
 				EB8E2DB623989B1900CDFBDA /* chatInfoGroupChatModel.m in Sources */,
+				EBD623F4251605F7007FF6BC /* CenterTouchTableView.m in Sources */,
 				EB7955CF24C6B0BB00EE9A55 /* TopicBookCell.m in Sources */,
 				C795C62F23744CD00042300F /* GoDisscussView.m in Sources */,
 				C7D6BC7E235DA1CE00770E7C /* MyOrderViewController.m in Sources */,
@@ -10816,6 +10945,7 @@
 				EB820AD523BC48CF00B96C6C /* ChatMoveModel.m in Sources */,
 				EB8E2D05239666A900CDFBDA /* NSIndexPath+PSTCollectionViewAdditions.m in Sources */,
 				EBCC209424B726EC001BDCDC /* UILabel+YBAttributeTextTapAction.m in Sources */,
+				EBD623DE2515CBA3007FF6BC /* SecondViewController.m in Sources */,
 				EB1D158824C8329D00C82FED /* MoveMegAlert.m in Sources */,
 				EBDF42A324ADB91D00D5F0E4 /* BookSelectSubModel.m in Sources */,
 				C7E17CC0236D7F7800C53DB8 /* InPutGongWenCell.m in Sources */,

二進制
smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/UserInterfaceState.xcuserstate


+ 153 - 0
smartRhino.xcworkspace/xcuserdata/niuzhen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -14,5 +14,158 @@
             breakpointStackSelectionBehavior = "1">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+         <BreakpointContent
+            uuid = "6CF37C8C-C4E1-4F7A-B01F-A11006CECC15"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            breakpointStackSelectionBehavior = "1"
+            scope = "1"
+            stopOnStyle = "0">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
+         <BreakpointContent
+            uuid = "8174DE38-752F-404B-88DD-F92D0A855E38"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            symbolName = ""
+            moduleName = "">
+            <Locations>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C172EFA2-80F6-4EF7-9C9E-5F78AD2EBA93"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/common/View/CommonListCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "524"
+            endingLineNumber = "524"
+            landmarkName = "-setCellNoAuthorData:withText:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8D88C257-F3EB-4857-A83D-A302E37CEBA8"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/common/View/CommonListCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "682"
+            endingLineNumber = "682"
+            landmarkName = "-setCellData:withText:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "3EB0F968-5478-4B5D-8273-FE53B217A6FC"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/ChatMessage/Chat/EMChatViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2875"
+            endingLineNumber = "2875"
+            landmarkName = "-returnMessge"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "A1C7D0AD-ECE7-465C-8CAE-665D636AF2BD"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/MoveViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "462"
+            endingLineNumber = "462"
+            landmarkName = "-collectToFindWithSuperModel:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2C18A3FE-AA5F-4B35-80AB-FDD2143F45C2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/MoveViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "104"
+            endingLineNumber = "104"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "0EC2113C-F5FD-4A54-82D5-819FF0D71099"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1906"
+            endingLineNumber = "1906"
+            landmarkName = "-ShareDetail"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "42995D20-6D2F-449E-913B-2F4EFB98083C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1940"
+            endingLineNumber = "1940"
+            landmarkName = "-gotoZanHander"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8193419F-9824-4381-8122-AB928F6C322C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2835"
+            endingLineNumber = "2835"
+            landmarkName = "-userContentController:didReceiveScriptMessage:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 16 - 7
smartRhino/AppConfig.h

@@ -132,7 +132,7 @@ return;\
 #define MHObjectIsNil(__object)  ((nil == __object) || [__object isKindOfClass:[NSNull class]])
 
 //#define BaseUrl @"http://192.168.0.133:84"///广西
-//#define HtmlUrl @"http://192.168.0.113:8081"
+//#define HtmlUrl @"http://192.168.0.113:8080"
 //#define HtmlUrl @"http://192.168.0.114:8081"
 
 #define BaseUrl       @"https://apk.tederen.com/service"
@@ -180,15 +180,18 @@ return;\
 #define Modify_UserImages_Post @"/api/app/file/uploads"
 
 #pragma mark - 首页
-#define API_APP_PAGE_CATHEDRA   @"/api/app/page/cathedra"
-#define API_APP_PAGE_GooDText   @"/api/app/page/day-good-text"
-#define API_APP_Chat_Hear_Speak @"/api/app/page/chat-hear-speak"
+#define API_APP_PAGE_CATHEDRA    @"/api/app/page/cathedra"
+#define API_APP_PAGE_GooDText    @"/api/app/page/day-good-text"
+#define API_APP_Chat_Hear_Speak  @"/api/app/page/chat-hear-speak"
 
-#define API_APP_PAGE_Teacher @"/api/app/page/teacher"
-#define API_APP_PAGE_WE_BOOK @"/api/app/page/day-we-book"
+#define API_APP_PAGE_Teacher     @"/api/app/page/teacher"
+#define API_APP_PAGE_WE_BOOK     @"/api/app/page/day-we-book"
 
 #define API_APP_RANDOM_DAY_Skill @"/api/app/page/random-day-skill"
-#define API_APP_DAY_Skill @"/api/app/page/day-skill"
+#define API_APP_DAY_Skill        @"/api/app/page/day-skill"
+#define API_APP_PAGE_Press       @"/api/app/page/press"
+#define API_APP_Press            @"/api/app/press/"
+
 
 
 #pragma mark - 书城
@@ -603,6 +606,12 @@ return;\
 #define ISEmpty(content)   ([content isKindOfClass:[NSNull class]])
 #define ISEmptyNumber(num) ([num isKindOfClass:[NSNull class]] || !num)
 
+#define NAVIGATION_BAR_HEIGHT   44.f
+#define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height
+#define IsEnablePersonalCenterVCMainTableViewScroll @"IsEnablePersonalCenterVCMainTableViewScroll"
+#define CurrentSelectedChildViewControllerIndex @"CurrentSelectedChildViewControllerIndex"
+#define PersonalCenterVCBackingStatus @"PersonalCenterVCBackingStatus"
+
 #define SELECTNOTE            @"SELECTNOTE"
 #define SELECTCOLLECT         @"SELECTCOLLECT"
 #define CHATMENUBAR           @"CHATMENUBAR"

+ 4 - 1
smartRhino/AppDelegate.m

@@ -73,7 +73,7 @@
 {
     [[UMSocialGlobal shareInstance] setUniversalLinkDic:@{@(UMSocialPlatformType_WechatSession):@"https://apk.tederen.com",
                                                           @(UMSocialPlatformType_WechatTimeLine):@"https://apk.tederen.com",
-                                                          @(UMSocialPlatformType_QQ):@"https://apk.tederen.com",
+                                                          @(UMSocialPlatformType_QQ):@"https://apk.tederen.com/qq_conn/101901983",
                                                           @(UMSocialPlatformType_Sina):@"https://apk.tederen.com",
     }];
     [UMConfigure initWithAppkey:UMengAppKey channel:nil];
@@ -307,6 +307,9 @@
     });
 }
 - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
+    if (![[UMSocialManager defaultManager] handleUniversalLink:userActivity options:nil]) {
+        // 其他SDK的回调
+    }
     if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
         NSURL *webpageURL = userActivity.webpageURL;
         NSString * str = [webpageURL absoluteString];

+ 3 - 3
smartRhino/Assets.xcassets/Contents.json

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

+ 22 - 0
smartRhino/Assets.xcassets/HomeSchool_Play.imageset/Contents.json

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

二進制
smartRhino/Assets.xcassets/HomeSchool_Play.imageset/HomeSchool_Play@2x.png


二進制
smartRhino/Assets.xcassets/HomeSchool_Play.imageset/HomeSchool_Play@3x.png


+ 22 - 0
smartRhino/Assets.xcassets/book_lock.imageset/Contents.json

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

二進制
smartRhino/Assets.xcassets/book_lock.imageset/book_lock@2x.png


二進制
smartRhino/Assets.xcassets/book_lock.imageset/book_lock@3x.png


+ 21 - 0
smartRhino/Assets.xcassets/center_bg.imageset/Contents.json

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

二進制
smartRhino/Assets.xcassets/center_bg.imageset/center_bg.jpg


+ 5 - 1
smartRhino/FwzAppConfig.h

@@ -446,6 +446,9 @@ typedef enum HistorySearchType {
     HistorySearchType_GroupInfoUser = 22,
     ///
     HistorySearchType_NoteFolderSearch = 23,
+    ///
+    HistorySearchType_BookStore = 24,
+
 }HistorySearchType;
 
 /// 书城
@@ -471,7 +474,8 @@ typedef enum MediaType{
     MediaMusicType  = 40,  ///音频
     MediaQikanType  = 50,  ///期刊
     MediaVideoType  = 60,  ///视频
-    MediaArticeType = 101, ///文章
+    MediaArticeType = 100, ///文章
+    MediaMediaArticeType = 101, ///文章
 }MediaType;
 
 typedef enum PlayModelType{

+ 31 - 8
smartRhino/Project/Other/Third/Calender/NSDate+Extension.m

@@ -187,13 +187,6 @@
     NSInteger srcMonth = [srcComponents month];
     NSInteger srcDay = [srcComponents day];
     // 要额外显示的时间分钟
-    // 当年
-//    NSCalendarUnit type = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
-//
-//    NSDateComponents *cmps = [calendar components:type fromDate:currentDate toDate:dt options:0];
-//    // 4.输出结果
-//    NSLog(@"两个时间相差%ld年%ld月%ld日%ld小时%ld分钟%ld秒", cmps.year, cmps.month, cmps.day, cmps.hour, cmps.minute, cmps.second);
-    
     if(currentYear == srcYear) {
         long currentTimestamp = [self getIOSTimeStamp:currentDate];
         long srcTimestamp = [self getIOSTimeStamp:dt];
@@ -271,7 +264,37 @@
 + (NSString *)getMonthAndDayWihtDate:(NSString *)date
 {
     NSDate * dt = [self getStringDate:date format:@"yyyy-MM-dd HH:mm:ss"];
-    NSString * ret = [self getTimeString:dt format:@"MM-dd"];
+    NSString * ret = nil;
+    NSCalendar * calendar = [NSCalendar currentCalendar];
+    // 当前时间
+    NSDate * currentDate = [NSDate date];
+    NSDateComponents * curComponents = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitWeekday fromDate:currentDate];
+    NSInteger currentYear = [curComponents year];
+    NSInteger currentMonth = [curComponents month];
+    NSInteger currentDay = [curComponents day];
+    // 目标判断时间
+    NSDateComponents*srcComponents = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitWeekday fromDate:dt];
+    NSInteger srcYear = [srcComponents year];
+    NSInteger srcMonth = [srcComponents month];
+    NSInteger srcDay = [srcComponents day];
+    // 要额外显示的时间分钟
+    if(currentYear == srcYear) {
+        long currentTimestamp = [self getIOSTimeStamp:currentDate];
+        long srcTimestamp = [self getIOSTimeStamp:dt];
+        // 相差时间(单位:秒)
+        long delta = currentTimestamp - srcTimestamp;
+        // 当天(月份和日期一致才是)
+        if(currentMonth == srcMonth && currentDay == srcDay) {
+            // 时间相差60秒以内
+            ret = @"今天";
+        }else if(delta > 60 * 60 * 24 && delta <  60 * 60 * 48) {
+            ret = @"昨天";
+        }else{
+            ret = [self getTimeString:dt format:@"MM-dd"];
+        }
+    }else{/// 往年 2020-12-21
+        ret = [self getTimeString:dt format:@"MM-dd"];
+    }
     return ret;
 }
 @end

+ 9 - 0
smartRhino/Project/Tools/ZYCTool.m

@@ -414,6 +414,9 @@
     if (infoStr.length == 0) {
         return [[NSMutableAttributedString alloc] initWithString:@""];
     }
+    if (text.length == 0) {
+        return [[NSMutableAttributedString alloc] initWithString:infoStr];
+    }
     NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:infoStr];
     [attrString addAttribute:(NSString *)NSForegroundColorAttributeName
                        value:UIColorHex(EA3729)
@@ -425,6 +428,9 @@
     if (infoStr.length == 0) {
         return nil;
     }
+    if (text.length == 0) {
+        return [[NSMutableAttributedString alloc] initWithString:infoStr];
+    }
     NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:infoStr];
     [attrString addAttribute:(NSString *)NSForegroundColorAttributeName
                        value:color
@@ -436,6 +442,9 @@
     if (infoStr.length == 0) {
         return [[NSMutableAttributedString alloc] initWithString:@""];
     }
+    if (text.length == 0) {
+        return [[NSMutableAttributedString alloc] initWithString:infoStr];
+    }
     NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:infoStr];
     [attrString addAttribute:(NSString *)NSForegroundColorAttributeName
                        value:bgColor

+ 2 - 2
smartRhino/Project/VCModel/ChatMessage/Chat/EMChatViewController.h

@@ -24,9 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property(nonatomic, assign) NSInteger          listId;
 @property(nonatomic, assign) BOOL               isTop;
-@property(nonatomic, copy) SelectModel          * sModel;
+@property(nonatomic, strong) SelectModel          * sModel;
 
-@property (nonatomic, copy) FlowAttachmentsModel *   sendModel;///转发
+@property (nonatomic, strong) FlowAttachmentsModel *   sendModel;///转发
 @property (assign, nonatomic) BOOL                   isReturn;
 - (instancetype)initWithConversationId:(NSString *)aId
                                   type:(EMConversationType)aType

+ 39 - 0
smartRhino/Project/VCModel/ChatMessage/Chat/EMChatViewController.m

@@ -2935,6 +2935,45 @@
                 }];
             }
                 break;
+            case CollectModel_StoreBook:///文本
+            {
+                [self _sendTextAction:@"图书" ext:@{@"app":@(YES),
+                                                   @"app_type":@(CollectModel_StoreBook),
+                                                   @"app_title":self.sendModel.Title,
+                                                   @"app_id":@(self.sendModel.SoureId),
+                                                   @"app_content":ISEmpty(self.sendModel.Author) ? @"" : self.sendModel.Author,
+                                                   @"app_sourceUserId":@(self.sendModel.SourceUserId),
+                                                   @"app_min_url":self.sendModel.MinUrl,
+                                                   @"app_url":self.sendModel.Url
+                }];
+            }
+                break;
+            case CollectModel_StoreCousre:///文本
+            {
+                [self _sendTextAction:@"课程" ext:@{@"app":@(YES),
+                                                   @"app_type":@(CollectModel_StoreCousre),
+                                                   @"app_title":self.sendModel.Title,
+                                                   @"app_id":@(self.sendModel.SoureId),
+                                                   @"app_content":ISEmpty(self.sendModel.Author) ? @"" : self.sendModel.Author,
+                                                   @"app_sourceUserId":@(self.sendModel.SourceUserId),
+                                                   @"app_min_url":self.sendModel.MinUrl,
+                                                   @"app_url":self.sendModel.Url
+                }];
+            }
+                break;
+            case CollectModel_MediaAritle:///文本
+            {
+                [self _sendTextAction:@"文章" ext:@{@"app":@(YES),
+                                                   @"app_type":@(CollectModel_MediaAritle),
+                                                   @"app_title":self.sendModel.Title,
+                                                   @"app_id":@(self.sendModel.SoureId),
+                                                   @"app_content":ISEmpty(self.sendModel.Author) ? @"" : self.sendModel.Author,
+                                                   @"app_sourceUserId":@(self.sendModel.SourceUserId),
+                                                   @"app_min_url":self.sendModel.MinUrl,
+                                                   @"app_url":self.sendModel.Url
+                }];
+            }
+                break;
             default:
             {
                 [self _sendTextAction:@"出版统计" ext:@{@"app":@(YES),

+ 18 - 1
smartRhino/Project/VCModel/ChatMessage/Chat/MessageCell/BubbleView/EMMsgExtSmartBubbleView.m

@@ -74,7 +74,6 @@
             make.left.equalTo(self.iconView.mas_right).offset(5);
             make.right.equalTo(self).offset(-10);
         }];
-        
     }
 }
 
@@ -174,6 +173,12 @@
             self.iconView.image = IMG(@"审批");
         }
             break;
+        case CollectModel_StoreBook:
+        {
+            
+            [self.iconView sd_setImageWithURL:[NSURL URLWithString:[extDcit objectForKey:@"app_min_url"]] placeholderImage:IMG(@"default_audio")];
+        }
+            break;
         case CollectModel_StoreSound:
         {
             
@@ -201,6 +206,18 @@
             }
         }
             break;
+        case CollectModel_StoreCousre:
+        {
+            
+            [self.iconView sd_setImageWithURL:[NSURL URLWithString:[extDcit objectForKey:@"app_min_url"]] placeholderImage:IMG(@"icon_weizhiwenjian")];
+        }
+            break;
+        case CollectModel_MediaAritle:
+        {
+            
+            [self.iconView sd_setImageWithURL:[NSURL URLWithString:[extDcit objectForKey:@"app_min_url"]] placeholderImage:IMG(@"文章")];
+        }
+            break;
         case CollectModel_financeCount:
         {
             self.iconView.image = IMG(@"报表");

+ 6 - 3
smartRhino/Project/VCModel/ChatMessage/Controller/ChatMsgNotice/Controller/MoveViewController.m

@@ -326,8 +326,7 @@
             NoticeFindModel *tmpModel = self.noticeArray[indexPath.row - _placeholderCellCount];
             [self saveFinder:tmpModel];
         }
-    }
-    else {
+    }else {
         switch (self.collectType) {
             case CollectHanderType_Collect:
             {
@@ -366,7 +365,10 @@
             [[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_Move) parameters:dic responseStyle:DATA success:^(id  _Nonnull responseObject) {
                 REMOVESHOW
                 NSLog(@"%@",responseObject);
-                SHOWSUCCESS(@"移动成功");
+                SHOWSUCCESS(weakSelf.collectType == CollectHanderType_Collect ? @"收藏成功" : @"移动成功");
+                if (weakSelf.collectType == CollectHanderType_Collect) {
+                    
+                }
                 [weakSelf myBack];
             } failure:^(NSError * _Nonnull error) {
                 REMOVESHOW
@@ -490,6 +492,7 @@
                 || [vc isKindOfClass:NSClassFromString(@"CommonHomeVC")]
                 || [vc isKindOfClass:NSClassFromString(@"MyTDTopicBookVC")]
                 || [vc isKindOfClass:NSClassFromString(@"MyTDTopicDetailVC")]
+                || [vc isKindOfClass:NSClassFromString(@"HomeSCDetailVC")]                
                 || [vc isKindOfClass:NSClassFromString(@"NoteBookVC")]) {
                 [self.navigationController popToViewController:vc animated:YES];
                 return;

+ 1 - 1
smartRhino/Project/VCModel/ChatMessage/Controller/MailList/Controller/ShareListVC.h

@@ -11,7 +11,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface ShareListVC : BaseViewController
-@property (nonatomic, copy) FlowAttachmentsModel *   sendModel;
+@property (nonatomic, strong) FlowAttachmentsModel *   sendModel;
 @property (assign, nonatomic) BOOL                   isReturn;
 @property (nonatomic, assign) BOOL      isCheck;
 +(ShareListVC *)initShareListVC;

+ 5 - 0
smartRhino/Project/VCModel/Home/Model/HomeSubItemModel.h

@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString     *ImageUrls;
 @property (nonatomic, copy) NSString     *FileUrl;
 @property (nonatomic, copy) NSString     *ImageUrl;
+@property (nonatomic, copy) NSArray      *LableName;
+@property (nonatomic, copy) NSString     *ExtendLableName;
 @property (nonatomic, assign) BOOL        IsCollect;
 @property (nonatomic, copy) NSString     *Author;
 @property (nonatomic, copy) NSString     *Name;
@@ -25,10 +27,13 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString     *Press;
 @property (nonatomic, assign) NSInteger   PressId;
 @property (nonatomic, copy) NSString     *VideoImage;
+@property (nonatomic, copy) NSString     *VideoCoverImage;
 @property (nonatomic, assign) NSInteger   CollectCount;
 @property (nonatomic, assign) MediaType   MediaType;
 @property (nonatomic, assign) NSInteger   ReadCount;
 @property (nonatomic, assign) NSInteger   TeacherId;
+@property (nonatomic, strong) NSArray    *TeacherResult;
+@property (nonatomic, strong) NSArray    *Resource;
 @end
 
 NS_ASSUME_NONNULL_END

+ 1 - 0
smartRhino/Project/VCModel/Home/Model/HomeSubModel.h

@@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString     *Name;
 @property (nonatomic, assign) NSInteger   ResourceType;
 @property (nonatomic, assign) NSInteger   Id;
+@property (nonatomic, assign) NSInteger   Total;
 @property (nonatomic, copy) NSString     *ActionUrl;
 @property (nonatomic, copy) NSString     *Method;
 @property (nonatomic, assign) BOOL        IsPage;

+ 0 - 1
smartRhino/Project/VCModel/Home/OtherHomeVC/HomeSearch/HomeSearchController.m

@@ -781,7 +781,6 @@ static NSString * MyApprovalBCellID = @"MyApprovalBCell";
     WEAKSELF
     self.historyHeaderTitleView.rightAction = ^{
         
-       
         UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
         UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
             // 清空历史记录

+ 1 - 15
smartRhino/Project/VCModel/Home/OtherHomeVC/HomeSearch/View/SearchTypeSection.m

@@ -45,7 +45,6 @@
 
 - (void)setSectionTitle:(NSString *)title {
     _titleLabel.text = title;
-    CGFloat wHeight = self.frame.size.height;
     CGSize labelSize = [_titleLabel sizeThatFits:CGSizeZero];
     _titleLabel.frame = CGRectMake(15, 16, labelSize.width, labelSize.height);
 
@@ -53,9 +52,7 @@
 
 - (void)setButtonTitle:(NSString *)title {
     [_rightButton setTitle:title forState:UIControlStateNormal];
-    CGFloat wHeight = self.frame.size.height;
     CGSize buttonSize = [_rightButton sizeThatFits:CGSizeZero];
-//    _rightButton.frame = CGRectMake(kGXScreenWidth-15-buttonSize.width, (wHeight-buttonSize.height)/2.0, buttonSize.width, buttonSize.height);
       _rightButton.frame = CGRectMake(kGXScreenWidth-15-buttonSize.width, 16, buttonSize.width,13);
 }
 - (void)setSectionTitle:(NSString *)title setButtonTitle:(NSString *)buttonTitle{
@@ -64,20 +61,9 @@
     _rightButton.frame = CGRectMake(kGXScreenWidth-15-buttonSize.width, 16, buttonSize.width, buttonSize.height);
         
     _titleLabel.text = title;
-        
-    CGFloat wHeight = self.frame.size.height;
-        
     CGSize labelSize = [_titleLabel sizeThatFits:CGSizeZero];
-        
-//    buttonSize.height/2 + 16  - labelSize.height/2
-    
-    
     _titleLabel.frame = CGRectMake(15, buttonSize.height/2 + 16  - labelSize.height/2, labelSize.width, labelSize.height);
-      
-    
-    
-    
-   
+
 }
 - (void)rightAction:(TDButton *)sender {
     if (self.rightAction) {

+ 172 - 16
smartRhino/Project/VCModel/Home/OtherHomeVC/MyTDTopic/VC/MyTDTopicDetailVC.m

@@ -169,6 +169,13 @@
             [self setMailBottomView:NO];
         }
             break;
+        case CollectModel_MediaAritle:
+        {
+            self.titleL.text = @"正文";
+            self.musicBtn.hidden = NO;
+            [self setMailBottomView:NO];
+        }
+            break;
         case CollectModel_meetMian:
         {
             self.titleL.text = @"会议纪要";
@@ -767,6 +774,83 @@
         });
     });
 }
+
+- (void)getMediaAritle{
+    WS(weakSelf);
+    dispatch_semaphore_t sem = dispatch_semaphore_create(0);
+    __block NSInteger httpFinishCount = 0;
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        NSString * url = [NSString stringWithFormat:@"%@%ld",Host(API_APP_Media),weakSelf.Id];
+        [[HttpManager sharedHttpManager] GETUrl:url parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+            NSLog(@"%@",responseObject);
+            weakSelf.currentNoteModel = [[MyNoteBookDetailModel alloc]initWithDictionary:responseObject error:nil];
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        } failure:^(NSError * _Nonnull error) {
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        }];
+        NSDictionary * comParaDict = @{@"ArticleId":@(self.Id),
+                                       @"TypeValue":@([self backTypeValue]),//会议 10
+                                       @"Page":@(self.currentPage),
+                                       @"PerPage":@(20),
+                                       @"sort":weakSelf.isSort ? @"asc":@"desc"
+        };
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Comment_List) parameters:comParaDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+            NSLog(@"评论数据列表%@",responseObject);
+            if ([responseObject isKindOfClass:[NSDictionary class]]) {
+                if ([responseObject[@"Items"] isKindOfClass:[NSArray class]]) {
+                    for (NSDictionary * dict in responseObject[@"Items"]) {
+                        MHTopic * topic = [MHTopic modelWithDictionary:dict];
+                        if ([[dict objectForKey:@"TopicCommentReplyResults"] isKindOfClass:[NSArray class]]) {
+                            NSMutableArray * subArray = [NSMutableArray array];
+                            for (NSDictionary * subDict in dict[@"TopicCommentReplyResults"]) {
+                                MHComment * commentModel = [MHComment modelWithDictionary:subDict];
+                                [subArray addObject:commentModel];
+                            }
+                            topic.CommentReplyResults = [NSMutableArray arrayWithArray:subArray];
+                        }
+                        [weakSelf.commentArray addObject:[weakSelf _topicFrameWithTopic:topic]];
+                    }
+                }
+            }
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        } failure:^(NSError * _Nonnull error) {
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        }];
+        NSDictionary * AnaParaDict = @{@"SourceId":@(self.Id),
+                                       @"TypeValue":@([self backTypeValue]),//会议 10
+                                       @"Page":@(1),
+                                       @"PerPage":@(20),
+                                       @"sort":@""
+        };
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Analyze_List) parameters:AnaParaDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+            NSLog(@"点赞列表%@",responseObject);
+            weakSelf.currentZanModel = [[MyNodeBookZanModel alloc]initWithDictionary:responseObject error:nil];
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        } failure:^(NSError * _Nonnull error) {
+            if (++httpFinishCount == 3) {
+                dispatch_semaphore_signal(sem);
+            }
+        }];
+        dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView.mj_header endRefreshing];
+            [weakSelf.tableView.mj_footer endRefreshing];
+            [weakSelf setBottomViewData:weakSelf.currentNoteModel];
+            [weakSelf.tableView reloadData];
+        });
+    });
+}
+
 - (void)getMail
 {
     WS(weakSelf);
@@ -1006,6 +1090,58 @@
         });
     });
 }
+
+- (void)refreshMediaAritleData
+{
+    WS(weakSelf);
+    SHOWLOADING
+    dispatch_semaphore_t sem = dispatch_semaphore_create(0);
+    __block NSInteger httpFinishCount = 0;
+    [[HttpManager sharedHttpManager] cancelRequest];
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        NSString * url = [NSString stringWithFormat:@"%@%ld",Host(API_APP_Media),weakSelf.Id];
+        [[HttpManager sharedHttpManager] GETUrl:url parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+            NSLog(@"%@",responseObject);
+            if ([responseObject isKindOfClass:[NSDictionary class]]) {
+                weakSelf.currentNoteModel = [[MyNoteBookDetailModel alloc]initWithDictionary:responseObject error:nil];
+                if (++httpFinishCount == 2) {
+                    dispatch_semaphore_signal(sem);
+                }
+            }else{
+                NSLog(@"asfasfas");
+            }
+        } failure:^(NSError * _Nonnull error) {
+            if (++httpFinishCount == 2) {
+                dispatch_semaphore_signal(sem);
+            }
+        }];
+        NSDictionary * AnaParaDict = @{@"SourceId":@(self.Id),
+                                       @"TypeValue":@([self backTypeValue]),//会议 10
+                                       @"Page":@(1),
+                                       @"PerPage":@(20),
+                                       @"sort":@""
+        };
+        [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Analyze_List) parameters:AnaParaDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+            NSLog(@"点赞列表%@",responseObject);
+            weakSelf.currentZanModel = [[MyNodeBookZanModel alloc]initWithDictionary:responseObject error:nil];
+            if (++httpFinishCount == 2) {
+                dispatch_semaphore_signal(sem);
+            }
+        } failure:^(NSError * _Nonnull error) {
+            if (++httpFinishCount == 2) {
+                dispatch_semaphore_signal(sem);
+            }
+        }];
+        dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
+        dispatch_async(dispatch_get_main_queue(), ^{
+            REMOVESHOW
+            [weakSelf.tableView.mj_header endRefreshing];
+            [weakSelf.tableView.mj_footer endRefreshing];
+            [weakSelf setBottomViewData:weakSelf.currentNoteModel];
+            [weakSelf.tableView reloadData];
+        });
+    });
+}
 - (MHTopicFrame *)_topicFrameWithTopic:(MHTopic *)topic
 {
     MHTopicFrame *topicFrame = [[MHTopicFrame alloc] init];
@@ -1115,6 +1251,11 @@
             [self getAritle];
         }
             break;
+        case CollectModel_MediaAritle:
+        {
+            [self getMediaAritle];
+        }
+            break;
         default:
             break;
     }
@@ -1389,20 +1530,16 @@
             [self.navigationController pushViewController:vc animated:YES];
         }break;
         case CollectModel_Aritle:{
-            SHOWLOADING
-            [[HttpManager sharedHttpManager] GETWithUrl:[NSString stringWithFormat:@"%@%ld",Article_Detail_Get,(long)Id] parameters:@{} success:^(id  _Nonnull responseObject) {
-                REMOVESHOW;
-                Item *itemModel = [[Item alloc]initWithDictionary:responseObject error:nil];
-                //                HomeDetailController *homeDetail = [[HomeDetailController alloc] init];
-                //                [homeDetail loadCurrentModel:itemModel];
-                //                [weakSelf.navigationController pushViewController:homeDetail animated:YES];
-                MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
-                vc.type = CollectModel_Aritle;
-                vc.Id = itemModel.Id;
-                [weakSelf.navigationController pushViewController:vc animated:YES];
-            } failure:^(NSError * _Nonnull error) {
-                //                SHOWERROR([ZYCTool handerResultData:error]);
-            }];
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_Aritle;
+            vc.Id = Id;
+            [weakSelf.navigationController pushViewController:vc animated:YES];
+        }break;
+        case CollectModel_MediaAritle:{
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_Aritle;
+            vc.Id = Id;
+            [weakSelf.navigationController pushViewController:vc animated:YES];
         }break;
         case CollectModel_Notice:{
             MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
@@ -2301,8 +2438,12 @@
         NSLog(@"data:%@",data);
         NSLog(@"error:%@",error);
     }];
-    [self refreshData];
-    self.IsCollect = YES;
+    NSLog(@"12313");
+    WS(weakSelf);
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf refreshData];
+        weakSelf.IsCollect = YES;
+    });
 }
 - (NSMutableArray<MyNoteBookCommentSubModel *> *)commentArray{
     if (!_commentArray) {
@@ -2557,6 +2698,11 @@
             url = @"/mobile/mainTextWeb";
         }
             break;
+        case CollectModel_MediaAritle:
+        {
+            url = @"/mobile/periodicalWeb";
+        }
+            break;
         case CollectModel_Group:
         {
             url = @"/mobile/topicDetails";
@@ -2869,6 +3015,11 @@
             return 100;
         }
             break;
+        case CollectModel_MediaAritle:
+        {
+            return 101;
+        }
+            break;
         case CollectModel_Group:
         {
             return 1;
@@ -2924,6 +3075,11 @@
             [self refreshAritleData];
         }
             break;
+        case CollectModel_MediaAritle:
+        {
+            [self refreshMediaAritleData];
+        }
+            break;
         case CollectModel_Group:
         {
             [self refreshTopicData];

+ 157 - 39
smartRhino/Project/VCModel/Home/VC/BookStore/BookDetail.storyboard

@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ap2-Fm-VRO">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ap2-Fm-VRO">
     <device id="retina5_5" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -81,6 +82,7 @@
                                         </constraints>
                                     </view>
                                 </subviews>
+                                <viewLayoutGuide key="safeArea" id="N9b-tS-8Mg"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="64" id="4EF-wU-gZO"/>
@@ -88,14 +90,13 @@
                                     <constraint firstItem="aUD-lO-tmd" firstAttribute="trailing" secondItem="N9b-tS-8Mg" secondAttribute="trailing" id="f1z-zl-Uws"/>
                                     <constraint firstItem="N9b-tS-8Mg" firstAttribute="bottom" secondItem="aUD-lO-tmd" secondAttribute="bottom" id="m99-fB-zcD"/>
                                 </constraints>
-                                <viewLayoutGuide key="safeArea" id="N9b-tS-8Mg"/>
                                 <connections>
                                     <outlet property="height" destination="4EF-wU-gZO" id="qe0-R5-HtA"/>
                                 </connections>
                             </view>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="P7O-Ou-oGU">
                                 <rect key="frame" x="0.0" y="64" width="414" height="614"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                 <view key="tableFooterView" contentMode="scaleToFill" id="lj7-Oq-cLf">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="483"/>
                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -132,11 +133,11 @@
                                                             <color key="textColor" red="0.36470588235294116" green="0.39215686274509803" blue="0.43137254901960786" alpha="1" colorSpace="calibratedRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0ta-cs-44R">
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0ta-cs-44R">
                                                             <rect key="frame" x="0.0" y="0.0" width="75.666666666666671" height="38"/>
                                                         </button>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <constraints>
                                                         <constraint firstAttribute="bottom" secondItem="1cg-E4-3p3" secondAttribute="bottom" id="CMn-Qb-FOt"/>
                                                         <constraint firstAttribute="trailing" secondItem="0ta-cs-44R" secondAttribute="trailing" id="GXe-Bp-W6d"/>
@@ -164,11 +165,11 @@
                                                             <color key="textColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bJN-iW-qqI">
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bJN-iW-qqI">
                                                             <rect key="frame" x="0.0" y="0.0" width="75.666666666666671" height="38"/>
                                                         </button>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <constraints>
                                                         <constraint firstItem="Z0T-nw-txt" firstAttribute="top" secondItem="L4Y-oE-dKI" secondAttribute="top" id="3gg-cc-iP7"/>
                                                         <constraint firstAttribute="trailing" secondItem="bJN-iW-qqI" secondAttribute="trailing" id="B2m-mq-5I6"/>
@@ -196,11 +197,11 @@
                                                             <color key="textColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kd8-9Z-hEX">
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kd8-9Z-hEX">
                                                             <rect key="frame" x="0.0" y="0.0" width="75.333333333333329" height="38"/>
                                                         </button>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <constraints>
                                                         <constraint firstAttribute="bottom" secondItem="jFU-Wv-bf7" secondAttribute="bottom" id="BLK-MO-NqL"/>
                                                         <constraint firstItem="kd8-9Z-hEX" firstAttribute="leading" secondItem="zlu-XQ-W6y" secondAttribute="leading" id="Fs0-Ct-ZCK"/>
@@ -228,11 +229,11 @@
                                                             <color key="textColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wpv-zM-j5F">
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wpv-zM-j5F">
                                                             <rect key="frame" x="0.0" y="0.0" width="75.666666666666671" height="38"/>
                                                         </button>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <constraints>
                                                         <constraint firstItem="oHA-2l-LYb" firstAttribute="centerX" secondItem="XcL-jV-FGF" secondAttribute="centerX" id="3u8-xl-Ce7"/>
                                                         <constraint firstAttribute="trailing" secondItem="wpv-zM-j5F" secondAttribute="trailing" id="50T-Ej-fzP"/>
@@ -260,11 +261,11 @@
                                                             <color key="textColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                                             <nil key="highlightedColor"/>
                                                         </label>
-                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XnJ-z7-0sw">
+                                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XnJ-z7-0sw">
                                                             <rect key="frame" x="0.0" y="0.0" width="75.666666666666671" height="38"/>
                                                         </button>
                                                     </subviews>
-                                                    <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <constraints>
                                                         <constraint firstItem="tGw-5b-1pd" firstAttribute="centerX" secondItem="8mV-Li-hnI" secondAttribute="centerX" id="0id-W4-tEE"/>
                                                         <constraint firstAttribute="bottom" secondItem="XnJ-z7-0sw" secondAttribute="bottom" id="DNA-nF-oxw"/>
@@ -299,7 +300,7 @@
                                         </button>
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nlb-xS-SnT">
                                             <rect key="frame" x="54" y="270" width="306" height="40"/>
-                                            <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="40" id="w93-OO-tuA"/>
                                             </constraints>
@@ -336,7 +337,7 @@
                                             <color key="textColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                         </label>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3fX-e0-tqr">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3fX-e0-tqr">
                                             <rect key="frame" x="217" y="433" width="88" height="26"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="26" id="Nhd-m2-rKl"/>
@@ -347,7 +348,7 @@
                                                 <color key="titleColor" red="0.36470588240000001" green="0.3921568627" blue="0.43137254899999999" alpha="1" colorSpace="calibratedRGB"/>
                                             </state>
                                         </button>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wiC-yM-Rvq">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wiC-yM-Rvq">
                                             <rect key="frame" x="109" y="433" width="88" height="26"/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="88" id="e8U-Nd-Uir"/>
@@ -444,14 +445,14 @@
                                                     <constraint firstAttribute="width" constant="31" id="wGQ-WO-Y06"/>
                                                 </constraints>
                                             </view>
-                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3LS-4r-A9N">
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3LS-4r-A9N">
                                                 <rect key="frame" x="0.0" y="0.0" width="141" height="42"/>
                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <state key="normal">
                                                     <color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 </state>
                                             </button>
-                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vzp-GC-0Ih">
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vzp-GC-0Ih">
                                                 <rect key="frame" x="141" y="0.0" width="36" height="42"/>
                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <state key="normal">
@@ -459,7 +460,7 @@
                                                 </state>
                                             </button>
                                         </subviews>
-                                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                         <constraints>
                                             <constraint firstAttribute="bottom" secondItem="Vzp-GC-0Ih" secondAttribute="bottom" id="0kb-P6-d41"/>
                                             <constraint firstAttribute="bottom" secondItem="3LS-4r-A9N" secondAttribute="bottom" id="3fj-Bg-7I6"/>
@@ -501,7 +502,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RFG-r7-mlR">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RFG-r7-mlR">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -534,7 +535,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rgz-Kp-PPB">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rgz-Kp-PPB">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -567,7 +568,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="76t-l2-xQ4">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="76t-l2-xQ4">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -617,7 +618,8 @@
                                 </constraints>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                        <viewLayoutGuide key="safeArea" id="7c1-e0-9St"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="JGf-bU-2Dn" firstAttribute="leading" secondItem="DUl-bS-JUQ" secondAttribute="leading" id="1Qn-RF-Ryu"/>
                             <constraint firstItem="JGf-bU-2Dn" firstAttribute="top" secondItem="P7O-Ou-oGU" secondAttribute="bottom" id="5GT-8t-bvA"/>
@@ -630,7 +632,6 @@
                             <constraint firstItem="7c1-e0-9St" firstAttribute="trailing" secondItem="P7O-Ou-oGU" secondAttribute="trailing" id="g3z-GR-Hbx"/>
                             <constraint firstItem="hCB-eT-rx4" firstAttribute="leading" secondItem="7c1-e0-9St" secondAttribute="leading" id="rMd-z6-kZq"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="7c1-e0-9St"/>
                     </view>
                     <navigationItem key="navigationItem" id="NKA-Hb-T1U"/>
                     <connections>
@@ -731,6 +732,7 @@
                                         </constraints>
                                     </view>
                                 </subviews>
+                                <viewLayoutGuide key="safeArea" id="nhs-mN-4Ir"/>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstItem="iCX-zQ-Hin" firstAttribute="trailing" secondItem="nhs-mN-4Ir" secondAttribute="trailing" id="0LN-Gw-4jm"/>
@@ -738,14 +740,13 @@
                                     <constraint firstAttribute="height" constant="64" id="KOx-D4-EGo"/>
                                     <constraint firstItem="nhs-mN-4Ir" firstAttribute="bottom" secondItem="iCX-zQ-Hin" secondAttribute="bottom" id="Lv3-D9-gcD"/>
                                 </constraints>
-                                <viewLayoutGuide key="safeArea" id="nhs-mN-4Ir"/>
                                 <connections>
                                     <outlet property="height" destination="KOx-D4-EGo" id="k2p-6G-IS9"/>
                                 </connections>
                             </view>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="wIA-Q2-9p0">
                                 <rect key="frame" x="0.0" y="64" width="414" height="614"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                             </tableView>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="REM-Od-qjm">
                                 <rect key="frame" x="0.0" y="678" width="414" height="58"/>
@@ -793,14 +794,14 @@
                                                     <constraint firstAttribute="trailing" secondItem="LGI-QV-IF3" secondAttribute="trailing" id="qkG-H4-Uzk"/>
                                                 </constraints>
                                             </view>
-                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Vk-hT-eLl">
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Vk-hT-eLl">
                                                 <rect key="frame" x="0.0" y="0.0" width="141" height="42"/>
                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <state key="normal">
                                                     <color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 </state>
                                             </button>
-                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O1g-lD-nvs">
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O1g-lD-nvs">
                                                 <rect key="frame" x="141" y="0.0" width="36" height="42"/>
                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                 <state key="normal">
@@ -808,7 +809,7 @@
                                                 </state>
                                             </button>
                                         </subviews>
-                                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                         <constraints>
                                             <constraint firstAttribute="trailing" secondItem="8AY-Yn-wL6" secondAttribute="trailing" constant="5" id="3t4-J3-DIb"/>
                                             <constraint firstItem="GUk-Jz-UGT" firstAttribute="leading" secondItem="bIM-H0-YZR" secondAttribute="leading" constant="10" id="BJX-Ou-NWW"/>
@@ -850,7 +851,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tgn-sm-AGM">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tgn-sm-AGM">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -883,7 +884,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g3t-g1-qmK">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g3t-g1-qmK">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -916,7 +917,7 @@
                                                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                 <nil key="highlightedColor"/>
                                                             </label>
-                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Oyi-59-pkD">
+                                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Oyi-59-pkD">
                                                                 <rect key="frame" x="0.0" y="0.0" width="62.333333333333336" height="58"/>
                                                                 <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                                 <state key="normal">
@@ -966,7 +967,8 @@
                                 </constraints>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                        <viewLayoutGuide key="safeArea" id="kkE-2f-FQW"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="wIA-Q2-9p0" firstAttribute="leading" secondItem="kkE-2f-FQW" secondAttribute="leading" id="Akt-Pt-yKR"/>
                             <constraint firstItem="kkE-2f-FQW" firstAttribute="trailing" secondItem="wIA-Q2-9p0" secondAttribute="trailing" id="BMd-gu-iJX"/>
@@ -979,7 +981,6 @@
                             <constraint firstItem="GdV-0j-3YV" firstAttribute="top" secondItem="Hol-8b-Ix8" secondAttribute="top" id="ldj-de-XiC"/>
                             <constraint firstItem="wIA-Q2-9p0" firstAttribute="top" secondItem="GdV-0j-3YV" secondAttribute="bottom" id="zam-yZ-asz"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="kkE-2f-FQW"/>
                     </view>
                     <navigationItem key="navigationItem" id="EDZ-fF-hAR"/>
                     <connections>
@@ -1070,6 +1071,7 @@
                                         </constraints>
                                     </view>
                                 </subviews>
+                                <viewLayoutGuide key="safeArea" id="0su-th-084"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstItem="d6G-vl-Egn" firstAttribute="leading" secondItem="0su-th-084" secondAttribute="leading" id="Gyk-z6-AWL"/>
@@ -1077,17 +1079,17 @@
                                     <constraint firstItem="0su-th-084" firstAttribute="bottom" secondItem="d6G-vl-Egn" secondAttribute="bottom" id="m3w-uT-OpN"/>
                                     <constraint firstAttribute="height" constant="64" id="pwF-Yw-RgV"/>
                                 </constraints>
-                                <viewLayoutGuide key="safeArea" id="0su-th-084"/>
                                 <connections>
                                     <outlet property="height" destination="pwF-Yw-RgV" id="WmD-qS-FTh"/>
                                 </connections>
                             </view>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="5Dj-4S-fYh">
                                 <rect key="frame" x="0.0" y="64" width="414" height="672"/>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                             </tableView>
                         </subviews>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                        <viewLayoutGuide key="safeArea" id="fTj-f4-TTG"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="5Dj-4S-fYh" firstAttribute="leading" secondItem="fTj-f4-TTG" secondAttribute="leading" id="04P-JP-5qi"/>
                             <constraint firstItem="fTj-f4-TTG" firstAttribute="bottom" secondItem="5Dj-4S-fYh" secondAttribute="bottom" id="GDL-q2-PPF"/>
@@ -1097,7 +1099,6 @@
                             <constraint firstItem="fTj-f4-TTG" firstAttribute="trailing" secondItem="5Dj-4S-fYh" secondAttribute="trailing" id="oab-if-XNk"/>
                             <constraint firstItem="EgR-1f-VfT" firstAttribute="trailing" secondItem="fTj-f4-TTG" secondAttribute="trailing" id="xFz-Va-2ec"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="fTj-f4-TTG"/>
                     </view>
                     <navigationItem key="navigationItem" id="bbL-3m-WuI"/>
                     <connections>
@@ -1109,6 +1110,120 @@
             </objects>
             <point key="canvasLocation" x="1235" y="95"/>
         </scene>
+        <!--Book Label AllVC-->
+        <scene sceneID="veR-jx-1m8">
+            <objects>
+                <viewController storyboardIdentifier="BookLabelAllVC" id="643-tT-fv4" customClass="BookLabelAllVC" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="OzT-3h-z6B">
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Exw-kL-upX" customClass="WQNavigationBar">
+                                <rect key="frame" x="0.0" y="0.0" width="414" height="64"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lhg-Gp-m0l" customClass="WQNavigationBar">
+                                        <rect key="frame" x="0.0" y="0.0" width="414" height="64"/>
+                                        <subviews>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ztX-h4-6jJ">
+                                                <rect key="frame" x="0.0" y="20" width="414" height="44"/>
+                                                <subviews>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gyy-52-FRv">
+                                                        <rect key="frame" x="0.0" y="0.0" width="50" height="44"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="height" constant="44" id="n9r-bE-4sa"/>
+                                                            <constraint firstAttribute="width" constant="50" id="y8F-7y-uTn"/>
+                                                        </constraints>
+                                                        <state key="normal" image="back_black_icon"/>
+                                                        <connections>
+                                                            <action selector="backAction:" destination="643-tT-fv4" eventType="touchUpInside" id="ZSX-ks-rrh"/>
+                                                        </connections>
+                                                    </button>
+                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fkk-dI-sHG">
+                                                        <rect key="frame" x="50" y="0.0" width="35" height="44"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="35" id="DbR-Te-oRo"/>
+                                                            <constraint firstAttribute="height" constant="44" id="hQ6-fj-mEl"/>
+                                                        </constraints>
+                                                        <state key="normal" image="menu_black_icon"/>
+                                                        <connections>
+                                                            <action selector="menuAction:" destination="643-tT-fv4" eventType="touchUpInside" id="0PV-gP-AU8"/>
+                                                        </connections>
+                                                    </button>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AFQ-Bq-JGa">
+                                                        <rect key="frame" x="207" y="22" width="0.0" height="0.0"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                                        <color key="textColor" red="0.039215686270000001" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                <constraints>
+                                                    <constraint firstItem="fkk-dI-sHG" firstAttribute="bottom" secondItem="Gyy-52-FRv" secondAttribute="bottom" id="DTT-3D-Czr"/>
+                                                    <constraint firstItem="AFQ-Bq-JGa" firstAttribute="centerY" secondItem="Gyy-52-FRv" secondAttribute="centerY" id="QjJ-QH-8D4"/>
+                                                    <constraint firstAttribute="height" constant="44" id="cCZ-r8-n0N"/>
+                                                    <constraint firstItem="fkk-dI-sHG" firstAttribute="leading" secondItem="Gyy-52-FRv" secondAttribute="trailing" id="gj6-PI-wZY"/>
+                                                    <constraint firstItem="AFQ-Bq-JGa" firstAttribute="centerX" secondItem="ztX-h4-6jJ" secondAttribute="centerX" id="hNa-0r-dSN"/>
+                                                    <constraint firstItem="Gyy-52-FRv" firstAttribute="leading" secondItem="ztX-h4-6jJ" secondAttribute="leading" id="jrW-tZ-xkC"/>
+                                                    <constraint firstAttribute="bottom" secondItem="Gyy-52-FRv" secondAttribute="bottom" id="uVC-HB-jGY"/>
+                                                    <constraint firstItem="fkk-dI-sHG" firstAttribute="top" secondItem="Gyy-52-FRv" secondAttribute="top" id="xqh-98-RY3"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="64" id="6ZN-fc-k16"/>
+                                            <constraint firstAttribute="bottom" secondItem="ztX-h4-6jJ" secondAttribute="bottom" id="RcL-qm-yeT"/>
+                                            <constraint firstItem="ztX-h4-6jJ" firstAttribute="trailing" secondItem="lhg-Gp-m0l" secondAttribute="trailing" id="WeA-he-w0w"/>
+                                            <constraint firstItem="ztX-h4-6jJ" firstAttribute="leading" secondItem="lhg-Gp-m0l" secondAttribute="leading" id="loq-vj-Bi6"/>
+                                        </constraints>
+                                        <connections>
+                                            <outlet property="height" destination="6ZN-fc-k16" id="I7f-WM-dl0"/>
+                                        </connections>
+                                    </view>
+                                </subviews>
+                                <viewLayoutGuide key="safeArea" id="Km8-YO-1Kp"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <constraints>
+                                    <constraint firstItem="lhg-Gp-m0l" firstAttribute="trailing" secondItem="Km8-YO-1Kp" secondAttribute="trailing" id="QTS-RR-22n"/>
+                                    <constraint firstItem="lhg-Gp-m0l" firstAttribute="leading" secondItem="Km8-YO-1Kp" secondAttribute="leading" id="UBf-Bs-pKk"/>
+                                    <constraint firstAttribute="height" constant="64" id="rjk-Xe-0hg"/>
+                                    <constraint firstItem="lhg-Gp-m0l" firstAttribute="bottom" secondItem="Km8-YO-1Kp" secondAttribute="bottom" id="t9q-tk-MUQ"/>
+                                </constraints>
+                                <connections>
+                                    <outlet property="height" destination="rjk-Xe-0hg" id="Mrg-16-yK2"/>
+                                </connections>
+                            </view>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="84N-jF-zwg">
+                                <rect key="frame" x="0.0" y="64" width="414" height="672"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <connections>
+                                    <outlet property="dataSource" destination="643-tT-fv4" id="NfY-JF-m3J"/>
+                                    <outlet property="delegate" destination="643-tT-fv4" id="74K-JE-EsE"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <viewLayoutGuide key="safeArea" id="5K8-2M-phM"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="Exw-kL-upX" firstAttribute="trailing" secondItem="5K8-2M-phM" secondAttribute="trailing" id="NtJ-a9-bEp"/>
+                            <constraint firstItem="Exw-kL-upX" firstAttribute="leading" secondItem="5K8-2M-phM" secondAttribute="leading" id="cZl-zo-V7Y"/>
+                            <constraint firstItem="Exw-kL-upX" firstAttribute="top" secondItem="OzT-3h-z6B" secondAttribute="top" id="m35-uA-0ol"/>
+                            <constraint firstItem="84N-jF-zwg" firstAttribute="leading" secondItem="5K8-2M-phM" secondAttribute="leading" id="nLM-z3-Q8s"/>
+                            <constraint firstItem="84N-jF-zwg" firstAttribute="top" secondItem="Exw-kL-upX" secondAttribute="bottom" id="qzp-Ik-F4e"/>
+                            <constraint firstItem="5K8-2M-phM" firstAttribute="bottom" secondItem="84N-jF-zwg" secondAttribute="bottom" id="sNN-bW-hVr"/>
+                            <constraint firstItem="5K8-2M-phM" firstAttribute="trailing" secondItem="84N-jF-zwg" secondAttribute="trailing" id="x7h-vJ-xUo"/>
+                        </constraints>
+                    </view>
+                    <navigationItem key="navigationItem" id="bIy-n3-4gY"/>
+                    <connections>
+                        <outlet property="tableView" destination="84N-jF-zwg" id="EQe-ql-Zlw"/>
+                        <outlet property="titleL" destination="AFQ-Bq-JGa" id="j2a-O2-BsZ"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="TKV-Ab-NxB" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-968" y="789"/>
+        </scene>
     </scenes>
     <resources>
         <image name="Book_Search_Icon" width="16" height="15"/>
@@ -1129,5 +1244,8 @@
         <image name="menu_black_icon" width="16.666666030883789" height="14.666666984558105"/>
         <image name="zan_no" width="14" height="14.5"/>
         <image name="收藏五角星" width="19" height="18.333333969116211"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
     </resources>
 </document>

+ 1 - 1
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookChanelSubListVC.m

@@ -120,7 +120,7 @@
             return cell;
         }
             break;
-        case MediaArticeType:///文章
+        case MediaMediaArticeType:///文章
         {
             BookContentCell * cell = [BookContentCell configCell1:tableView indexPath:indexPath];
             cell.playIconV.hidden = YES;

+ 1 - 1
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookContentNavVC.m

@@ -496,7 +496,7 @@
                 return cell;
             }
                 break;
-            case MediaArticeType:///课程
+            case MediaMediaArticeType:///文章
             {
                 BookContentCell * cell = [BookContentCell configCell1:tableView indexPath:indexPath];
                 cell.playImgV.hidden = YES;

+ 59 - 6
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookListDetailVC.m

@@ -17,6 +17,7 @@
 #import "BookListenVC.h"
 #import "BookListModel.h"
 #import "BookReadVC.h"
+#import "BookListCell.h"
 
 @interface BookListDetailVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (weak, nonatomic) IBOutlet UIView *navBar;
@@ -31,6 +32,7 @@
 @property (assign,nonatomic) NSInteger        selectIndex;
 @property (strong,nonatomic) BookMeidaModel  *model;
 @property (strong,nonatomic) NSMutableArray  *listArray;
+@property (assign,nonatomic) BOOL             isShow;
 @end
 
 @implementation BookListDetailVC
@@ -92,6 +94,14 @@
         if ([responseObject[@"BookCatalogResults"] isKindOfClass:[NSArray class]]) {
             for (NSDictionary * dict in responseObject[@"BookCatalogResults"]) {
                 BookListModel * listModel = [BookListModel modelWithDictionary:dict];
+                if ([listModel.Children isKindOfClass:[NSArray class]]) {
+                    NSMutableArray * array = [NSMutableArray array];
+                    for (NSDictionary * subDict in listModel.Children) {
+                        BookListModel * listSubModel = [BookListModel modelWithDictionary:subDict];
+                        [array addObject:listSubModel];
+                    }
+                    listModel.Children = array.mutableCopy;
+                }
                 [weakSelf.listArray addObject:listModel];
             }
         }
@@ -359,11 +369,11 @@
 
 - (void)setLabelwithText:(NSString *)text
 {
-    [text stringByReplacingOccurrencesOfString:@"\n" withString:@""];
-    if (text.length == 0) {
+    NSString *strUrl = [text stringByReplacingOccurrencesOfString:@"\n" withString:@""];
+    if (strUrl.length == 0) {
         return;
     }
-    NSArray * stringArr = [self getLinesArrayOfStringInText:text width:SCREEN_WIDTH - 80];
+    NSArray * stringArr = [self getLinesArrayOfStringInText:strUrl width:SCREEN_WIDTH - 80];
     if (stringArr.count > 2) {
         self.contentL.numberOfLines = 2;
         NSString *string1 = stringArr[0];
@@ -506,13 +516,56 @@
 }
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
-    return 0;
+    switch (section) {
+        case 0:
+        {
+            return self.listArray.count > 0 ? 1 : 0;
+        }
+            break;
+        default:
+        {
+            return 1;
+        }
+            break;
+    }
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    UITableViewCell * cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellId"];
-    return cell;
+    WS(weakSelf);
+    switch (indexPath.section) {
+        case 0:
+        {
+            BookListCell * cell = [BookListCell configCell:tableView indexPath:indexPath];
+            [cell setDataWithArray:self.listArray isShow:!self.isShow];
+            [cell.showBtn setAction:^{
+                weakSelf.isShow = YES;
+                dispatch_async(dispatch_get_main_queue(), ^{
+                    [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
+                });
+            }];
+            cell.ClickRowBlock = ^(BookListModel * _Nonnull selectModel) {
+                [weakSelf pushListDataVC:selectModel];
+            };
+            return cell;
+        }
+            break;
+        default:
+        {
+            BookListCell * cell = [BookListCell configCell:tableView indexPath:indexPath];
+            return cell;
+        }
+            break;
+    }
 }
 
+#pragma mark - 获取某一节内容
+- (void)pushListDataVC:(BookListModel *)model
+{
+    BookReadVC * vc = [[BookReadVC alloc] init];
+    vc.Id = self.Id;
+    vc.dataArray = self.listArray;
+    vc.currentId = model.Id;
+    [self.navigationController pushViewController:vc animated:YES];
+}
 @end
 

+ 15 - 11
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookListenVC.m

@@ -121,6 +121,9 @@ NSString* SN = @"7aec3327-527082a8-0795-00bc-28f63-00";
     id traget = self.navigationController.interactivePopGestureRecognizer.delegate;
     UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
     [self.view removeGestureRecognizer:pan];
+    self.isPlay = NO;
+    [self.playBtn setImage:IMG(@"Book_listen_play_Icon") forState:UIControlStateNormal];
+    [self.player pause];
 }
 - (void)viewDidLoad {
     [super viewDidLoad];
@@ -409,7 +412,6 @@ NSString* SN = @"7aec3327-527082a8-0795-00bc-28f63-00";
     WS(weakSelf);
        [weakSelf.dataArray removeAllObjects];
        [weakSelf.commentArray removeAllObjects];
-
        dispatch_semaphore_t sem = dispatch_semaphore_create(0);
        __block NSInteger httpFinishCount = 0;
        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -460,18 +462,20 @@ NSString* SN = @"7aec3327-527082a8-0795-00bc-28f63-00";
            };
            [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Comment_List) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
                NSLog(@"评论数据列表%@",responseObject);
-               if ([responseObject[@"Items"] isKindOfClass:[NSArray class]]) {
-                   for (NSDictionary * dict in responseObject[@"Items"]) {
-                       MHTopic * topic = [MHTopic modelWithDictionary:dict];
-                       if ([[dict objectForKey:@"TopicCommentReplyResults"] isKindOfClass:[NSArray class]]) {
-                           NSMutableArray * subArray = [NSMutableArray array];
-                           for (NSDictionary * subDict in dict[@"TopicCommentReplyResults"]) {
-                               MHComment * commentModel = [MHComment modelWithDictionary:subDict];
-                               [subArray addObject:commentModel];
+               if ([responseObject isKindOfClass:[NSDictionary class]]) {
+                   if ([responseObject[@"Items"] isKindOfClass:[NSArray class]]) {
+                       for (NSDictionary * dict in responseObject[@"Items"]) {
+                           MHTopic * topic = [MHTopic modelWithDictionary:dict];
+                           if ([[dict objectForKey:@"TopicCommentReplyResults"] isKindOfClass:[NSArray class]]) {
+                               NSMutableArray * subArray = [NSMutableArray array];
+                               for (NSDictionary * subDict in dict[@"TopicCommentReplyResults"]) {
+                                   MHComment * commentModel = [MHComment modelWithDictionary:subDict];
+                                   [subArray addObject:commentModel];
+                               }
+                               topic.CommentReplyResults = [NSMutableArray arrayWithArray:subArray];
                            }
-                           topic.CommentReplyResults = [NSMutableArray arrayWithArray:subArray];
+                           [weakSelf.commentArray addObject:[weakSelf _topicFrameWithTopic:topic]];
                        }
-                       [weakSelf.commentArray addObject:[weakSelf _topicFrameWithTopic:topic]];
                    }
                }
                if (++httpFinishCount == 3) {

+ 2 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/BookReadVC.h

@@ -12,8 +12,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface BookReadVC : BaseViewController
 @property (nonatomic,copy) NSString            *filePath;
+@property (nonatomic,copy) NSString            *CatalogId;
 @property (nonatomic,strong) NSMutableArray    *dataArray;
 @property (nonatomic,assign) NSInteger          Id;
+@property (nonatomic,assign) NSInteger          currentId;
 @end
 
 NS_ASSUME_NONNULL_END

+ 93 - 29
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/BookReadVC.m

@@ -48,6 +48,10 @@
 @property (nonatomic, strong) NSArray<NSMutableAttributedString *> *pageContentArray;
 @property (nonatomic,copy) NSString *textFontSize;
 @property (nonatomic,copy) NSString *fontIndex;
+@property (nonatomic,strong) BookListModel  *model;
+@property (nonatomic,assign) BOOL            next;//下一章
+@property (nonatomic,assign) NSInteger       allCount;//下一章
+
 @end
 
 @implementation BookReadVC
@@ -73,12 +77,14 @@
     UIPanGestureRecognizer * pan = [[UIPanGestureRecognizer alloc]initWithTarget:traget action:nil];
     [self.view addGestureRecognizer:pan];
     //初始化
+    [self getAllCount];
+    
     [self initialization];
     //加载数据
     [self loadData];
 
     //添加UI
-
+    self.next = YES;
     [self.view addSubview:self.topView];
     [self.view addSubview:self.bottomView];
     [self.view addSubview:self.listView];
@@ -469,18 +475,34 @@
 ////    [YJProgressHUD showMsgWithoutView:[NSString stringWithFormat:@"字体\n%@",self.textFontSize]];
 //}
 - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController {
-    if(_currentIndex == 0 && _currentChapter == 0)
-    {
-        //第一章第一页
+//    if(_currentIndex == 0 && _currentChapter == 0)
+//    {
+//        //第一章第一页
+//        return nil;
+//    }else if(_currentIndex == 0 && _currentChapter > 0){
+//        //非第一章第一页,加载上一章的内容,
+//        _currentChapter--;
+//        self.next = NO;
+//        self.model = [self foundNextModel];
+//        [self getData];
+////        [self loadChapterContentWithIndex:_currentChapter];
+////        _currentIndex = self.pageContentArray.count - 1;
+//    }else{
+//        //不是第一页,则页码减一
+//        _currentIndex--;
+//    }
+    if (self.currentId < 1) {
         return nil;
-    }else if(_currentIndex == 0 && _currentChapter > 0)
-    {
+    }
+    if(_currentIndex == 0){
         //非第一章第一页,加载上一章的内容,
-        _currentChapter--;
-        [self loadChapterContentWithIndex:_currentChapter];
-        _currentIndex = self.pageContentArray.count - 1;
-    }else
-    {
+        self.next = NO;
+        self.currentId --;
+        [self foundModel:self.currentId];
+        [self getData];
+//        [self loadChapterContentWithIndex:_currentChapter];
+//        _currentIndex = self.pageContentArray.count - 1;
+    }else{
         //不是第一页,则页码减一
         _currentIndex--;
     }
@@ -494,22 +516,32 @@
 //    {
 //        //最后一章最后一页
 //        return nil;
-    if(_currentIndex >= 2)
-    {
-        //最后一章最后一页
+//    }else if(_currentIndex >= self.pageContentArray.count - 1 && _currentChapter < self.chapterArr.count){
+//        //非最后一章的最后一页,加载下一章内容
+//        _currentChapter++;
+//        self.next = YES;
+//        self.model = [self foundNextModel];
+//        [self getData];
+////        [self loadChapterContentWithIndex:_currentChapter];
+//        _currentIndex = 0;
+//    }else{
+//        //不是最后一页
+//        _currentIndex++;
+//    }
+    if (self.allCount == self.currentId) {
         return nil;
-    }else if(_currentIndex >= self.pageContentArray.count - 1 && _currentChapter <self.chapterArr.count)
-    {
+    }
+    if(_currentIndex >= self.pageContentArray.count - 1){
         //非最后一章的最后一页,加载下一章内容
-        _currentChapter++;
-        [self loadChapterContentWithIndex:_currentChapter];
+        self.next = YES;
+        self.currentId ++;
+        [self foundModel:self.currentId];
+        [self getData];
         _currentIndex = 0;
-    }else
-    {
+    }else{
         //不是最后一页
         _currentIndex++;
     }
-    
     return [self viewControllerAtIndex:_currentIndex];
 }
 #pragma mark  - notification
@@ -530,17 +562,49 @@
     }
     self.listView.list = array;
     //加载第一章文字
+    [self foundModel:self.currentId];
     [self getData];
     
 }
+- (void)foundModel:(NSInteger)Id
+{
+    for (BookListModel * model in self.dataArray) {
+        if (model.Id == Id) {
+            self.model = model;
+            return;
+        }
+        if (model.IsChildren) {
+            for (BookListModel * smodel in model.Children) {
+                if (smodel.Id == Id) {
+                    self.model = smodel;
+                    return;
+                }
+            }
+        }
+    }
+    self.model = nil;
+}
+- (void)getAllCount
+{
+    BookListModel * model = self.dataArray.lastObject;
+    if (model.IsChildren) {
+        BookListModel * smodel = model.Children.lastObject;
+        self.allCount = smodel.Id;
+    }else{
+        self.allCount = model.Id;
+    }
+}
 - (void)getData
 {
     WS(weakSelf);
-    BookListModel * model = self.dataArray.firstObject;
+    if (!self.model) {
+        return;
+    }
     NSDictionary * paraDict = @{@"MediaId":@(self.Id),
-                                @"CatalogNameg":model.CatalogNameg,
-                                @"CatalogId":model.CatalogId
+                                @"CatalogNameg":self.model.CatalogNameg,
+                                @"CatalogId":self.model.CatalogId
     };
+    [self.chapterArr removeAllObjects];
     [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Media_Book_Content) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"%@",responseObject);
         [weakSelf.chapterArr addObject:responseObject[@"Data"]];
@@ -553,19 +617,19 @@
         
     }];
 }
--(void)loadChapterContentWithIndex:(NSInteger )index
+-(void)loadChapterContentWithIndex:(NSInteger)index
 {
     NSMutableDictionary * attrDict = [NSMutableDictionary dictionaryWithDictionary:self.attributeDict];
     [attrDict setObject:[UIColor blackColor] forKey:NSForegroundColorAttributeName];
     NSArray *arr =  [self pagingWithContentString:self.chapterArr[index] contentSize:_contentSize textAttribute:attrDict];
     self.pageContentArray = arr;
+    self.currentIndex = self.next ? 0 : (self.pageContentArray.count - 1);
 }
 -(NSArray *)pagingWithContentString:(NSString *)contentString contentSize:(CGSize)contentSize textAttribute:(NSDictionary *)textAttribute
 {
     if (contentString.length == 0) {
         return @[];
     }
-    
     NSMutableArray *pageArray = [NSMutableArray array];
     NSMutableAttributedString *orginAttributeString = [[NSMutableAttributedString alloc] initWithAttributedString:[self attributeStringByHtmlString:contentString Attribute:textAttribute]];
     NSTextStorage *textStorage = [[NSTextStorage alloc]initWithAttributedString:orginAttributeString];
@@ -665,9 +729,9 @@
     DCContentVC *contantVC = [self viewControllerAtIndex:self.currentIndex];
     WS(weakSelf);
 
-    if (self.currentIndex == self.pageContentArray.count || self.currentIndex == 0) {
-        self.currentIndex += 1;
-    }
+//    if (self.currentIndex == self.pageContentArray.count || self.currentIndex == 0) {
+//        self.currentIndex += 1;
+//    }
     dispatch_async(dispatch_get_main_queue(), ^{
         [weakSelf.pageViewController setViewControllers:@[contantVC] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
     });

+ 6 - 6
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookRead/viewcontroller/DCContentVC.m

@@ -31,10 +31,10 @@
     [self.view addSubview:self.textView];
     [self.view addSubview:self.bottomRightL];
     [self.view addSubview: self.bottomLeftL];
-    [self.view addSubview: self.userView];
-    [self.view addSubview: self.buyView];
-    [self addUserView];
-    [self addBuyView];
+//    [self.view addSubview: self.userView];
+//    [self.view addSubview: self.buyView];
+//    [self addUserView];
+//    [self addBuyView];
     WS(weakSelf);
     self.textView.ClickMenuBlock = ^(NSInteger index) {
         NSLog(@"%ld",index);
@@ -202,11 +202,11 @@
     _index = index;
     _totalPages = totalPages;
     
-    NSString *indexStr = [NSString stringWithFormat:@"%ld",index];
+    NSString *indexStr = [NSString stringWithFormat:@"%ld",index + 1];
     NSString *totalPagesStr = [NSString stringWithFormat:@"%ld",totalPages];
     float progress = indexStr.floatValue / totalPagesStr.floatValue;
     self.bottomLeftL.text = [NSString stringWithFormat:@"本章进度%.1lf%%",progress*100];
-    self.bottomRightL.text = [NSString stringWithFormat:@"%ld / %ld",index,totalPages];
+    self.bottomRightL.text = [NSString stringWithFormat:@"%ld / %ld",index + 1,totalPages];
     
     if (index == 2) {
         self.userView.hidden = NO;

+ 19 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookLabelAllVC.h

@@ -0,0 +1,19 @@
+//
+//  BookLabelAllVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/18.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BookLabelAllVC : BaseViewController
+@property (nonatomic, assign) NSInteger   Id;
+@property (nonatomic, copy) NSString     *titleStr;
++(BookLabelAllVC *)initBookLabelAllVC;
+@end
+
+NS_ASSUME_NONNULL_END

+ 233 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookLabelAllVC.m

@@ -0,0 +1,233 @@
+//
+//  BookLabelAllVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/18.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BookLabelAllVC.h"
+#import "HomeWeiCousreCell.h"
+#import "BookSubArticeCell.h"
+#import "HomeTeacherCell.h"
+#import "HomeMusicCell.h"
+#import "HomeSchoolCell.h"
+#import "IndexGoodBookCell.h"
+#import "HomeSubItemModel.h"
+#import "BookTeacherDetailVC.h"
+#import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+#import "TDSearchBar.h"
+
+@interface BookLabelAllVC ()<UIScrollViewDelegate>
+@property (weak, nonatomic) IBOutlet UILabel  *titleL;
+@property (weak, nonatomic) IBOutlet UITableView *tableView;
+@property (nonatomic, strong) NSMutableArray  *dataArray;
+@property (nonatomic, copy) NSString          *searchText;
+@property (nonatomic, assign) NSInteger        currentPage;
+@property (nonatomic, assign) NSInteger        Total;
+@property (nonatomic, strong) TDSearchBar     *searchBar;
+@end
+
+@implementation BookLabelAllVC
++(BookLabelAllVC *)initBookLabelAllVC{
+    BookLabelAllVC *controller = [StoryboardManager.shared.BookDetail instantiateViewControllerWithIdentifier:@"BookLabelAllVC"];
+    return controller;
+}
+- (NSMutableArray *)dataArray
+{
+    if (!_dataArray) {
+        _dataArray = [NSMutableArray array];
+    }
+    return _dataArray;
+}
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    self.view.backgroundColor = UIColorHex(0xF8F8F8);
+    WS(weakSelf);
+    self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
+        [weakSelf footerRefresh];
+    }];
+    self.titleL.text = self.titleStr;
+    [self getData];
+}
+
+- (void)footerRefresh
+{
+    self.currentPage += 1;
+    if (self.dataArray.count == self.Total) {
+        self.tableView.mj_footer.hidden = YES;
+        [self.tableView.mj_footer resetNoMoreData];
+        return;
+    }
+    [self getDataNetWork];
+}
+- (void)getDataNetWork
+{
+    WS(weakSelf);
+    SHOWLOADING
+    NSDictionary * paraDict = @{@"LableId":@(self.Id),
+                                @"Page":@(self.currentPage),
+                                @"PerPage":@(10),
+                                @"KeyWord":self.searchText
+    };
+    [[HttpManager sharedHttpManager] GETUrl:Host(API_APP_Media_Lable_List) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        REMOVESHOW
+        NSLog(@"%@",responseObject);
+        if ([responseObject isKindOfClass:[NSDictionary class]]) {
+            for (NSDictionary * dict in responseObject[@"Items"]) {
+                HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+                [weakSelf.dataArray addObject:model];
+            }
+        }
+        weakSelf.Total = [responseObject[@"Total"] integerValue];
+        [weakSelf.tableView.mj_footer endRefreshing];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    } failure:^(NSError * _Nonnull error) {
+        REMOVESHOW
+    }];
+}
+- (void)getData
+{
+    [self.dataArray removeAllObjects];
+    self.currentPage = 1;
+    self.Total = 0;
+    [self getDataNetWork];
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.dataArray.count;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel * model = [self.dataArray objectAtIndex:indexPath.row];
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            IndexGoodBookCell * cell = [IndexGoodBookCell configCell0:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            HomeWeiCousreCell * cell = [HomeWeiCousreCell configCell0:tableView indexPath:indexPath];
+            [cell setDataWithIndexModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            HomeMusicCell * cell = [HomeMusicCell configCell:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            HomeTeacherCell * cell = [HomeTeacherCell configCell:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSchoolCell * cell = [HomeSchoolCell configCell1:tableView indexPath:indexPath];
+            [cell setDataIndexModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+        default:
+        {
+            IndexGoodBookCell * cell = [IndexGoodBookCell configCell1:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:@""];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+            }
+            return cell;
+        }
+            break;
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel * model = [self.dataArray objectAtIndex:indexPath.row];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            
+        }
+            break;
+        default:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = (CollectModelType)model.MediaType;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+    }
+}
+#pragma mark - Delegata
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView
+{
+    [self setEditing:YES];
+}
+- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar {
+    self.searchText = searchBar.text;
+    [self getData];
+}
+@end

+ 19 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookSearchSubVC.h

@@ -0,0 +1,19 @@
+//
+//  BookSearchSubVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BookSearchSubVC : UIViewController
+@property (nonatomic, assign) MediaType   type;
+@property (nonatomic, copy) NSString     * searchText;
+- (void)getData;
+@end
+
+NS_ASSUME_NONNULL_END

+ 291 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearch/BookSearchSubVC.m

@@ -0,0 +1,291 @@
+//
+//  BookSearchSubVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BookSearchSubVC.h"
+#import "HomeWeiCousreCell.h"
+#import "BookSubArticeCell.h"
+#import "HomeTeacherCell.h"
+#import "HomeMusicCell.h"
+#import "HomeSchoolCell.h"
+#import "IndexGoodBookCell.h"
+#import "HomeSubItemModel.h"
+#import "BookTeacherDetailVC.h"
+#import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+
+@interface BookSearchSubVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) UITableView    * tableView;
+@property (nonatomic, strong) NSMutableArray * dataArray;
+@property (nonatomic, assign) NSInteger        currentPage;
+@property (nonatomic, assign) NSInteger        Total;
+@end
+
+@implementation BookSearchSubVC
+- (NSMutableArray *)dataArray
+{
+    if (!_dataArray) {
+        _dataArray = [NSMutableArray array];
+    }
+    return _dataArray;
+}
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = UIColorHex(0xF8F8F8);
+    [self.view addSubview:self.tableView];
+    self.tableView.showsVerticalScrollIndicator = NO;
+    self.tableView.backgroundColor = [UIColor clearColor];
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    self.tableView.layer.cornerRadius = 8.f;
+    self.tableView.layer.masksToBounds = YES;
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.mas_offset(UIEdgeInsetsMake(20,15,(IS_IPHONEX ? 40 : 20) + EMVIEWBOTTOMMARGIN + 50,15));
+    }];
+    WS(weakSelf);
+    self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
+        [weakSelf footerRefresh];
+    }];
+}
+
+- (void)footerRefresh
+{
+    self.currentPage += 1;
+    if (self.dataArray.count == self.Total) {
+        self.tableView.mj_footer.hidden = YES;
+        [self.tableView.mj_footer resetNoMoreData];
+        return;
+    }
+    [self getDataNetWork];
+}
+- (void)getDataNetWork
+{
+    WS(weakSelf);
+    SHOWLOADING
+    NSDictionary * paraDict = @{@"MediaType":@(self.type),
+                                @"Page":@(self.currentPage),
+                                @"PerPage":@(10),
+                                @"KeyWord":self.searchText
+    };
+    [[HttpManager sharedHttpManager] GETUrl:Host(API_APP_Media_Search) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        REMOVESHOW
+        NSLog(@"%@",responseObject);
+        if ([responseObject isKindOfClass:[NSDictionary class]]) {
+            for (NSDictionary * dict in responseObject[@"Items"]) {
+                HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+                [weakSelf.dataArray addObject:model];
+            }
+        }
+        weakSelf.Total = [responseObject[@"Total"] integerValue];
+        [weakSelf.tableView.mj_footer endRefreshing];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    } failure:^(NSError * _Nonnull error) {
+        REMOVESHOW
+    }];
+}
+- (void)getData
+{
+    [self.dataArray removeAllObjects];
+    self.currentPage = 1;
+    self.Total = 0;
+    [self getDataNetWork];
+}
+- (UITableView *)tableView
+{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    }
+    return _tableView;
+}
+//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+//{
+//    return self.dataArray.count == 0 ? 0.01f : 15.f;
+//}
+//- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
+//{
+//    return self.dataArray.count == 0 ? 0.01f : 15.f;
+//}
+//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+//{
+//    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.dataArray.count == 0 ? 0.01f : 15.f)];
+//    view.backgroundColor = UIColorHex(0xFFFFFF);
+//    return view;
+//}
+//- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
+//{
+//    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.dataArray.count == 0 ? 0.01f : 15.f)];
+//    view.backgroundColor = UIColorHex(0xFFFFFF);
+//    return view;
+//}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.dataArray.count;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel * model = [self.dataArray objectAtIndex:indexPath.row];
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            IndexGoodBookCell * cell = [IndexGoodBookCell configCell0:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            HomeWeiCousreCell * cell = [HomeWeiCousreCell configCell0:tableView indexPath:indexPath];
+            [cell setDataWithIndexModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            HomeMusicCell * cell = [HomeMusicCell configCell:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            HomeTeacherCell * cell = [HomeTeacherCell configCell:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSchoolCell * cell = [HomeSchoolCell configCell1:tableView indexPath:indexPath];
+            [cell setDataIndexModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+        default:
+        {
+            IndexGoodBookCell * cell = [IndexGoodBookCell configCell1:tableView indexPath:indexPath];
+            [cell setDataWithModel:model searchText:self.searchText];
+            if (self.dataArray.count == indexPath.row + 1) {
+                cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
+            }
+            return cell;
+        }
+            break;
+    }
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel * model = [self.dataArray objectAtIndex:indexPath.row];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+
+        }
+            break;
+        default:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = (CollectModelType)model.MediaType;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+    }
+}
+- (void)setupRoundedCornersWithView:(UITableViewCell *)cell cutCorners:(UIRectCorner)rectCorner isMask:(BOOL)isMask{
+
+    CAShapeLayer *mask = [CAShapeLayer layer];
+    UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_WIDTH - 30, cell.bounds.size.height) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(isMask ? 8 : 0, isMask ? 8 : 0)];
+    mask.path = path.CGPath;
+    mask.frame = cell.bounds;
+
+
+    CAShapeLayer *borderLayer = [CAShapeLayer layer];
+    borderLayer.path = path.CGPath;
+    borderLayer.fillColor = [UIColor clearColor].CGColor;
+    borderLayer.strokeColor = [UIColor whiteColor].CGColor;
+    borderLayer.lineWidth = 0;
+    borderLayer.frame = cell.bounds;
+    cell.layer.mask = mask;
+    [cell.layer addSublayer:borderLayer];
+}
+@end
+

+ 17 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearchVC.h

@@ -0,0 +1,17 @@
+//
+//  BookSearchVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BookSearchVC : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 467 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookSearchVC.m

@@ -0,0 +1,467 @@
+//
+//  IndexSearchVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/17.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BookSearchVC.h"
+#import "DrawerView.h"
+#import "TabBarController.h"
+#import "SegmentViewController.h"
+#import "BookSearchSubVC.h"
+#import "InfoSearchView.h"
+#import "SearchTypeSection.h"
+#import "SearchTypeCell.h"
+#import "SearchHistoryCell.h"
+#import "SearchDetailViewCell.h"
+#import <YYModel/YYModel.h>
+
+#define PYSEARCH_MARGIN 10
+
+@interface BookSearchVC ()<InfoSearchViewDelegate, UITableViewDataSource, UITableViewDelegate>
+@property (nonatomic, strong) InfoSearchView      *topNavSearch;
+@property (strong, nonatomic) DrawerView           *drawerView;
+@property (strong, nonatomic) SegmentViewController          *pageView;
+@property (copy,nonatomic) NSString                     *searchStr;
+@property (strong, nonatomic) BookSearchSubVC           *allVC;
+@property (strong, nonatomic) BookSearchSubVC           *articeVC;
+@property (strong, nonatomic) BookSearchSubVC           *bookVC;
+@property (strong, nonatomic) BookSearchSubVC           *videoVC;
+@property (strong, nonatomic) BookSearchSubVC           *musicVC;
+// 历史记录tableView
+@property (nonatomic, strong) TDTableView          *historyTableView;
+// 历史记录tableViewHeaderContainer
+@property (nonatomic, strong) UIView               *historyHeaderContainer;
+// 历史记录tableHeaderView
+@property (nonatomic, strong) UIView               *historyTableHeaderView;
+@property (nonatomic, strong) NSMutableArray       *historyArray;
+@property (nonatomic, strong) SearchTypeSection    *historyHeaderTitleView;
+@property (nonatomic, strong) UIView               *hisNoView;
+
+@end
+
+@implementation BookSearchVC
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.navigationController.navigationBar setHidden:YES];
+}
+
+- (DrawerView *)drawerView{
+    if(!_drawerView){
+        _drawerView = [[DrawerView alloc] init];
+    }
+    return _drawerView;
+}
+- (InfoSearchView *)topNavSearch {
+    if (!_topNavSearch) {
+        _topNavSearch = [[InfoSearchView alloc] initWithFrame:CGRectMake(0, (IS_IPHONEX?40:20), kGXScreenWidth, 45) type:InfoSearchViewTypeDefault];
+    }
+    return _topNavSearch;
+}
+- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
+{
+    [self.topNavSearch.searchBar resignFirstResponder];
+}
+
+- (void)searchButtonAction:(UISearchBar *)searchBar {
+    self.searchStr = searchBar.text;
+    
+    [self insertHistorySearchStr:self.searchStr];
+    // 更新本地历史记录
+    self.historyArray = [NSMutableArray arrayWithArray:[_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_BookStore]];
+    // 更新tableViewHeader的高度
+    if (self.historyArray.count == 0) {
+        self.hisNoView.hidden = NO;
+    }else{
+        self.hisNoView.hidden = YES;
+    }
+    [self addAndLayoutTagsWithTagsContentView:self.historyTableHeaderView tagTexts:self.historyArray];
+    [self resetHistoryHeaderViewHeight];
+    [self.historyTableView reloadData];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
+    // 添加历史记录,刷新historyTable
+    [self noticeGetData];
+    [self.view endEditing:YES];
+}
+- (void)noticeGetData
+{
+    if (self.searchStr.length == 0) {
+        return;
+    }
+    switch (self.pageView.selectIndex - 10000) {
+        case 0:
+        {
+            self.allVC.searchText = self.searchStr;
+            self.articeVC.type = 0;
+            [self.allVC getData];
+        }
+            break;
+        case 1:
+        {
+            self.articeVC.searchText = self.searchStr;
+            self.articeVC.type = MediaMediaArticeType;
+            [self.articeVC getData];
+        }
+            break;
+        case 2:
+        {
+            self.bookVC.searchText = self.searchStr;
+            self.bookVC.type = MediaBookType;
+            [self.bookVC getData];
+        }
+            break;
+        case 3:
+        {
+            self.videoVC.searchText = self.searchStr;
+            self.videoVC.type = MediaVideoType;
+            [self.videoVC getData];
+        }
+            break;
+        default:
+        {
+            self.musicVC.searchText = self.searchStr;
+            self.musicVC.type = MediaMusicType;
+            [self.musicVC getData];
+        }
+            break;
+    }
+}
+// 文本改变回调
+- (void)textDidChange:(NSString *)text {
+    self.searchStr = text;
+    if (ISEmptyString(text)) {
+        // 没有文本显示历史记录cell
+    } else {
+        // 有文本,就去搜索文章列表,有联想显示联想,没有联想显示历史记录
+    }
+}
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = [UIColor whiteColor];
+    [self.view addSubview:self.topNavSearch];
+    [self.view addSubview:self.historyTableView];
+    [self addNavSearch];
+    [self addPageView];
+    [self.historyTableView setFrame:CGRectMake(0, CGRectGetMaxY(self.topNavSearch.frame), SCREEN_WIDTH, SCREEN_HEIGHT - CGRectGetMaxY(self.topNavSearch.frame))];
+    [self initHistoryTableHeaderView];
+    [self.pageView addObserver:self forKeyPath:@"selectIndex" options:NSKeyValueObservingOptionNew context:nil];
+}
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context
+{
+    id new = [change objectForKey:@"new"];
+    id old = [change objectForKey:@"old"];
+    if (new != old) {
+        [self noticeGetData];
+    }
+}
+- (void)addNavSearch
+{
+    WS(weakSelf);
+    self.topNavSearch.delegate = self;
+    self.topNavSearch.backBlock = ^{
+        [weakSelf.navigationController popViewControllerAnimated:YES];
+    };
+    self.topNavSearch.menuBlock = ^{
+        [weakSelf.view endEditing:YES];
+        [[UtilsTools getWindow] addSubview:weakSelf.drawerView];
+        weakSelf.drawerView.SelectDrawerBlock = ^(NSIndexPath * _Nonnull indexPath) {
+            if (![weakSelf.tabBarController isKindOfClass:[TabBarController class]]) {
+                [TabBarController sharedTabBarController].tabBar.hidden = NO;
+                [weakSelf.tabBarController.navigationController popViewControllerAnimated:NO];
+            }
+            if ([weakSelf.navigationController.viewControllers count] > 1) {
+                [weakSelf.navigationController popToRootViewControllerAnimated:NO];
+            }
+            switch (indexPath.section) {
+                case 0:
+                {
+                    [[TabBarController sharedTabBarController] setSelectedIndex:indexPath.row];
+                }
+                    break;
+                case 1:
+                {
+                    switch (indexPath.row) {
+                        case 0:
+                        {
+                            [[TabBarController sharedTabBarController] setSelectedIndex:2];
+                        }
+                            break;
+                        case 1:
+                        {
+                            [[TabBarController sharedTabBarController] setSelectedIndex:2];
+                        }
+                            break;
+                        default:
+                        {
+                            [[TabBarController sharedTabBarController] setSelectedIndex:3];
+                        }
+                            break;
+                    }
+                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                        [[NSNotificationCenter defaultCenter] postNotificationName:DRAWERPUSHVC object:nil userInfo:@{VCINDEX:@(indexPath.row)}];
+                    });
+                }
+                    break;
+                default:
+                {
+                    [[TabBarController sharedTabBarController] setSelectedIndex:3];
+                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                        [[NSNotificationCenter defaultCenter] postNotificationName:DRAWERPUSHVC object:nil userInfo:@{VCINDEX:@(4 + indexPath.row)}];
+                    });
+                }
+                    break;
+            }
+        };
+        weakSelf.drawerView.frame = CGRectMake(0,0, SCREEN_WIDTH, SCREEN_HEIGHT);// - kNavigationHeight
+    };
+}
+- (void)addPageView
+{
+    self.pageView = [[SegmentViewController alloc] init];
+    NSArray * titleArray = @[@"全部",@"文章",@"书籍",@"视频",@"音频"];
+    self.pageView.titleArray = titleArray;
+    NSMutableArray *controlArray = [[NSMutableArray alloc]init];
+    
+    self.allVC = [[BookSearchSubVC alloc]init];
+    [controlArray addObject:self.allVC];
+
+    self.articeVC = [[BookSearchSubVC alloc]init];
+    [controlArray addObject:self.articeVC];
+
+    self.bookVC = [[BookSearchSubVC alloc]init];
+    [controlArray addObject:self.bookVC];
+    
+    self.videoVC = [[BookSearchSubVC alloc]init];
+    [controlArray addObject:self.videoVC];
+    
+    self.musicVC = [[BookSearchSubVC alloc]init];
+    [controlArray addObject:self.musicVC];
+    self.pageView.subViewControllers = controlArray;
+    self.pageView.buttonWidth = self.view.frame.size.width / titleArray.count;
+    self.pageView.buttonHeight = 34.f;
+    self.pageView.bottomCount = titleArray.count;
+    [self.pageView initSegment:0];
+    [self.pageView addParentController:self];
+    [self.pageView.view setFrame:CGRectMake(0, CGRectGetMaxY(self.topNavSearch.frame), SCREEN_WIDTH, SCREEN_HEIGHT - CGRectGetMaxY(self.topNavSearch.frame))];
+    self.pageView.view.hidden = YES;
+}
+
+- (void)initHistoryTableHeaderView {
+    [self.historyHeaderTitleView setSectionTitle:@"最近搜索"];
+    WEAKSELF
+    self.historyHeaderTitleView.rightAction = ^{
+        
+       
+        UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
+        UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            // 清空历史记录
+            [_TDFileStorage saveHistorySearchBySearchType:HistorySearchType_BookStore WithArr:@[]];
+            weakSelf.historyArray = [NSMutableArray arrayWithArray:[_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_BookStore]];
+            [weakSelf addAndLayoutTagsWithTagsContentView:weakSelf.historyTableHeaderView tagTexts:weakSelf.historyArray];
+            [weakSelf resetHistoryHeaderViewHeight];
+            if (weakSelf.historyArray.count == 0) {
+                weakSelf.hisNoView.hidden = NO;
+            }else{
+                weakSelf.hisNoView.hidden = YES;
+            }
+            [weakSelf.historyTableView reloadData];
+        }];
+        UIAlertController *tmpVc = [UIAlertController alertControllerWithTitle:@"提示" message:@"确定要删除最近搜索?" preferredStyle:UIAlertControllerStyleAlert];
+        [tmpVc addAction:action1];
+        [tmpVc addAction:action2];
+        [weakSelf presentViewController:tmpVc animated:YES completion:nil];
+    };
+    [self.historyHeaderContainer addSubview:self.historyHeaderTitleView];
+    
+    self.historyTableHeaderView.frame = CGRectMake(0, self.historyHeaderTitleView.height + 13, kScreenWidth, 0);
+    [self addAndLayoutTagsWithTagsContentView:self.historyTableHeaderView tagTexts:self.historyArray];
+    CGFloat height = CGRectGetMaxY(self.historyTableHeaderView.subviews.lastObject.frame);
+    self.historyTableHeaderView.frame = CGRectMake(0, self.historyHeaderTitleView.height + 13, kScreenWidth, height);
+    [self.historyHeaderContainer addSubview:self.historyTableHeaderView];
+    [self resetHistoryHeaderViewHeight];
+    self.historyTableView.tableHeaderView = self.historyHeaderContainer;
+    
+    self.historyTableView.tableFooterView = self.hisNoView;
+    if (self.historyArray.count == 0) {
+        self.hisNoView.hidden = NO;
+    }else{
+        self.hisNoView.hidden = YES;
+    }
+    UILabel * label = [UILabel new];
+    label.text = @"暂无搜索记录!";
+    label.font = [UIFont systemFontOfSize:14];
+    label.textColor = UIColorHex(0x999999);
+    [self.hisNoView addSubview:label];
+    [label mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.mas_equalTo(self.hisNoView);
+    }];
+}
+- (UIView *)historyTableHeaderView {
+    if (!_historyTableHeaderView) {
+        _historyTableHeaderView = [UIView new];
+        _historyTableHeaderView.backgroundColor = [UIColor whiteColor];;
+    }
+    return _historyTableHeaderView;
+}
+- (SearchTypeSection *)historyHeaderTitleView {
+    if (!_historyHeaderTitleView) {
+        _historyHeaderTitleView = [[SearchTypeSection alloc] initWithFrame:CGRectMake(0, 0, kGXScreenWidth, 44)];
+    }
+    return _historyHeaderTitleView;
+}
+- (UIView *)hisNoView
+{
+    if (!_hisNoView) {
+        _hisNoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
+        _hisNoView.hidden = YES;
+    }
+    return _hisNoView;
+}
+- (UIView *)historyHeaderContainer {
+    if (!_historyHeaderContainer) {
+        _historyHeaderContainer = [UIView new];
+        _historyHeaderContainer.backgroundColor = [UIColor whiteColor];
+    }
+    return _historyHeaderContainer;
+}
+- (TDTableView *)historyTableView {
+    if (!_historyTableView) {
+        _historyTableView = [[TDTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
+        _historyTableView.dataSource = self;
+        _historyTableView.delegate = self;
+    }
+    return _historyTableView;
+}
+- (NSMutableArray *)historyArray {
+    if (!_historyArray) {
+        _historyArray = [_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_BookStore].mutableCopy;
+    }
+    return _historyArray;
+}
+- (void)resetHistoryHeaderViewHeight {
+    CGFloat containerHeight = CGRectGetMaxY(self.historyHeaderContainer.subviews.lastObject.frame);
+    self.historyHeaderContainer.frame = CGRectMake(0, 0, kScreenWidth, containerHeight);
+}
+
+- (void)addAndLayoutTagsWithTagsContentView:(UIView *)contentView tagTexts:(NSArray<NSString *> *)tagTexts;
+{
+    [contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
+    NSMutableArray *tagsM = [NSMutableArray array];
+    for (int i = 0; i < tagTexts.count; i++) {
+        UILabel *label = [self labelWithTitle:tagTexts[i]];
+        [label addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tagDidCLick:)]];
+        [contentView addSubview:label];
+        [tagsM addObject:label];
+    }
+    
+    CGFloat currentX = 0;
+    CGFloat currentY = 0;
+    CGFloat countRow = 0;
+    CGFloat countCol = 0;
+    
+    CGFloat leftMargin = 12;
+    
+    for (int i = 0; i < contentView.subviews.count; i++) {
+        UILabel *subView = contentView.subviews[i];
+        // When the number of search words is too large, the width is width of the contentView
+        if (subView.width > contentView.width) {
+            subView.width = contentView.width;
+        }
+        
+        if (leftMargin + currentX + subView.width + PYSEARCH_MARGIN * countRow > contentView.width) {
+            subView.x = leftMargin;
+            subView.y = (currentY += subView.height) + PYSEARCH_MARGIN * ++countCol;
+            currentX = subView.width;
+            countRow = 1;
+        } else {
+            subView.x = leftMargin + (currentX += subView.width) - subView.width + PYSEARCH_MARGIN * countRow;
+            subView.y = currentY + PYSEARCH_MARGIN * countCol;
+            countRow ++;
+        }
+    }
+}
+
+
+
+// 创建label
+- (UILabel *)labelWithTitle:(NSString *)title
+{
+    UILabel *label = [[UILabel alloc] init];
+    label.userInteractionEnabled = YES;
+    label.font = [UIFont systemFontOfSize:14];
+    label.text = title;
+    label.textColor = [UIColor grayColor];
+    label.backgroundColor = kColorFromRGB(0xfafafa);
+    label.textAlignment = NSTextAlignmentCenter;
+    [label sizeToFit];
+    label.width += 20;
+    label.height += 14;
+    label.layer.cornerRadius = label.height / 2;
+    label.clipsToBounds = YES;
+    return label;
+}
+
+- (void)insertHistorySearchStr:(NSString *)string {
+    for (NSString *cache in _historyArray) {
+        // 查重
+        if ([cache isEqualToString:string]) {
+            return;
+        }
+    }
+    [_historyArray insertObject:string atIndex:0];
+    if (_historyArray.count > 10) {
+        NSArray *orderArray = [_historyArray subarrayWithRange:NSMakeRange(0, 10)];
+        _historyArray = orderArray.mutableCopy;
+    }
+    [_TDFileStorage saveHistorySearchBySearchType:HistorySearchType_BookStore WithArr:_historyArray];
+}
+
+- (void)tagDidCLick:(UITapGestureRecognizer *)gr
+{
+    UILabel *label = (UILabel *)gr.view;
+    self.searchStr = label.text;
+    [self.topNavSearch setNowSearchData:self.searchStr];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
+    [self noticeGetData];
+}
+
+#pragma mark - UITableViewDelegate
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 0;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 34;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    SearchHistoryCell * searchHistoryCell = (SearchHistoryCell *)[tableView dequeueReusableCellWithIdentifier:@"SearchHistoryCell"];
+    if (!searchHistoryCell) {
+        searchHistoryCell = [[SearchHistoryCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SearchHistoryCell"];
+    }
+    [searchHistoryCell setCurrentHistoryData:_historyArray[indexPath.row]];
+    return searchHistoryCell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [self.view endEditing:YES];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    self.searchStr = self.historyArray[indexPath.row];
+    [self.topNavSearch setNowSearchData:self.searchStr];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
+    // 添加历史记录,刷新historyTable
+    [self noticeGetData];
+}
+@end

+ 6 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookStoreHome.m

@@ -41,6 +41,7 @@
 #import "BookChanelVC.h"
 #import "BookBillboardVC.h"
 #import "BookListDetailVC.h"
+#import "BookSearchVC.h"
 
 @interface BookStoreHome ()<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
 @property (weak, nonatomic) IBOutlet UITableView *tableView;
@@ -115,6 +116,11 @@
         make.left.right.mas_equalTo(self.HeadView);
         make.height.mas_offset(36);
     }];
+    WS(weakSelf);
+    [self.SearchView.button setAction:^{
+        BookSearchVC * vc = [[BookSearchVC alloc] init];
+        [weakSelf.navigationController pushViewController:vc animated:YES];
+    }];
     [self initCollectionData];
     [self getData];
 //    [self.tableView beginUpdates];

+ 17 - 13
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookTeacherDetailVC.m

@@ -160,15 +160,17 @@
     [weakSelf.listArray removeAllObjects];
     [weakSelf.cousrArray removeAllObjects];
     [weakSelf.commentArray removeAllObjects];
-
+    [[HttpManager sharedHttpManager] cancelRequest];
     dispatch_semaphore_t sem = dispatch_semaphore_create(0);
     __block NSInteger httpFinishCount = 0;
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         NSString * url = [NSString stringWithFormat:@"%@%ld",Host(API_APP_Teacher),self.Id];
         [[HttpManager sharedHttpManager] GETUrl:url parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
             NSLog(@"%@",responseObject);
-            BookListenModel * model = [BookListenModel modelWithDictionary:responseObject[@"TeacherResult"]];
-            weakSelf.model = model;
+            if ([responseObject isKindOfClass:[NSDictionary class]]) {
+                BookListenModel * model = [BookListenModel modelWithDictionary:responseObject[@"TeacherResult"]];
+                weakSelf.model = model;
+            }
             if (++httpFinishCount == 4) {
                 dispatch_semaphore_signal(sem);
             }
@@ -228,18 +230,20 @@
         };
         [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Comment_List) parameters:paraDict responseStyle:JOSN success:^(id  _Nonnull responseObject) {
             NSLog(@"评论数据列表%@",responseObject);
-            if ([responseObject[@"Items"] isKindOfClass:[NSArray class]]) {
-                for (NSDictionary * dict in responseObject[@"Items"]) {
-                    MHTopic * topic = [MHTopic modelWithDictionary:dict];
-                    if ([[dict objectForKey:@"TopicCommentReplyResults"] isKindOfClass:[NSArray class]]) {
-                        NSMutableArray * subArray = [NSMutableArray array];
-                        for (NSDictionary * subDict in dict[@"TopicCommentReplyResults"]) {
-                            MHComment * commentModel = [MHComment modelWithDictionary:subDict];
-                            [subArray addObject:commentModel];
+            if ([responseObject isKindOfClass:[NSDictionary class]]) {
+                if ([responseObject[@"Items"] isKindOfClass:[NSArray class]]) {
+                    for (NSDictionary * dict in responseObject[@"Items"]) {
+                        MHTopic * topic = [MHTopic modelWithDictionary:dict];
+                        if ([[dict objectForKey:@"TopicCommentReplyResults"] isKindOfClass:[NSArray class]]) {
+                            NSMutableArray * subArray = [NSMutableArray array];
+                            for (NSDictionary * subDict in dict[@"TopicCommentReplyResults"]) {
+                                MHComment * commentModel = [MHComment modelWithDictionary:subDict];
+                                [subArray addObject:commentModel];
+                            }
+                            topic.CommentReplyResults = [NSMutableArray arrayWithArray:subArray];
                         }
-                        topic.CommentReplyResults = [NSMutableArray arrayWithArray:subArray];
+                        [weakSelf.commentArray addObject:[weakSelf _topicFrameWithTopic:topic]];
                     }
-                    [weakSelf.commentArray addObject:[weakSelf _topicFrameWithTopic:topic]];
                 }
             }
             if (++httpFinishCount == 4) {

+ 3 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/VC/BookWCDetailVC.m

@@ -69,11 +69,14 @@
 @implementation BookWCDetailVC
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
+    [self.assetURLs removeAllObjects];
     self.player.viewControllerDisappear = NO;
 }
 
 - (void)viewWillDisappear:(BOOL)animated {
     [super viewWillDisappear:animated];
+    [self.assetURLs removeAllObjects];
+    [self.player stop];
     self.player.viewControllerDisappear = YES;
 }
 +(BookWCDetailVC *)initBookWCDetailVC{

+ 24 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.h

@@ -0,0 +1,24 @@
+//
+//  BookListCell.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/22.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "BookListModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BookListCell : UITableViewCell
+@property (weak, nonatomic) IBOutlet UITableView *subTableView;
+@property (weak, nonatomic) IBOutlet UIView *showView;
+@property (weak, nonatomic) IBOutlet UIButton *showBtn;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tabH;
+@property (copy, nonatomic) void(^ClickRowBlock)(BookListModel * selectModel);
+- (void)setDataWithArray:(NSArray *)array isShow:(BOOL)show;
++ (BookListCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 164 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.m

@@ -0,0 +1,164 @@
+//
+//  BookListCell.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/22.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BookListCell.h"
+#import "BookListSubCell.h"
+
+@interface BookListCell()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) NSMutableArray * dataArray;
+@end
+@implementation BookListCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
++ (BookListCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+    static NSString *cellIdentifer = @"BookListCell";
+    BookListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
+    if (cell == nil) {
+        cell = [[[NSBundle mainBundle] loadNibNamed:@"BookListCell" owner:nil options:nil] objectAtIndex:0];
+    }
+    return cell;
+}
+- (void)setDataWithArray:(NSArray *)array isShow:(BOOL)show
+{
+    self.showView.hidden = show;
+    self.subTableView.delegate = self;
+    self.subTableView.dataSource = self;
+    if (!show) {
+        [self setShowBgColor];
+    }
+    self.dataArray = array.mutableCopy;
+    CGFloat H = 0.f;
+    for (BookListModel * model in self.dataArray) {
+        if (model.Children.count > 0) {
+            H = H + model.Children.count * 38 + 38;
+        }else{
+            H = H + 38.f;
+        }
+    }
+    self.tabH.constant = H;
+    [self.subTableView reloadData];
+}
+- (NSMutableArray *)dataArray
+{
+    if (!_dataArray) {
+        _dataArray = [NSMutableArray array];
+    }
+    return _dataArray;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
+    return 38.f;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
+{
+    return 0.01f;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 38)];
+    UILabel * textL = [UILabel new];
+    UIView * lineV = [UIView new];
+    UIImageView * lockV = [UIImageView new];
+    [view addSubview:textL];
+    [view addSubview:lineV];
+    [view addSubview:lockV];
+    lockV.image = IMG(@"book_lock");
+    [textL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.mas_equalTo(view);
+        make.left.mas_offset(15);
+        make.right.mas_offset(-20);
+    }];
+    [lineV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.left.right.mas_equalTo(view);
+        make.height.mas_offset(0.5);
+    }];
+    [lockV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.mas_equalTo(view);
+        make.right.mas_offset(-20);
+    }];
+    textL.font = Kfont(15);
+    textL.textColor = UIColorHex(0x656565);
+    lineV.backgroundColor = UIColorHex(0xE5E5E5);
+    BookListModel * model = [self.dataArray objectAtIndex:section];
+    textL.text = model.CatalogNameg;
+    lockV.hidden = model.IsRead;
+    WS(weakSelf);
+    UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
+        if (weakSelf.ClickRowBlock) {
+            weakSelf.ClickRowBlock(model);
+        }
+    }];
+    view.userInteractionEnabled = YES;
+    [view addGestureRecognizer:tap];
+    return view;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
+{
+    return [UIView new];
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return self.dataArray.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    BookListModel * model = [self.dataArray objectAtIndex:indexPath.section];
+    return model.Children.count > 0 ? UITableViewAutomaticDimension : 0.01f;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    BookListModel * model = [self.dataArray objectAtIndex:section];
+    return model.Children.count > 0 ? model.Children.count : 1;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    BookListModel * model = [self.dataArray objectAtIndex:indexPath.section];
+    BookListModel * smdoel = [model.Children objectAtIndex:indexPath.row];
+    BookListSubCell * cell = [BookListSubCell configCell:tableView indexPath:indexPath];
+    if (model.Children.count > 0) {
+        cell.textL.text = smdoel.CatalogNameg;
+        cell.lockV.hidden = smdoel.IsRead;
+    }else{
+        cell.lockV.hidden = YES;
+    }
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    BookListModel * model = [self.dataArray objectAtIndex:indexPath.section];
+    BookListModel * smodel = [model.Children objectAtIndex:indexPath.row];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    if (self.ClickRowBlock) {
+        self.ClickRowBlock(smodel);
+    }
+}
+- (void)setShowBgColor
+{
+    CAGradientLayer *gl = [CAGradientLayer layer];
+    NSArray *colors = [NSArray arrayWithObjects:
+                       (id)[[UIColor colorWithRed:255 green:255 blue:255 alpha:0] CGColor],  //clearColor,透明度为0(显示为黑色,就像黑洞...)
+                       (id)[[UIColor colorWithRed:255 green:255 blue:255 alpha:0.5] CGColor],//clearColor,透明度为0.5
+                       (id)[[UIColor colorWithRed:255 green:255 blue:255 alpha:1] CGColor],  //clearColor,透明度为1(显示为透明)
+                       nil];
+    [gl setColors:colors];
+    [gl setStartPoint:CGPointMake(0.0f, 0.0f)];
+    [gl setEndPoint:CGPointMake(0.0f, 0.4f)];
+    [gl setFrame:CGRectMake(0, 0, SCREEN_WIDTH, 140)];
+    [[self.showView layer] setMask:gl];
+}
+@end

+ 82 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListCell.xib

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="169" id="KGk-i7-Jjw" customClass="BookListCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="169"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="169"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="目录" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lzj-1v-J9K">
+                        <rect key="frame" x="15" y="15" width="33" height="108"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                        <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="zdG-dI-kQ1">
+                        <rect key="frame" x="0.0" y="131" width="320" height="38"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="38" id="dbV-wA-cy5"/>
+                        </constraints>
+                    </tableView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Uwz-ZA-DA1">
+                        <rect key="frame" x="0.0" y="131" width="320" height="38"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="beF-D4-LK5">
+                                <rect key="frame" x="0.0" y="0.0" width="320" height="38"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <state key="normal" title="展示全部">
+                                    <color key="titleColor" red="0.22352941176470587" green="0.47450980392156861" blue="0.82745098039215681" alpha="1" colorSpace="calibratedRGB"/>
+                                </state>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="beF-D4-LK5" secondAttribute="bottom" id="184-7e-R76"/>
+                            <constraint firstAttribute="trailing" secondItem="beF-D4-LK5" secondAttribute="trailing" id="1NW-nq-Xmj"/>
+                            <constraint firstItem="beF-D4-LK5" firstAttribute="top" secondItem="Uwz-ZA-DA1" secondAttribute="top" id="geO-A7-SNu"/>
+                            <constraint firstAttribute="height" constant="38" id="rQz-44-LG8"/>
+                            <constraint firstItem="beF-D4-LK5" firstAttribute="leading" secondItem="Uwz-ZA-DA1" secondAttribute="leading" id="sti-Zj-tRa"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="Uwz-ZA-DA1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="8aq-5V-dj8"/>
+                    <constraint firstItem="lzj-1v-J9K" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="15" id="8eY-h3-Wnw"/>
+                    <constraint firstAttribute="trailing" secondItem="zdG-dI-kQ1" secondAttribute="trailing" id="9dP-yl-eGh"/>
+                    <constraint firstItem="lzj-1v-J9K" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="GdL-nB-4Hn"/>
+                    <constraint firstAttribute="bottom" secondItem="Uwz-ZA-DA1" secondAttribute="bottom" id="O3i-g8-O81"/>
+                    <constraint firstAttribute="trailing" secondItem="Uwz-ZA-DA1" secondAttribute="trailing" id="TY7-uP-Mco"/>
+                    <constraint firstItem="zdG-dI-kQ1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="bDJ-Je-Mak"/>
+                    <constraint firstAttribute="bottom" secondItem="zdG-dI-kQ1" secondAttribute="bottom" id="ptb-cX-FfQ"/>
+                    <constraint firstItem="zdG-dI-kQ1" firstAttribute="top" secondItem="lzj-1v-J9K" secondAttribute="bottom" constant="8" id="rYs-jJ-XI0"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <connections>
+                <outlet property="showBtn" destination="beF-D4-LK5" id="eNN-Vd-Ws9"/>
+                <outlet property="showView" destination="Uwz-ZA-DA1" id="u5K-sR-QeE"/>
+                <outlet property="subTableView" destination="zdG-dI-kQ1" id="zGA-Xd-OQl"/>
+                <outlet property="tabH" destination="dbV-wA-cy5" id="BpL-ll-CjB"/>
+            </connections>
+            <point key="canvasLocation" x="137.68115942028987" y="166.40625"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 21 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.h

@@ -0,0 +1,21 @@
+//
+//  BookListSubCell.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/22.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface BookListSubCell : UITableViewCell
+@property (weak, nonatomic) IBOutlet UILabel *textL;
+@property (weak, nonatomic) IBOutlet UIView  *lineV;
+@property (weak, nonatomic) IBOutlet UIImageView *lockV;
+
++ (BookListSubCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
+@end
+
+NS_ASSUME_NONNULL_END

+ 31 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.m

@@ -0,0 +1,31 @@
+//
+//  BookListSubCell.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/22.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BookListSubCell.h"
+
+@implementation BookListSubCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
++ (BookListSubCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+    static NSString *cellIdentifer = @"BookListSubCell";
+    BookListSubCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
+    if (cell == nil) {
+        cell = [[[NSBundle mainBundle] loadNibNamed:@"BookListSubCell" owner:nil options:nil] objectAtIndex:0];
+    }
+    return cell;
+}
+@end

+ 60 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookListSubCell.xib

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="KGk-i7-Jjw" customClass="BookListSubCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="38"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="38"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dfo-Hy-Xg7">
+                        <rect key="frame" x="45" y="19" width="233" height="0.0"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                        <color key="textColor" red="0.396078431372549" green="0.396078431372549" blue="0.396078431372549" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z6x-VX-Ofz">
+                        <rect key="frame" x="45" y="37.5" width="275" height="0.5"/>
+                        <color key="backgroundColor" red="0.89803921568627454" green="0.89803921568627454" blue="0.89803921568627454" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="0.5" id="rEv-v0-iFK"/>
+                        </constraints>
+                    </view>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="book_lock" translatesAutoresizingMaskIntoConstraints="NO" id="dgY-qj-cAq">
+                        <rect key="frame" x="288" y="12" width="12" height="14"/>
+                    </imageView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="dgY-qj-cAq" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="9x2-GQ-mvR"/>
+                    <constraint firstItem="dgY-qj-cAq" firstAttribute="leading" secondItem="dfo-Hy-Xg7" secondAttribute="trailing" constant="10" id="O8m-3C-qH0"/>
+                    <constraint firstItem="dfo-Hy-Xg7" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="RjO-MH-feG"/>
+                    <constraint firstItem="Z6x-VX-Ofz" firstAttribute="leading" secondItem="dfo-Hy-Xg7" secondAttribute="leading" id="clT-fo-muG"/>
+                    <constraint firstAttribute="bottom" secondItem="Z6x-VX-Ofz" secondAttribute="bottom" id="hoB-OJ-wA2"/>
+                    <constraint firstItem="dfo-Hy-Xg7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="45" id="neB-mN-ddu"/>
+                    <constraint firstAttribute="trailing" secondItem="dgY-qj-cAq" secondAttribute="trailing" constant="20" id="x0W-bX-9iG"/>
+                    <constraint firstAttribute="trailing" secondItem="Z6x-VX-Ofz" secondAttribute="trailing" id="zp2-OX-ZhQ"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <connections>
+                <outlet property="lineV" destination="Z6x-VX-Ofz" id="gNe-Rk-EFu"/>
+                <outlet property="lockV" destination="dgY-qj-cAq" id="fip-bn-Le0"/>
+                <outlet property="textL" destination="dfo-Hy-Xg7" id="vHr-8b-9TQ"/>
+            </connections>
+            <point key="canvasLocation" x="137.68115942028987" y="124.55357142857142"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <image name="book_lock" width="12" height="14"/>
+    </resources>
+</document>

+ 2 - 0
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.h

@@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet UILabel *smaryL;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *smaryContant;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *nameContant;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *subContant;
+
 - (void)setData;
 - (void)setDataWithModel:(HomeSubItemModel *)model;
 + (BookSubArticeCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;

+ 9 - 8
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.m

@@ -7,6 +7,7 @@
 //
 
 #import "BookSubArticeCell.h"
+#import "NSDate+Extension.h"
 
 @implementation BookSubArticeCell
 
@@ -45,20 +46,20 @@
     if ([self textZiseWidth:model.Title]) {
         self.smaryL.hidden = YES;
         self.smaryContant.constant = 0.f;
-        self.nameContant.constant = 4.f;
     }else{
         self.smaryL.hidden = NO;
         self.smaryL.text = model.Summary;
     }
     self.titleL.text = model.Title;
     self.nameL.text = model.Author;
-//    self.subTitleL.text = model.Summary;
-//    if (model.Author.length == 0) {
-//        self.lead.constant = 0.f;
-//    }
-    self.lead.constant = 0.f;
-//    [self.subTitleL layoutIfNeeded];
-//    [self.conView layoutIfNeeded];
+    self.countL.text = [NSString stringWithFormat:@"%ld",model.ReadCount];
+    if (ISEmpty(model.Press) || model.Press.length == 0) {
+        self.subTitleL.text = @"";
+        self.subContant.constant = 0.f;
+    }else{
+        self.subTitleL.text = model.Press;
+    }
+    self.timeL.text = [NSDate getMonthAndDayWihtDate:model.CreatedDate];
 }
 + (BookSubArticeCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath
 {

+ 13 - 11
smartRhino/Project/VCModel/Home/VC/BookStore/View/BookSubArticeCell.xib

@@ -33,10 +33,10 @@
                         </constraints>
                     </view>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Aek-Sx-KxA">
-                        <rect key="frame" x="13" y="15" width="199" height="90"/>
+                        <rect key="frame" x="13" y="21" width="199" height="77.5"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y3f-8i-XPH">
-                                <rect key="frame" x="0.0" y="0.0" width="199" height="34"/>
+                                <rect key="frame" x="0.0" y="0.0" width="199" height="20.5"/>
                                 <constraints>
                                     <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="IXe-l2-Wrn"/>
                                 </constraints>
@@ -52,34 +52,34 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="周亮" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UUc-6Y-CLW">
-                                <rect key="frame" x="0.0" y="57" width="25" height="14"/>
+                                <rect key="frame" x="0.0" y="43.5" width="25" height="14"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="752" text="知识网" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="10M-Wf-VmT">
-                                <rect key="frame" x="0.0" y="75" width="37" height="15"/>
+                                <rect key="frame" x="0.0" y="62.5" width="37" height="15"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M7f-gW-2R6">
-                                <rect key="frame" x="57" y="75" width="25" height="15"/>
+                                <rect key="frame" x="57" y="61.5" width="25" height="17"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Home_yun_icon" translatesAutoresizingMaskIntoConstraints="NO" id="uHg-h9-jcn">
-                                <rect key="frame" x="102" y="77" width="15" height="11"/>
+                                <rect key="frame" x="102" y="64.5" width="15" height="11"/>
                             </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="207" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nBN-CW-Z1I">
-                                <rect key="frame" x="120.5" y="75" width="21.5" height="14.5"/>
+                                <rect key="frame" x="120.5" y="63" width="21.5" height="14.5"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="周亮" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IWF-Ko-oPE">
-                                <rect key="frame" x="0.0" y="38" width="199" height="15"/>
+                                <rect key="frame" x="0.0" y="24.5" width="199" height="15"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
@@ -93,6 +93,7 @@
                             <constraint firstAttribute="bottom" secondItem="10M-Wf-VmT" secondAttribute="bottom" id="8g8-dM-IqE"/>
                             <constraint firstItem="10M-Wf-VmT" firstAttribute="leading" secondItem="y3f-8i-XPH" secondAttribute="leading" id="Egx-st-WSN"/>
                             <constraint firstItem="IWF-Ko-oPE" firstAttribute="trailing" secondItem="y3f-8i-XPH" secondAttribute="trailing" id="JNP-7w-qD0"/>
+                            <constraint firstItem="M7f-gW-2R6" firstAttribute="top" secondItem="UUc-6Y-CLW" secondAttribute="bottom" constant="4" id="Jbk-FI-vMy"/>
                             <constraint firstItem="nBN-CW-Z1I" firstAttribute="leading" secondItem="uHg-h9-jcn" secondAttribute="trailing" constant="3.5" id="UTg-Y1-yaq"/>
                             <constraint firstAttribute="trailing" secondItem="y3f-8i-XPH" secondAttribute="trailing" id="Uoh-dn-2Az"/>
                             <constraint firstItem="y3f-8i-XPH" firstAttribute="top" secondItem="Aek-Sx-KxA" secondAttribute="top" id="X9G-OH-2f2"/>
@@ -100,10 +101,10 @@
                             <constraint firstItem="uHg-h9-jcn" firstAttribute="centerY" secondItem="nBN-CW-Z1I" secondAttribute="centerY" id="ZGv-kf-Wka"/>
                             <constraint firstItem="y3f-8i-XPH" firstAttribute="leading" secondItem="Aek-Sx-KxA" secondAttribute="leading" id="ZjS-XQ-I4u"/>
                             <constraint firstItem="M7f-gW-2R6" firstAttribute="leading" secondItem="10M-Wf-VmT" secondAttribute="trailing" constant="20" id="cTS-Ur-act"/>
-                            <constraint firstItem="UUc-6Y-CLW" firstAttribute="top" secondItem="y3f-8i-XPH" secondAttribute="bottom" constant="23" id="dip-a2-pOA"/>
+                            <constraint firstItem="UUc-6Y-CLW" firstAttribute="top" secondItem="IWF-Ko-oPE" secondAttribute="bottom" constant="4" id="dip-a2-pOA"/>
                             <constraint firstItem="uHg-h9-jcn" firstAttribute="centerY" secondItem="M7f-gW-2R6" secondAttribute="centerY" id="g6z-Q7-VlW"/>
-                            <constraint firstAttribute="height" constant="90" id="kfw-cs-kEk"/>
-                            <constraint firstItem="10M-Wf-VmT" firstAttribute="top" secondItem="UUc-6Y-CLW" secondAttribute="bottom" constant="4" id="tre-8B-3UJ"/>
+                            <constraint firstAttribute="height" relation="lessThanOrEqual" constant="90" id="kfw-cs-kEk"/>
+                            <constraint firstItem="10M-Wf-VmT" firstAttribute="top" secondItem="UUc-6Y-CLW" secondAttribute="bottom" constant="5" id="tre-8B-3UJ"/>
                             <constraint firstItem="UUc-6Y-CLW" firstAttribute="leading" secondItem="y3f-8i-XPH" secondAttribute="leading" id="v33-AI-ae3"/>
                         </constraints>
                     </view>
@@ -131,6 +132,7 @@
                 <outlet property="nameL" destination="UUc-6Y-CLW" id="4cY-Y0-fME"/>
                 <outlet property="smaryContant" destination="0Lw-oe-URj" id="XiI-6K-J10"/>
                 <outlet property="smaryL" destination="IWF-Ko-oPE" id="ARG-ei-syo"/>
+                <outlet property="subContant" destination="cTS-Ur-act" id="OfM-P0-NKw"/>
                 <outlet property="subTitleL" destination="10M-Wf-VmT" id="Qlz-Cn-WYl"/>
                 <outlet property="timeL" destination="M7f-gW-2R6" id="krk-hM-l7o"/>
                 <outlet property="titleL" destination="y3f-8i-XPH" id="CkZ-gw-51U"/>

+ 249 - 2
smartRhino/Project/VCModel/Home/VC/IndexSearchVC.m

@@ -13,8 +13,15 @@
 #import "IndexAllVC.h"
 #import "IndexSubVC.h"
 #import "InfoSearchView.h"
+#import "SearchTypeSection.h"
+#import "SearchTypeCell.h"
+#import "SearchHistoryCell.h"
+#import "SearchDetailViewCell.h"
+#import <YYModel/YYModel.h>
 
-@interface IndexSearchVC ()<InfoSearchViewDelegate>
+#define PYSEARCH_MARGIN 10
+
+@interface IndexSearchVC ()<InfoSearchViewDelegate, UITableViewDataSource, UITableViewDelegate>
 @property (nonatomic, strong) InfoSearchView      *topNavSearch;
 @property (strong, nonatomic) DrawerView           *drawerView;
 @property (strong, nonatomic) SegmentViewController          *pageView;
@@ -24,6 +31,15 @@
 @property (strong, nonatomic) IndexSubVC           *bookVC;
 @property (strong, nonatomic) IndexSubVC           *videoVC;
 @property (strong, nonatomic) IndexSubVC           *musicVC;
+// 历史记录tableView
+@property (nonatomic, strong) TDTableView          *historyTableView;
+// 历史记录tableViewHeaderContainer
+@property (nonatomic, strong) UIView               *historyHeaderContainer;
+// 历史记录tableHeaderView
+@property (nonatomic, strong) UIView               *historyTableHeaderView;
+@property (nonatomic, strong) NSMutableArray       *historyArray;
+@property (nonatomic, strong) SearchTypeSection    *historyHeaderTitleView;
+@property (nonatomic, strong) UIView               *hisNoView;
 
 @end
 
@@ -52,6 +68,21 @@
 
 - (void)searchButtonAction:(UISearchBar *)searchBar {
     self.searchStr = searchBar.text;
+    
+    [self insertHistorySearchStr:self.searchStr];
+    // 更新本地历史记录
+    self.historyArray = [NSMutableArray arrayWithArray:[_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_Home]];
+    // 更新tableViewHeader的高度
+    if (self.historyArray.count == 0) {
+        self.hisNoView.hidden = NO;
+    }else{
+        self.hisNoView.hidden = YES;
+    }
+    [self addAndLayoutTagsWithTagsContentView:self.historyTableHeaderView tagTexts:self.historyArray];
+    [self resetHistoryHeaderViewHeight];
+    [self.historyTableView reloadData];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
     // 添加历史记录,刷新historyTable
     [self noticeGetData];
     [self.view endEditing:YES];
@@ -71,7 +102,7 @@
         case 1:
         {
             self.articeVC.searchText = self.searchStr;
-            self.articeVC.type = MediaArticeType;
+            self.articeVC.type = MediaMediaArticeType;
             [self.articeVC getData];
         }
             break;
@@ -111,8 +142,11 @@
     [super viewDidLoad];
     self.view.backgroundColor = [UIColor whiteColor];
     [self.view addSubview:self.topNavSearch];
+    [self.view addSubview:self.historyTableView];
     [self addNavSearch];
     [self addPageView];
+    [self.historyTableView setFrame:CGRectMake(0, CGRectGetMaxY(self.topNavSearch.frame), SCREEN_WIDTH, SCREEN_HEIGHT - CGRectGetMaxY(self.topNavSearch.frame))];
+    [self initHistoryTableHeaderView];
     [self.pageView addObserver:self forKeyPath:@"selectIndex" options:NSKeyValueObservingOptionNew context:nil];
 }
 - (void)dealloc
@@ -216,5 +250,218 @@
     [self.pageView initSegment:0];
     [self.pageView addParentController:self];
     [self.pageView.view setFrame:CGRectMake(0, CGRectGetMaxY(self.topNavSearch.frame), SCREEN_WIDTH, SCREEN_HEIGHT - CGRectGetMaxY(self.topNavSearch.frame))];
+    self.pageView.view.hidden = YES;
+}
+
+- (void)initHistoryTableHeaderView {
+    [self.historyHeaderTitleView setSectionTitle:@"最近搜索"];
+    WEAKSELF
+    self.historyHeaderTitleView.rightAction = ^{
+        
+       
+        UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
+        UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            // 清空历史记录
+            [_TDFileStorage saveHistorySearchBySearchType:HistorySearchType_Home WithArr:@[]];
+            weakSelf.historyArray = [NSMutableArray arrayWithArray:[_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_Home]];
+            [weakSelf addAndLayoutTagsWithTagsContentView:weakSelf.historyTableHeaderView tagTexts:weakSelf.historyArray];
+            [weakSelf resetHistoryHeaderViewHeight];
+            if (weakSelf.historyArray.count == 0) {
+                weakSelf.hisNoView.hidden = NO;
+            }else{
+                weakSelf.hisNoView.hidden = YES;
+            }
+            [weakSelf.historyTableView reloadData];
+        }];
+        UIAlertController *tmpVc = [UIAlertController alertControllerWithTitle:@"提示" message:@"确定要删除最近搜索?" preferredStyle:UIAlertControllerStyleAlert];
+        [tmpVc addAction:action1];
+        [tmpVc addAction:action2];
+        [weakSelf presentViewController:tmpVc animated:YES completion:nil];
+    };
+    [self.historyHeaderContainer addSubview:self.historyHeaderTitleView];
+    
+    self.historyTableHeaderView.frame = CGRectMake(0, self.historyHeaderTitleView.height + 13, kScreenWidth, 0);
+    [self addAndLayoutTagsWithTagsContentView:self.historyTableHeaderView tagTexts:self.historyArray];
+    CGFloat height = CGRectGetMaxY(self.historyTableHeaderView.subviews.lastObject.frame);
+    self.historyTableHeaderView.frame = CGRectMake(0, self.historyHeaderTitleView.height + 13, kScreenWidth, height);
+    [self.historyHeaderContainer addSubview:self.historyTableHeaderView];
+    [self resetHistoryHeaderViewHeight];
+    self.historyTableView.tableHeaderView = self.historyHeaderContainer;
+    
+    self.historyTableView.tableFooterView = self.hisNoView;
+    if (self.historyArray.count == 0) {
+        self.hisNoView.hidden = NO;
+    }else{
+        self.hisNoView.hidden = YES;
+    }
+    UILabel * label = [UILabel new];
+    label.text = @"暂无搜索记录!";
+    label.font = [UIFont systemFontOfSize:14];
+    label.textColor = UIColorHex(0x999999);
+    [self.hisNoView addSubview:label];
+    [label mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.mas_equalTo(self.hisNoView);
+    }];
+}
+- (UIView *)historyTableHeaderView {
+    if (!_historyTableHeaderView) {
+        _historyTableHeaderView = [UIView new];
+        _historyTableHeaderView.backgroundColor = [UIColor whiteColor];;
+    }
+    return _historyTableHeaderView;
+}
+- (SearchTypeSection *)historyHeaderTitleView {
+    if (!_historyHeaderTitleView) {
+        _historyHeaderTitleView = [[SearchTypeSection alloc] initWithFrame:CGRectMake(0, 0, kGXScreenWidth, 44)];
+    }
+    return _historyHeaderTitleView;
+}
+- (UIView *)hisNoView
+{
+    if (!_hisNoView) {
+        _hisNoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
+        _hisNoView.hidden = YES;
+    }
+    return _hisNoView;
+}
+- (UIView *)historyHeaderContainer {
+    if (!_historyHeaderContainer) {
+        _historyHeaderContainer = [UIView new];
+        _historyHeaderContainer.backgroundColor = [UIColor whiteColor];
+    }
+    return _historyHeaderContainer;
+}
+- (TDTableView *)historyTableView {
+    if (!_historyTableView) {
+        _historyTableView = [[TDTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
+        _historyTableView.dataSource = self;
+        _historyTableView.delegate = self;
+    }
+    return _historyTableView;
+}
+- (NSMutableArray *)historyArray {
+    if (!_historyArray) {
+        _historyArray = [_TDFileStorage loadHistorySearchBySearchType:HistorySearchType_Home].mutableCopy;
+    }
+    return _historyArray;
+}
+- (void)resetHistoryHeaderViewHeight {
+    CGFloat containerHeight = CGRectGetMaxY(self.historyHeaderContainer.subviews.lastObject.frame);
+    self.historyHeaderContainer.frame = CGRectMake(0, 0, kScreenWidth, containerHeight);
+}
+
+- (void)addAndLayoutTagsWithTagsContentView:(UIView *)contentView tagTexts:(NSArray<NSString *> *)tagTexts;
+{
+    [contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
+    NSMutableArray *tagsM = [NSMutableArray array];
+    for (int i = 0; i < tagTexts.count; i++) {
+        UILabel *label = [self labelWithTitle:tagTexts[i]];
+        [label addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tagDidCLick:)]];
+        [contentView addSubview:label];
+        [tagsM addObject:label];
+    }
+    
+    CGFloat currentX = 0;
+    CGFloat currentY = 0;
+    CGFloat countRow = 0;
+    CGFloat countCol = 0;
+    
+    CGFloat leftMargin = 12;
+    
+    for (int i = 0; i < contentView.subviews.count; i++) {
+        UILabel *subView = contentView.subviews[i];
+        // When the number of search words is too large, the width is width of the contentView
+        if (subView.width > contentView.width) {
+            subView.width = contentView.width;
+        }
+        
+        if (leftMargin + currentX + subView.width + PYSEARCH_MARGIN * countRow > contentView.width) {
+            subView.x = leftMargin;
+            subView.y = (currentY += subView.height) + PYSEARCH_MARGIN * ++countCol;
+            currentX = subView.width;
+            countRow = 1;
+        } else {
+            subView.x = leftMargin + (currentX += subView.width) - subView.width + PYSEARCH_MARGIN * countRow;
+            subView.y = currentY + PYSEARCH_MARGIN * countCol;
+            countRow ++;
+        }
+    }
+}
+
+
+
+// 创建label
+- (UILabel *)labelWithTitle:(NSString *)title
+{
+    UILabel *label = [[UILabel alloc] init];
+    label.userInteractionEnabled = YES;
+    label.font = [UIFont systemFontOfSize:14];
+    label.text = title;
+    label.textColor = [UIColor grayColor];
+    label.backgroundColor = kColorFromRGB(0xfafafa);
+    label.textAlignment = NSTextAlignmentCenter;
+    [label sizeToFit];
+    label.width += 20;
+    label.height += 14;
+    label.layer.cornerRadius = label.height / 2;
+    label.clipsToBounds = YES;
+    return label;
+}
+
+- (void)insertHistorySearchStr:(NSString *)string {
+    for (NSString *cache in _historyArray) {
+        // 查重
+        if ([cache isEqualToString:string]) {
+            return;
+        }
+    }
+    [_historyArray insertObject:string atIndex:0];
+    if (_historyArray.count > 10) {
+        NSArray *orderArray = [_historyArray subarrayWithRange:NSMakeRange(0, 10)];
+        _historyArray = orderArray.mutableCopy;
+    }
+    [_TDFileStorage saveHistorySearchBySearchType:HistorySearchType_Home WithArr:_historyArray];
+}
+
+- (void)tagDidCLick:(UITapGestureRecognizer *)gr
+{
+    UILabel *label = (UILabel *)gr.view;
+    self.searchStr = label.text;
+    [self.topNavSearch setNowSearchData:self.searchStr];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
+    [self noticeGetData];
+}
+
+#pragma mark - UITableViewDelegate
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 0;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 34;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    SearchHistoryCell * searchHistoryCell = (SearchHistoryCell *)[tableView dequeueReusableCellWithIdentifier:@"SearchHistoryCell"];
+    if (!searchHistoryCell) {
+        searchHistoryCell = [[SearchHistoryCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SearchHistoryCell"];
+    }
+    [searchHistoryCell setCurrentHistoryData:_historyArray[indexPath.row]];
+    return searchHistoryCell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [self.view endEditing:YES];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    self.searchStr = self.historyArray[indexPath.row];
+    [self.topNavSearch setNowSearchData:self.searchStr];
+    self.pageView.view.hidden = NO;
+    self.historyTableView.hidden = YES;
+    // 添加历史记录,刷新historyTable
+    [self noticeGetData];
 }
 @end

+ 21 - 8
smartRhino/Project/VCModel/Home/VC/IndexViewController.m

@@ -50,12 +50,13 @@
 #import "HomeWeiCousreVC.h"
 #import "HomeMingShiVC.h"
 #import "HomeUserVC.h"
+#import "HomeSchoolVC.h"
 #import "HomeProblemVC.h"
 #import "WorkFlowDetailsController.h"
 #import "IndexSearchVC.h"
 
 @interface IndexViewController () <SLBannerViewDelegate,AddChannelControllerDelegate,EMChatManagerDelegate, EMGroupManagerDelegate, EMConversationsDelegate>
-@property (nonatomic, strong) UILabel *titleLabel;
+@property (nonatomic, strong) UILabel           *titleLabel;
 @property (nonatomic, strong) UIView            *bannerBgV;
 @property (nonatomic, strong) SLBannerView      *bannerView;
 @property (nonatomic, strong) SurfaceSearchView *searchView;
@@ -82,7 +83,6 @@
 @property (copy, nonatomic)   NSString        *style;
 @property (strong, nonatomic) NSMutableArray    *chatListIMArray;
 @property (strong, nonatomic) NSMutableArray    *dataArray;
-@property (strong, nonatomic) HomeRecommendVC * homeVC;
 @end
 
 @implementation IndexViewController
@@ -170,10 +170,10 @@
         ChannelModel * model = self.myChannel[i];
         if ([model.StyleCss isEqualToString:@"Commend"]) {
             [data addObject:model.ArticleGroupName];
-            self.homeVC = [[HomeRecommendVC alloc] init];
-            self.homeVC.height = height;
-            self.homeVC.style = model.StyleCss;
-            [vcArr addObject:self.homeVC];
+            HomeRecommendVC * vc = [[HomeRecommendVC alloc] init];
+            vc.height = height;
+            vc.style = model.StyleCss;
+            [vcArr addObject:vc];
         }
         if ([model.StyleCss isEqualToString:@"Cathedra"]) {
             [data addObject:model.ArticleGroupName];
@@ -224,6 +224,13 @@
             vc.style = model.StyleCss;
             [vcArr addObject:vc];
         }
+        if ([model.StyleCss isEqualToString:@"StarSchool"]) {
+            [data addObject:model.ArticleGroupName];
+            HomeSchoolVC * vc = [[HomeSchoolVC alloc] init];
+            vc.height = height;
+            vc.style = model.StyleCss;
+            [vcArr addObject:vc];
+        }
         //        if ([model.StyleCss isEqualToString:@"DayProblem"]) {///每日技能
         //            [data addObject:model.ArticleGroupName];
         //            HomeProblemVC * vc = [[HomeProblemVC alloc] init];
@@ -400,7 +407,10 @@
                 dispatch_semaphore_signal(sem);
             }
         } failure:^(NSError * _Nonnull error) {
-            SHOWERROR([ZYCTool handerResultData:error]);
+            if (++httpFinishCount == 2) {
+                dispatch_semaphore_signal(sem);
+            }
+//            SHOWERROR([ZYCTool handerResultData:error]);
         }];
         [[HttpManager sharedHttpManager] POSTUrl:[NSString stringWithFormat:@"%@%@",BaseUrl,Article_Pindao_User_Post] parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
             NSLog(@"%@",responseObject);
@@ -417,7 +427,10 @@
                 dispatch_semaphore_signal(sem);
             }
         } failure:^(NSError * _Nonnull error) {
-            SHOWERROR([ZYCTool handerResultData:error]);
+            if (++httpFinishCount == 2) {
+                dispatch_semaphore_signal(sem);
+            }
+//            SHOWERROR([ZYCTool handerResultData:error]);
         }];
         dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

+ 67 - 0
smartRhino/Project/VCModel/Home/VC/SubVC/HomeBigshotVC.m

@@ -10,6 +10,12 @@
 #import "HomeSubModel.h"
 #import "HomeSubItemModel.h"
 #import "HomeBigshotCell.h"
+#import "BookTeacherDetailVC.h"
+#import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+#import "IndexMoreVC.h"
+#import "HomeSCDetailVC.h"
 
 @interface HomeBigshotVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
@@ -77,14 +83,21 @@
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
+    WS(weakSelf);
     HomeSubModel *model = self.dataSource[indexPath.row];
     if (indexPath.row == 0) {
         HomeBigshotCell * cell = [HomeBigshotCell configCell0:tableView indexPath:indexPath];
         [cell setDatatype:0 model:model];
+        cell.ClickItemBlock = ^(HomeSubItemModel * _Nonnull pmodel) {
+            [weakSelf pushVC:pmodel];
+        };
         return cell;
     }else{
         HomeBigshotCell * cell = [HomeBigshotCell configCell1:tableView indexPath:indexPath];
         [cell setDatatype:1 model:model];
+        cell.ClickItemBlock = ^(HomeSubItemModel * _Nonnull pmodel) {
+            [weakSelf pushVC:pmodel];
+        };
         return cell;
     }
 }
@@ -92,4 +105,58 @@
 {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
 }
+- (void)pushVC:(HomeSubItemModel *)model
+{
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_MediaAritle:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_MediaAritle;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        default:
+        {
+            
+        }
+            break;
+    }
+}
 @end

+ 35 - 4
smartRhino/Project/VCModel/Home/VC/SubVC/HomeDayGoodArticeVC.m

@@ -14,6 +14,8 @@
 @interface HomeDayGoodArticeVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
 @property (nonatomic, strong) NSMutableArray  * dataSource;
+@property (nonatomic, assign) NSInteger         currentPage;
+@property (nonatomic, assign) NSInteger         Total;
 @end
 
 @implementation HomeDayGoodArticeVC
@@ -23,7 +25,13 @@
     [self.view addSubview:self.tableView];
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
-    [self getData];
+    self.currentPage = 1;
+    self.Total = 0;
+    WS(weakSelf);
+    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
+        [weakSelf footerRefresh];
+    }];
+    [self headRefresh];
 }
 - (void)setHeight:(CGFloat)height
 {
@@ -45,23 +53,41 @@
     }
     return _dataSource;
 }
+- (void)headRefresh{
+    self.currentPage = 1;
+    self.Total = 1;
+    [self.dataSource removeAllObjects];
+    [self getData];
+}
+- (void)footerRefresh{
+    self.currentPage += 1;
+    if (self.Total == self.dataSource.count) {
+        self.currentPage --;
+        [self.tableView.mj_footer endRefreshingWithNoMoreData];
+        self.tableView.mj_footer.hidden = YES;
+        return ;
+    }
+    [self getData];
+}
 - (void)getData
 {
     WS(weakSelf);
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_GooDText) parameters:@{@"StyleCss":self.style,@"Page":@(1),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_GooDText) parameters:@{@"StyleCss":self.style,@"Page":@(self.currentPage),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"%@",responseObject);
         if ([responseObject isKindOfClass:[NSDictionary class]]) {
-                HomeSubModel *model = [HomeSubModel modelWithDictionary:responseObject];
+            HomeSubModel *model = [HomeSubModel modelWithDictionary:responseObject];
             for (NSDictionary * dict in model.Items) {
                 HomeSubItemModel *smodel = [HomeSubItemModel modelWithDictionary:dict];
                 [weakSelf.dataSource addObject:smodel];
             }
+            weakSelf.Total = model.Total;
         }
+        [weakSelf.tableView.mj_footer endRefreshing];
         dispatch_async(dispatch_get_main_queue(), ^{
             [weakSelf.tableView reloadData];
         });
     } failure:^(NSError * _Nonnull error) {
-        
+        [weakSelf.tableView.mj_footer endRefreshing];
     }];
 }
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
@@ -86,5 +112,10 @@
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    HomeSubItemModel *model = self.dataSource[indexPath.row];
+    MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+    vc.Id = model.Id;
+    vc.type = model.MediaType;
+    [self.navigationController pushViewController:vc animated:YES];
 }
 @end

+ 62 - 5
smartRhino/Project/VCModel/Home/VC/SubVC/HomeDayGoodBookVC.m

@@ -10,7 +10,12 @@
 #import "HomeSubModel.h"
 #import "HomeSubItemModel.h"
 #import "HomeGoodBookCell.h"
-#import "BookDetailVC.h"
+#import "BookTeacherDetailVC.h"
+#import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+#import "IndexMoreVC.h"
+#import "HomeSCDetailVC.h"
 
 @interface HomeDayGoodBookVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
@@ -101,10 +106,8 @@
     }
     BOOL isEnd = self.dataSource.count - 1 == indexPath.row;
     [cell setDataWithItem:indexPath.row isUnUser:isEnd model:model];
-    cell.ClickIndexBlock = ^{
-        BookDetailVC * vc = [BookDetailVC initBookDetailVC];
-        vc.hidesBottomBarWhenPushed = YES;
-        [weakSelf.navigationController pushViewController:vc animated:YES];
+    cell.ClickItemBlock = ^(HomeSubItemModel * _Nonnull pmodel) {
+        [weakSelf pushVC:pmodel];
     };
     [cell.huanBtn setAction:^{
         [weakSelf refreshData:model indexPath:indexPath];
@@ -115,4 +118,58 @@
 {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
 }
+- (void)pushVC:(HomeSubItemModel *)model
+{
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_MediaAritle:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_MediaAritle;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        default:
+        {
+            
+        }
+            break;
+    }
+}
 @end

+ 17 - 0
smartRhino/Project/VCModel/Home/VC/SubVC/HomeSCDetailVC.h

@@ -0,0 +1,17 @@
+//
+//  HomeSCDetailVC.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@interface HomeSCDetailVC : UIViewController
+//默认上下左右放大
+@property (nonatomic, assign) BOOL isEnlarge;
+@property (nonatomic, assign) NSUInteger selectedIndex;
+@property (nonatomic, readonly, assign) BOOL isBacking;
+
+@property (nonatomic, assign) NSInteger  Id;
+@end

+ 410 - 0
smartRhino/Project/VCModel/Home/VC/SubVC/HomeSCDetailVC.m

@@ -0,0 +1,410 @@
+//
+//  HomeSCDetailVC.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "HomeSCDetailVC.h"
+#import "SegmentView.h"
+#import "FirstViewController.h"
+#import "ThirdViewController.h"
+#import "SecondViewController.h"
+#import "HomeSubItemModel.h"
+#import "CenterTouchTableView.h"
+#import "HomeSchoolHeadView.h"
+#import "MoveViewController.h"
+#import "HomeSchollVideoVC.h"
+
+@interface HomeSCDetailVC () <UITableViewDelegate, UITableViewDataSource, UIGestureRecognizerDelegate>
+@property (nonatomic, strong) CenterTouchTableView *mainTableView;
+@property (nonatomic, strong) SegmentView *segmentView;
+@property (nonatomic, strong) UIView *naviView;
+@property (nonatomic, strong) UIImageView        *headerImageView;
+@property (nonatomic, strong) HomeSchoolHeadView *headerContentView;
+/** mainTableView是否可以滚动 */
+@property (nonatomic, assign) BOOL canScroll;
+/** segmentHeaderView到达顶部, mainTableView不能移动 */
+@property (nonatomic, assign) BOOL isTopIsCanNotMoveTabView;
+/** segmentHeaderView离开顶部,childViewController的滚动视图不能移动 */
+@property (nonatomic, assign) BOOL isTopIsCanNotMoveTabViewPre;
+/** 是否正在pop */
+@property (nonatomic, assign) BOOL isBacking;
+@property (nonatomic, strong) HomeSubItemModel   *model;
+@property (nonatomic, strong) UIButton           *backBtn;
+@property (nonatomic, strong) UIButton           *menuBtn;
+@property (nonatomic, strong) UIButton           *shareBtn;
+@property (nonatomic, assign) CGFloat             HeaderImageViewHeight;
+@property (nonatomic, strong) FirstViewController           *firstVC;
+@property (nonatomic, strong) SecondViewController          *secondVC;
+@property (nonatomic, strong) ThirdViewController           *thirdVC;
+@end
+
+@implementation HomeSCDetailVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = [UIColor whiteColor];
+    self.HeaderImageViewHeight = SCREEN_WIDTH / 375 * 183 + 40.f;
+    [[UIScrollView appearance] setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
+    //如果使用自定义的按钮去替换系统默认返回按钮,会出现滑动返回手势失效的情况
+    self.navigationController.interactivePopGestureRecognizer.delegate = self;
+    [self setupSubViews];
+    //注册允许外层tableView滚动通知-解决和分页视图的上下滑动冲突问题
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:@"leaveTop" object:nil];
+    //分页的scrollView左右滑动的时候禁止mainTableView滑动,停止滑动的时候允许mainTableView滑动
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:IsEnablePersonalCenterVCMainTableViewScroll object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(collectSuccess) name:COLLECTSUCCESS object:nil];
+
+    [self getData];
+    WS(weakSelf);
+    [self.headerContentView.collectBtn setAction:^{
+        if (weakSelf.model.IsCollect) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"真的取消收藏吗?" message:nil preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+                    [dic setValue:@(weakSelf.Id) forKey:@"CollectionDataId"];
+                    ///     1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8 会议详情 14工作流审批 300 文件 400 会议纪要
+                    [dic setValue:@(CollectModel_Organization) forKey:@"CollectionType"];
+                    [dic setValue:@(0) forKey:@"FolderId"];
+                    [dic setValue:@(0) forKey:@"SourceUserId"];
+                    [[HttpManager sharedHttpManager] PUTUrl:Host(API_CreateCollect) parameters:dic success:^(id  _Nonnull responseObject) {
+                        weakSelf.model.IsCollect = NO;
+                        dispatch_async(dispatch_get_main_queue(), ^{
+                            [weakSelf.headerContentView setDataWithModel:weakSelf.model];
+                        });
+                    } failure:^(NSError * _Nonnull error) {
+                        //                    SHOWERROR([ZYCTool handerResultData:error]);
+                    }];
+                }];
+                UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+                    
+                }];
+                [alert addAction:actionYes];
+                [alert addAction:actionNo];
+                [weakSelf presentViewController:alert animated:YES completion:^{
+                    
+                }];
+            });
+        }else{
+            [weakSelf gotoCollectHander:weakSelf.Id];
+        }
+    }];
+}
+- (void)gotoCollectHander:(NSInteger)Id{
+    MoveViewController *vc = [MoveViewController initMoveViewController];
+    vc.CollectionDataId = Id;
+    vc.collectType = CollectHanderType_Collect;
+    vc.CollectionType = CollectModel_Organization;
+    vc.ParentId = 0;
+    vc.titleStr = @"我的收藏";
+    vc.TypeId = CreateCollectionType;
+    vc.FolderIds = @[].mutableCopy;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+- (void)collectSuccess
+{
+    self.model.IsCollect = YES;
+    [self.headerContentView setDataWithModel:self.model];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.navigationController setNavigationBarHidden:YES];
+    self.naviView.hidden = NO;
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    self.isBacking = NO;
+    [[NSNotificationCenter defaultCenter] postNotificationName:PersonalCenterVCBackingStatus object:nil userInfo:@{@"isBacking" : @(self.isBacking)}];
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    self.isBacking = YES;
+    [[NSNotificationCenter defaultCenter] postNotificationName:PersonalCenterVCBackingStatus object:nil userInfo:@{@"isBacking" : @(self.isBacking)}];
+}
+
+- (void)viewDidDisappear:(BOOL)animated {
+    [super viewDidDisappear:animated];
+    self.fd_prefersNavigationBarHidden = YES;
+    [self.navigationController setNavigationBarHidden:YES];
+    self.naviView.hidden = YES;
+}
+
+- (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+#pragma mark - Private Methods
+- (void)setupSubViews {
+    [self.view addSubview:self.mainTableView];
+    [self.view addSubview:self.naviView];
+    [self.headerImageView addSubview:self.headerContentView];
+    [self.mainTableView addSubview:self.headerImageView];
+    
+    [self.headerContentView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.centerX.mas_equalTo(self.headerImageView);
+        make.width.mas_equalTo(SCREEN_WIDTH);
+        make.height.mas_equalTo(self.HeaderImageViewHeight);
+    }];
+    [self.naviView addSubview:self.backBtn];
+    [self.naviView addSubview:self.menuBtn];
+    [self.naviView addSubview:self.shareBtn];
+
+    [self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.bottom.mas_equalTo(self.naviView);
+        make.size.mas_offset(CGSizeMake(44, 44));
+    }];
+    [self.menuBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.mas_equalTo(self.naviView);
+        make.left.mas_equalTo(self.backBtn.mas_right);
+        make.size.mas_offset(CGSizeMake(44, 44));
+    }];
+    [self.shareBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.bottom.mas_equalTo(self.naviView);
+        make.size.mas_offset(CGSizeMake(44, 44));
+    }];
+    [self.headerContentView.playBtn addTarget:self action:@selector(PlayAction) forControlEvents:UIControlEventTouchUpInside];
+}
+- (void)PlayAction
+{
+    if (self.model.FileUrl) {
+        HomeSchollVideoVC * vc = [HomeSchollVideoVC initHomeSchollVideoVC];
+        vc.file = self.model.FileUrl;
+        vc.VideoImage = self.model.VideoCoverImage ? self.model.VideoCoverImage : self.model.VideoImage;
+        [self.navigationController pushViewController:vc animated:YES];
+    }else{
+        SHOWERROR(@"没有视频地址");
+    }
+}
+- (void)getData
+{
+    WS(weakSelf);
+    NSString * url = [NSString stringWithFormat:@"%@%ld",Host(API_APP_Press),self.Id];
+    [[HttpManager sharedHttpManager] GETUrl:url parameters:@{} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        if ([responseObject isKindOfClass:[NSDictionary class]]) {
+            weakSelf.model = [HomeSubItemModel modelWithDictionary:responseObject];
+            [weakSelf.headerContentView setDataWithModel:weakSelf.model];
+            [weakSelf.firstVC setDataText:weakSelf.model.Summary];
+            [weakSelf.secondVC setDataArray:weakSelf.model.TeacherResult];
+            [weakSelf.thirdVC setDataArray:weakSelf.model.Resource];
+        }
+    } failure:^(NSError * _Nonnull error) {
+
+    }];
+}
+#pragma mark -  Notification
+- (void)acceptMsg:(NSNotification *)notification {
+    NSDictionary *userInfo = notification.userInfo;
+    
+    if ([notification.name isEqualToString:@"leaveTop"]) {
+        NSString *canScroll = userInfo[@"canScroll"];
+        if ([canScroll isEqualToString:@"1"]) {
+            self.canScroll = YES;
+        }
+    } else if ([notification.name isEqualToString:IsEnablePersonalCenterVCMainTableViewScroll]) {
+        NSString *canScroll = userInfo[@"canScroll"];
+        if ([canScroll isEqualToString:@"1"]) {
+            self.mainTableView.scrollEnabled = YES;
+        }else if([canScroll isEqualToString:@"0"]) {
+            self.mainTableView.scrollEnabled = NO;
+        }
+    }
+}
+
+#pragma mark - UiScrollViewDelegate
+/**
+ * 处理联动
+ * 因为要实现下拉头部放大的问题,tableView设置了contentInset,所以试图刚加载的时候会调用一遍这个方法,所以要做一些特殊处理,
+ */
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
+    if (scrollView == self.mainTableView) {
+        //当前y轴偏移量
+        CGFloat yOffset  = scrollView.contentOffset.y;
+        //临界点偏移量(吸顶临界点)
+        CGFloat tabyOffset = [self.mainTableView rectForSection:0].origin.y - STATUS_BAR_HEIGHT - NAVIGATION_BAR_HEIGHT;
+        
+        //第一部分: 更改导航栏的背景图的透明度
+        CGFloat alpha = 0;
+        if (-yOffset <= STATUS_BAR_HEIGHT + NAVIGATION_BAR_HEIGHT) {
+            alpha = 1;
+        } else if ((-yOffset > STATUS_BAR_HEIGHT + NAVIGATION_BAR_HEIGHT) && -yOffset < self.HeaderImageViewHeight) {
+            alpha = (self.HeaderImageViewHeight + yOffset) / (self.HeaderImageViewHeight - STATUS_BAR_HEIGHT - NAVIGATION_BAR_HEIGHT);
+        }else {
+            alpha = 0;
+        }
+        
+        //第二部分:
+        //利用contentOffset处理内外层scrollView的滑动冲突问题
+        if (yOffset >= tabyOffset) {
+            scrollView.contentOffset = CGPointMake(0, tabyOffset);
+            _isTopIsCanNotMoveTabView = YES;
+        }else{
+            _isTopIsCanNotMoveTabView = NO;
+        }
+        
+        _isTopIsCanNotMoveTabViewPre = !_isTopIsCanNotMoveTabView;
+        
+        if (!_isTopIsCanNotMoveTabViewPre) {
+            [[NSNotificationCenter defaultCenter] postNotificationName:@"goTop" object:nil userInfo:@{@"canScroll":@"1"}];
+            _canScroll = NO;
+        } else{
+            if (!_canScroll) {
+                _mainTableView.contentOffset = CGPointMake(0, tabyOffset);
+            }
+        }
+        
+        //第三部分:
+        /**
+         * 处理头部自定义背景视图 (如: 下拉放大)
+         * 图片会被拉伸多出状态栏的高度
+         */
+        if(yOffset <= -self.HeaderImageViewHeight) {
+            if (_isEnlarge) {
+                CGRect f = self.headerImageView.frame;
+                //改变HeadImageView的frame
+                //上下放大
+                f.origin.y = yOffset;
+                f.size.height = -yOffset;
+                //左右放大
+                f.origin.x = (yOffset * SCREEN_WIDTH / self.HeaderImageViewHeight + SCREEN_WIDTH) / 2;
+                f.size.width = -yOffset * SCREEN_WIDTH / self.HeaderImageViewHeight;
+                //改变头部视图的frame
+                self.headerImageView.frame = f;
+            }else{
+                scrollView.bounces = NO;
+            }
+        }else {
+            scrollView.bounces = YES;
+        }
+    }
+}
+
+#pragma mark - UITableViewDelegate
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return SCREEN_HEIGHT - STATUS_BAR_HEIGHT - NAVIGATION_BAR_HEIGHT;
+}
+
+#pragma mark - UITableViewDataSource
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 1;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    [cell.contentView addSubview:self.setPageViewControllers];
+    return cell;
+}
+
+- (UITableView *)mainTableView {
+    if (!_mainTableView) {
+        //⚠️这里的属性初始化一定要放在mainTableView.contentInset的设置滚动之前, 不然首次进来视图就会偏移到临界位置,contentInset会调用scrollViewDidScroll这个方法。
+        //初始化变量
+        self.canScroll = YES;
+        self.isTopIsCanNotMoveTabView = NO;
+        
+        self.mainTableView = [[CenterTouchTableView alloc]initWithFrame:CGRectMake(0, STATUS_BAR_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT - STATUS_BAR_HEIGHT) style:UITableViewStylePlain];
+        _mainTableView.delegate = self;
+        _mainTableView.dataSource = self;
+        _mainTableView.showsVerticalScrollIndicator = NO;
+        //注意:这里不能使用动态高度_headimageHeight, 不然tableView会往下移,在iphone X下,头部不放大的时候,上方依然会有白色空白
+        _mainTableView.contentInset = UIEdgeInsetsMake(self.HeaderImageViewHeight, 0, 0, 0);//内容视图开始正常显示的坐标为(0, self.HeaderImageViewHeight)
+    }
+    return _mainTableView;
+}
+
+- (HomeSchoolHeadView *)headerContentView {
+    if (!_headerContentView) {
+        _headerContentView = [[HomeSchoolHeadView alloc]init];
+    }
+    return _headerContentView;
+}
+
+
+- (UIImageView *)headerImageView {
+    if (!_headerImageView) {
+        _headerImageView = [[UIImageView alloc] init];
+        _headerImageView.backgroundColor = [UIColor clearColor];
+        _headerImageView.userInteractionEnabled = YES;
+        _headerImageView.frame = CGRectMake(0, -self.HeaderImageViewHeight, SCREEN_WIDTH, self.HeaderImageViewHeight);
+    }
+    return _headerImageView;
+}
+
+/*
+ * 这里可以设置替换你喜欢的segmentView
+ */
+- (UIView *)setPageViewControllers {
+    if (!_segmentView) {
+        //设置子控制器
+        self.firstVC  = [[FirstViewController alloc] init];
+        self.secondVC = [[SecondViewController alloc] init];
+        self.thirdVC  = [[ThirdViewController alloc] init];
+        NSArray *controllers = @[self.firstVC, self.secondVC, self.thirdVC];
+        NSArray *titleArray = @[@"概况", @"人物", @"共享资源"];
+        SegmentView *segmentView = [[SegmentView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - STATUS_BAR_HEIGHT - NAVIGATION_BAR_HEIGHT) controllers:controllers titleArray:(NSArray *)titleArray parentController:self];
+        //注意:不能通过初始化方法传递selectedIndex的初始值,因为内部使用的是Masonry布局的方式, 否则设置selectedIndex不起作用
+        segmentView.selectedIndex = self.selectedIndex;
+        _segmentView = segmentView;
+    }
+    return _segmentView;
+}
+- (UIView *)naviView {
+    if (!_naviView) {
+        _naviView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, STATUS_BAR_HEIGHT + NAVIGATION_BAR_HEIGHT)];
+        _naviView.backgroundColor = [UIColor colorWithWhite:1 alpha:0];
+    }
+    return _naviView;
+}
+- (UIButton *)backBtn
+{
+    if (!_backBtn) {
+        _backBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
+        [_backBtn setImage:[UIImage imageNamed:@"back_white_icon"] forState:(UIControlStateNormal)];
+        _backBtn.frame = CGRectMake(0,STATUS_BAR_HEIGHT, 44, 44);
+        _backBtn.adjustsImageWhenHighlighted = YES;
+        [_backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
+    }
+    return _backBtn;
+}
+- (UIButton *)menuBtn
+{
+    if (!_menuBtn) {
+        _menuBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
+        [_menuBtn setImage:[UIImage imageNamed:@"menu_white_icon"] forState:(UIControlStateNormal)];
+        _menuBtn.adjustsImageWhenHighlighted = YES;
+        [_menuBtn addTarget:self action:@selector(menuAction) forControlEvents:(UIControlEventTouchUpInside)];
+    }
+    return _menuBtn;
+}
+- (UIButton *)shareBtn
+{
+    if (!_shareBtn) {
+        _shareBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
+        [_shareBtn setImage:[UIImage imageNamed:@"shareWhile"] forState:(UIControlStateNormal)];
+        _shareBtn.adjustsImageWhenHighlighted = YES;
+        [_shareBtn addTarget:self action:@selector(shareAction) forControlEvents:(UIControlEventTouchUpInside)];
+    }
+    return _shareBtn;
+}
+- (void)backAction
+{
+    [self.navigationController popViewControllerAnimated:YES];
+}
+- (void)menuAction
+{
+//    [super menuAction:nil];
+}
+- (void)shareAction
+{
+    
+}
+@end

+ 18 - 0
smartRhino/Project/VCModel/Home/VC/SubVC/HomeSchoolVC.h

@@ -0,0 +1,18 @@
+//
+//  HomeSchoolVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/6/23.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeSchoolVC : UIViewController
+@property (nonatomic, copy) NSString  * style;
+@property(nonatomic, assign) CGFloat   height;
+@end
+
+NS_ASSUME_NONNULL_END

+ 99 - 0
smartRhino/Project/VCModel/Home/VC/SubVC/HomeSchoolVC.m

@@ -0,0 +1,99 @@
+//
+//  HomeSchoolVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/6/23.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "HomeSchoolVC.h"
+#import "HomeSubItemModel.h"
+#import "HomeSchoolCell.h"
+#import "HomeSCDetailVC.h"
+
+@interface HomeSchoolVC ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) UITableView     * tableView;
+@property (nonatomic, strong) NSMutableArray  * dataSource;
+@end
+
+@implementation HomeSchoolVC
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self.view addSubview:self.tableView];
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    [self getData];
+}
+- (void)setHeight:(CGFloat)height
+{
+    [self.tableView setFrame:CGRectMake(0, 0, SCREEN_WIDTH, height - 45)];
+}
+- (UITableView *)tableView
+{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        _tableView.showsVerticalScrollIndicator = NO;
+    }
+    return _tableView;
+}
+- (NSMutableArray *)dataSource
+{
+    if (!_dataSource) {
+        _dataSource = [NSMutableArray array];
+    }
+    return _dataSource;
+}
+- (void)getData
+{
+    WS(weakSelf);
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_Press) parameters:@{@"Page":@(1),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+        NSLog(@"%@",responseObject);
+        if ([responseObject isKindOfClass:[NSDictionary class]]) {
+            for (NSDictionary * dict in responseObject[@"Items"]) {
+                HomeSubItemModel *model = [HomeSubItemModel modelWithDictionary:dict];
+                [weakSelf.dataSource addObject:model];
+            }
+        }
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [weakSelf.tableView reloadData];
+        });
+    } failure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return 1;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.dataSource.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return UITableViewAutomaticDimension;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel *model = self.dataSource[indexPath.row];
+    HomeSchoolCell * cell = [HomeSchoolCell configCell0:tableView indexPath:indexPath];
+    if (indexPath.row > 0) {
+        cell.topView.hidden = YES;
+        cell.height.constant = 0.f;
+    }
+    cell.lineV.hidden = NO;
+    [cell setDataModel:model];
+    return cell;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel *model = self.dataSource[indexPath.row];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+    vc.Id = model.Id;
+    vc.hidesBottomBarWhenPushed = YES;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+@end

+ 27 - 2
smartRhino/Project/VCModel/Home/VC/SubVC/HomeSpeakVC.m

@@ -15,6 +15,8 @@
 @interface HomeSpeakVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
 @property (nonatomic, strong) NSMutableArray  * dataSource;
+@property (nonatomic, assign) NSInteger         currentPage;
+@property (nonatomic, assign) NSInteger         Total;
 @end
 
 @implementation HomeSpeakVC
@@ -24,7 +26,13 @@
     [self.view addSubview:self.tableView];
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
-    [self getData];
+    self.currentPage = 1;
+    self.Total = 0;
+    WS(weakSelf);
+    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
+        [weakSelf footerRefresh];
+    }];
+    [self headRefresh];
 }
 - (void)setHeight:(CGFloat)height
 {
@@ -46,10 +54,26 @@
     }
     return _dataSource;
 }
+- (void)headRefresh{
+    self.currentPage = 1;
+    self.Total = 1;
+    [self.dataSource removeAllObjects];
+    [self getData];
+}
+- (void)footerRefresh{
+    self.currentPage += 1;
+    if (self.Total == self.dataSource.count) {
+        self.currentPage --;
+        [self.tableView.mj_footer endRefreshingWithNoMoreData];
+        self.tableView.mj_footer.hidden = YES;
+        return ;
+    }
+    [self getData];
+}
 - (void)getData
 {
     WS(weakSelf);
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Chat_Hear_Speak) parameters:@{@"Page":@(1),@"PerPage":@999999} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_Chat_Hear_Speak) parameters:@{@"Page":@(self.currentPage),@"PerPage":@(20)} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"%@",responseObject);
         if ([responseObject isKindOfClass:[NSDictionary class]]) {
                 HomeSubModel *model = [HomeSubModel modelWithDictionary:responseObject];
@@ -57,6 +81,7 @@
                 HomeSubItemModel *smodel = [HomeSubItemModel modelWithDictionary:dict];
                 [weakSelf.dataSource addObject:smodel];
             }
+            weakSelf.Total = model.Total;
         }
         dispatch_async(dispatch_get_main_queue(), ^{
             [weakSelf.tableView reloadData];

+ 81 - 3
smartRhino/Project/VCModel/Home/VC/SubVC/HomeUserVC.m

@@ -10,10 +10,18 @@
 #import "HomeSubModel.h"
 #import "HomeSubItemModel.h"
 #import "HomeUserPrivilegeCell.h"
+#import "BookTeacherDetailVC.h"
+#import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+#import "BookLabelAllVC.h"
+#import "HomeSCDetailVC.h"
 
 @interface HomeUserVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
 @property (nonatomic, strong) NSMutableArray  * dataSource;
+@property (nonatomic, assign) NSInteger   currentPage;
+@property (nonatomic, assign) NSInteger   Total;
 @end
 
 @implementation HomeUserVC
@@ -23,6 +31,7 @@
     [self.view addSubview:self.tableView];
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
+    
     [self getData];
 }
 - (void)setHeight:(CGFloat)height
@@ -38,6 +47,7 @@
     }
     return _tableView;
 }
+
 - (NSMutableArray *)dataSource
 {
     if (!_dataSource) {
@@ -48,7 +58,7 @@
 - (void)getData
 {
     WS(weakSelf);
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_CATHEDRA) parameters:@{@"StyleCss":self.style,@"Page":@(1),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_CATHEDRA) parameters:@{@"StyleCss":self.style,@"Page":@(self.currentPage),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"%@",responseObject);
         if ([responseObject isKindOfClass:[NSArray class]]) {
             for (NSDictionary * dict in responseObject) {
@@ -77,15 +87,83 @@
 }
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
+    WS(weakSelf);
     HomeSubModel *model = self.dataSource[indexPath.row];
     HomeUserPrivilegeCell * cell = [HomeUserPrivilegeCell configCell:tableView indexPath:indexPath];
     if (indexPath.row == 0) {
         cell.height.constant = 11.f;
     }
-    BOOL isEnd = self.dataSource.count - 1 == indexPath.row;
-    [cell setDataWithItem:indexPath.row isUnUser:isEnd model:model];
+    cell.ClickItemBlock = ^(HomeSubItemModel * _Nonnull pmodel) {
+        [weakSelf pushVC:pmodel];
+    };
+//    BOOL isEnd = self.dataSource.count - 1 == indexPath.row;
+    [cell setDataWithItem:indexPath.row isUnUser:NO model:model];
+    [cell.lookBtn setAction:^{
+        [weakSelf ShowAll:model];
+    }];
     return cell;
 }
+- (void)pushVC:(HomeSubItemModel *)model
+{
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_MediaAritle:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_MediaAritle;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        default:
+        {
+            
+        }
+            break;
+    }
+}
+- (void)ShowAll:(HomeSubModel *)model
+{
+    BookLabelAllVC * vc = [BookLabelAllVC initBookLabelAllVC];
+    vc.Id = model.Id;
+    vc.titleStr = model.LabelName;
+    [self.navigationController pushViewController:vc animated:YES];
+}
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];

+ 84 - 5
smartRhino/Project/VCModel/Home/VC/SubVC/HomeWeiCousreVC.m

@@ -10,11 +10,18 @@
 #import "HomeSubModel.h"
 #import "HomeSubItemModel.h"
 #import "HomeWeiCousreCell.h"
+#import "BookTeacherDetailVC.h"
 #import "BookWCDetailVC.h"
+#import "BookListenVC.h"
+#import "BookListDetailVC.h"
+#import "IndexMoreVC.h"
+#import "HomeSCDetailVC.h"
 
 @interface HomeWeiCousreVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView     * tableView;
 @property (nonatomic, strong) NSMutableArray  * dataSource;
+@property (nonatomic, assign) NSInteger         currentPage;
+@property (nonatomic, assign) NSInteger         Total;
 @end
 
 @implementation HomeWeiCousreVC
@@ -24,7 +31,13 @@
     [self.view addSubview:self.tableView];
     self.tableView.delegate = self;
     self.tableView.dataSource = self;
-    [self getData];
+    self.currentPage = 1;
+    self.Total = 0;
+    WS(weakSelf);
+    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
+        [weakSelf footerRefresh];
+    }];
+    [self headRefresh];
 }
 - (void)setHeight:(CGFloat)height
 {
@@ -46,10 +59,26 @@
     }
     return _dataSource;
 }
+- (void)headRefresh{
+    self.currentPage = 1;
+    self.Total = 1;
+    [self.dataSource removeAllObjects];
+    [self getData];
+}
+- (void)footerRefresh{
+    self.currentPage += 1;
+    if (self.Total == self.dataSource.count) {
+        self.currentPage --;
+        [self.tableView.mj_footer endRefreshingWithNoMoreData];
+        self.tableView.mj_footer.hidden = YES;
+        return ;
+    }
+    [self getData];
+}
 - (void)getData
 {
     WS(weakSelf);
-    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_WE_BOOK) parameters:@{@"StyleCss":self.style,@"Page":@(1),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
+    [[HttpManager sharedHttpManager] POSTUrl:Host(API_APP_PAGE_WE_BOOK) parameters:@{@"StyleCss":self.style,@"Page":@(self.currentPage),@"PerPage":@20} responseStyle:JOSN success:^(id  _Nonnull responseObject) {
         NSLog(@"%@",responseObject);
         if ([responseObject isKindOfClass:[NSDictionary class]]) {
                 HomeSubModel *model = [HomeSubModel modelWithDictionary:responseObject];
@@ -57,7 +86,9 @@
                 HomeSubItemModel *smodel = [HomeSubItemModel modelWithDictionary:dict];
                 [weakSelf.dataSource addObject:smodel];
             }
+            weakSelf.Total = model.Total;
         }
+        [weakSelf.tableView.mj_footer endRefreshing];
         dispatch_async(dispatch_get_main_queue(), ^{
             [weakSelf.tableView reloadData];
         });
@@ -93,8 +124,56 @@
 {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
     HomeSubItemModel *model = self.dataSource[indexPath.row];
-    BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
-    vc.Id = model.Id;
-    [self.navigationController pushViewController:vc animated:YES];
+    switch ((CollectModelType)model.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            BookListDetailVC * vc = [BookListDetailVC initBookListDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            BookWCDetailVC * vc = [BookWCDetailVC initBookWCDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            BookListenVC * vc = [BookListenVC initBookListenVC];
+            vc.Id = model.Id;
+            vc.MediaType = MediaMusicType;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case CollectModel_MediaAritle:
+        {
+            MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
+            vc.type = CollectModel_MediaAritle;
+            vc.Id = model.Id;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        default:
+        {
+            
+        }
+            break;
+    }
 }
 @end

+ 5 - 2
smartRhino/Project/VCModel/Home/VC/SubVC/IndexAllVC.m

@@ -15,6 +15,7 @@
 #import "BookListenVC.h"
 #import "BookListDetailVC.h"
 #import "IndexMoreVC.h"
+#import "HomeSCDetailVC.h"
 
 @interface IndexAllVC ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic, strong) UITableView    * tableView;
@@ -107,7 +108,7 @@
 {
     WS(weakSelf);
     IndexAllModel * model = [self.dataArray objectAtIndex:indexPath.section];
-    IndexAllCell * cell = [IndexAllCell configCell:tableView indexPath:indexPath];
+    IndexAllCell * cell = [IndexAllCell configCell0:tableView indexPath:indexPath];
     [cell setDataWithModel:model searchText:self.searchText];
     [cell.topBtn setAction:^{
         [weakSelf top:model.LableId];
@@ -172,7 +173,9 @@
             break;
         case CollectModel_Organization:
         {
-
+            HomeSCDetailVC * vc = [[HomeSCDetailVC alloc] init];
+            vc.Id = Id;
+            [self.navigationController pushViewController:vc animated:YES];
         }
             break;
         default:

+ 40 - 1
smartRhino/Project/VCModel/Home/VC/SubVC/IndexSubVC.m

@@ -47,7 +47,6 @@
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.edges.mas_offset(UIEdgeInsetsMake(20,15,(IS_IPHONEX ? 40 : 20) + EMVIEWBOTTOMMARGIN + 50,15));
     }];
-
     WS(weakSelf);
     self.tableView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
         [weakSelf footerRefresh];
@@ -141,6 +140,10 @@
             [cell setDataWithModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -151,6 +154,10 @@
             [cell setDataWithIndexModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -161,6 +168,10 @@
             [cell setDataWithModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -171,6 +182,10 @@
             [cell setDataWithModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -181,6 +196,10 @@
             [cell setDataIndexModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -191,6 +210,10 @@
             [cell setDataWithModel:model searchText:self.searchText];
             if (self.dataArray.count == indexPath.row + 1) {
                 cell.lineV.hidden = YES;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:YES];
+            }else{
+                cell.lineV.hidden = NO;
+                [self setupRoundedCornersWithView:cell cutCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight isMask:NO];
             }
             return cell;
         }
@@ -247,6 +270,22 @@
             break;
     }
 }
+- (void)setupRoundedCornersWithView:(UITableViewCell *)cell cutCorners:(UIRectCorner)rectCorner isMask:(BOOL)isMask{
+
+    CAShapeLayer *mask = [CAShapeLayer layer];
+    UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_WIDTH - 30, cell.bounds.size.height) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(isMask ? 8 : 0, isMask ? 8 : 0)];
+    mask.path = path.CGPath;
+    mask.frame = cell.bounds;
 
+
+    CAShapeLayer *borderLayer = [CAShapeLayer layer];
+    borderLayer.path = path.CGPath;
+    borderLayer.fillColor = [UIColor clearColor].CGColor;
+    borderLayer.strokeColor = [UIColor whiteColor].CGColor;
+    borderLayer.lineWidth = 0;
+    borderLayer.frame = cell.bounds;
+    cell.layer.mask = mask;
+    [cell.layer addSublayer:borderLayer];
+}
 @end
 

+ 2 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeBigshotCell.h

@@ -8,6 +8,7 @@
 
 #import <UIKit/UIKit.h>
 #import "HomeSubModel.h"
+#import "HomeSubItemModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -15,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *height;
 @property (weak, nonatomic) IBOutlet UILabel *CellTitleL;
+@property (copy, nonatomic) void(^ClickItemBlock)(HomeSubItemModel * pmodel);
 
 + (HomeBigshotCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 + (HomeBigshotCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;

+ 11 - 1
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeBigshotCell.m

@@ -131,7 +131,17 @@
         HomeBigshotListCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"HomeBigshotListCell" forIndexPath:indexPath];
         NSDictionary * dict = self.model.Items[indexPath.item];
         HomeSubItemModel * sModel = [HomeSubItemModel modelWithDictionary:dict];
-        [cell setDataModel:sModel];        return cell;
+        [cell setDataModel:sModel];
+        return cell;
+    }
+}
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
+{
+    [collectionView deselectItemAtIndexPath:indexPath animated:YES];
+    NSDictionary * dict = self.model.Items[indexPath.item];
+    HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+    if (self.ClickItemBlock) {
+        self.ClickItemBlock(model);
     }
 }
 @end

+ 4 - 2
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeGoodBookCell.h

@@ -8,6 +8,8 @@
 
 #import <UIKit/UIKit.h>
 #import "HomeSubModel.h"
+#import "HomeSubItemModel.h"
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface HomeGoodBookCell : UITableViewCell<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@@ -17,8 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *collectH;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *height;
 @property (assign, nonatomic)NSInteger   type;
-@property (copy, nonatomic) HomeSubModel   * model;
-@property (copy, nonatomic) void(^ClickIndexBlock)(void);
+@property (strong, nonatomic) HomeSubModel   * model;
+@property (copy, nonatomic) void(^ClickItemBlock)(HomeSubItemModel * pmodel);
 + (HomeGoodBookCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 - (void)setDataWithItem:(NSInteger)Item isUnUser:(BOOL)isUser model:(HomeSubModel *)model;
 @end

+ 5 - 2
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeGoodBookCell.m

@@ -108,8 +108,11 @@
 }
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
 {
-    if (self.ClickIndexBlock) {
-        self.ClickIndexBlock();
+    [collectionView deselectItemAtIndexPath:indexPath animated:YES];
+    NSDictionary * dict = self.model.Items[indexPath.item];
+    HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+    if (self.ClickItemBlock) {
+        self.ClickItemBlock(model);
     }
 }
 @end

+ 1 - 1
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolCell.h

@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 + (HomeSchoolCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 + (HomeSchoolCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
-- (void)setData;
+- (void)setDataModel:(HomeSubItemModel *)model;
 
 - (void)setDataIndexModel:(HomeSubItemModel *)model searchText:(NSString *)text;
 @end

+ 19 - 4
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolCell.m

@@ -44,11 +44,26 @@
     }
     return cell;
 }
-- (void)setData
+- (void)setDataModel:(HomeSubItemModel *)model
 {
-    self.addressL.text = @"北京";
-    self.numL.text = @"特级教师36人";
-    self.levelL.text = @"小学、初中";
+    [self.imagV sd_setImageWithURL:[NSURL URLWithString:model.ImageUrl] placeholderImage:kPlaceHolderImage];
+    self.titleL.text = model.Name;
+    self.subTitleL.text = model.ExtendLableName;
+    if ([model.LableName isKindOfClass:[NSArray class]]) {
+        NSArray * array = model.LableName;
+        if (array.count == 3) {
+            self.addressL.text = array[0];
+            self.numL.text = array[1];
+            self.levelL.text = array[2];
+        }
+    }else if([model.LableName isKindOfClass:[NSString class]]){
+        NSString * str = model.LableName;
+        NSArray *array = [str componentsSeparatedByString:@","];
+        self.addressL.text = array[0];
+        self.numL.text = array[1];
+        self.levelL.text = array[2];
+    }
+
     self.addW.constant = [self addPlaceLabel:self.addressL];
     self.numW.constant = [self addPlaceLabel:self.numL];
     self.levelW.constant = [self addPlaceLabel:self.levelL];

+ 19 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.h

@@ -0,0 +1,19 @@
+//
+//  HomeSchoolContentCell.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/21.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeSchoolContentCell : UITableViewCell
+@property (weak, nonatomic) IBOutlet UILabel *contentL;
++ (HomeSchoolContentCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
+- (void)setDataText:(NSString *)text;
+@end
+
+NS_ASSUME_NONNULL_END

+ 42 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.m

@@ -0,0 +1,42 @@
+//
+//  HomeSchoolContentCell.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/21.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "HomeSchoolContentCell.h"
+
+@implementation HomeSchoolContentCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
++ (HomeSchoolContentCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+    static NSString *cellIdentifer = @"HomeSchoolContentCell";
+    HomeSchoolContentCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
+    if (cell == nil) {
+        cell = [[[NSBundle mainBundle] loadNibNamed:@"HomeSchoolContentCell" owner:nil options:nil] objectAtIndex:0];
+    }
+    return cell;
+}
+- (void)setDataText:(NSString *)text
+{
+    if (ISEmpty(text) || text.length == 0) {
+        return;
+    }
+    NSMutableAttributedString * attr = [[NSMutableAttributedString alloc] initWithString:text];
+    NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    [paragraphStyle setLineSpacing:8];
+    [attr addAttributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSForegroundColorAttributeName:UIColorHex(0x666666),NSFontAttributeName:[UIFont systemFontOfSize:17.f]} range:NSMakeRange(0, [text length])];
+    self.contentL.attributedText = attr;
+}
+@end

+ 40 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeSchoolContentCell.xib

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="214" id="KGk-i7-Jjw" customClass="HomeSchoolContentCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="214"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="214"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bw9-pn-YDh">
+                        <rect key="frame" x="15" y="0.0" width="290" height="199"/>
+                        <attributedString key="attributedText"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="bw9-pn-YDh" secondAttribute="trailing" constant="15" id="AtL-Pr-sWJ"/>
+                    <constraint firstAttribute="bottom" secondItem="bw9-pn-YDh" secondAttribute="bottom" constant="15" id="FoW-6B-OPc"/>
+                    <constraint firstItem="bw9-pn-YDh" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="QQ8-r8-6Vg"/>
+                    <constraint firstItem="bw9-pn-YDh" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="gzm-RU-DAB"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <connections>
+                <outlet property="contentL" destination="bw9-pn-YDh" id="Np0-VS-TvR"/>
+            </connections>
+            <point key="canvasLocation" x="137.68115942028987" y="156.69642857142856"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 2 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeUserPrivilegeCell.h

@@ -8,6 +8,7 @@
 
 #import <UIKit/UIKit.h>
 #import "HomeSubModel.h"
+#import "HomeSubItemModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -20,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet UILabel *showTitleL;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *height;
 @property (strong, nonatomic) HomeSubModel * model;
+@property (nonatomic, copy) void(^ClickItemBlock)(HomeSubItemModel *pmodel);
 + (HomeUserPrivilegeCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
 - (void)setDataWithItem:(NSInteger)Item isUnUser:(BOOL)isUser model:(HomeSubModel *)model;
 @end

+ 9 - 0
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeUserPrivilegeCell.m

@@ -89,6 +89,15 @@
     [cell setData:smodel];
     return cell;
 }
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
+{
+    NSDictionary * dict = self.model.Items[indexPath.item];
+    HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+    [collectionView deselectItemAtIndexPath:indexPath animated:YES];
+    if (self.ClickItemBlock) {
+        self.ClickItemBlock(model);
+    }
+}
 - (void)setShowBgColor
 {
     CAGradientLayer *gl = [CAGradientLayer layer];

+ 23 - 33
smartRhino/Project/VCModel/Home/VC/View/Cell/HomeWeiCousreCell.xib

@@ -315,36 +315,16 @@
                 <rect key="frame" x="0.0" y="0.0" width="320" height="110"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bZM-XU-n5i">
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_placeHolder" translatesAutoresizingMaskIntoConstraints="NO" id="d81-lp-DFW">
                         <rect key="frame" x="15" y="15" width="130" height="80"/>
-                        <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_placeHolder" translatesAutoresizingMaskIntoConstraints="NO" id="d81-lp-DFW">
-                                <rect key="frame" x="0.0" y="0.0" width="130" height="80"/>
-                            </imageView>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_video_leftIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ajT-CT-7WK">
-                                <rect key="frame" x="5" y="61" width="12" height="12"/>
-                            </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="02:14:27" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TXB-zZ-Xv3">
-                                <rect key="frame" x="19.5" y="61" width="42.5" height="12"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="10"/>
-                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                        </subviews>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
-                            <constraint firstItem="TXB-zZ-Xv3" firstAttribute="centerY" secondItem="ajT-CT-7WK" secondAttribute="centerY" id="29r-tL-rRG"/>
-                            <constraint firstAttribute="width" constant="130" id="3th-K8-Yqt"/>
-                            <constraint firstItem="d81-lp-DFW" firstAttribute="leading" secondItem="bZM-XU-n5i" secondAttribute="leading" id="931-uj-GJv"/>
-                            <constraint firstItem="ajT-CT-7WK" firstAttribute="leading" secondItem="d81-lp-DFW" secondAttribute="leading" constant="5" id="9Kn-fU-MMB"/>
-                            <constraint firstAttribute="height" constant="80" id="Fv1-C6-tZa"/>
-                            <constraint firstAttribute="trailing" secondItem="d81-lp-DFW" secondAttribute="trailing" id="HM4-3S-1oY"/>
-                            <constraint firstItem="d81-lp-DFW" firstAttribute="top" secondItem="bZM-XU-n5i" secondAttribute="top" id="MYI-6h-cnl"/>
-                            <constraint firstItem="TXB-zZ-Xv3" firstAttribute="leading" secondItem="ajT-CT-7WK" secondAttribute="trailing" constant="2.5" id="N9r-7k-Y2u"/>
-                            <constraint firstAttribute="bottom" secondItem="d81-lp-DFW" secondAttribute="bottom" id="VzW-QR-IUU"/>
-                            <constraint firstItem="ajT-CT-7WK" firstAttribute="bottom" secondItem="d81-lp-DFW" secondAttribute="bottom" constant="-7" id="rcr-tH-SkQ"/>
+                            <constraint firstAttribute="width" secondItem="d81-lp-DFW" secondAttribute="height" multiplier="130:80" id="cLf-Kg-3WR"/>
+                            <constraint firstAttribute="width" constant="130" id="zpg-7M-2wY"/>
                         </constraints>
-                    </view>
+                    </imageView>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_video_leftIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ajT-CT-7WK">
+                        <rect key="frame" x="22" y="76" width="12" height="12"/>
+                    </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="理科思维记古诗" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ylM-sq-9Ba">
                         <rect key="frame" x="160" y="15" width="145" height="20.5"/>
                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
@@ -370,21 +350,31 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="02:14:27" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TXB-zZ-Xv3">
+                        <rect key="frame" x="38" y="76" width="42.5" height="12"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                        <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <nil key="highlightedColor"/>
+                    </label>
                 </subviews>
                 <constraints>
-                    <constraint firstItem="3vg-Et-rWE" firstAttribute="top" secondItem="bZM-XU-n5i" secondAttribute="bottom" constant="14.5" id="0gi-Cm-I2J"/>
+                    <constraint firstItem="ylM-sq-9Ba" firstAttribute="leading" secondItem="d81-lp-DFW" secondAttribute="trailing" constant="15" id="1ov-3d-m5n"/>
                     <constraint firstItem="7V0-cn-IqN" firstAttribute="leading" secondItem="ylM-sq-9Ba" secondAttribute="leading" id="3IK-L4-F7y"/>
-                    <constraint firstItem="ylM-sq-9Ba" firstAttribute="top" secondItem="d81-lp-DFW" secondAttribute="top" id="4qT-sK-8xl"/>
-                    <constraint firstItem="bZM-XU-n5i" firstAttribute="leading" secondItem="B29-Nk-6lM" secondAttribute="leading" constant="15" id="CtQ-K5-9VV"/>
+                    <constraint firstItem="ajT-CT-7WK" firstAttribute="bottom" secondItem="d81-lp-DFW" secondAttribute="bottom" constant="-7" id="ClH-As-7nU"/>
                     <constraint firstItem="7V0-cn-IqN" firstAttribute="top" secondItem="ylM-sq-9Ba" secondAttribute="bottom" constant="4" id="HT1-G1-bC7"/>
+                    <constraint firstItem="TXB-zZ-Xv3" firstAttribute="centerY" secondItem="ajT-CT-7WK" secondAttribute="centerY" id="J7f-vb-bFf"/>
+                    <constraint firstItem="cdA-sd-wGq" firstAttribute="bottom" secondItem="d81-lp-DFW" secondAttribute="bottom" id="JJM-Gj-dIG"/>
                     <constraint firstAttribute="trailing" secondItem="ylM-sq-9Ba" secondAttribute="trailing" constant="15" id="Jlw-kt-Cgi"/>
+                    <constraint firstItem="TXB-zZ-Xv3" firstAttribute="leading" secondItem="ajT-CT-7WK" secondAttribute="trailing" constant="4" id="L7M-eI-ThH"/>
+                    <constraint firstItem="ajT-CT-7WK" firstAttribute="leading" secondItem="d81-lp-DFW" secondAttribute="leading" constant="7" id="LEF-ox-sPr"/>
                     <constraint firstAttribute="trailing" secondItem="7V0-cn-IqN" secondAttribute="trailing" constant="15" id="NKv-fN-ffI"/>
-                    <constraint firstItem="bZM-XU-n5i" firstAttribute="top" secondItem="B29-Nk-6lM" secondAttribute="top" constant="15" id="S2u-t4-cK1"/>
+                    <constraint firstItem="ylM-sq-9Ba" firstAttribute="top" secondItem="d81-lp-DFW" secondAttribute="top" id="O1O-xG-Yac"/>
+                    <constraint firstItem="d81-lp-DFW" firstAttribute="leading" secondItem="B29-Nk-6lM" secondAttribute="leading" constant="15" id="Qs9-kq-JFp"/>
                     <constraint firstAttribute="trailing" secondItem="cdA-sd-wGq" secondAttribute="trailing" constant="15" id="THD-1Q-Bdn"/>
                     <constraint firstItem="cdA-sd-wGq" firstAttribute="leading" secondItem="ylM-sq-9Ba" secondAttribute="leading" id="a6c-5Q-Zfg"/>
                     <constraint firstAttribute="bottom" secondItem="3vg-Et-rWE" secondAttribute="bottom" id="eQe-Jt-J9H"/>
-                    <constraint firstItem="ylM-sq-9Ba" firstAttribute="leading" secondItem="bZM-XU-n5i" secondAttribute="trailing" constant="15" id="fJV-TI-q0I"/>
-                    <constraint firstItem="cdA-sd-wGq" firstAttribute="bottom" secondItem="d81-lp-DFW" secondAttribute="bottom" id="ocp-of-5Qd"/>
+                    <constraint firstItem="3vg-Et-rWE" firstAttribute="top" secondItem="d81-lp-DFW" secondAttribute="bottom" constant="14.5" id="kas-Xa-mJ5"/>
+                    <constraint firstItem="d81-lp-DFW" firstAttribute="top" secondItem="B29-Nk-6lM" secondAttribute="top" constant="15" id="pMi-Ci-Fav"/>
                     <constraint firstAttribute="trailing" secondItem="3vg-Et-rWE" secondAttribute="trailing" id="sk2-sb-HVh"/>
                     <constraint firstItem="3vg-Et-rWE" firstAttribute="leading" secondItem="B29-Nk-6lM" secondAttribute="leading" id="vts-Dd-KN1"/>
                 </constraints>

+ 3 - 1
smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.h

@@ -21,7 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *contant;
 
 @property (copy, nonatomic) void(^ClickRowBlock)(CollectModelType type, NSInteger Id);
-+ (IndexAllCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
++ (IndexAllCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
++ (IndexAllCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath;
+- (void)setDataWithModel:(IndexAllModel *)model;
 - (void)setDataWithModel:(IndexAllModel *)model searchText:(NSString *)text;
 @end
 

+ 56 - 3
smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.m

@@ -17,7 +17,7 @@
 
 
 @interface IndexAllCell ()<UITableViewDelegate,UITableViewDataSource>
-@property (nonatomic, strong) IndexAllModel * model;
+@property (nonatomic, strong) IndexAllModel  * model;
 @property (nonatomic, copy) NSString        * searchText;
 @end
 @implementation IndexAllCell
@@ -30,15 +30,68 @@
     self.bgView.layer.cornerRadius = 8.f;
     self.bgView.layer.masksToBounds = YES;
 }
-+ (IndexAllCell *)configCell:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath
++ (IndexAllCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath
 {
-    static NSString *cellIdentifer = @"IndexAllCell";
+    static NSString *cellIdentifer = @"IndexAllCell0";
     IndexAllCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
     if (cell == nil) {
         cell = [[[NSBundle mainBundle] loadNibNamed:@"IndexAllCell" owner:nil options:nil] objectAtIndex:0];
     }
     return cell;
 }
++ (IndexAllCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath
+{
+    static NSString *cellIdentifer = @"IndexAllCell1";
+    IndexAllCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
+    if (cell == nil) {
+        cell = [[[NSBundle mainBundle] loadNibNamed:@"IndexAllCell" owner:nil options:nil] objectAtIndex:1];
+    }
+    return cell;
+}
+- (void)setDataWithModel:(IndexAllModel *)model
+{
+    self.model = model;
+    self.nameL.text = self.model.LableName;
+    self.subTableV.estimatedRowHeight = 80;
+    self.subTableV.rowHeight = UITableViewAutomaticDimension;
+    self.subTableV.showsVerticalScrollIndicator = NO;
+    self.subTableV.showsHorizontalScrollIndicator = NO;
+    [self.subTableV reloadData];
+    
+    HomeSubItemModel * smodel = self.model.Items.firstObject;
+    switch ((CollectModelType)smodel.MediaType) {
+        case CollectModel_StoreBook:
+        {
+            self.contant.constant = 120.f * self.model.Items.count;
+        }
+            break;
+        case CollectModel_StoreVideo:
+        {
+            self.contant.constant = 110.f * self.model.Items.count;
+        }
+            break;
+        case CollectModel_StoreSound:
+        {
+            self.contant.constant = 85.f * self.model.Items.count;
+        }
+            break;
+        case CollectModel_Teacher:
+        {
+            self.contant.constant = 130.f * self.model.Items.count;
+        }
+            break;
+        case CollectModel_Organization:
+        {
+            self.contant.constant = 130.f * self.model.Items.count;
+        }
+            break;
+        default:
+        {
+            self.contant.constant = 120.f * self.model.Items.count;
+        }
+            break;
+    }
+}
 - (void)setDataWithModel:(IndexAllModel *)model searchText:(NSString *)text
 {
     self.model = model;

+ 69 - 1
smartRhino/Project/VCModel/Home/VC/View/Cell/IndexAllCell.xib

@@ -11,7 +11,7 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="232" id="KGk-i7-Jjw" customClass="IndexAllCell">
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="IndexAllCell0" rowHeight="232" id="KGk-i7-Jjw" customClass="IndexAllCell">
             <rect key="frame" x="0.0" y="0.0" width="320" height="232"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
@@ -95,8 +95,76 @@
             </connections>
             <point key="canvasLocation" x="-807.24637681159425" y="107.8125"/>
         </tableViewCell>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="IndexAllCell1" rowHeight="232" id="gGJ-Uf-gnE" customClass="IndexAllCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="232"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gGJ-Uf-gnE" id="QeF-uP-QA9">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="232"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3wf-3R-uM4">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="232"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JNn-VE-mbN">
+                                <rect key="frame" x="15" y="15" width="39.5" height="112"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                <color key="textColor" red="0.039215686270000001" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="wB3-si-D6x">
+                                <rect key="frame" x="0.0" y="142" width="320" height="50"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="50" id="7aW-ks-acz"/>
+                                </constraints>
+                            </tableView>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eAB-85-hXw">
+                                <rect key="frame" x="124" y="192" width="62" height="40"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="40" id="aDL-AS-iUb"/>
+                                </constraints>
+                                <state key="normal" title="查看更多">
+                                    <color key="titleColor" red="0.22352941179999999" green="0.47450980390000003" blue="0.82745098039999998" alpha="1" colorSpace="calibratedRGB"/>
+                                </state>
+                            </button>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Home_shuangjian_right" translatesAutoresizingMaskIntoConstraints="NO" id="Wn2-gj-5sF">
+                                <rect key="frame" x="186" y="206" width="12.5" height="12.5"/>
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="eAB-85-hXw" firstAttribute="top" secondItem="wB3-si-D6x" secondAttribute="bottom" id="9MS-Dd-726"/>
+                            <constraint firstItem="JNn-VE-mbN" firstAttribute="leading" secondItem="3wf-3R-uM4" secondAttribute="leading" constant="15" id="DvQ-Ht-7L9"/>
+                            <constraint firstItem="Wn2-gj-5sF" firstAttribute="centerY" secondItem="eAB-85-hXw" secondAttribute="centerY" id="IZN-tf-JBj"/>
+                            <constraint firstItem="Wn2-gj-5sF" firstAttribute="leading" secondItem="eAB-85-hXw" secondAttribute="trailing" id="Zx3-hJ-Otv"/>
+                            <constraint firstItem="wB3-si-D6x" firstAttribute="leading" secondItem="3wf-3R-uM4" secondAttribute="leading" id="iaZ-iJ-wHm"/>
+                            <constraint firstItem="wB3-si-D6x" firstAttribute="top" secondItem="JNn-VE-mbN" secondAttribute="bottom" constant="15" id="ioL-e4-MPY"/>
+                            <constraint firstAttribute="bottom" secondItem="eAB-85-hXw" secondAttribute="bottom" id="iwL-55-Fky"/>
+                            <constraint firstItem="eAB-85-hXw" firstAttribute="centerX" secondItem="3wf-3R-uM4" secondAttribute="centerX" constant="-5" id="q0M-qV-svp"/>
+                            <constraint firstAttribute="trailing" secondItem="wB3-si-D6x" secondAttribute="trailing" id="td1-sn-jq2"/>
+                            <constraint firstItem="JNn-VE-mbN" firstAttribute="top" secondItem="3wf-3R-uM4" secondAttribute="top" constant="15" id="u6h-0R-UF0"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="3wf-3R-uM4" firstAttribute="top" secondItem="QeF-uP-QA9" secondAttribute="top" id="6YD-jZ-MFR"/>
+                    <constraint firstItem="3wf-3R-uM4" firstAttribute="leading" secondItem="QeF-uP-QA9" secondAttribute="leading" id="8yq-Zr-gaZ"/>
+                    <constraint firstAttribute="bottom" secondItem="3wf-3R-uM4" secondAttribute="bottom" id="AMZ-p5-aVz"/>
+                    <constraint firstAttribute="trailing" secondItem="3wf-3R-uM4" secondAttribute="trailing" id="Hza-ep-O4q"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="mwK-1M-di2"/>
+            <connections>
+                <outlet property="bgView" destination="3wf-3R-uM4" id="y76-QA-Rkj"/>
+                <outlet property="contant" destination="7aW-ks-acz" id="ps0-7M-qjU"/>
+                <outlet property="nameL" destination="JNn-VE-mbN" id="QEh-KT-cJK"/>
+                <outlet property="subTableV" destination="wB3-si-D6x" id="QAa-dZ-TPH"/>
+            </connections>
+            <point key="canvasLocation" x="-807.24637681159425" y="343.52678571428572"/>
+        </tableViewCell>
     </objects>
     <resources>
+        <image name="Home_shuangjian_right" width="12.5" height="12.5"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 13 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/CenterTouchTableView.h

@@ -0,0 +1,13 @@
+//
+//  CenterTouchTableView.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CenterTouchTableView : UITableView
+
+@end

+ 16 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/CenterTouchTableView.m

@@ -0,0 +1,16 @@
+//
+//  CenterTouchTableView.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "CenterTouchTableView.h"
+
+@implementation CenterTouchTableView
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+    return YES;
+}
+
+@end

+ 13 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/FirstViewController.h

@@ -0,0 +1,13 @@
+//
+//  FirstViewController.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SegmentVController.h"
+
+@interface FirstViewController : SegmentVController
+- (void)setDataText:(NSString *)text;
+@end

+ 96 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/FirstViewController.m

@@ -0,0 +1,96 @@
+//
+//  FirstViewController.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "FirstViewController.h"
+#import "HomeSchoolContentCell.h"
+
+@interface FirstViewController ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) UILabel   * titleL;
+@property (nonatomic, copy) NSString    * content;
+@property(nonatomic, strong) UITableView    *tableView;
+@end
+
+@implementation FirstViewController
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = UIColorHex(0xF8F9FB);
+    [self creatTableView];
+}
+
+- (void)creatTableView {
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 10, SCREEN_WIDTH, SCREEN_HEIGHT - NAVH - 10) style:UITableViewStyleGrouped];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    _tableView.showsVerticalScrollIndicator = NO;
+    _tableView.showsHorizontalScrollIndicator = NO;
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    _tableView.backgroundColor = [UIColor whiteColor];
+    _tableView.rowHeight = 50;
+    [self.view addSubview:_tableView];
+}
+- (void)setDataText:(NSString *)text
+{
+    self.content = text;
+    [self.tableView reloadData];
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
+    return 45.f;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
+{
+    return 0.01f;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 45)];
+    [view addSubview:self.titleL];
+    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_offset(15);
+        make.centerY.right.mas_equalTo(view);
+    }];
+    return view;
+}
+- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
+{
+    return [UIView new];
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return 1;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return 1;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return UITableViewAutomaticDimension;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSchoolContentCell * cell = [HomeSchoolContentCell configCell:tableView indexPath:indexPath];
+    [cell setDataText:self.content];
+    return cell;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+
+- (UILabel *)titleL
+{
+    if (!_titleL) {
+        _titleL = [UILabel new];
+        _titleL.font = [UIFont systemFontOfSize:16];
+        _titleL.textColor = UIColorHex(0x222222);
+        _titleL.text = @"学校简介";
+    }
+    return _titleL;
+}
+@end

+ 20 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchollVideoVC.h

@@ -0,0 +1,20 @@
+//
+//  HomeSchollVideoVC.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/5/18.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeSchollVideoVC : BaseViewController
+@property (nonatomic, copy) NSString    * file;
+@property (nonatomic, copy) NSString    * VideoImage;
+
++(HomeSchollVideoVC *)initHomeSchollVideoVC;
+@end
+
+NS_ASSUME_NONNULL_END

+ 161 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchollVideoVC.m

@@ -0,0 +1,161 @@
+//
+//  HomeSchollVideoVC.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/5/18.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "HomeSchollVideoVC.h"
+
+#import <ZFPlayer/ZFAVPlayerManager.h>
+#import <ZFPlayer/ZFPlayerControlView.h>
+
+@interface HomeSchollVideoVC ()
+@property (nonatomic, strong) ZFPlayerController    *player;
+@property (nonatomic, strong) UIImageView           *containerView;
+@property (nonatomic, strong) ZFPlayerControlView   *controlView;
+@property (nonatomic, strong) UIButton *playBtn;
+@property (nonatomic, assign) BOOL      isPlay;
+@property (nonatomic, strong) NSMutableArray <NSURL *>*assetURLs;
+@end
+
+@implementation HomeSchollVideoVC
++(HomeSchollVideoVC *)initHomeSchollVideoVC{
+    HomeSchollVideoVC *controller = [StoryboardManager.shared.home instantiateViewControllerWithIdentifier:@"HomeSchollVideoVC"];
+    return controller;
+}
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.assetURLs removeAllObjects];
+    self.player.viewControllerDisappear = NO;
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    [self.assetURLs removeAllObjects];
+    [self.player stop];
+    self.player.viewControllerDisappear = YES;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.fd_prefersNavigationBarHidden = YES;
+    [self setupPlayer];
+}
+
+- (void)setupPlayer
+{
+    [self.view addSubview:self.containerView];
+    [self.containerView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.mas_equalTo(self.view);
+        make.size.mas_offset(CGSizeMake(SCREEN_WIDTH, SCREEN_WIDTH / 16 * 9));
+    }];
+    ZFAVPlayerManager *playerManager = [[ZFAVPlayerManager alloc] init];
+    playerManager.shouldAutoPlay = YES;
+    [self.containerView sd_setImageWithURL:[NSURL URLWithString:self.VideoImage]];
+    /// 播放器相关
+    self.player = [ZFPlayerController playerWithPlayerManager:playerManager containerView:self.containerView];
+    self.player.controlView = self.controlView;
+    [self.containerView addSubview:self.playBtn];
+    [self.playBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.mas_equalTo(self.containerView);
+    }];
+    /// 设置退到后台继续播放
+    self.player.pauseWhenAppResignActive = NO;
+    //    self.player.resumePlayRecord = YES;
+//    self.player.lockedScreen = YES;
+//    self.player.allowOrentitaionRotation = NO;
+//    [self.player enterFullScreen:YES animated:NO];
+    WS(weakSelf);
+    self.player.orientationWillChange = ^(ZFPlayerController * _Nonnull player, BOOL isFullScreen) {
+        ((AppDelegate *)[[UIApplication sharedApplication] delegate]).allowOrentitaionRotation = isFullScreen;
+    };
+    
+    /// 播放完成
+    self.player.playerDidToEnd = ^(id  _Nonnull asset) {
+        if (!weakSelf.player.isLastAssetURL) {
+            [weakSelf.player playTheNext];
+            NSString *title = [NSString stringWithFormat:@"视频标题%zd",weakSelf.player.currentPlayIndex];
+            [weakSelf.controlView showTitle:title coverURLString:weakSelf.file fullScreenMode:ZFFullScreenModeLandscape];
+        } else {
+            [weakSelf.player stop];
+        }
+    };
+    [self.assetURLs addObject:[NSURL URLWithString:weakSelf.file]];
+    self.player.assetURLs = self.assetURLs;
+    [self.player playTheIndex:0];
+    [self.controlView showTitle:@"" coverURLString:weakSelf.file fullScreenMode:ZFFullScreenModeAutomatic];
+    [self.playBtn setAction:^{
+        weakSelf.isPlay = !weakSelf.isPlay;
+        if (weakSelf.isPlay) {
+            weakSelf.player.currentPlayIndex = 0;
+            [weakSelf.player playTheNext];
+            [weakSelf.playBtn setImage:IMG(@"new_allPause_44x44_") forState:UIControlStateNormal];
+        }else{
+            [weakSelf.player stop];
+            [weakSelf.playBtn setImage:IMG(@"new_allPlay_44x44_") forState:UIControlStateNormal];
+        }
+    }];
+//    self.controlView.backBtnClickCallback = ^{
+//        [weakSelf.navigationController popViewControllerAnimated:YES];
+//    };
+}
+
+
+#pragma mark - ZFPlayer
+- (UIStatusBarStyle)preferredStatusBarStyle {
+    return UIStatusBarStyleDefault;
+}
+
+- (BOOL)prefersStatusBarHidden {
+    return NO;
+}
+
+- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
+    return UIStatusBarAnimationNone;
+}
+
+- (BOOL)shouldAutorotate {
+    return NO;
+}
+
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
+    return UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (ZFPlayerControlView *)controlView {
+    if (!_controlView) {
+        _controlView = [ZFPlayerControlView new];
+        _controlView.fastViewAnimated = YES;
+        _controlView.autoHiddenTimeInterval = 5;
+        _controlView.autoFadeTimeInterval = 0.5;
+        _controlView.prepareShowLoading = YES;
+        _controlView.prepareShowControlView = NO;
+        _controlView.fullScreenMode = ZFFullScreenModeLandscape;
+    }
+    return _controlView;
+}
+
+- (UIImageView *)containerView {
+    if (!_containerView) {
+        CGFloat h = SCREEN_WIDTH*9/16;
+        _containerView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, h)];
+    }
+    return _containerView;
+}
+
+- (UIButton *)playBtn {
+    if (!_playBtn) {
+        _playBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        [_playBtn setImage:IMG(@"new_allPause_44x44_") forState:UIControlStateNormal];
+    }
+    return _playBtn;
+}
+- (NSMutableArray<NSURL *> *)assetURLs {
+    if (!_assetURLs) {
+        _assetURLs = [NSMutableArray array];
+    }
+    return _assetURLs;
+}
+@end

+ 28 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchoolHeadView.h

@@ -0,0 +1,28 @@
+//
+//  HomeSchoolHeadView.h
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/19.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "HomeSubItemModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeSchoolHeadView : UIView
+@property (nonatomic, strong) UIImageView  * imagV;
+@property (nonatomic, strong) UIView       * showView;
+@property (nonatomic, strong) UIImageView  * iconV;
+@property (nonatomic, strong) UILabel      * titleL;
+@property (nonatomic, strong) UILabel      * subTitleL;
+@property (nonatomic, strong) UILabel      * addressL;
+@property (nonatomic, strong) UILabel      * numL;
+@property (nonatomic, strong) UILabel      * typeL;
+@property (nonatomic, strong) UIButton     * collectBtn;
+@property (nonatomic, strong) UIButton     * playBtn;
+- (void)setDataWithModel:(HomeSubItemModel *)model;
+@end
+
+NS_ASSUME_NONNULL_END

+ 224 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/HomeSchoolHeadView.m

@@ -0,0 +1,224 @@
+//
+//  HomeSchoolHeadView.m
+//  smartRhino
+//
+//  Created by niuzhen on 2020/9/19.
+//  Copyright © 2020 tederen. All rights reserved.
+//
+
+#import "HomeSchoolHeadView.h"
+
+@implementation HomeSchoolHeadView
+
+- (instancetype)init
+{
+    if (self = [super init]) {
+        [self setUpSubView];
+    }
+    return self;
+}
+- (void)setUpSubView
+{
+    self.backgroundColor = UIColorHex(0xFFFFFF);
+
+    [self addSubview:self.imagV];
+    [self addSubview:self.showView];
+    [self.imagV addSubview:self.playBtn];
+    [self.showView addSubview:self.titleL];
+    [self.showView addSubview:self.subTitleL];
+    [self.showView addSubview:self.addressL];
+    [self.showView addSubview:self.numL];
+    [self.showView addSubview:self.typeL];
+    [self.showView addSubview:self.collectBtn];
+    [self.showView addSubview:self.iconV];
+    
+    self.showView.layer.shadowColor = UIColorHex(0x666666).CGColor;
+    self.showView.layer.shadowOffset = CGSizeMake(2, 2);
+    self.showView.layer.shadowOpacity = 8.f;
+    self.showView.layer.shadowRadius = 10.f;
+    
+    [self.imagV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.right.mas_equalTo(self);
+        make.height.mas_offset(183 * SCREEN_WIDTH / 375);
+    }];
+    [self.playBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.imagV);
+        make.top.mas_offset(40);
+        make.size.mas_offset(CGSizeMake(55, 55));
+    }];
+    [self.showView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_offset(15);
+        make.right.mas_offset(-15);
+        make.height.mas_offset(93);
+        make.bottom.mas_offset(-6);
+    }];
+    [self.iconV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.mas_offset(15);
+        make.size.mas_offset(CGSizeMake(63, 63));
+    }];
+    [self.collectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_offset(15);
+        make.right.mas_offset(-15);
+        make.size.mas_offset(CGSizeMake(50, 26));
+    }];
+    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.iconV.mas_right).offset(15);
+        make.top.mas_equalTo(self.iconV.mas_top);
+        make.right.mas_equalTo(self.collectBtn.mas_left).offset(15);
+    }];
+    [self.subTitleL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.titleL.mas_left);
+        make.top.mas_equalTo(self.titleL.mas_bottom).offset(9);
+        make.right.mas_equalTo(self.titleL.mas_right);
+    }];
+}
+
+- (void)setDataWithModel:(HomeSubItemModel *)model
+{
+    if (ISEmpty(model.VideoCoverImage)) {
+        [self.imagV sd_setImageWithURL:[NSURL URLWithString:model.VideoImage] placeholderImage:kPlaceHolderImage];
+    }else{
+        [self.imagV sd_setImageWithURL:[NSURL URLWithString:model.VideoCoverImage] placeholderImage:kPlaceHolderImage];
+    }
+    [self.iconV sd_setImageWithURL:[NSURL URLWithString:model.ImageUrl] placeholderImage:kPlaceHolderImage];
+    NSArray * array = model.LableName;
+    if (array.count == 3) {
+        self.addressL.text = array[0];
+        self.numL.text = array[1];
+        self.typeL.text = array[2];
+    }
+    self.titleL.text = model.Name;
+    self.subTitleL.text = model.ExtendLableName;
+    [self.collectBtn setTitle:model.IsCollect ? @"已收藏" : @"收藏" forState:UIControlStateNormal];
+    [self.collectBtn setBackgroundColor:model.IsCollect ? UIColorHex(0x666666) : UIColorHex(0xFAC364)];
+
+    [self.addressL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.titleL.mas_left);
+        make.top.mas_equalTo(self.subTitleL.mas_bottom).offset(9);
+        make.size.mas_offset(CGSizeMake([self countLabel:self.addressL], 18));
+    }];
+    
+    [self.numL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.addressL.mas_right).offset(5);
+        make.top.mas_equalTo(self.addressL.mas_top);
+        make.size.mas_offset(CGSizeMake([self countLabel:self.numL], 18));
+    }];
+    [self.typeL mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.numL.mas_right).offset(5);
+        make.top.mas_equalTo(self.addressL.mas_top);
+        make.size.mas_offset(CGSizeMake([self countLabel:self.typeL], 18));
+    }];
+    self.imagV.userInteractionEnabled = YES;
+}
+- (CGFloat)countLabel:(UILabel *)label
+{
+    CGFloat W = [label sizeThatFits:CGSizeMake(MAXFLOAT, 18)].width + 16.f;
+    return W;
+}
+#pragma mark - SubView
+- (UIImageView *)imagV
+{
+    if (!_imagV) {
+        _imagV = [UIImageView new];
+//        _imagV.contentMode = UIViewContentModeScaleAspectFill;
+    }
+    return _imagV;
+}
+- (UIImageView *)iconV
+{
+    if (!_iconV) {
+        _iconV = [UIImageView new];
+        _iconV.layer.cornerRadius = 4.f;
+        _iconV.layer.masksToBounds = YES;
+    }
+    return _iconV;
+}
+- (UIView *)showView
+{
+    if (!_showView) {
+        _showView = [UIView new];
+        _showView.layer.cornerRadius = 12.f;
+        _showView.layer.masksToBounds = YES;
+        _showView.backgroundColor = UIColorHex(0xFFFFFF);
+    }
+    return _showView;
+}
+- (UILabel *)titleL
+{
+    if (!_titleL) {
+        _titleL = [UILabel new];
+        _titleL.font = [UIFont systemFontOfSize:15];
+        _titleL.textColor = UIColorHex(0x222222);
+    }
+    return _titleL;
+}
+- (UILabel *)subTitleL
+{
+    if (!_subTitleL) {
+        _subTitleL = [UILabel new];
+        _subTitleL.font = [UIFont systemFontOfSize:12];
+        _subTitleL.textColor = UIColorHex(0x222222);
+    }
+    return _subTitleL;
+}
+- (UILabel *)addressL
+{
+    if (!_addressL) {
+        _addressL = [UILabel new];
+        _addressL.font = [UIFont systemFontOfSize:10];
+        _addressL.textColor = UIColorHex(0x666666);
+        _addressL.backgroundColor = UIColorHex(0xF4F4F4);
+        _addressL.layer.cornerRadius = 2.f;
+        _addressL.textAlignment = NSTextAlignmentCenter;
+        _addressL.layer.masksToBounds = YES;
+    }
+    return _addressL;
+}
+- (UILabel *)numL
+{
+    if (!_numL) {
+        _numL = [UILabel new];
+        _numL.font = [UIFont systemFontOfSize:10];
+        _numL.textColor = UIColorHex(0x666666);
+        _numL.backgroundColor = UIColorHex(0xF4F4F4);
+        _numL.layer.cornerRadius = 2.f;
+        _numL.textAlignment = NSTextAlignmentCenter;
+        _numL.layer.masksToBounds = YES;
+    }
+    return _numL;
+}
+- (UILabel *)typeL
+{
+    if (!_typeL) {
+        _typeL = [UILabel new];
+        _typeL.font = [UIFont systemFontOfSize:10];
+        _typeL.textColor = UIColorHex(0x666666);
+        _typeL.backgroundColor = UIColorHex(0xF4F4F4);
+        _typeL.layer.cornerRadius = 2.f;
+        _typeL.textAlignment = NSTextAlignmentCenter;
+        _typeL.layer.masksToBounds = YES;
+    }
+    return _typeL;
+}
+- (UIButton *)collectBtn
+{
+    if (!_collectBtn) {
+        _collectBtn = [UIButton new];
+        [_collectBtn setTitle:@"收藏" forState:UIControlStateNormal];
+        [_collectBtn setBackgroundColor:UIColorHex(0xFAC364)];
+        _collectBtn.titleLabel.font = [UIFont systemFontOfSize:14];
+        [_collectBtn setTitleColor:UIColorHex(0xFFFFFF) forState:UIControlStateNormal];
+        _collectBtn.layer.cornerRadius = 4.f;
+        _collectBtn.layer.masksToBounds = YES;
+    }
+    return _collectBtn;
+}
+- (UIButton *)playBtn
+{
+    if (!_playBtn) {
+        _playBtn = [UIButton new];
+        [_playBtn setImage:IMG(@"HomeSchool_Play") forState:UIControlStateNormal];
+    }
+    return _playBtn;
+}
+@end

+ 13 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SecondViewController.h

@@ -0,0 +1,13 @@
+//
+//  SecondViewController.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SegmentVController.h"
+
+@interface SecondViewController : SegmentVController
+- (void)setDataArray:(NSArray *)array;
+@end

+ 139 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SecondViewController.m

@@ -0,0 +1,139 @@
+//
+//  SecondViewController.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SecondViewController.h"
+#import "HomeSubModel.h"
+#import "HomeSubItemModel.h"
+#import "HomeTeacherCell.h"
+#import "MoveViewController.h"
+#import "BookTeacherDetailVC.h"
+
+static NSString *const SecondViewControllerTableVIewCellIdentifier = @"SecondViewControllerTableVIewCell";
+
+@interface SecondViewController () <UITableViewDelegate, UITableViewDataSource>
+@property (nonatomic, strong) NSMutableArray *  dataSource;
+@property(nonatomic, strong) UITableView    *tableView;
+@property(nonatomic, strong) NSIndexPath        * IndexPath;
+@property(nonatomic, strong) HomeSubItemModel       * model;
+@end
+
+@implementation SecondViewController
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = UIColorHex(0xF8F9FB);
+    [self creatTableView];
+}
+- (NSMutableArray *)dataSource
+{
+    if (!_dataSource) {
+        _dataSource = [NSMutableArray array];
+    }
+    return _dataSource;
+}
+- (void)creatTableView {
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 10, SCREEN_WIDTH, SCREEN_HEIGHT - NAVH - 10)];
+    _tableView.delegate = self;
+    _tableView.dataSource = self;
+    _tableView.showsVerticalScrollIndicator = NO;
+    _tableView.showsHorizontalScrollIndicator = NO;
+    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    _tableView.rowHeight = 50;
+    [self.view addSubview:_tableView];
+}
+- (void)setDataArray:(NSArray *)array
+{
+    [self.dataSource removeAllObjects];
+    for (NSDictionary *dict in array) {
+        HomeSubItemModel * model = [HomeSubItemModel modelWithDictionary:dict];
+        [self.dataSource addObject:model];
+    }
+    [self.tableView reloadData];
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return 1;
+}
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    return self.dataSource.count;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return UITableViewAutomaticDimension;
+}
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    WS(weakSelf);
+    HomeSubItemModel *model = self.dataSource[indexPath.row];
+    HomeTeacherCell * cell = [HomeTeacherCell configCell:tableView indexPath:indexPath];
+    [cell setDataWithModel:model];
+    cell.ClickCollectBlock = ^(NSInteger Id) {
+        if (model.IsCollect) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"真的取消收藏吗?" message:nil preferredStyle:UIAlertControllerStyleAlert];
+                UIAlertAction *actionYes = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                    NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
+                    [dic setValue:@(Id) forKey:@"CollectionDataId"];
+                    ///     1文章 2话题 3 收藏 4笔记 5通知 6站内信 7小组 8 会议详情 14工作流审批 300 文件 400 会议纪要
+                    [dic setValue:@(CollectModel_Teacher) forKey:@"CollectionType"];
+                    [dic setValue:@(0) forKey:@"FolderId"];
+                    [dic setValue:@(0) forKey:@"SourceUserId"];
+                    [[HttpManager sharedHttpManager] PUTUrl:Host(API_CreateCollect) parameters:dic success:^(id  _Nonnull responseObject) {
+                        model.IsCollect = NO;
+                        dispatch_async(dispatch_get_main_queue(), ^{
+                            [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
+                        });
+                    } failure:^(NSError * _Nonnull error) {
+                        //                    SHOWERROR([ZYCTool handerResultData:error]);
+                    }];
+                }];
+                UIAlertAction *actionNo = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+                    
+                }];
+                [alert addAction:actionYes];
+                [alert addAction:actionNo];
+                [weakSelf presentViewController:alert animated:YES completion:^{
+                    
+                }];
+            });
+        }else{
+            weakSelf.model = model;
+            weakSelf.IndexPath = indexPath;
+            [weakSelf gotoCollectHander:Id];
+        }
+    };
+    return cell;
+}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    HomeSubItemModel * model = self.dataSource[indexPath.row];
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    BookTeacherDetailVC * vc = [BookTeacherDetailVC initBookTeacherDetailVC];
+    vc.Id = model.Id;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+- (void)gotoCollectHander:(NSInteger)Id{
+    MoveViewController *vc = [MoveViewController initMoveViewController];
+    vc.CollectionDataId = Id;
+    vc.collectType = CollectHanderType_Collect;
+    vc.CollectionType = CollectModel_Teacher;
+    vc.ParentId = 0;
+    vc.titleStr = @"我的收藏";
+    vc.TypeId = CreateCollectionType;
+    vc.FolderIds = @[].mutableCopy;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+- (void)collectSuccess
+{
+    self.model.IsCollect = YES;
+    [self.tableView reloadRowsAtIndexPaths:@[self.IndexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
+}
+
+@end

+ 23 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentHeaderView.h

@@ -0,0 +1,23 @@
+//
+//  SegmentHeaderView.h
+//  PersonalCenter
+//
+//  Created by Arch on 2018/8/20.
+//  Copyright © 2018年 mint_bin. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+UIKIT_EXTERN CGFloat const SegmentHeaderViewHeight;
+
+@interface SegmentHeaderViewCollectionViewCell : UICollectionViewCell
+@property (nonatomic, readonly, strong) UILabel *titleLabel;
+@end;
+
+@interface SegmentHeaderView : UIView
+@property (nonatomic, assign) NSUInteger defaultSelectedIndex;
+@property (nonatomic, assign) NSUInteger selectedIndex;
+@property (nonatomic, copy) void (^selectedItemHelper)(NSUInteger index);
+
+- (void)changeItemWithTargetIndex:(NSUInteger)targetIndex;
+- (instancetype)initWithFrame:(CGRect)frame titleArray:(NSArray *)titleArray;
+@end

+ 257 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentHeaderView.m

@@ -0,0 +1,257 @@
+//
+//  SegmentHeaderView.m
+//  PersonalCenter
+//
+//  Created by Arch on 2018/8/20.
+//  Copyright © 2018年 mint_bin. All rights reserved.
+//
+
+#import "SegmentHeaderView.h"
+
+//#define kWidth self.frame.size.width
+#define NORMAL_FONT [UIFont systemFontOfSize:15]
+
+@interface SegmentHeaderViewCollectionViewCell ()
+@property (nonatomic, strong) UILabel *titleLabel;
+@end;
+
+@implementation SegmentHeaderViewCollectionViewCell
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.frame = frame;
+        [self.contentView addSubview:self.titleLabel];
+        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_equalTo(0);
+        }];
+    }
+    return self;
+}
+
+- (UILabel *)titleLabel {
+    if (!_titleLabel) {
+        _titleLabel = [[UILabel alloc] init];
+        _titleLabel.textAlignment = NSTextAlignmentCenter;
+        _titleLabel.font = NORMAL_FONT;
+        _titleLabel.textColor = UIColorHex(0x666666);
+    }
+    return _titleLabel;
+}
+
+@end
+
+@interface SegmentHeaderView () <UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
+@property (nonatomic, strong) UICollectionView *collectionView;
+@property (nonatomic, copy) NSArray *titleArray;
+@property (nonatomic, strong) UIView *moveLine;
+@property (nonatomic, strong) UIView *separator;
+@property (nonatomic, assign) BOOL selectedCellExist;
+@end
+
+CGFloat const SegmentHeaderViewHeight = 37;
+static NSString * const SegmentHeaderViewCollectionViewCellIdentifier = @"SegmentHeaderViewCollectionViewCell";
+static CGFloat const MoveLineHeight = 2;
+static CGFloat const SeparatorHeight = 0.5;
+static CGFloat const CellSpacing = 15;
+static CGFloat const CollectionViewHeight = SegmentHeaderViewHeight - SeparatorHeight;
+
+@implementation SegmentHeaderView
+
+#pragma mark - Life
+- (instancetype)initWithFrame:(CGRect)frame titleArray:(NSArray *)titleArray {
+    if (self = [super initWithFrame:frame]) {
+        [self setupSubViews];
+        self.titleArray = titleArray;
+        self.selectedIndex = 0;
+    }
+    return self;
+}
+
+#pragma mark - Public Method
+- (void)changeItemWithTargetIndex:(NSUInteger)targetIndex {
+    if (_selectedIndex == targetIndex) {
+        return;
+    }
+    
+    SegmentHeaderViewCollectionViewCell *selectedCell = [self getCell:_selectedIndex];
+    if (selectedCell) {
+        selectedCell.titleLabel.textColor = UIColorHex(0x666666);
+    }
+    SegmentHeaderViewCollectionViewCell *targetCell = [self getCell:targetIndex];
+    if (targetCell) {
+        targetCell.titleLabel.textColor = UIColorHex(0x3979D3);
+    }
+    
+    _selectedIndex = targetIndex;
+    
+    [self layoutAndScrollToSelectedItem];
+}
+
+#pragma mark - Private Method
+- (void)setupSubViews {
+    [self addSubview:self.collectionView];
+    [self.collectionView addSubview:self.moveLine];
+    [self addSubview:self.separator];
+    
+    [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.left.right.mas_equalTo(0);
+        make.height.mas_equalTo(CollectionViewHeight);
+    }];
+    [self.moveLine mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(CollectionViewHeight - MoveLineHeight);
+        make.height.mas_equalTo(MoveLineHeight);
+    }];
+    [self.separator mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.collectionView.mas_bottom);
+        make.left.right.mas_equalTo(0);
+        make.height.mas_equalTo(SeparatorHeight);
+    }];
+}
+
+- (SegmentHeaderViewCollectionViewCell *)getCell:(NSUInteger)Index {
+    return (SegmentHeaderViewCollectionViewCell *)[self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:Index inSection:0]];
+}
+
+- (void)layoutAndScrollToSelectedItem {
+    [self.collectionView.collectionViewLayout invalidateLayout];
+    [self.collectionView setNeedsLayout];
+    [self.collectionView layoutIfNeeded];
+    
+    [self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:_selectedIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
+
+    if (self.selectedItemHelper) {
+        self.selectedItemHelper(_selectedIndex);
+    }
+    
+    SegmentHeaderViewCollectionViewCell *selectedCell = [self getCell:_selectedIndex];
+    if (selectedCell) {
+        self.selectedCellExist = YES;
+        [self updateMoveLineLocation];
+    } else {
+        self.selectedCellExist = NO;
+        //这种情况下updateMoveLineLocation将在self.collectionView滚动结束后执行(代理方法scrollViewDidEndScrollingAnimation)
+    }
+}
+
+- (void)setupMoveLineDefaultLocation {
+    CGFloat firstCellWidth = [self getWidthWithContent:self.titleArray[0]];
+    [self.moveLine mas_updateConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(firstCellWidth);
+        make.left.mas_equalTo(CellSpacing);
+    }];
+}
+
+- (void)updateMoveLineLocation {
+    SegmentHeaderViewCollectionViewCell *cell = [self getCell:_selectedIndex];
+    [UIView animateWithDuration:0.25 animations:^{
+        [self.moveLine mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(CollectionViewHeight - MoveLineHeight);
+            make.height.mas_equalTo(MoveLineHeight);
+            make.width.centerX.equalTo(cell.titleLabel);
+        }];
+        [self.collectionView setNeedsLayout];
+        [self.collectionView layoutIfNeeded];
+    }];
+}
+
+- (CGFloat)getWidthWithContent:(NSString *)content {
+    CGRect rect = [content boundingRectWithSize:CGSizeMake(MAXFLOAT, CollectionViewHeight)
+                                        options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
+                                     attributes:@{NSFontAttributeName:NORMAL_FONT}
+                                        context:nil
+                   ];
+    return ceilf(rect.size.width);;
+}
+
+#pragma mark - UICollectionViewDelegateFlowLayout
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
+    CGFloat itemWidth = [self getWidthWithContent:self.titleArray[indexPath.row]];
+    return CGSizeMake(itemWidth, SegmentHeaderViewHeight - 1);
+}
+
+#pragma mark - UICollectionViewDataSource
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    return self.titleArray.count;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    SegmentHeaderViewCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:SegmentHeaderViewCollectionViewCellIdentifier forIndexPath:indexPath];
+    cell.titleLabel.text = self.titleArray[indexPath.row];
+    cell.titleLabel.textColor = _selectedIndex == indexPath.row ? UIColorHex(0x3979D3) : UIColorHex(0x666666);
+    return cell;
+}
+
+#pragma mark - UICollectionViewDelegate
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
+    [collectionView deselectItemAtIndexPath:indexPath animated:YES];
+    [self changeItemWithTargetIndex:indexPath.row];
+}
+
+- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
+    if (!self.selectedCellExist) {
+        [self updateMoveLineLocation];
+    }
+}
+
+#pragma mark - Setter
+- (void)setTitleArray:(NSArray *)titleArray {
+    _titleArray = titleArray.copy;
+    [self.collectionView reloadData];
+}
+
+- (void)setSelectedIndex:(NSUInteger)selectedIndex {
+    if (self.titleArray == nil && self.titleArray.count == 0) {
+        return;
+    }
+    
+    if (selectedIndex >= self.titleArray.count) {
+        _selectedIndex = self.titleArray.count - 1;
+    } else {
+        _selectedIndex = selectedIndex;
+    }
+    
+    //设置初始选中位置
+    if (_selectedIndex == 0) {
+        [self setupMoveLineDefaultLocation];
+    } else {
+        [self layoutAndScrollToSelectedItem];
+    }
+}
+
+#pragma mark - Getter
+- (UICollectionView *)collectionView {
+    if (!_collectionView) {
+        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
+        flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
+        flowLayout.minimumLineSpacing = 0;
+        flowLayout.minimumInteritemSpacing = CellSpacing;
+        flowLayout.sectionInset = UIEdgeInsetsMake(0, CellSpacing, 0, CellSpacing);
+        
+        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, kWidth, CollectionViewHeight) collectionViewLayout:flowLayout];
+        _collectionView.showsHorizontalScrollIndicator = NO;
+        _collectionView.backgroundColor = [UIColor whiteColor];
+        _collectionView.delegate = self;
+        _collectionView.dataSource = self;
+        _collectionView.bounces = NO;
+        [_collectionView registerClass:[SegmentHeaderViewCollectionViewCell class] forCellWithReuseIdentifier:SegmentHeaderViewCollectionViewCellIdentifier];
+    }
+    return _collectionView;
+}
+
+- (UIView *)moveLine {
+    if (!_moveLine) {
+        _moveLine = [[UIView alloc] init];
+        _moveLine.backgroundColor = UIColorHex(0x3979D3);
+    }
+    return _moveLine;
+}
+
+- (UIView *)separator {
+    if (!_separator) {
+        _separator = [[UIView alloc] init];
+        _separator.backgroundColor = [UIColor lightGrayColor];
+    }
+    return _separator;
+}
+
+@end

+ 14 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentVController.h

@@ -0,0 +1,14 @@
+//
+//  SegmentVController.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SegmentHeaderView.h"
+
+@interface SegmentVController : UIViewController
+
+@end

+ 80 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentVController.m

@@ -0,0 +1,80 @@
+//
+//  SegmentVController.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SegmentVController.h"
+@interface SegmentVController () <UIGestureRecognizerDelegate, UIScrollViewDelegate>
+@property (nonatomic, strong) UIScrollView *scrollView;
+@property (nonatomic, assign) BOOL canScroll;
+@property (nonatomic, strong) NSNumber *selectedPageIndex;
+
+@end
+
+@implementation SegmentVController
+#pragma mark - Life
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    //子控制器视图到达顶部的通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:@"goTop" object:nil];
+    //子控制器视图离开顶部的通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:@"leaveTop" object:nil];
+    //切换分页选项的通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptMsg:) name:CurrentSelectedChildViewControllerIndex object:nil];
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
+        self.navigationController.interactivePopGestureRecognizer.delegate = self;
+    }
+}
+
+- (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+#pragma mark - Notification
+- (void)acceptMsg:(NSNotification *)notification {
+    NSString *notificationName = notification.name;
+    if ([notificationName isEqualToString:@"goTop"]) {
+        NSDictionary *userInfo = notification.userInfo;
+        NSString *canScroll = userInfo[@"canScroll"];
+        if ([canScroll isEqualToString:@"1"]) {
+            self.canScroll = YES;
+            self.scrollView.showsVerticalScrollIndicator = YES;
+        } else {
+            self.canScroll = NO;
+        }
+    } else if ([notificationName isEqualToString:@"leaveTop"]){
+        self.canScroll = NO;
+        self.scrollView.contentOffset = CGPointZero;
+        self.scrollView.showsVerticalScrollIndicator = NO;
+    } else if ([notificationName isEqualToString:CurrentSelectedChildViewControllerIndex]) {
+        NSDictionary *userInfo = notification.userInfo;
+        self.selectedPageIndex = userInfo[@"selectedPageIndex"];
+    }
+}
+
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
+    if (!self.canScroll) {
+        [scrollView setContentOffset:CGPointZero];
+    }
+    CGFloat offsetY = scrollView.contentOffset.y;
+    if (offsetY <= 0) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"leaveTop" object:nil userInfo:@{@"canScroll":@"1"}];
+    }
+    self.scrollView = scrollView;
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+    if ([self.selectedPageIndex isEqualToNumber:@0]) {
+        return YES;
+    }
+    return NO;
+}
+
+@end

+ 16 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentView.h

@@ -0,0 +1,16 @@
+//
+//  CenterSegmentView.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SegmentHeaderView.h"
+
+@interface SegmentView : UIView
+@property (nonatomic, assign) NSUInteger selectedIndex;
+
+- (instancetype)initWithFrame:(CGRect)frame controllers:(NSArray *)controllers titleArray:(NSArray *)titleArray parentController:(UIViewController *)parentController;
+@end

+ 81 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/SegmentView.m

@@ -0,0 +1,81 @@
+//
+//  CentersegmentHeaderView.m
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SegmentView.h"
+#import "SegmentHeaderView.h"
+
+//#define kWidth self.frame.size.width
+//#define kHeight self.frame.size.height
+
+@interface SegmentView () <UIScrollViewDelegate>
+@property (nonatomic, strong) SegmentHeaderView *headerView;
+@property (nonatomic, strong) UIScrollView *contentScrollView;
+@end
+
+@implementation SegmentView
+#pragma mark - Life
+- (instancetype)initWithFrame:(CGRect)frame controllers:(NSArray *)controllers titleArray:(NSArray *)titleArray parentController:(UIViewController *)parentController {
+    if ( self = [super initWithFrame:frame]) {
+        self.frame = frame;
+        
+        self.headerView = [[SegmentHeaderView alloc] initWithFrame:CGRectMake(0, 0, kWidth, SegmentHeaderViewHeight) titleArray:titleArray];
+        [self addSubview:self.headerView];
+        [self.headerView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.left.right.mas_equalTo(0);
+            make.height.mas_equalTo(SegmentHeaderViewHeight);
+        }];
+        __weak  typeof(self) weakSelf = self;
+        weakSelf.headerView.selectedItemHelper = ^(NSUInteger index) {
+            __strong typeof(weakSelf) strongSelf = weakSelf;
+            [strongSelf.contentScrollView setContentOffset:CGPointMake(index * kWidth, 0) animated:NO];
+            [[NSNotificationCenter defaultCenter] postNotificationName:CurrentSelectedChildViewControllerIndex object:nil userInfo:@{@"selectedPageIndex" : @(index)}];
+        };
+        
+        self.contentScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, SegmentHeaderViewHeight, kWidth, kHeight-SegmentHeaderViewHeight)];
+        self.contentScrollView.contentSize = CGSizeMake(kWidth * controllers.count, 0);
+        self.contentScrollView.delegate = self;
+        self.contentScrollView.showsHorizontalScrollIndicator = NO;
+        self.contentScrollView.pagingEnabled = YES;
+        self.contentScrollView.bounces = NO;
+        [self addSubview:self.contentScrollView];
+        
+        [controllers enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+            UIViewController *controller = obj;
+            [self.contentScrollView addSubview:controller.view];
+            controller.view.frame = CGRectMake(idx * kWidth, 0, kWidth, kHeight);
+            [parentController addChildViewController:controller];
+            [controller didMoveToParentViewController:parentController];
+        }];
+    }
+    return self;
+}
+
+#pragma mark - Setter
+- (void)setSelectedIndex:(NSUInteger)selectedIndex {
+    _selectedIndex = selectedIndex;
+    self.headerView.selectedIndex =  selectedIndex;
+    [[NSNotificationCenter defaultCenter] postNotificationName:CurrentSelectedChildViewControllerIndex object:nil userInfo:@{@"selectedPageIndex" : @(selectedIndex)}];
+}
+
+#pragma mark - UIScrollViewDelegate
+//增加分页视图左右滑动和外界tableView上下滑动互斥处理
+- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
+    [[NSNotificationCenter defaultCenter] postNotificationName:IsEnablePersonalCenterVCMainTableViewScroll object:nil userInfo:@{@"canScroll" : @"0"}];
+}
+
+- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
+    [[NSNotificationCenter defaultCenter] postNotificationName:IsEnablePersonalCenterVCMainTableViewScroll object:nil userInfo:@{@"canScroll" : @"1"}];
+}
+
+- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
+    NSUInteger selectedIndex = (NSUInteger)self.contentScrollView.contentOffset.x / kWidth;
+    [self.headerView changeItemWithTargetIndex:selectedIndex];
+    [[NSNotificationCenter defaultCenter] postNotificationName:CurrentSelectedChildViewControllerIndex object:nil userInfo:@{@"selectedPageIndex" : @(selectedIndex)}];
+}
+
+@end

+ 13 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/ThirdViewController.h

@@ -0,0 +1,13 @@
+//
+//  ThirdViewController.h
+//  PersonalCenter
+//
+//  Created by Arch on 2017/6/16.
+//  Copyright © 2017年 mint_bin. All rights reserved.
+//
+
+#import "SegmentVController.h"
+
+@interface ThirdViewController : SegmentVController
+- (void)setDataArray:(NSArray *)array;
+@end

+ 0 - 0
smartRhino/Project/VCModel/Home/VC/View/HomeSchoolSubVC/ThirdViewController.m


部分文件因文件數量過多而無法顯示