Steven %!s(int64=2) %!d(string=hai) anos
pai
achega
281ea31e28
Modificáronse 62 ficheiros con 3127 adicións e 128 borrados
  1. 152 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN=BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 72 40
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 11 8
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/Contents.json
  6. BIN=BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@2x.png
  7. BIN=BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@3x.png
  8. 9 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  9. 20 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  10. 19 3
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  11. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m
  12. 10 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m
  13. 63 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m
  14. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  15. 6 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSSelectConversationViewController.m
  16. 28 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/FriendListModel.h
  17. 148 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/FriendListModel.m
  18. 25 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.h
  19. 70 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.m
  20. 31 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.h
  21. 90 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.m
  22. 5 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m
  23. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.h
  24. 231 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m
  25. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.h
  26. 120 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.m
  27. 147 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.xib
  28. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.h
  29. 57 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.m
  30. 89 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.xib
  31. 25 39
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m
  32. 14 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressHeaderView.m
  33. 6 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressHeaderView.xib
  34. 23 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ContractListCell.m
  35. 6 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ContractListCell.xib
  36. 49 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatGroupListCell.m
  37. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatListSearchView.m
  38. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatListSearchView.xib
  39. 16 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatLiveShareCell.h
  40. 78 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatLiveShareCell.m
  41. 16 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatMusicShareCell.h
  42. 62 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatMusicShareCell.m
  43. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.h
  44. 53 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.m
  45. 204 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.xib
  46. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.h
  47. 113 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.m
  48. 160 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.xib
  49. 21 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m
  50. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Model/MusicMessageModel.h
  51. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  52. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m
  53. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.h
  54. 21 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m
  55. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m
  56. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m
  57. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m
  58. 4 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/UserSettingViewController.m
  59. 28 0
      KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/Controller/KSShareChooseViewController.h
  60. 226 0
      KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/Controller/KSShareChooseViewController.m
  61. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/View/ShareChooseMainView.h
  62. 424 0
      KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/View/ShareChooseMainView.m

+ 152 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -605,6 +605,14 @@
 		BCB635B927F722E800ACFDCF /* KSDocumentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB635B827F722E800ACFDCF /* KSDocumentViewController.m */; };
 		BCB635BE27F7256B00ACFDCF /* KSICloudManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB635BA27F7256B00ACFDCF /* KSICloudManager.m */; };
 		BCB635BF27F7256B00ACFDCF /* KSDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB635BD27F7256B00ACFDCF /* KSDocument.m */; };
+		BCB908DB2850A71100F5FF69 /* ShareMusicCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908DA2850A71100F5FF69 /* ShareMusicCellContentView.m */; };
+		BCB908DD2850A71800F5FF69 /* ShareMusicCellContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908DC2850A71800F5FF69 /* ShareMusicCellContentView.xib */; };
+		BCB908F72850C6EF00F5FF69 /* MusicChooseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908F52850C6EF00F5FF69 /* MusicChooseCell.m */; };
+		BCB908F82850C6EF00F5FF69 /* MusicChooseCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908F62850C6EF00F5FF69 /* MusicChooseCell.xib */; };
+		BCB908FB2850C9C300F5FF69 /* MusicChooseSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908FA2850C9C300F5FF69 /* MusicChooseSearchView.m */; };
+		BCB908FD2850C9CB00F5FF69 /* MusicChooseSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908FC2850C9CB00F5FF69 /* MusicChooseSearchView.xib */; };
+		BCB909042851E25D00F5FF69 /* KSShareChooseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB909032851E25D00F5FF69 /* KSShareChooseViewController.m */; };
+		BCB909072851E32C00F5FF69 /* ShareChooseMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB909062851E32C00F5FF69 /* ShareChooseMainView.m */; };
 		BCC03F88280460C000461B7C /* InstrumentHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC03F86280460C000461B7C /* InstrumentHeaderView.m */; };
 		BCC03F89280460C000461B7C /* InstrumentHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCC03F87280460C000461B7C /* InstrumentHeaderView.xib */; };
 		BCC03F8C280526B300461B7C /* MyStyleVideoChooseView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC03F8B280526B300461B7C /* MyStyleVideoChooseView.m */; };
@@ -725,6 +733,14 @@
 		BCEA75322819336A00886A86 /* WithdrawBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCEA75312819336A00886A86 /* WithdrawBodyView.xib */; };
 		BCEBB8F62840D68400A76BE8 /* KSChatGroupListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEBB8F42840D68400A76BE8 /* KSChatGroupListCell.m */; };
 		BCEBB8F72840D68400A76BE8 /* KSChatGroupListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCEBB8F52840D68400A76BE8 /* KSChatGroupListCell.xib */; };
+		BCED5CAA284F5D8D009A42DE /* FriendListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CA9284F5D8D009A42DE /* FriendListModel.m */; };
+		BCED5CAE28507E5F009A42DE /* KSChatLiveMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CAD28507E5F009A42DE /* KSChatLiveMessage.m */; };
+		BCED5CB128507E85009A42DE /* KSChatMusicMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CB028507E85009A42DE /* KSChatMusicMessage.m */; };
+		BCED5CB4285083AC009A42DE /* ShareMusicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CB3285083AC009A42DE /* ShareMusicViewController.m */; };
+		BCED5CBB28508823009A42DE /* KSChatLiveShareCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CBA28508823009A42DE /* KSChatLiveShareCell.m */; };
+		BCED5CBE28508831009A42DE /* KSChatMusicShareCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CBD28508831009A42DE /* KSChatMusicShareCell.m */; };
+		BCED5CC128508F21009A42DE /* ShareLiveCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CC028508F21009A42DE /* ShareLiveCellContentView.m */; };
+		BCED5CC328508F28009A42DE /* ShareLiveCellContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCED5CC228508F28009A42DE /* ShareLiveCellContentView.xib */; };
 		BCF1BA5127F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m in Sources */ = {isa = PBXBuildFile; fileRef = BCF1BA5027F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m */; };
 		BCF1BA5427F5CB5800FA36C4 /* LiveSeatApplyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCF1BA5327F5CB5800FA36C4 /* LiveSeatApplyView.m */; };
 		BCF1BA5627F5CBA100FA36C4 /* LiveSeatApplyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCF1BA5527F5CBA100FA36C4 /* LiveSeatApplyView.xib */; };
@@ -1841,6 +1857,19 @@
 		BCB635BB27F7256B00ACFDCF /* KSICloudManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSICloudManager.h; sourceTree = "<group>"; };
 		BCB635BC27F7256B00ACFDCF /* KSDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSDocument.h; sourceTree = "<group>"; };
 		BCB635BD27F7256B00ACFDCF /* KSDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSDocument.m; sourceTree = "<group>"; };
+		BCB908D92850A71100F5FF69 /* ShareMusicCellContentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareMusicCellContentView.h; sourceTree = "<group>"; };
+		BCB908DA2850A71100F5FF69 /* ShareMusicCellContentView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareMusicCellContentView.m; sourceTree = "<group>"; };
+		BCB908DC2850A71800F5FF69 /* ShareMusicCellContentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShareMusicCellContentView.xib; sourceTree = "<group>"; };
+		BCB908F42850C6EF00F5FF69 /* MusicChooseCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicChooseCell.h; sourceTree = "<group>"; };
+		BCB908F52850C6EF00F5FF69 /* MusicChooseCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicChooseCell.m; sourceTree = "<group>"; };
+		BCB908F62850C6EF00F5FF69 /* MusicChooseCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MusicChooseCell.xib; sourceTree = "<group>"; };
+		BCB908F92850C9C300F5FF69 /* MusicChooseSearchView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicChooseSearchView.h; sourceTree = "<group>"; };
+		BCB908FA2850C9C300F5FF69 /* MusicChooseSearchView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicChooseSearchView.m; sourceTree = "<group>"; };
+		BCB908FC2850C9CB00F5FF69 /* MusicChooseSearchView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MusicChooseSearchView.xib; sourceTree = "<group>"; };
+		BCB909022851E25D00F5FF69 /* KSShareChooseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSShareChooseViewController.h; sourceTree = "<group>"; };
+		BCB909032851E25D00F5FF69 /* KSShareChooseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSShareChooseViewController.m; sourceTree = "<group>"; };
+		BCB909052851E32C00F5FF69 /* ShareChooseMainView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareChooseMainView.h; sourceTree = "<group>"; };
+		BCB909062851E32C00F5FF69 /* ShareChooseMainView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareChooseMainView.m; sourceTree = "<group>"; };
 		BCC03F85280460C000461B7C /* InstrumentHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstrumentHeaderView.h; sourceTree = "<group>"; };
 		BCC03F86280460C000461B7C /* InstrumentHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstrumentHeaderView.m; sourceTree = "<group>"; };
 		BCC03F87280460C000461B7C /* InstrumentHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InstrumentHeaderView.xib; sourceTree = "<group>"; };
@@ -2064,6 +2093,21 @@
 		BCEBB8F32840D68400A76BE8 /* KSChatGroupListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatGroupListCell.h; sourceTree = "<group>"; };
 		BCEBB8F42840D68400A76BE8 /* KSChatGroupListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSChatGroupListCell.m; sourceTree = "<group>"; };
 		BCEBB8F52840D68400A76BE8 /* KSChatGroupListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSChatGroupListCell.xib; sourceTree = "<group>"; };
+		BCED5CA8284F5D8D009A42DE /* FriendListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FriendListModel.h; sourceTree = "<group>"; };
+		BCED5CA9284F5D8D009A42DE /* FriendListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FriendListModel.m; sourceTree = "<group>"; };
+		BCED5CAC28507E5F009A42DE /* KSChatLiveMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatLiveMessage.h; sourceTree = "<group>"; };
+		BCED5CAD28507E5F009A42DE /* KSChatLiveMessage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSChatLiveMessage.m; sourceTree = "<group>"; };
+		BCED5CAF28507E85009A42DE /* KSChatMusicMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatMusicMessage.h; sourceTree = "<group>"; };
+		BCED5CB028507E85009A42DE /* KSChatMusicMessage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSChatMusicMessage.m; sourceTree = "<group>"; };
+		BCED5CB2285083AC009A42DE /* ShareMusicViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareMusicViewController.h; sourceTree = "<group>"; };
+		BCED5CB3285083AC009A42DE /* ShareMusicViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareMusicViewController.m; sourceTree = "<group>"; };
+		BCED5CB928508823009A42DE /* KSChatLiveShareCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatLiveShareCell.h; sourceTree = "<group>"; };
+		BCED5CBA28508823009A42DE /* KSChatLiveShareCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSChatLiveShareCell.m; sourceTree = "<group>"; };
+		BCED5CBC28508831009A42DE /* KSChatMusicShareCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatMusicShareCell.h; sourceTree = "<group>"; };
+		BCED5CBD28508831009A42DE /* KSChatMusicShareCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSChatMusicShareCell.m; sourceTree = "<group>"; };
+		BCED5CBF28508F21009A42DE /* ShareLiveCellContentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareLiveCellContentView.h; sourceTree = "<group>"; };
+		BCED5CC028508F21009A42DE /* ShareLiveCellContentView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareLiveCellContentView.m; sourceTree = "<group>"; };
+		BCED5CC228508F28009A42DE /* ShareLiveCellContentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ShareLiveCellContentView.xib; sourceTree = "<group>"; };
 		BCF1BA4F27F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveChatroomMemberCount.h; sourceTree = "<group>"; };
 		BCF1BA5027F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveChatroomMemberCount.m; sourceTree = "<group>"; };
 		BCF1BA5227F5CB5800FA36C4 /* LiveSeatApplyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveSeatApplyView.h; sourceTree = "<group>"; };
@@ -3174,6 +3218,7 @@
 		277935D927E325B90010E277 /* Module */ = {
 			isa = PBXGroup;
 			children = (
+				BCB908FE2851BE8700F5FF69 /* ShareInChat */,
 				BCB633D527F6A18100ACFDCF /* Classroom */,
 				BCC9F35A27F69BD100647449 /* SealClass */,
 				27D83F4327F3EBAA00062476 /* Live */,
@@ -3389,6 +3434,7 @@
 		2779360227E32BBF0010E277 /* Chat */ = {
 			isa = PBXGroup;
 			children = (
+				BCED5CB5285087A9009A42DE /* ShareMusic */,
 				27F9CB0527EC5479003E0FE4 /* Group */,
 				2755C07827EC9593007D9070 /* GroupNotice */,
 				275B171127EB1B840081FDEF /* Search */,
@@ -3419,12 +3465,18 @@
 		2779360427E32BBF0010E277 /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				BCED5CA8284F5D8D009A42DE /* FriendListModel.h */,
+				BCED5CA9284F5D8D009A42DE /* FriendListModel.m */,
 				27F9CB0D27EC5DF4003E0FE4 /* KSRCloudMediaManager.h */,
 				27F9CB0C27EC5DF3003E0FE4 /* KSRCloudMediaManager.m */,
 				27F9CB1027EC60CF003E0FE4 /* GroupListModel.h */,
 				27F9CB0F27EC60CE003E0FE4 /* GroupListModel.m */,
 				2755C07227EC905D007D9070 /* GroupMemberModel.h */,
 				2755C07327EC905E007D9070 /* GroupMemberModel.m */,
+				BCED5CAC28507E5F009A42DE /* KSChatLiveMessage.h */,
+				BCED5CAD28507E5F009A42DE /* KSChatLiveMessage.m */,
+				BCED5CAF28507E85009A42DE /* KSChatMusicMessage.h */,
+				BCED5CB028507E85009A42DE /* KSChatMusicMessage.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -3455,6 +3507,16 @@
 				BCEBB8F32840D68400A76BE8 /* KSChatGroupListCell.h */,
 				BCEBB8F42840D68400A76BE8 /* KSChatGroupListCell.m */,
 				BCEBB8F52840D68400A76BE8 /* KSChatGroupListCell.xib */,
+				BCED5CB928508823009A42DE /* KSChatLiveShareCell.h */,
+				BCED5CBA28508823009A42DE /* KSChatLiveShareCell.m */,
+				BCED5CBF28508F21009A42DE /* ShareLiveCellContentView.h */,
+				BCED5CC028508F21009A42DE /* ShareLiveCellContentView.m */,
+				BCED5CC228508F28009A42DE /* ShareLiveCellContentView.xib */,
+				BCED5CBC28508831009A42DE /* KSChatMusicShareCell.h */,
+				BCED5CBD28508831009A42DE /* KSChatMusicShareCell.m */,
+				BCB908D92850A71100F5FF69 /* ShareMusicCellContentView.h */,
+				BCB908DA2850A71100F5FF69 /* ShareMusicCellContentView.m */,
+				BCB908DC2850A71800F5FF69 /* ShareMusicCellContentView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -4677,6 +4739,41 @@
 			path = MainToolbar;
 			sourceTree = "<group>";
 		};
+		BCB908FE2851BE8700F5FF69 /* ShareInChat */ = {
+			isa = PBXGroup;
+			children = (
+				BCB908FF2851BE8700F5FF69 /* Controller */,
+				BCB909002851BE8700F5FF69 /* Model */,
+				BCB909012851BE8700F5FF69 /* View */,
+			);
+			path = ShareInChat;
+			sourceTree = "<group>";
+		};
+		BCB908FF2851BE8700F5FF69 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BCB909022851E25D00F5FF69 /* KSShareChooseViewController.h */,
+				BCB909032851E25D00F5FF69 /* KSShareChooseViewController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BCB909002851BE8700F5FF69 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		BCB909012851BE8700F5FF69 /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BCB909052851E32C00F5FF69 /* ShareChooseMainView.h */,
+				BCB909062851E32C00F5FF69 /* ShareChooseMainView.m */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BCC9F35A27F69BD100647449 /* SealClass */ = {
 			isa = PBXGroup;
 			children = (
@@ -5068,6 +5165,45 @@
 			path = PopView;
 			sourceTree = "<group>";
 		};
+		BCED5CB5285087A9009A42DE /* ShareMusic */ = {
+			isa = PBXGroup;
+			children = (
+				BCED5CB6285087A9009A42DE /* Controller */,
+				BCED5CB7285087A9009A42DE /* Model */,
+				BCED5CB8285087A9009A42DE /* View */,
+			);
+			path = ShareMusic;
+			sourceTree = "<group>";
+		};
+		BCED5CB6285087A9009A42DE /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BCED5CB2285083AC009A42DE /* ShareMusicViewController.h */,
+				BCED5CB3285083AC009A42DE /* ShareMusicViewController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BCED5CB7285087A9009A42DE /* Model */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		BCED5CB8285087A9009A42DE /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BCB908F42850C6EF00F5FF69 /* MusicChooseCell.h */,
+				BCB908F52850C6EF00F5FF69 /* MusicChooseCell.m */,
+				BCB908F62850C6EF00F5FF69 /* MusicChooseCell.xib */,
+				BCB908F92850C9C300F5FF69 /* MusicChooseSearchView.h */,
+				BCB908FA2850C9C300F5FF69 /* MusicChooseSearchView.m */,
+				BCB908FC2850C9CB00F5FF69 /* MusicChooseSearchView.xib */,
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BCFE540A28178BD100AD6786 /* Income */ = {
 			isa = PBXGroup;
 			children = (
@@ -5242,6 +5378,7 @@
 				BC41104F280678ED00800BD9 /* HomeworkSortView.xib in Resources */,
 				275FA56427F31AEE00EB6240 /* MinePageHeadView.xib in Resources */,
 				275B173127EB27960081FDEF /* GroupCreateView.xib in Resources */,
+				BCB908F82850C6EF00F5FF69 /* MusicChooseCell.xib in Resources */,
 				BCC9F43227F69BD200647449 /* class_stop.mp3 in Resources */,
 				2755C08E27ED5DB2007D9070 /* GroupApplyChooseCell.xib in Resources */,
 				BCF61BE9280425DA0000ACFE /* InstrumentChooseCell.xib in Resources */,
@@ -5260,6 +5397,7 @@
 				2780A06B27E823D300447CFD /* MineBodyView.xib in Resources */,
 				27F9030127E864AE00C08A19 /* NetworkBodyView.xib in Resources */,
 				BC4BCE7F2823B66A00522C8B /* AddressDetailBodyView.xib in Resources */,
+				BCB908FD2850C9CB00F5FF69 /* MusicChooseSearchView.xib in Resources */,
 				275E8A7227E18F2300DD3F6E /* Main.storyboard in Resources */,
 				2780C92927E490CA00A95A4F /* VefiBodyView.xib in Resources */,
 				BCA9CE4427FD947C00D558C6 /* AccompanyArrangeCell.xib in Resources */,
@@ -5278,6 +5416,7 @@
 				275E3DEE27F467BF0010EC30 /* LiveRoomBottomView.xib in Resources */,
 				BC4BCE6D28239EEB00522C8B /* MyAddressListCell.xib in Resources */,
 				27BC3B2B27F2DB9600D81E30 /* MusicUploadView.xib in Resources */,
+				BCED5CC328508F28009A42DE /* ShareLiveCellContentView.xib in Resources */,
 				BCE6A09B27F83E8E00C97704 /* MinePageVideoCell.xib in Resources */,
 				BCE06F2D2818147000234817 /* KSConfirmAlertView.xib in Resources */,
 				BCA7C34428476533009D20EC /* KSBoardAddStaffView.xib in Resources */,
@@ -5308,6 +5447,7 @@
 				BC0A22A8284751F80065C1AB /* DownloadStatusCell.xib in Resources */,
 				275B170D27EB14AC0081FDEF /* KSChatListSearchView.xib in Resources */,
 				BC7CFFCA2817F2FF00CAEB21 /* CashRecordListCell.xib in Resources */,
+				BCB908DD2850A71800F5FF69 /* ShareMusicCellContentView.xib in Resources */,
 				27D83F5927F4225D00062476 /* LivePreviewBodyView.xib in Resources */,
 				BC41104A2806706800800BD9 /* HomeworkListCell.xib in Resources */,
 				2779362E27E33C360010E277 /* LoginBodyView.xib in Resources */,
@@ -5459,6 +5599,7 @@
 				BCEBB8F62840D68400A76BE8 /* KSChatGroupListCell.m in Sources */,
 				277931E827E30FC20010E277 /* KSUtilities.m in Sources */,
 				2779326327E30FD80010E277 /* FSCalendarCollectionView.m in Sources */,
+				BCED5CB128507E85009A42DE /* KSChatMusicMessage.m in Sources */,
 				BCA9CE3927FD93EB00D558C6 /* AccompanyStudentEvaCell.m in Sources */,
 				2779324027E30FC30010E277 /* VoNetworking+RequestManager.m in Sources */,
 				2723B68C27F1685600E0B90B /* HomeNavView.m in Sources */,
@@ -5544,7 +5685,9 @@
 				277931DA27E30FC20010E277 /* UIImage+UIImageScale.m in Sources */,
 				277931DF27E30FC20010E277 /* UIControl+ButtonAction.m in Sources */,
 				275E3DB627F45DA60010EC30 /* KSLiveChatroomEnter.m in Sources */,
+				BCED5CBB28508823009A42DE /* KSChatLiveShareCell.m in Sources */,
 				27BC3B2527F2B76900D81E30 /* MusicMessageCell.m in Sources */,
+				BCED5CC128508F21009A42DE /* ShareLiveCellContentView.m in Sources */,
 				BCC9F42E27F69BD200647449 /* RolePortraitView.m in Sources */,
 				277931ED27E30FC20010E277 /* zhPopupController.m in Sources */,
 				BCC9F44827F69BD200647449 /* Classroom.m in Sources */,
@@ -5559,6 +5702,7 @@
 				275B172627EB1C6C0081FDEF /* KSBaseTableViewController.m in Sources */,
 				BCC9F43D27F69BD200647449 /* InviteUpgradeMessage.m in Sources */,
 				BC7CFFCD2817FE8C00CAEB21 /* BandCardViewController.m in Sources */,
+				BCB909072851E32C00F5FF69 /* ShareChooseMainView.m in Sources */,
 				2779322127E30FC30010E277 /* NSString+phone.m in Sources */,
 				BCC9F44027F69BD200647449 /* MemberChangeMessage.m in Sources */,
 				BCC9F41827F69BD200647449 /* ClassroomTitleView.m in Sources */,
@@ -5647,6 +5791,7 @@
 				BC0A22A1284751F80065C1AB /* KSCloseCourseView.m in Sources */,
 				275E3DBC27F45E750010EC30 /* KSLiveChatroomLeave.m in Sources */,
 				27D83F5127F4036E00062476 /* KSNormalAlertView.m in Sources */,
+				BCED5CB4285083AC009A42DE /* ShareMusicViewController.m in Sources */,
 				BC1365B8280D130C00EB03E2 /* MyVideoCourseBodyView.m in Sources */,
 				2779323F27E30FC30010E277 /* VoMemoryCache.m in Sources */,
 				BCC9F44B27F69BD200647449 /* KSIMService.m in Sources */,
@@ -5670,6 +5815,7 @@
 				277931F227E30FC20010E277 /* NSDictionary+Extension.m in Sources */,
 				27D83F5727F4224F00062476 /* LivePreviewBodyView.m in Sources */,
 				BC1191F6280EBC7D00A716F7 /* AccompanyDetailBottomView.m in Sources */,
+				BCB909042851E25D00F5FF69 /* KSShareChooseViewController.m in Sources */,
 				277932B927E30FFE0010E277 /* TADotView.m in Sources */,
 				2773204D27EDB72B008FAECA /* LFPopupMenu.m in Sources */,
 				BCC03F8F2805484200461B7C /* StyleVideoModel.m in Sources */,
@@ -5756,6 +5902,7 @@
 				277931D327E30FC20010E277 /* UIScrollView+KSTouch.m in Sources */,
 				BC7CFFB22817E6DB00CAEB21 /* KSMutilDatePicker.m in Sources */,
 				277931FE27E30FC30010E277 /* UIImage+Addtions.m in Sources */,
+				BCED5CAA284F5D8D009A42DE /* FriendListModel.m in Sources */,
 				BCC9F41727F69BD200647449 /* ChatAreaView.m in Sources */,
 				BCEA752B2819133E00886A86 /* CardBindResultBodyView.m in Sources */,
 				2779322827E30FC30010E277 /* KeyChainTools.m in Sources */,
@@ -5822,6 +5969,7 @@
 				BCC9F44527F69BD200647449 /* Whiteboard.m in Sources */,
 				BCC9F44327F69BD200647449 /* AccompanyDownloadCallbackMessage.m in Sources */,
 				2779322327E30FC30010E277 /* PIckView.m in Sources */,
+				BCED5CAE28507E5F009A42DE /* KSChatLiveMessage.m in Sources */,
 				BC0A22B62847523E0065C1AB /* MemberListBodyView.m in Sources */,
 				275FA55F27F31AAF00EB6240 /* MinePageViewController.m in Sources */,
 				2779323127E30FC30010E277 /* UIView+ALFrame.m in Sources */,
@@ -5857,6 +6005,7 @@
 				BCB633F927F6A18200ACFDCF /* ClassVideoListView.m in Sources */,
 				277D432F27E9A50800107DB7 /* PhoneChangeBodyView.m in Sources */,
 				277931EA27E30FC20010E277 /* UIAlertController+Extend.m in Sources */,
+				BCB908FB2850C9C300F5FF69 /* MusicChooseSearchView.m in Sources */,
 				BC0A22AA284751F80065C1AB /* FullVideoCell.m in Sources */,
 				BCC9F41627F69BD200647449 /* TimeStampMessage.m in Sources */,
 				2779326C27E30FD80010E277 /* FSCalendarExtensions.m in Sources */,
@@ -5908,6 +6057,7 @@
 				BCF61BEF28042F9B0000ACFE /* InstrumentChooseBottonView.m in Sources */,
 				2780C91927E4852500A95A4F /* UINavigationController+KSNavigationBar.m in Sources */,
 				277931E327E30FC20010E277 /* UITextView+ZWPlaceHolder.m in Sources */,
+				BCB908DB2850A71100F5FF69 /* ShareMusicCellContentView.m in Sources */,
 				BC0A2285284751DF0065C1AB /* KSValuePopView.m in Sources */,
 				BCC9F40B27F69BD200647449 /* CREmojiCollectionCell.m in Sources */,
 				2779320927E30FC30010E277 /* KSRecordPowerAnimationView.m in Sources */,
@@ -5949,6 +6099,7 @@
 				BC0A22C1284752900065C1AB /* WhiteboardListView.m in Sources */,
 				BCC9F43B27F69BD200647449 /* AssistantTransferMessage.m in Sources */,
 				BC332DB3284866BE005AEF95 /* KSOrderManager.m in Sources */,
+				BCB908F72850C6EF00F5FF69 /* MusicChooseCell.m in Sources */,
 				277932BA27E30FFE0010E277 /* TAPageControl.m in Sources */,
 				BCB633F627F6A18200ACFDCF /* LocalRenderManager.m in Sources */,
 				2779329127E30FEB0010E277 /* MSSBrowseModel.m in Sources */,
@@ -5960,6 +6111,7 @@
 				277935DC27E326650010E277 /* RecordCheckManager.m in Sources */,
 				275E3DB327F45D380010EC30 /* KSLiveChatroomDownSeat.m in Sources */,
 				BCB399AC27F946A200AFF376 /* CourseNavView.m in Sources */,
+				BCED5CBE28508831009A42DE /* KSChatMusicShareCell.m in Sources */,
 				BCC9F41E27F69BD200647449 /* UpgradeDidApplyView.m in Sources */,
 				BCE06F2B2818146700234817 /* KSConfirmAlertView.m in Sources */,
 				275B16FA27EB08230081FDEF /* CreateFansGroupViewController.m in Sources */,

BIN=BIN
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 72 - 40
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -234,8 +234,8 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1118"
-            endingLineNumber = "1118"
+            startingLineNumber = "1127"
+            endingLineNumber = "1127"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
@@ -250,8 +250,8 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1088"
-            endingLineNumber = "1088"
+            startingLineNumber = "1097"
+            endingLineNumber = "1097"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
@@ -323,22 +323,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "60E6B0D4-4684-4C5B-B81E-3D79D05E409F"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Chat/Group/Controller/GroupApplyViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "148"
-            endingLineNumber = "148"
-            landmarkName = "-requestData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "1CA4E2D2-DBC5-4DE3-8173-B5AC445844BA"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -419,64 +403,112 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "EE4042C9-0FD1-45E3-8D08-7374E6B84780"
+            uuid = "8B325189-D135-42F0-8121-942554021C04"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m"
+            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "142"
-            endingLineNumber = "142"
-            landmarkName = "-willReloadTableData:"
+            startingLineNumber = "89"
+            endingLineNumber = "89"
+            landmarkName = "-configWithSource:actionCallback:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "6AE365BD-0D59-466E-A5D9-C8170887B609"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "96"
+            endingLineNumber = "96"
+            landmarkName = "-requestData"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "1FE05C7B-204C-4471-8020-015038F14D3B"
+            uuid = "FECF9606-B5A4-464A-AF41-6F542C9A75D0"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m"
+            filePath = "KulexiuForTeacher/Common/Base/KSRCIMDataSource.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "166"
-            endingLineNumber = "166"
-            landmarkName = "-configWithCourseMessage:beforeTime:actionCallback:"
+            startingLineNumber = "72"
+            endingLineNumber = "72"
+            landmarkName = "-getUserInfoWithUserId:completion:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "8AFEA2D9-D2E2-4E9C-98D5-99CF1984FB48"
+            uuid = "82C368CD-C46A-4BFC-AF26-04A6A027CA87"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m"
+            filePath = "KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "400"
-            endingLineNumber = "400"
-            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            startingLineNumber = "307"
+            endingLineNumber = "307"
+            landmarkName = "-refreshUserInfoOrGroupInfo"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "294892E9-4678-4F59-AE2A-08F70381957A"
+            uuid = "E9B08BCF-C9A7-4819-BE36-A3A77F271C4D"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m"
+            filePath = "KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "89"
-            endingLineNumber = "89"
-            landmarkName = "-configWithSource:actionCallback:"
+            startingLineNumber = "104"
+            endingLineNumber = "104"
+            landmarkName = "-viewWillAppear:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2AEA3612-7AE7-4BEC-92D5-66F8021C9E5B"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "75"
+            endingLineNumber = "75"
+            landmarkName = "-topViewAction:search:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9E36324D-2FB9-43D1-8925-902041C797C6"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "75"
+            endingLineNumber = "75"
+            landmarkName = "-rightBtnClick"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 11 - 8
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -169,7 +169,7 @@
 }
 
 - (void)configUM {
-    [UMConfigure initWithAppkey:@"5e6f6458978eea0774044b88" channel:@"App Store"];
+    [UMConfigure initWithAppkey:@"62a2a86de60ab53d9a94611f" channel:@"App Store"];
 }
 
 - (void)versionCheck {
@@ -273,6 +273,8 @@
     
     //开启用户信息和群组信息的持久化
     [RCIM sharedRCIM].enablePersistentUserInfoCache = YES;
+    // 在发送的所有消息中携带当前登录的用户信息
+    [RCIM sharedRCIM].enableMessageAttachUserInfo = YES;
     // 关闭所有提示音
     RCKitConfigCenter.message.disableMessageAlertSound = YES;
     
@@ -282,7 +284,8 @@
     // 左右上角按钮颜色
     RCKitConfigCenter.ui.globalNavigationBarTintColor = HexRGB(0x000000);
     // 注册消息
-//    [[RCIM sharedRCIM] registerMessageType:[KSGroupNoticeMessage class]];
+    [[RCIM sharedRCIM] registerMessageType:NSClassFromString(@"KSChatLiveMessage")];
+    [[RCIM sharedRCIM] registerMessageType:NSClassFromString(@"KSChatMusicMessage")];
     
     //    [[RCIMClient sharedRCIMClient] setLogLevel:RC_Log_Level_Verbose];
     //    [self redirectNSlogToDocumentFolder];
@@ -424,7 +427,11 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     if (message.conversationType == ConversationType_CHATROOM) { // 聊天室类型为直播
         [[KSIMService sharedService] ksOnReceivedChatroom:message left:left object:@""];
     }
-    if ([message.targetId containsString:@"LIVE"] || [message.targetId containsString:@"FAN"]) {
+    if (message.conversationType == ConversationType_GROUP && ![message.targetId containsString:@"LIVE"] && ![message.targetId containsString:@"FAN"]) { // 网络教室视频聊天
+        [[RCIMClient sharedRCIMClient] clearMessagesUnreadStatus:ConversationType_GROUP targetId:message.targetId];
+        [[KSIMService sharedService] ksOnReceived:message left:left object:@""];
+    }
+    else {
         // 此处对单聊、群聊消息处理
         dispatch_async(dispatch_get_main_queue(), ^{
         
@@ -447,11 +454,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             }
         });
     }
-    // 小班课视频聊天
-    else {
-        [[RCIMClient sharedRCIMClient] clearMessagesUnreadStatus:ConversationType_GROUP targetId:message.targetId];
-        [[KSIMService sharedService] ksOnReceived:message left:left object:@""];
-    }
+    
 }
 
 

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/Contents.json

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

BIN=BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@2x.png


BIN=BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@3x.png


+ 9 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -24,6 +24,7 @@
 #import "KSICloudManager.h"
 #import "AddressListViewController.h"
 #import "KSOrderManager.h"
+#import "KSEnterLiveroomManager.h"
 
 typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     CHOOSETYPE_XML,
@@ -447,6 +448,14 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [KSOrderManager dealWithWXSDK:infoMessage];
         }
     }
+    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
+        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+        NSString *roomId = [valueDic stringValueForKey:@"roomId"];
+        [self showhud];
+        [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController callback:^{
+            [self removehub];
+        }];
+    }
 }
 
 - (void)sendAddressAction:(AddressListModel *)model {

+ 20 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -513,8 +513,26 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)videoLessonListRequest:(NSString *)post lessonSubject:(NSString *_Nullable)lessonSubject auditStatus:(NSString *)auditStatus pageNo:(NSInteger)pageNo pageSize:(NSInteger)pageSize success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 #pragma mark ---- 老师曲谱列表查询
-// /api-admin/music/sheet/list
-+ (void)musicListRequest:(NSString *)post auditStatus:(NSString *)auditStatus pageNo:(NSInteger)pageNo pageSize:(NSInteger)pageSize success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+// /api-teacher/music/sheet/list
+
+/// 曲谱列表查询
+/// @param post post
+/// @param auditStatus UNPAALY,DOING,PASS,UNPASS
+/// @param page 分页
+/// @param rows 条数
+/// @param search 搜索
+/// @param success 成功
+/// @param faliure 失败
++ (void)musicListRequest:(NSString *)post auditStatus:(NSString *)auditStatus page:(NSInteger)page rows:(NSInteger)rows search:(NSString *)search success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+
+// /teacher-server/music/sheet/share
+
+/// 分享老师曲谱数据查询
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryMusicShareMessageRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 #pragma mark ----- 直播房间与课程的关系表
 // /api-teacher/liveRoom/createTempLiveRoom

+ 19 - 3
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -1077,16 +1077,32 @@
 
 #pragma mark ---- 老师曲谱列表查询
 // /api-teacher/music/sheet/list
-+ (void)musicListRequest:(NSString *)post auditStatus:(NSString *)auditStatus pageNo:(NSInteger)pageNo pageSize:(NSInteger)pageSize success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+
+/// 曲谱列表查询
+/// @param post post
+/// @param auditStatus UNPAALY,DOING,PASS,UNPASS
+/// @param page 分页
+/// @param rows 条数
+/// @param search 搜索
+/// @param success 成功
+/// @param faliure 失败
++ (void)musicListRequest:(NSString *)post auditStatus:(NSString *)auditStatus page:(NSInteger)page rows:(NSInteger)rows search:(NSString *)search success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/music/sheet/list"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:auditStatus forKey:@"auditStatus"];
-    [parm setValue:@(pageNo) forKey:@"page"];
-    [parm setValue:@(pageSize) forKey:@"rows"];
+    [parm setValue:@(page) forKey:@"page"];
+    [parm setValue:@(rows) forKey:@"rows"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// 分享老师曲谱数据查询
+// /api-teacher/music/sheet/share
++ (void)queryMusicShareMessageRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/music/sheet/share"];
+    [self request:get andWithUrl:url and:nil success:success faliure:faliure];
+}
+
 #pragma mark ----- 直播房间与课程的关系表
 // /api-teacher/liveRoom/createTempLiveRoom
 

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSRCIMDataSource.m

@@ -79,9 +79,9 @@
     if (![userId isEqualToString:[RCIM sharedRCIM].currentUserInfo.userId]) {
         [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:userId success:^(NSDictionary * _Nonnull dic) {
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-                NSDictionary *userDic = [result dictionaryValueForKey:@"friend"];
-                RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:[result stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"avatar"]];
+                
+                NSDictionary *userDic = [dic dictionaryValueForKey:@"data"];
+                RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:userId name:[userDic stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"friendAvatar"]];
                 completion(user);
             }
             else {

+ 10 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m

@@ -59,19 +59,20 @@
 }
 
 
-
 - (void)topViewAction:(CHATADDRESSTYPE)type search:(NSString *)searchKey {
     switch (type) {
         case CHATADDRESSTYPE_PERSON: // 联系人
         {
             [self.categoryView selectItemAtIndex:0];
             self.selectedIndex = 0;
+            [self searchRequest:@""];
         }
             break;
         case CHATADDRESSTYPE_GROUP: // 群组
         {
             [self.categoryView selectItemAtIndex:1];
             self.selectedIndex = 1;
+            [self searchRequest:@""];
         }
             break;
         case CHATADDRESSTYPE_SEARCH:  // 搜索
@@ -95,6 +96,14 @@
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+    
+    if (self.listViewArray.count > self.categoryView.selectedIndex) {
+        id value = self.listViewArray[self.categoryView.selectedIndex];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 - (void)viewDidAppear:(BOOL)animated {

+ 63 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m

@@ -16,6 +16,13 @@
 #import "KSRCloudMediaManager.h"
 #import "KSSelectConversationViewController.h"
 #import "GroupMemberModel.h"
+
+#import "ShareMusicViewController.h"
+#import "KSChatLiveMessage.h"
+#import "KSChatLiveShareCell.h"
+#import "KSChatMusicShareCell.h"
+#import "KSChatMusicMessage.h"
+
 #define SHARE_MUSIC_TAG (2001)
 
 @interface RCNaviDataInfo : NSObject
@@ -87,6 +94,8 @@
     }
     
     // 注册自定义消息
+    [self registerClass:[KSChatLiveShareCell class] forMessageClass:[KSChatLiveMessage class]];
+    [self registerClass:[KSChatMusicShareCell class] forMessageClass:[KSChatMusicMessage class]];
     
     [self leftRightButton];
     [self refreshUserInfoOrGroupInfo];
@@ -187,7 +196,15 @@
 #pragma mark override
 // 点击消息的处理
 - (void)didTapMessageCell:(RCMessageModel *)model {
-    
+    if ([model.objectName isEqualToString:@"RC:CHATSHARE:LIVE"]) { // 直播消息
+        
+    }
+    else if ([model.objectName isEqualToString:@"RC:CHATSHARE:MUSIC"]) { // 曲谱消息
+        
+    }
+    else {
+        [super didTapMessageCell:model];
+    }
 }
 
 - (void)playVideoWithUrl:(NSString *)fileUrl {
@@ -288,9 +305,8 @@
         if (![self.targetId isEqualToString:[RCIM sharedRCIM].currentUserInfo.userId]) {
             [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:self.targetId success:^(NSDictionary * _Nonnull dic) {
                 if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                    NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-                    NSDictionary *userDic = [result dictionaryValueForKey:@"friend"];
-                    RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:self.targetId name:[result stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"avatar"]];
+                    NSDictionary *userDic = [dic dictionaryValueForKey:@"data"];
+                    RCUserInfo *user = [[RCUserInfo alloc] initWithUserId:self.targetId name:[userDic stringValueForKey:@"friendNickname"] portrait:[userDic stringValueForKey:@"friendAvatar"]];
                     [[RCIM sharedRCIM] refreshUserInfoCache:user withUserId:self.targetId];
                     [self refreshTitle];
                 }
@@ -365,6 +381,24 @@
     switch (tag) {
         case SHARE_MUSIC_TAG: // 曲谱分享
         {
+//            KSChatLiveMessage *msg = [[KSChatLiveMessage alloc] init];
+//            msg.teacherName = @"zhagns";
+//            msg.teacherAvatar = @"hahhahhh";
+//            msg.roomUID = @"AJJFAJFJJFAJF";
+//            msg.liveDescMessage = @"李老师带您0基础学习竖笛,通过4节课的学";
+//            RCMessage *liveMessage = [[RCMessage alloc] initWithType:self.conversationType targetId:self.targetId direction:MessageDirection_SEND content:msg];
+//            [[RCIM sharedRCIM] sendMessage:liveMessage pushContent:nil pushData:nil successBlock:^(RCMessage *successMessage) {
+//
+//            } errorBlock:^(RCErrorCode nErrorCode, RCMessage *errorMessage) {
+//
+//            }];
+            
+            MJWeakSelf;
+            ShareMusicViewController *ctrl = [[ShareMusicViewController alloc] init];
+            [ctrl shareSongChooseCallback:^(MusicMessageModel * _Nonnull chooseModel) {
+                [weakSelf shareSongAction:chooseModel];
+            }];
+            [self.navigationController pushViewController:ctrl animated:YES];
             
         }
             break;
@@ -379,6 +413,31 @@
     }
 }
 
+- (void)shareSongAction:(MusicMessageModel *)musicModel {
+    KSChatMusicMessage *musicMsg = [[KSChatMusicMessage alloc] init];
+    musicMsg.songName = [NSString returnNoNullStringWithString:musicModel.musicSheetName];
+    musicMsg.chargeType = musicModel.chargeType;
+    musicMsg.songAuth = musicModel.composer;
+    musicMsg.teacherAvatar = [musicModel.addUserAvatar getUrlEndcodeString];
+    NSString *owner = @"";
+    if ([NSString isEmptyString:musicModel.addName]) {
+        owner = [NSString stringWithFormat:@"游客%.0f",musicModel.userId];
+    }
+    else {
+        owner = musicModel.addName;
+    }
+    musicMsg.teacherName = owner;
+    
+    musicMsg.musicTagNames = musicModel.musicTagNames;
+    musicMsg.songId = [NSString stringWithFormat:@"%.0f",musicModel.internalBaseClassIdentifier];
+    RCMessage *musicMessage = [[RCMessage alloc] initWithType:self.conversationType targetId:self.targetId direction:MessageDirection_SEND content:musicMsg];
+    [[RCIM sharedRCIM] sendMessage:musicMessage pushContent:nil pushData:nil successBlock:^(RCMessage *successMessage) {
+        
+    } errorBlock:^(RCErrorCode nErrorCode, RCMessage *errorMessage) {
+
+    }];
+
+}
 
 
 #pragma mark ----- chatSessionInputBarControl delegate

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m

@@ -52,7 +52,6 @@
         [self allocLeftButton];
         self.conversationListTableView.tableHeaderView = [UIView new];
     }
-    
 }
 
 - (void)allocLeftButton {
@@ -136,14 +135,14 @@
 - (NSMutableArray *)willReloadTableData:(NSMutableArray *)dataSource {
     NSMutableArray *array = [NSMutableArray array];
     for (RCConversationModel *model in dataSource) {
-        if (model.conversationType == ConversationType_GROUP) {
-            model.conversationModelType = RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION;
-        }
-        if ([model.targetId containsString:@"FAN"] || [model.targetId containsString:@"LIVE"]) {
-            [array addObject:model];
+        if (model.conversationType == ConversationType_GROUP && ![model.targetId containsString:@"FAN"] && ![model.targetId containsString:@"LIVE"]) {
+            [[RCIMClient sharedRCIMClient] clearMessagesUnreadStatus:ConversationType_GROUP targetId:model.targetId];
         }
         else {
-            [[RCIMClient sharedRCIMClient] clearMessagesUnreadStatus:ConversationType_GROUP targetId:model.targetId];
+//            if (model.conversationType == ConversationType_GROUP) {
+//                model.conversationModelType = RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION;
+//            }
+            [array addObject:model];
         }
     }
     dispatch_async(dispatch_get_main_queue(), ^{
@@ -181,6 +180,7 @@
     return @[deleteRowAction,upperRowAction];
 }
 
+
 - (RCConversationBaseCell *)rcConversationListTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     RCConversationModel *model = self.conversationListDataSource[indexPath.row];
     KSChatGroupListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KSChatGroupListCell"];

+ 6 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSSelectConversationViewController.m

@@ -50,9 +50,13 @@ typedef void (^CompleteBlock)(NSArray *conversationList);
     [self.view addSubview:self.conversationTableView];
     self.selectedConversationArray = [[NSMutableArray alloc] init];
     NSMutableArray *listArray = [NSMutableArray array];
-    NSArray *conversationArray = [[RCIMClient sharedRCIMClient] getConversationList:@[ @(ConversationType_PRIVATE), @(ConversationType_GROUP)]];
+    NSArray *conversationArray = [[RCIMClient sharedRCIMClient] getConversationList:@[@(ConversationType_PRIVATE), @(ConversationType_GROUP)]];
+    
     for (RCConversation *conversation in conversationArray) {
-        if ([conversation.targetId containsString:@"LIVE"] || [conversation.targetId containsString:@"FAN"]) {
+        if (conversation.conversationType == ConversationType_GROUP && ![conversation.targetId containsString:@"FAN"] && ![conversation.targetId containsString:@"LIVE"]) { // 视频聊天群不添加
+            
+        }
+        else {
             [listArray addObject:conversation];
         }
     }

+ 28 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/FriendListModel.h

@@ -0,0 +1,28 @@
+//
+//  FriendListModel.h
+//
+//  Created by Steven  on 2022/6/7
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+
+@interface FriendListModel : NSObject <NSCoding, NSCopying>
+
+@property (nonatomic, strong) NSString *userId;
+@property (nonatomic, strong) NSString *friendNickname;
+@property (nonatomic, strong) NSString *internalBaseClassIdentifier;
+@property (nonatomic, strong) NSString *friendId;
+@property (nonatomic, strong) NSString *memo;
+@property (nonatomic, strong) NSString *friendAvatar;
+@property (nonatomic, strong) NSString *updateTime;
+@property (nonatomic, strong) NSString *createTime;
+@property (nonatomic, strong) NSString *firstLetter;
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
+- (instancetype)initWithDictionary:(NSDictionary *)dict;
+- (NSDictionary *)dictionaryRepresentation;
+
+@end

+ 148 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/FriendListModel.m

@@ -0,0 +1,148 @@
+//
+//  FriendListModel.m
+//
+//  Created by Steven  on 2022/6/7
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import "FriendListModel.h"
+
+
+NSString *const kFriendListModelUserId = @"userId";
+NSString *const kFriendListModelFriendNickname = @"friendNickname";
+NSString *const kFriendListModelId = @"id";
+NSString *const kFriendListModelFriendId = @"friendId";
+NSString *const kFriendListModelMemo = @"memo";
+NSString *const kFriendListModelFriendAvatar = @"friendAvatar";
+NSString *const kFriendListModelUpdateTime = @"updateTime";
+NSString *const kFriendListModelCreateTime = @"createTime";
+
+
+@interface FriendListModel ()
+
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
+
+@end
+
+@implementation FriendListModel
+
+@synthesize userId = _userId;
+@synthesize friendNickname = _friendNickname;
+@synthesize internalBaseClassIdentifier = _internalBaseClassIdentifier;
+@synthesize friendId = _friendId;
+@synthesize memo = _memo;
+@synthesize friendAvatar = _friendAvatar;
+@synthesize updateTime = _updateTime;
+@synthesize createTime = _createTime;
+
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
+{
+    return [[self alloc] initWithDictionary:dict];
+}
+
+- (instancetype)initWithDictionary:(NSDictionary *)dict
+{
+    self = [super init];
+    
+    // This check serves to make sure that a non-NSDictionary object
+    // passed into the model class doesn't break the parsing.
+    if(self && [dict isKindOfClass:[NSDictionary class]]) {
+            self.userId = [self objectOrNilForKey:kFriendListModelUserId fromDictionary:dict];
+            self.friendNickname = [self objectOrNilForKey:kFriendListModelFriendNickname fromDictionary:dict];
+            self.internalBaseClassIdentifier = [self objectOrNilForKey:kFriendListModelId fromDictionary:dict];
+            self.friendId = [self objectOrNilForKey:kFriendListModelFriendId fromDictionary:dict];
+            self.memo = [self objectOrNilForKey:kFriendListModelMemo fromDictionary:dict];
+            self.friendAvatar = [self objectOrNilForKey:kFriendListModelFriendAvatar fromDictionary:dict];
+            self.updateTime = [self objectOrNilForKey:kFriendListModelUpdateTime fromDictionary:dict];
+            self.createTime = [self objectOrNilForKey:kFriendListModelCreateTime fromDictionary:dict];
+
+    }
+    
+    return self;
+    
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setValue:self.userId forKey:kFriendListModelUserId];
+    [mutableDict setValue:self.friendNickname forKey:kFriendListModelFriendNickname];
+    [mutableDict setValue:self.internalBaseClassIdentifier forKey:kFriendListModelId];
+    [mutableDict setValue:self.friendId forKey:kFriendListModelFriendId];
+    [mutableDict setValue:self.memo forKey:kFriendListModelMemo];
+    [mutableDict setValue:self.friendAvatar forKey:kFriendListModelFriendAvatar];
+    [mutableDict setValue:self.updateTime forKey:kFriendListModelUpdateTime];
+    [mutableDict setValue:self.createTime forKey:kFriendListModelCreateTime];
+
+    return [NSDictionary dictionaryWithDictionary:mutableDict];
+}
+
+- (NSString *)description 
+{
+    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
+}
+
+#pragma mark - Helper Method
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
+{
+    id object = [dict objectForKey:aKey];
+    if ([object isKindOfClass:[NSNumber class]]) {
+        NSNumber *number = object;
+        object = [number stringValue];
+    }
+    return [object isEqual:[NSNull null]] ? nil : object;
+}
+
+
+#pragma mark - NSCoding Methods
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super init];
+
+    self.userId = [aDecoder decodeObjectForKey:kFriendListModelUserId];
+    self.friendNickname = [aDecoder decodeObjectForKey:kFriendListModelFriendNickname];
+    self.internalBaseClassIdentifier = [aDecoder decodeObjectForKey:kFriendListModelId];
+    self.friendId = [aDecoder decodeObjectForKey:kFriendListModelFriendId];
+    self.memo = [aDecoder decodeObjectForKey:kFriendListModelMemo];
+    self.friendAvatar = [aDecoder decodeObjectForKey:kFriendListModelFriendAvatar];
+    self.updateTime = [aDecoder decodeObjectForKey:kFriendListModelUpdateTime];
+    self.createTime = [aDecoder decodeObjectForKey:kFriendListModelCreateTime];
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)aCoder
+{
+
+    [aCoder encodeObject:_userId forKey:kFriendListModelUserId];
+    [aCoder encodeObject:_friendNickname forKey:kFriendListModelFriendNickname];
+    [aCoder encodeObject:_internalBaseClassIdentifier forKey:kFriendListModelId];
+    [aCoder encodeObject:_friendId forKey:kFriendListModelFriendId];
+    [aCoder encodeObject:_memo forKey:kFriendListModelMemo];
+    [aCoder encodeObject:_friendAvatar forKey:kFriendListModelFriendAvatar];
+    [aCoder encodeObject:_updateTime forKey:kFriendListModelUpdateTime];
+    [aCoder encodeObject:_createTime forKey:kFriendListModelCreateTime];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    FriendListModel *copy = [[FriendListModel alloc] init];
+    
+    if (copy) {
+
+        copy.userId = [self.userId copyWithZone:zone];
+        copy.friendNickname = [self.friendNickname copyWithZone:zone];
+        copy.internalBaseClassIdentifier = [self.internalBaseClassIdentifier copyWithZone:zone];
+        copy.friendId = [self.friendId copyWithZone:zone];
+        copy.memo = [self.memo copyWithZone:zone];
+        copy.friendAvatar = [self.friendAvatar copyWithZone:zone];
+        copy.updateTime = [self.updateTime copyWithZone:zone];
+        copy.createTime = [self.createTime copyWithZone:zone];
+    }
+    
+    return copy;
+}
+
+
+@end

+ 25 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.h

@@ -0,0 +1,25 @@
+//
+//  KSChatLiveMessage.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// 分享的直播间消息
+@interface KSChatLiveMessage : RCMessageContent
+
+@property (nonatomic, strong) NSString *roomUID;
+
+@property (nonatomic, strong) NSString *teacherAvatar;
+
+@property (nonatomic, strong) NSString *teacherName;
+
+@property (nonatomic, strong) NSString *liveDescMessage;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 70 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatLiveMessage.m

@@ -0,0 +1,70 @@
+//
+//  KSChatLiveMessage.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "KSChatLiveMessage.h"
+
+@implementation KSChatLiveMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    if (self.roomUID) {
+        [multableDict setObject:self.roomUID forKey:@"roomUID"];
+    } else {
+        [multableDict setObject:@"" forKey:@"roomUID"];
+    }
+    
+    if (self.teacherAvatar) {
+        [multableDict setObject:self.teacherAvatar forKey:@"teacherAvatar"];
+    } else {
+        [multableDict setObject:@"" forKey:@"teacherAvatar"];
+    }
+    
+    if (self.teacherName) {
+        [multableDict setObject:self.teacherName forKey:@"teacherName"];
+    } else {
+        [multableDict setObject:@"" forKey:@"teacherName"];
+    }
+    
+    if (self.liveDescMessage) {
+        [multableDict setObject:self.liveDescMessage forKey:@"liveDescMessage"];
+    } else {
+        [multableDict setObject:@"" forKey:@"liveDescMessage"];
+    }
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+    
+    self.roomUID = [json stringValueForKey:@"roomUID"];
+    self.teacherAvatar = [json stringValueForKey:@"teacherAvatar"];
+    self.teacherName = [json stringValueForKey:@"teacherName"];
+    self.liveDescMessage = [json stringValueForKey:@"liveDescMessage"];
+    
+}
+
++ (NSString *)getObjectName {
+  return @"RC:CHATSHARE:LIVE";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+    return @[@"直播分享"];
+}
+
+- (NSString *)conversationDigest {
+    return @"[直播分享]";
+}
+
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_ISCOUNTED;
+}
+
+@end

+ 31 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.h

@@ -0,0 +1,31 @@
+//
+//  KSChatMusicMessage.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// 分享的曲谱消息
+@interface KSChatMusicMessage : RCMessageContent
+
+@property (nonatomic, strong) NSString *songName;
+
+@property (nonatomic, strong) NSString *chargeType;
+
+@property (nonatomic, strong) NSString *songAuth;
+
+@property (nonatomic, strong) NSString *teacherAvatar;
+
+@property (nonatomic, strong) NSString *teacherName;
+
+@property (nonatomic, strong) NSString *musicTagNames;
+
+@property (nonatomic, strong) NSString *songId;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 90 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Model/KSChatMusicMessage.m

@@ -0,0 +1,90 @@
+//
+//  KSChatMusicMessage.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "KSChatMusicMessage.h"
+
+@implementation KSChatMusicMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    if (self.songName) {
+        [multableDict setObject:self.songName forKey:@"songName"];
+    } else {
+        [multableDict setObject:@"" forKey:@"songName"];
+    }
+    
+    if (self.chargeType) {
+        [multableDict setObject:self.chargeType forKey:@"chargeType"];
+    } else {
+        [multableDict setObject:@"" forKey:@"chargeType"];
+    }
+    
+    if (self.songAuth) {
+        [multableDict setObject:self.songAuth forKey:@"songAuth"];
+    } else {
+        [multableDict setObject:@"" forKey:@"songAuth"];
+    }
+    
+    if (self.teacherAvatar) {
+        [multableDict setObject:self.teacherAvatar forKey:@"teacherAvatar"];
+    } else {
+        [multableDict setObject:@"" forKey:@"teacherAvatar"];
+    }
+    if (self.teacherName) {
+        [multableDict setObject:self.teacherName forKey:@"teacherName"];
+    } else {
+        [multableDict setObject:@"" forKey:@"teacherName"];
+    }
+    
+    if (self.musicTagNames) {
+        [multableDict setObject:self.musicTagNames forKey:@"musicTagNames"];
+    } else {
+        [multableDict setObject:@"" forKey:@"musicTagNames"];
+    }
+    
+    if (self.songId) {
+        [multableDict setObject:self.songId forKey:@"songId"];
+    } else {
+        [multableDict setObject:@"" forKey:@"songId"];
+    }
+    
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+    
+    self.songName = [json stringValueForKey:@"songName"];
+    self.teacherAvatar = [json stringValueForKey:@"teacherAvatar"];
+    self.teacherName = [json stringValueForKey:@"teacherName"];
+    self.chargeType = [json stringValueForKey:@"chargeType"];
+    self.songAuth = [json stringValueForKey:@"songAuth"];
+    self.musicTagNames = [json stringValueForKey:@"musicTagNames"];
+    self.songId = [json stringValueForKey:@"songId"];
+}
+
++ (NSString *)getObjectName {
+  return @"RC:CHATSHARE:MUSIC";
+}
+
+
+- (NSArray<NSString *> *)getSearchableWords {
+    return @[@"曲谱分享"];
+}
+
+- (NSString *)conversationDigest {
+    return @"[曲谱分享]";
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_ISCOUNTED;
+}
+
+@end

+ 5 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m

@@ -169,9 +169,13 @@
                 messegeModel.portraitUri = group.portraitUri;
             }
             messegeModel.count = searchResult.matchCount;
-            if ([messegeModel.targetId containsString:@"LIVE"] || [messegeModel.targetId containsString:@"FAN"]) {
+            if (messegeModel.conversationType == ConversationType_GROUP && ![messegeModel.targetId containsString:@"FAN"] && ![messegeModel.targetId containsString:@"LIVE"]) { // 视频课聊天群不添加
+                
+            }
+            else {
                 [resultArray addObject:messegeModel];
             }
+
         }
         self.resultArray = resultArray;
         [self refreshSearchView:searchText];

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.h

@@ -0,0 +1,22 @@
+//
+//  ShareMusicViewController.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "KSBaseViewController.h"
+#import "MusicMessageModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^ChooseSongCallback)(MusicMessageModel *chooseModel);
+
+/// 曲目分享的页面
+@interface ShareMusicViewController : KSBaseViewController
+
+- (void)shareSongChooseCallback:(ChooseSongCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 231 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m

@@ -0,0 +1,231 @@
+//
+//  ShareMusicViewController.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "ShareMusicViewController.h"
+#import "MusicChooseCell.h"
+#import "MusicMessageModel.h"
+#import "MusicChooseSearchView.h"
+#import "UIButton+EnlargeEdge.h"
+
+@interface ShareMusicViewController ()<UITableViewDelegate,UITableViewDataSource>
+
+@property (nonatomic, strong) MusicChooseSearchView *searchView;
+
+@property (nonatomic, strong) UITableView *tableView;
+
+@property (nonatomic, copy) ChooseSongCallback callback;
+
+@property (nonatomic, strong) NSString *searchKey;
+
+@property (nonatomic, strong) MusicMessageModel *chooseModel;
+
+@property (nonatomic, assign) NSInteger lastChooseIndex;
+
+@end
+
+@implementation ShareMusicViewController
+
+- (void)shareSongChooseCallback:(ChooseSongCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    [self allocTitle:@"曲谱"];
+    [self configLeftButton];
+    [self rightButtonTitle:@"确定" color:THEMECOLOR];
+    [self configUI];
+    [self resetParamenterAndRequest];
+}
+
+- (void)configLeftButton {
+    UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    leftButton.frame =CGRectMake(0, 0, 40, 40);
+    [leftButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
+    leftButton.titleLabel.font = [UIFont systemFontOfSize:16];
+    [leftButton setTitleColor:HexRGB(0x000000) forState:UIControlStateNormal];
+    [leftButton setTitle:@"取消" forState:UIControlStateNormal];
+    [leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
+    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:leftButton];
+    self.navigationItem.leftBarButtonItem = backItem;
+}
+
+- (void)resetParamenterAndRequest {
+    [self resetParamenter];
+    [self requestData];
+}
+
+- (void)resetParamenter {
+    self.isLoadMore = YES;
+    self.pages = 1;
+    self.rows = 10;
+    self.dataArray = [NSMutableArray array];
+    [self.tableView.mj_footer resetNoMoreData];
+    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.tableView];
+    [self.tableView reloadData];
+}
+
+- (void)configUI {
+    [self.scrollView removeFromSuperview];
+    [self.view addSubview:self.searchView];
+    [self.searchView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(60.0f);
+    }];
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.searchView.mas_bottom);
+        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
+    }];
+    MJWeakSelf;
+    self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
+        [weakSelf resetParamenterAndRequest];
+    }];
+    self.tableView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
+        if (weakSelf.isLoadMore) {
+            weakSelf.pages += 1;
+            [weakSelf requestData];
+        }
+        else {
+            [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
+        }
+    }];
+    
+}
+
+- (void)backAction {
+    [self.view endEditing:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+- (void)rightBtnClick {
+    [self.view endEditing:YES];
+    if (self.chooseModel == nil) {
+        [self MBPShow:@"请选择分享曲谱"];
+        return;
+    }
+    if (self.callback) {
+        self.callback(self.chooseModel);
+    }
+    [self backAction];
+}
+
+- (void)endRefresh {
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self.tableView.mj_header endRefreshing];
+        [self.tableView.mj_footer endRefreshing];
+    });
+}
+
+- (void)requestData {
+    [self showhud];
+    [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        [self endRefresh];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            for (NSDictionary *parm in sourceArray) {
+                MusicMessageModel *model = [[MusicMessageModel alloc] initWithDictionary:parm];
+                [self.dataArray addObject:model];
+            }
+            if (sourceArray.count < self.rows) {
+                self.isLoadMore = NO;
+            }
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+        [self.tableView reloadData];
+        [self changePromptLabelState];
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+        [self endRefresh];
+        if (self.networkAvaiable == NO) {
+            [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
+        }
+        [self.dataArray removeAllObjects];
+        [self.tableView reloadData];
+        [self changePromptLabelState];
+    }];
+}
+
+
+#pragma mark - UITableViewDataSource
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.dataArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    MusicMessageModel *model = self.dataArray[indexPath.row];
+    MusicChooseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicChooseCell"];
+    [cell configWithMessage:model];
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    // 剔除上一个
+    if (self.chooseModel) {
+        MusicMessageModel *model = self.dataArray[self.lastChooseIndex];
+        model.isChoose = NO;
+    }
+    // 选择当前
+    MusicMessageModel *model = self.dataArray[indexPath.row];
+    model.isChoose = YES;
+    self.lastChooseIndex = indexPath.row;
+    self.chooseModel = model;
+    [self.tableView reloadData];
+    
+}
+
+- (MusicChooseSearchView *)searchView {
+    if (!_searchView) {
+        _searchView = [MusicChooseSearchView shareInstance];
+        MJWeakSelf;
+        [_searchView searchCallback:^(NSString * _Nullable musicName) {
+            weakSelf.searchKey = musicName;
+            [weakSelf resetParamenterAndRequest];
+        }];
+    }
+    return _searchView;
+}
+
+- (UITableView *)tableView {
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.backgroundColor = HexRGB(0xf6f8f9);
+        _tableView.showsVerticalScrollIndicator = NO;
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        _tableView.rowHeight = 110;
+        [_tableView registerNib:[UINib nibWithNibName:@"MusicChooseCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MusicChooseCell"];
+        UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
+        headView.backgroundColor = HexRGB(0xf6f8f9);
+        _tableView.tableHeaderView = headView;
+        
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
+        bottomView.backgroundColor = HexRGB(0xf6f8f9);
+        _tableView.tableFooterView = bottomView;
+    }
+    return _tableView;
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.h

@@ -0,0 +1,20 @@
+//
+//  MusicChooseCell.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <UIKit/UIKit.h>
+#import "MusicMessageModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicChooseCell : UITableViewCell
+
+- (void)configWithMessage:(MusicMessageModel *)songMessage;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 120 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.m

@@ -0,0 +1,120 @@
+//
+//  MusicChooseCell.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "MusicChooseCell.h"
+
+@interface MusicChooseCell ()
+
+@property (weak, nonatomic) IBOutlet UILabel *songName;
+@property (weak, nonatomic) IBOutlet UILabel *songAuth;
+@property (weak, nonatomic) IBOutlet UIImageView *uploaderLogo;
+@property (weak, nonatomic) IBOutlet UILabel *uploaderName;
+@property (weak, nonatomic) IBOutlet UIImageView *typeImage;
+@property (weak, nonatomic) IBOutlet UIView *tagView;
+@property (weak, nonatomic) IBOutlet UIView *bgView;
+
+@end
+
+
+@implementation MusicChooseCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+}
+
+- (void)configWithMessage:(MusicMessageModel *)songMessage {
+    self.songName.text = [NSString returnNoNullStringWithString:songMessage.musicSheetName];
+    self.songAuth.text = [NSString returnNoNullStringWithString:songMessage.composer];
+    NSArray *tagArray = [songMessage.musicTagNames componentsSeparatedByString:@","];
+    NSString *owner = @"";
+    if ([NSString isEmptyString:songMessage.addName]) {
+        owner = [NSString stringWithFormat:@"游客%.0f",songMessage.userId];
+    }
+    else {
+        owner = songMessage.addName;
+    }
+    CGFloat maxWidth = [self getTagViewMaxWidth:owner];
+    [self configTagViewWithTagArray:tagArray maxWidth:maxWidth];
+    NSString *typeImgName = @"";
+    if ([songMessage.chargeType isEqualToString:@"VIP"]) {
+        typeImgName = @"music_vip";
+    }
+    else if ([songMessage.chargeType isEqualToString:@"CHARGE"]) {
+        typeImgName = @"music_order";
+    }
+    else {
+        typeImgName = @"music_free";
+    }
+    [self.typeImage setImage:[UIImage imageNamed:typeImgName]];
+    
+    self.uploaderName.text = [NSString returnNoNullStringWithString:owner];
+    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:[songMessage.addUserAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    if (songMessage.isChoose) {
+        self.bgView.layer.borderColor = THEMECOLOR.CGColor;
+        self.bgView.layer.borderWidth = 1.0f;
+    }
+    else {
+        self.bgView.layer.borderColor = [UIColor whiteColor].CGColor;
+        self.bgView.layer.borderWidth = 1.0f;
+    }
+}
+
+- (CGFloat)getTagViewMaxWidth:(NSString *)teacherName {
+    CGFloat width = [self getStringWidthInLabel:teacherName font:[UIFont systemFontOfSize:12.0f]];
+    return kScreenWidth - 45  - 10 - 14 - width - 8;
+}
+
+- (void)configTagViewWithTagArray:(NSArray *)tagArray maxWidth:(CGFloat)maxWidth {
+    [self.tagView removeAllSubViews];
+    CGFloat width = maxWidth;
+    CGFloat xSpace = 0.0f;
+    for (NSInteger i = 0; i < tagArray.count; i++) {
+        NSString *tagString = tagArray[i];
+        CGFloat labelWidth = [self getStringWidthInLabel:tagString font:[UIFont systemFontOfSize:11.0f]];
+        CGFloat viewWidth = labelWidth + 8;
+        if (xSpace + viewWidth > width) {
+            return;
+        }
+        CGRect frame = CGRectMake(xSpace, 0, viewWidth, 16.0f);
+        [self createTagLabelViewWithName:tagString frame:frame];
+        xSpace += (viewWidth + 6);
+    }
+}
+
+- (CGFloat)getStringWidthInLabel:(NSString *)tagString font:(UIFont *)font {
+    CGFloat width = [tagString boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 16.0f) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil].size.width+1;
+    return width;
+}
+
+- (void)createTagLabelViewWithName:(NSString *)name frame:(CGRect)frame {
+    UIView *bgView = [[UIView alloc] initWithFrame:frame];
+    bgView.backgroundColor = HexRGB(0xfff1de);
+    bgView.layer.cornerRadius = 4.0f;
+    [self.tagView addSubview:bgView];
+    
+    UILabel *tagLabel = [[UILabel alloc] init];
+    tagLabel.text = name;
+    tagLabel.textColor = HexRGB(0xff8c00);
+    tagLabel.font = [UIFont systemFontOfSize:11.0f];
+    tagLabel.textAlignment = NSTextAlignmentCenter;
+    [bgView addSubview:tagLabel];
+    [tagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(bgView.mas_left).offset(4);
+        make.right.mas_equalTo(bgView.mas_right).offset(-4);
+        make.top.bottom.mas_equalTo(bgView);
+    }];
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 147 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseCell.xib

@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" 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="20020"/>
+        <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="default" indentationWidth="10" rowHeight="143" id="KGk-i7-Jjw" customClass="MusicChooseCell">
+            <rect key="frame" x="0.0" y="0.0" width="361" height="143"/>
+            <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="361" height="143"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zdT-Gq-o6h">
+                        <rect key="frame" x="14" y="0.0" width="333" height="131"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="music_logo" translatesAutoresizingMaskIntoConstraints="NO" id="lnb-TA-sB1">
+                                <rect key="frame" x="11" y="10" width="41" height="40"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="40" id="Nw3-MT-cdl"/>
+                                    <constraint firstAttribute="width" constant="41" id="PeP-mM-PEf"/>
+                                </constraints>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="野蜂飞舞" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mBv-gA-1Xq">
+                                <rect key="frame" x="66" y="10" width="58" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="20" id="Mqv-Xn-MfZ"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
+                                <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" 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="x14-lM-uEy">
+                                <rect key="frame" x="66" y="30" width="144" height="17"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="17" id="LIC-qg-P7b"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                <color key="textColor" red="0.41568627450000001" green="0.41568627450000001" blue="0.41568627450000001" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ux3-4K-gVV">
+                                <rect key="frame" x="10" y="60" width="313" height="1"/>
+                                <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="1" id="Bak-oD-PSf"/>
+                                </constraints>
+                            </view>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="1jr-x0-lYx">
+                                <rect key="frame" x="18" y="69" width="20" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="20" id="7hc-pB-NBU"/>
+                                    <constraint firstAttribute="width" constant="20" id="Ar7-Fb-nZS"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="10"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张老师" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fpM-HP-ZbJ">
+                                <rect key="frame" x="45" y="71.5" width="37" height="15"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ppt-mW-U5C">
+                                <rect key="frame" x="90" y="71" width="233" height="16"/>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="16" id="q7q-yz-zQL"/>
+                                </constraints>
+                            </view>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="music_free" translatesAutoresizingMaskIntoConstraints="NO" id="phL-s9-pqT">
+                                <rect key="frame" x="266" y="19" width="55" height="22"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="22" id="6TN-ww-uz6"/>
+                                    <constraint firstAttribute="width" constant="55" id="v2r-fp-Y99"/>
+                                </constraints>
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="Ppt-mW-U5C" firstAttribute="centerY" secondItem="fpM-HP-ZbJ" secondAttribute="centerY" id="28n-HP-QaS"/>
+                            <constraint firstItem="ux3-4K-gVV" firstAttribute="leading" secondItem="zdT-Gq-o6h" secondAttribute="leading" constant="10" id="55p-dH-jxl"/>
+                            <constraint firstItem="phL-s9-pqT" firstAttribute="top" secondItem="zdT-Gq-o6h" secondAttribute="top" constant="19" id="8Qa-op-D8o"/>
+                            <constraint firstItem="ux3-4K-gVV" firstAttribute="top" secondItem="lnb-TA-sB1" secondAttribute="bottom" constant="10" id="AW3-eh-aAm"/>
+                            <constraint firstItem="Ppt-mW-U5C" firstAttribute="leading" secondItem="fpM-HP-ZbJ" secondAttribute="trailing" constant="8" id="KIm-DQ-rDy"/>
+                            <constraint firstItem="1jr-x0-lYx" firstAttribute="top" secondItem="ux3-4K-gVV" secondAttribute="bottom" constant="8" id="LC1-0k-7iJ"/>
+                            <constraint firstAttribute="trailing" secondItem="ux3-4K-gVV" secondAttribute="trailing" constant="10" id="Mmx-eb-uSx"/>
+                            <constraint firstItem="x14-lM-uEy" firstAttribute="leading" secondItem="mBv-gA-1Xq" secondAttribute="leading" id="PJw-HZ-fIq"/>
+                            <constraint firstAttribute="trailing" secondItem="Ppt-mW-U5C" secondAttribute="trailing" constant="10" id="Pee-bW-oZV"/>
+                            <constraint firstItem="lnb-TA-sB1" firstAttribute="top" secondItem="zdT-Gq-o6h" secondAttribute="top" constant="10" id="RNI-hT-lyW"/>
+                            <constraint firstItem="fpM-HP-ZbJ" firstAttribute="leading" secondItem="1jr-x0-lYx" secondAttribute="trailing" constant="7" id="Rk5-X7-v7T"/>
+                            <constraint firstItem="mBv-gA-1Xq" firstAttribute="top" secondItem="lnb-TA-sB1" secondAttribute="top" id="Rz5-kA-Br4"/>
+                            <constraint firstItem="fpM-HP-ZbJ" firstAttribute="centerY" secondItem="1jr-x0-lYx" secondAttribute="centerY" id="TZ9-iX-7ck"/>
+                            <constraint firstItem="mBv-gA-1Xq" firstAttribute="leading" secondItem="lnb-TA-sB1" secondAttribute="trailing" constant="14" id="a9M-fs-6c0"/>
+                            <constraint firstAttribute="trailing" secondItem="phL-s9-pqT" secondAttribute="trailing" constant="12" id="gVM-0q-onk"/>
+                            <constraint firstItem="1jr-x0-lYx" firstAttribute="leading" secondItem="zdT-Gq-o6h" secondAttribute="leading" constant="18" id="oxj-Fy-jhU"/>
+                            <constraint firstItem="x14-lM-uEy" firstAttribute="top" secondItem="mBv-gA-1Xq" secondAttribute="bottom" id="wpZ-2T-J8l"/>
+                            <constraint firstItem="lnb-TA-sB1" firstAttribute="leading" secondItem="zdT-Gq-o6h" secondAttribute="leading" constant="11" id="xFf-5v-cwD"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="10"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                </subviews>
+                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                <constraints>
+                    <constraint firstItem="zdT-Gq-o6h" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="1i4-cm-jrg"/>
+                    <constraint firstAttribute="bottom" secondItem="zdT-Gq-o6h" secondAttribute="bottom" constant="12" id="4VH-Pi-gaO"/>
+                    <constraint firstItem="zdT-Gq-o6h" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="KU7-eB-yAW"/>
+                    <constraint firstAttribute="trailing" secondItem="zdT-Gq-o6h" secondAttribute="trailing" constant="14" id="Qca-8N-apf"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <connections>
+                <outlet property="bgView" destination="zdT-Gq-o6h" id="qPt-F9-bPE"/>
+                <outlet property="songAuth" destination="x14-lM-uEy" id="C6q-cP-rZO"/>
+                <outlet property="songName" destination="mBv-gA-1Xq" id="ZiQ-ic-ph6"/>
+                <outlet property="tagView" destination="Ppt-mW-U5C" id="TiE-Xb-UZc"/>
+                <outlet property="typeImage" destination="phL-s9-pqT" id="76J-zB-hZ8"/>
+                <outlet property="uploaderLogo" destination="1jr-x0-lYx" id="j8j-OG-Axa"/>
+                <outlet property="uploaderName" destination="fpM-HP-ZbJ" id="O9e-73-rcI"/>
+            </connections>
+            <point key="canvasLocation" x="161.59420289855075" y="112.83482142857142"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <image name="music_free" width="55" height="22"/>
+        <image name="music_logo" width="41" height="40"/>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.h

@@ -0,0 +1,22 @@
+//
+//  MusicChooseSearchView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^MusicSeachCallback)(NSString * _Nullable musicName);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicChooseSearchView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)searchCallback:(MusicSeachCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 57 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.m

@@ -0,0 +1,57 @@
+//
+//  MusicChooseSearchView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "MusicChooseSearchView.h"
+
+@interface MusicChooseSearchView ()<UITextFieldDelegate>
+
+@property (nonatomic, copy) MusicSeachCallback callback;
+
+@property (weak, nonatomic) IBOutlet UITextField *searchField;
+
+@end
+
+@implementation MusicChooseSearchView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.searchField.delegate = self;
+    self.searchField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入曲谱名称" attributes:@{NSForegroundColorAttributeName:HexRGB(0x999999)}];
+}
+
++ (instancetype)shareInstance {
+    MusicChooseSearchView *view = [[[NSBundle mainBundle] loadNibNamed:@"MusicChooseSearchView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)searchCallback:(MusicSeachCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    [self endEditing:YES];
+    if (self.callback) {
+        self.callback(textField.text);
+    }
+    return YES;
+}
+- (IBAction)searchButtonClick:(id)sender {
+    if (self.callback) {
+        self.callback(self.searchField.text);
+    }
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 89 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/View/MusicChooseSearchView.xib

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MusicChooseSearchView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="60"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="feQ-p5-8BV">
+                    <rect key="frame" x="14" y="12.5" width="386" height="35"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="search_green" translatesAutoresizingMaskIntoConstraints="NO" id="kc4-Mh-Wba">
+                            <rect key="frame" x="12" y="10" width="15" height="15"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="15" id="ChL-kt-jnA"/>
+                                <constraint firstAttribute="width" constant="15" id="ay9-EY-wTV"/>
+                            </constraints>
+                        </imageView>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入曲谱名称" adjustsFontSizeToFit="NO" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dms-N6-5L6">
+                            <rect key="frame" x="38" y="0.0" width="271" height="35"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                            <textInputTraits key="textInputTraits" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q1u-ei-e7Q">
+                            <rect key="frame" x="319" y="4" width="56" height="27"/>
+                            <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="56" id="O9W-sU-pWs"/>
+                                <constraint firstAttribute="height" constant="27" id="oCl-jT-Tyx"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="搜索"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="13.5"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="searchButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="KZT-7Y-YR6"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstItem="kc4-Mh-Wba" firstAttribute="leading" secondItem="feQ-p5-8BV" secondAttribute="leading" constant="12" id="7Ob-TQ-d3r"/>
+                        <constraint firstAttribute="bottom" secondItem="dms-N6-5L6" secondAttribute="bottom" id="BFp-Mv-4W9"/>
+                        <constraint firstItem="kc4-Mh-Wba" firstAttribute="centerY" secondItem="feQ-p5-8BV" secondAttribute="centerY" id="Dsr-u3-txv"/>
+                        <constraint firstItem="q1u-ei-e7Q" firstAttribute="leading" secondItem="dms-N6-5L6" secondAttribute="trailing" constant="10" id="GjM-aR-VF8"/>
+                        <constraint firstItem="dms-N6-5L6" firstAttribute="leading" secondItem="kc4-Mh-Wba" secondAttribute="trailing" constant="11" id="PHN-fi-uWY"/>
+                        <constraint firstItem="dms-N6-5L6" firstAttribute="top" secondItem="feQ-p5-8BV" secondAttribute="top" id="TnW-JS-RXe"/>
+                        <constraint firstAttribute="trailing" secondItem="q1u-ei-e7Q" secondAttribute="trailing" constant="11" id="Zrf-qG-gte"/>
+                        <constraint firstItem="q1u-ei-e7Q" firstAttribute="centerY" secondItem="feQ-p5-8BV" secondAttribute="centerY" id="abL-Fe-FCK"/>
+                        <constraint firstAttribute="height" constant="35" id="obj-7i-NeV"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="17.5"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="feQ-p5-8BV" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="3gV-GN-1AQ"/>
+                <constraint firstAttribute="trailing" secondItem="feQ-p5-8BV" secondAttribute="trailing" constant="14" id="8B8-c1-r9N"/>
+                <constraint firstItem="feQ-p5-8BV" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="O9L-0v-dT8"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="searchField" destination="dms-N6-5L6" id="SZb-aF-nhD"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="67.633928571428569"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="search_green" width="15" height="16"/>
+    </resources>
+</document>

+ 25 - 39
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m

@@ -14,6 +14,7 @@
 #import "ContractListCell.h"
 #import "StateView.h"
 #import "Reachability.h"
+#import "FriendListModel.h"
 
 @interface ChatAddressBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -89,7 +90,7 @@
 
 - (void)requestData {
     if (self.selectIndex == 0) {
-//        [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
+        [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
         [KSNetworkingManager imUserFriendRequest:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
@@ -98,10 +99,10 @@
                     if ([parm isKindOfClass:[NSNull class]]) {
                         continue;
                     }
-//                    FriendListModel *model = [[FriendListModel alloc] initWithDictionary:parm];
-//                    [self.sourceArray addObject:model];
+                    FriendListModel *model = [[FriendListModel alloc] initWithDictionary:parm];
+                    [self.sourceArray addObject:model];
                 }
-//                [self evaluateMessge];
+                [self evaluateMessge];
             }
             else {
                 [MBProgressHUD ksHideHUD];
@@ -155,13 +156,16 @@
         // 异步线程处理数据
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             NSMutableArray *sortArr = [NSMutableArray array];
-//            for (FriendListModel *model in sourceArray) {
-//                NSString *firstLetter = [NSString getFirstLetterFromString:[NSString returnNoNullStringWithString:model.friendNickname]];
-//                model.firstLetter = firstLetter;
-//                if (![sortArr containsObject:firstLetter]) {
-//                    [sortArr addObject:firstLetter];
-//                }
-//            }
+            for (FriendListModel *model in sourceArray) {
+                if ([NSString isEmptyString:model.friendNickname]) {
+                    model.friendNickname = [NSString stringWithFormat:@"游客%@",model.friendId];
+                }
+                NSString *firstLetter = [NSString getFirstLetterFromString:[NSString returnNoNullStringWithString:model.friendNickname]];
+                model.firstLetter = firstLetter;
+                if (![sortArr containsObject:firstLetter]) {
+                    [sortArr addObject:firstLetter];
+                }
+            }
             [sortArr sortUsingComparator:^NSComparisonResult(id  _Nonnull obj1, id  _Nonnull obj2) {
                 return [obj1 compare:obj2 options:NSCaseInsensitiveSearch];
             }];
@@ -175,11 +179,11 @@
             }
             for (NSString *sortStr in sortArr) {
                 NSMutableArray *filterArray = [NSMutableArray array];
-//                for (FriendListModel *subModel in self.sourceArray) {
-//                    if ([sortStr isEqualToString:subModel.firstLetter]) {
-//                        [filterArray addObject:subModel];
-//                    }
-//                }
+                for (FriendListModel *subModel in self.sourceArray) {
+                    if ([sortStr isEqualToString:subModel.firstLetter]) {
+                        [filterArray addObject:subModel];
+                    }
+                }
                 [self.studentArray addObject:filterArray];
             }
             
@@ -264,6 +268,9 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     if (self.selectIndex == 0) {
         ContractListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContractListCell"];
+        NSArray *filterArray = self.studentArray[indexPath.section];
+        FriendListModel *model = filterArray[indexPath.row];
+        [cell configWithSource:model];
         return cell;
     }
     else {
@@ -278,7 +285,8 @@
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     if (self.selectIndex == 0) { // 联系人
         NSArray *filterArray = self.studentArray[indexPath.section];
-        
+        FriendListModel *model = filterArray[indexPath.row];
+        [self chatConversationWithTargetId:model.friendId targetName:model.friendNickname isGroup:NO];
     }
     else { // 群聊
         GroupListModel *model = self.classArray[indexPath.row];
@@ -290,28 +298,6 @@
             [self chatConversationWithTargetId:model.groupId targetName:model.name isGroup:YES];
         }
     }
-//    if (self.selectIndex == 0) {
-//        ClassListModel *model = self.classArray[indexPath.row];
-//
-//        if (_isShareVideo) { // 群聊消息
-//            [self sendMessageWithTargetId:model.internalBaseClassIdentifier isGroup:YES];
-//        }
-//        else {
-//            // 点击进入群聊
-//            [self chatConversationWithTargetId:model.internalBaseClassIdentifier targetName:model.name isGroup:YES];
-//        }
-//
-//    }
-//    else {
-//        NSArray *filterArray = self.studentArray[indexPath.section];
-//        FriendListModel *model = filterArray[indexPath.row];
-//        if (_isShareVideo) {
-//            [self sendMessageWithTargetId:model.friendId isGroup:NO];
-//        }
-//        else {
-//            [self chatConversationWithTargetId:model.friendId targetName:model.friendNickname isGroup:NO];
-//        }
-//    }
 }
 
 - (void)sendMessageWithTargetId:(NSString *)targetId isGroup:(BOOL)isGroup {

+ 14 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressHeaderView.m

@@ -84,6 +84,20 @@
     [self scrollPersonTable:NO];
 }
 
+- (IBAction)seasrchRequest:(id)sender {
+    if (self.callback) {
+        self.callback(CHATADDRESSTYPE_SEARCH,self.searchField.text);
+    }
+}
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    [self endEditing:YES];
+    if (self.callback) {
+        self.callback(CHATADDRESSTYPE_SEARCH,textField.text);
+    }
+    return YES;
+}
+
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 6 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressHeaderView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -126,7 +126,7 @@
                             <rect key="frame" x="38" y="0.0" width="324" height="35"/>
                             <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                            <textInputTraits key="textInputTraits"/>
+                            <textInputTraits key="textInputTraits" returnKeyType="search"/>
                         </textField>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pVF-V1-s8f">
                             <rect key="frame" x="372" y="4" width="56" height="27"/>
@@ -143,6 +143,9 @@
                                     <real key="value" value="13.5"/>
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="seasrchRequest:" destination="iN0-l3-epB" eventType="touchUpInside" id="M0g-KA-nmx"/>
+                            </connections>
                         </button>
                     </subviews>
                     <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>

+ 23 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ContractListCell.m

@@ -6,6 +6,15 @@
 //
 
 #import "ContractListCell.h"
+#import "FriendListModel.h"
+
+@interface ContractListCell ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *friendAvatar;
+
+@property (weak, nonatomic) IBOutlet UILabel *friendName;
+
+@end
 
 @implementation ContractListCell
 
@@ -15,6 +24,20 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
+- (void)configWithSource:(id)sourceModel {
+    if ([sourceModel isKindOfClass:[FriendListModel class]]) {
+        FriendListModel *model = sourceModel;
+        [self.friendAvatar sd_setImageWithURL:[NSURL URLWithString:model.friendAvatar] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+        if ([NSString isEmptyString:model.friendNickname]) {
+            self.friendName.text = [NSString stringWithFormat:@"游客%@",model.friendId];
+        }
+        else {
+            self.friendName.text = model.friendNickname;
+        }
+        self.friendName.text = [NSString returnNoNullStringWithString:model.friendNickname];
+    }
+}
+
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
     [super setSelected:selected animated:animated];
 

+ 6 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ContractListCell.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" 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="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -58,6 +58,10 @@
             </tableViewCellContentView>
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <connections>
+                <outlet property="friendAvatar" destination="vI1-v5-uMm" id="Nob-dw-1A8"/>
+                <outlet property="friendName" destination="8fl-pa-IHx" id="o2J-m8-ozl"/>
+            </connections>
             <point key="canvasLocation" x="178.2608695652174" y="95.424107142857139"/>
         </tableViewCell>
     </objects>

+ 49 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatGroupListCell.m

@@ -7,6 +7,8 @@
 
 #import "KSChatGroupListCell.h"
 
+
+
 @interface KSChatGroupListCell ()
 
 @property (weak, nonatomic) IBOutlet UIImageView *groupLogo;
@@ -31,7 +33,54 @@
 
 
 - (void)setDataModel:(RCConversationModel *)model {
+    NSString *defaultLogo = @"";
+    NSString *typeLogo = @"";
+    if ([model.targetId containsString:@"FAN"]) {
+        defaultLogo = @"chat_fansGroup_logo";
+        typeLogo = @"group_fans";
+    }
+    else {
+        defaultLogo = @"chat_group_Logo";
+        typeLogo = @"group_course";
+    }
+//    RCGroup
+    self.groupTitle.text = [NSString returnNoNullStringWithString:model.conversationTitle];
+    [self.groupLogo setImage:[UIImage imageNamed:defaultLogo]];
+    [self.typeLogo setImage:[UIImage imageNamed:typeLogo]];
     
+    // 时间和描述
+    self.timeLabel.text = [RCKitUtility convertConversationTime:model.sentTime / 1000];
+//    RCUserInfo *memberInfo = [[RCUserInfoCacheManager sharedManager] getUserInfo:model.senderUserId inGroupId:model.targetId];
+//    RCUserInfo *userInfo = [[RCUserInfoCache sharedCache] getUserInfo:model.senderUserId];
+//    NSString *messageContent = [NSString stringWithFormat:@"%@: %@", @"", [self formatMessageContent:model]];
+    NSString *messageContent = [NSString stringWithFormat:@"%@", [self formatMessageContent:model]];
+    self.descLabel.text = messageContent;
+}
+
+//- (RCUserInfo *)queryUserInfo:(NSString *)userId inGroupId:(NSString *)groupId {
+//    if (userId && groupId) {
+//        RCUserInfo *cacheUserInfo = [rcconversa]
+//    }
+//    return
+//}
+
+- (NSString *)formatMessageContent:(RCConversationModel *)model {
+    NSString *objectName = model.objectName;
+    if (model.conversationType == ConversationType_Encrypted &&
+        ([objectName isEqualToString:RCTextMessageTypeIdentifier] ||
+         [objectName isEqualToString:RCVoiceMessageTypeIdentifier] ||
+         [objectName isEqualToString:RCImageMessageTypeIdentifier] || [objectName isEqualToString:@"RC:SightMsg"] ||
+         [objectName isEqualToString:RCLocationMessageTypeIdentifier] || [objectName isEqualToString:@"RC:CardMsg"])) {
+        return RCLocalizedString(@"Message");
+    }
+    if ([RCKitUtility isUnkownMessage:model.lastestMessageId content:model.lastestMessage] &&
+        RCKitConfigCenter.message.showUnkownMessage) {
+        return RCLocalizedString(@"unknown_message_cell_tip");
+    } else {
+        return [RCKitUtility formatMessage:model.lastestMessage
+                                  targetId:model.targetId
+                          conversationType:model.conversationType];
+    }
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatListSearchView.m

@@ -41,6 +41,7 @@
     }
     return NO;
 }
+
 - (IBAction)searchButtonClick:(id)sender {
     if (self.callback) {
         self.callback();

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatListSearchView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -27,7 +27,7 @@
                             <rect key="frame" x="38" y="0.0" width="271" height="35"/>
                             <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                            <textInputTraits key="textInputTraits"/>
+                            <textInputTraits key="textInputTraits" returnKeyType="done" enablesReturnKeyAutomatically="YES"/>
                         </textField>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="va7-49-aYd">
                             <rect key="frame" x="319" y="4" width="56" height="27"/>

+ 16 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatLiveShareCell.h

@@ -0,0 +1,16 @@
+//
+//  KSChatLiveShareCell.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <RongIMKit/RongIMKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSChatLiveShareCell : RCMessageBaseCell
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 78 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatLiveShareCell.m

@@ -0,0 +1,78 @@
+//
+//  KSChatLiveShareCell.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "KSChatLiveShareCell.h"
+#import "KSChatLiveMessage.h"
+#import "ShareLiveCellContentView.h"
+
+#define SHARELIVEWIDTH (260)
+@interface KSChatLiveShareCell ()
+
+@property (nonatomic, strong) ShareLiveCellContentView *liveContentView;
+
+@end
+
+
+@implementation KSChatLiveShareCell
+
++ (CGSize)sizeForMessageModel:(RCMessageModel *)model withCollectionViewWidth:(CGFloat)collectionViewWidth referenceExtraHeight:(CGFloat)extraHeight {
+
+    if ([model.content isKindOfClass:[KSChatLiveMessage class]]) {
+        KSChatLiveMessage *liveShareMsg = (KSChatLiveMessage *)model.content;
+
+        if (![NSString isEmptyString:liveShareMsg.liveDescMessage]) {
+            NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+            [paragraphStyle setLineSpacing:4];//调整行间距
+            
+            CGFloat height = [liveShareMsg.liveDescMessage boundingRectWithSize:CGSizeMake(SHARELIVEWIDTH, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)} context:nil].size.height + 6;
+            CGFloat contentHeight = height + 123 + 20;
+            return CGSizeMake(collectionViewWidth, contentHeight + extraHeight);
+        }
+        else {
+            return CGSizeMake(collectionViewWidth, 123 + 20 + extraHeight);
+        }
+        
+    }
+    
+    return CGSizeZero;
+}
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self configUI];
+    }
+    return self;
+}
+
+- (void)configUI {
+    [self.baseContentView addSubview:self.liveContentView];
+    [self.liveContentView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.baseContentView.mas_left);
+        make.top.mas_equalTo(self.baseContentView.mas_top).offset(10);
+        make.width.mas_equalTo(KPortraitWidth);
+        make.bottom.mas_equalTo(self.baseContentView.mas_bottom).offset(-10);
+    }];
+}
+
+- (ShareLiveCellContentView *)liveContentView {
+    if (!_liveContentView) {
+        _liveContentView = [ShareLiveCellContentView shareIntance];
+    }
+    return _liveContentView;
+}
+
+- (void)setDataModel:(RCMessageModel *)model {
+    [super setDataModel:model];
+    if ([model.content isKindOfClass:[KSChatLiveMessage class]]) {
+        KSChatLiveMessage *liveShareMsg = (KSChatLiveMessage *)model.content;
+        [self.liveContentView configCellWithShareAvatar:liveShareMsg.teacherAvatar teacherName:liveShareMsg.teacherName liveDesc:liveShareMsg.liveDescMessage];
+    }
+}
+
+
+@end

+ 16 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatMusicShareCell.h

@@ -0,0 +1,16 @@
+//
+//  KSChatMusicShareCell.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <RongIMKit/RongIMKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSChatMusicShareCell : RCMessageBaseCell
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 62 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatMusicShareCell.m

@@ -0,0 +1,62 @@
+//
+//  KSChatMusicShareCell.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "KSChatMusicShareCell.h"
+#import "ShareMusicCellContentView.h"
+#import "KSChatMusicMessage.h"
+
+#define SHAREMUDICWIDTH (260)
+
+@interface KSChatMusicShareCell ()
+
+@property (nonatomic, strong) ShareMusicCellContentView *musicContentView;
+
+@end
+
+@implementation KSChatMusicShareCell
+
++ (CGSize)sizeForMessageModel:(RCMessageModel *)model withCollectionViewWidth:(CGFloat)collectionViewWidth referenceExtraHeight:(CGFloat)extraHeight {
+    if ([model.content isKindOfClass:[KSChatMusicMessage class]]) {
+        return CGSizeMake(collectionViewWidth, 100 + 20 + extraHeight);
+    }
+    return CGSizeZero;
+}
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self configUI];
+    }
+    return self;
+}
+
+- (void)configUI {
+    [self.baseContentView addSubview:self.musicContentView];
+    [self.musicContentView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.baseContentView.mas_left);
+        make.top.mas_equalTo(self.baseContentView.mas_top).offset(10);
+        make.width.mas_equalTo(KPortraitWidth);
+        make.bottom.mas_equalTo(self.baseContentView.mas_bottom).offset(-10);
+    }];
+}
+
+- (ShareMusicCellContentView *)musicContentView {
+    if (!_musicContentView) {
+        _musicContentView = [ShareMusicCellContentView shareInstance];
+    }
+    return _musicContentView;
+}
+
+- (void)setDataModel:(RCMessageModel *)model {
+    [super setDataModel:model];
+    if ([model.content isKindOfClass:[KSChatMusicMessage class]]) {
+        KSChatMusicMessage *musicShareMsg = (KSChatMusicMessage *)model.content;
+        [self.musicContentView configWithSongName:musicShareMsg.songName type:musicShareMsg.chargeType authName:musicShareMsg.songAuth sendAvatar:musicShareMsg.teacherAvatar sendName:musicShareMsg.teacherName userId:model.senderUserId tags:musicShareMsg.musicTagNames];
+    }
+}
+
+@end

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.h

@@ -0,0 +1,20 @@
+//
+//  ShareLiveCellContentView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ShareLiveCellContentView : UIView
+
++ (instancetype)shareIntance;
+
+- (void)configCellWithShareAvatar:(NSString *)avatar teacherName:(NSString *)teacherName liveDesc:(NSString *)desc;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 53 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.m

@@ -0,0 +1,53 @@
+//
+//  ShareLiveCellContentView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "ShareLiveCellContentView.h"
+
+@interface ShareLiveCellContentView ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *teacherAvatar;
+
+@property (weak, nonatomic) IBOutlet UILabel *descLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *waitDesc;
+
+@property (weak, nonatomic) IBOutlet UIImageView *teacher_info;
+
+@end
+
+@implementation ShareLiveCellContentView
+
+
++ (instancetype)shareIntance {
+    ShareLiveCellContentView *view = [[[NSBundle mainBundle] loadNibNamed:@"ShareLiveCellContentView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configCellWithShareAvatar:(NSString *)avatar teacherName:(NSString *)teacherName liveDesc:(NSString *)desc {
+    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:[avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    self.waitDesc.text = [NSString stringWithFormat:@"%@在直播间等你哦~",[NSString returnNoNullStringWithString:teacherName]];
+    if (![NSString isEmptyString:desc]) {
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        [paragraphStyle setLineSpacing:4];//调整行间距
+        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:desc attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+        self.descLabel.attributedText = attr;
+    }
+    else {
+        self.descLabel.text = @"";
+    }
+    [self.teacher_info sd_setImageWithURL:[NSURL URLWithString:[avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"user_avatarRectangle"]];
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 204 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareLiveCellContentView.xib

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ShareLiveCellContentView">
+            <rect key="frame" x="0.0" y="0.0" width="441" height="161"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yd2-ur-hRq">
+                    <rect key="frame" x="34" y="0.0" width="260" height="161"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i7L-q9-DkS">
+                            <rect key="frame" x="14" y="11" width="44" height="44"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="SJI-XW-kBi">
+                                    <rect key="frame" x="1" y="1" width="42" height="42"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="42" id="hzs-OV-n8V"/>
+                                        <constraint firstAttribute="width" constant="42" id="mnP-CZ-GcR"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="21"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </imageView>
+                            </subviews>
+                            <color key="backgroundColor" red="1" green="0.2627450980392157" blue="0.27843137254901962" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="44" id="as0-3u-z2A"/>
+                                <constraint firstAttribute="height" constant="44" id="dt3-Pn-jn6"/>
+                                <constraint firstItem="SJI-XW-kBi" firstAttribute="centerY" secondItem="i7L-q9-DkS" secondAttribute="centerY" id="rfK-n7-KD4"/>
+                                <constraint firstItem="SJI-XW-kBi" firstAttribute="centerX" secondItem="i7L-q9-DkS" secondAttribute="centerX" id="x8L-Z1-Ecw"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="22"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nVS-My-ja2">
+                            <rect key="frame" x="19" y="47" width="34" height="16"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i9b-Bo-Mcm">
+                                    <rect key="frame" x="2" y="2" width="30" height="12"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="直播中" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="smH-qK-pMg">
+                                            <rect key="frame" x="3" y="1" width="25" height="10"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="8"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <color key="backgroundColor" red="1" green="0.2627450980392157" blue="0.27843137254901962" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstItem="smH-qK-pMg" firstAttribute="top" secondItem="i9b-Bo-Mcm" secondAttribute="top" constant="1" id="0yR-Bx-m8w"/>
+                                        <constraint firstAttribute="bottom" secondItem="smH-qK-pMg" secondAttribute="bottom" constant="1" id="8nd-6V-YQ0"/>
+                                        <constraint firstAttribute="trailing" secondItem="smH-qK-pMg" secondAttribute="trailing" constant="2" id="dUf-8K-nG7"/>
+                                        <constraint firstItem="smH-qK-pMg" firstAttribute="leading" secondItem="i9b-Bo-Mcm" secondAttribute="leading" constant="3" id="dZo-Fp-1MT"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="6"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                            </subviews>
+                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="i9b-Bo-Mcm" secondAttribute="trailing" constant="2" id="Nd4-fl-dDI"/>
+                                <constraint firstAttribute="bottom" secondItem="i9b-Bo-Mcm" secondAttribute="bottom" constant="2" id="YzH-rB-oco"/>
+                                <constraint firstItem="i9b-Bo-Mcm" firstAttribute="leading" secondItem="nVS-My-ja2" secondAttribute="leading" constant="2" id="vTf-0X-25S"/>
+                                <constraint firstItem="i9b-Bo-Mcm" firstAttribute="top" secondItem="nVS-My-ja2" secondAttribute="top" constant="2" id="wU8-ms-ndC"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="8"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uCK-Sj-epF">
+                            <rect key="frame" x="0.0" y="110.5" width="260" height="1"/>
+                            <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="FCb-FT-oRr"/>
+                            </constraints>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="「正在直播」" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lRu-JH-qsz">
+                            <rect key="frame" x="65" y="13" width="86" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="MJo-99-Md0"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mG8-MH-eZ7">
+                            <rect key="frame" x="12" y="63" width="236" height="37.5"/>
+                            <attributedString key="attributedText">
+                                <fragment content="李老师带您0基础学习竖笛,通过4节课的学习掌握竖笛演奏方法">
+                                    <attributes>
+                                        <color key="NSColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
+                                        <font key="NSFont" metaFont="system" size="14"/>
+                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
+                                    </attributes>
+                                </fragment>
+                            </attributedString>
+                            <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="zel-fE-reB">
+                            <rect key="frame" x="91.5" y="118.5" width="77" height="21"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="21" id="fw0-Ob-WCC"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
+                            <color key="textColor" red="1" green="0.26274509800000001" blue="0.2784313725" alpha="1" 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="q2Q-aP-HCM">
+                            <rect key="frame" x="65" y="34" width="183" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="4zg-Ey-6Dc"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="q2Q-aP-HCM" firstAttribute="top" secondItem="lRu-JH-qsz" secondAttribute="bottom" constant="1" id="1ji-F3-28U"/>
+                        <constraint firstItem="mG8-MH-eZ7" firstAttribute="top" secondItem="i7L-q9-DkS" secondAttribute="bottom" constant="8" id="5iK-WB-dYf"/>
+                        <constraint firstItem="zel-fE-reB" firstAttribute="centerX" secondItem="yd2-ur-hRq" secondAttribute="centerX" id="9qH-U8-bM3"/>
+                        <constraint firstAttribute="trailing" secondItem="uCK-Sj-epF" secondAttribute="trailing" id="AtA-p0-sJ1"/>
+                        <constraint firstAttribute="width" constant="260" id="DcA-h7-TGL"/>
+                        <constraint firstAttribute="trailing" secondItem="mG8-MH-eZ7" secondAttribute="trailing" constant="12" id="KHL-Xm-Tlh"/>
+                        <constraint firstItem="uCK-Sj-epF" firstAttribute="top" secondItem="mG8-MH-eZ7" secondAttribute="bottom" constant="10" id="M2i-uI-GPi"/>
+                        <constraint firstItem="zel-fE-reB" firstAttribute="top" secondItem="uCK-Sj-epF" secondAttribute="bottom" constant="7" id="NeP-Gr-HjR"/>
+                        <constraint firstItem="i7L-q9-DkS" firstAttribute="leading" secondItem="yd2-ur-hRq" secondAttribute="leading" constant="14" id="Otc-aM-Gy0"/>
+                        <constraint firstItem="nVS-My-ja2" firstAttribute="centerY" secondItem="i7L-q9-DkS" secondAttribute="bottom" id="OwT-5v-Cex"/>
+                        <constraint firstItem="q2Q-aP-HCM" firstAttribute="leading" secondItem="lRu-JH-qsz" secondAttribute="leading" id="QD0-ob-6k3"/>
+                        <constraint firstItem="lRu-JH-qsz" firstAttribute="leading" secondItem="i7L-q9-DkS" secondAttribute="trailing" constant="7" id="ULA-Rm-7MU"/>
+                        <constraint firstItem="i7L-q9-DkS" firstAttribute="top" secondItem="yd2-ur-hRq" secondAttribute="top" constant="11" id="a5i-8B-yKv"/>
+                        <constraint firstItem="mG8-MH-eZ7" firstAttribute="leading" secondItem="yd2-ur-hRq" secondAttribute="leading" constant="12" id="alk-FH-P8t"/>
+                        <constraint firstAttribute="trailing" secondItem="q2Q-aP-HCM" secondAttribute="trailing" constant="12" id="hmj-hC-1j8"/>
+                        <constraint firstItem="nVS-My-ja2" firstAttribute="centerX" secondItem="i7L-q9-DkS" secondAttribute="centerX" id="iE1-cj-GX9"/>
+                        <constraint firstItem="lRu-JH-qsz" firstAttribute="top" secondItem="i7L-q9-DkS" secondAttribute="top" constant="2" id="taa-i9-ai0"/>
+                        <constraint firstItem="uCK-Sj-epF" firstAttribute="leading" secondItem="yd2-ur-hRq" secondAttribute="leading" id="u3b-aH-cbd"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_avatarRectangle" translatesAutoresizingMaskIntoConstraints="NO" id="7D7-lB-a41">
+                    <rect key="frame" x="383" y="0.0" width="44" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="44" id="GUW-2H-yUR"/>
+                        <constraint firstAttribute="height" constant="44" id="wEl-ra-JG8"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="6"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </imageView>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="yd2-ur-hRq" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="34" id="63I-gG-Zua"/>
+                <constraint firstItem="yd2-ur-hRq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="K8Q-lg-bH5"/>
+                <constraint firstAttribute="trailing" secondItem="7D7-lB-a41" secondAttribute="trailing" constant="14" id="qz7-EB-Sd3"/>
+                <constraint firstAttribute="bottom" secondItem="yd2-ur-hRq" secondAttribute="bottom" id="uhj-Y8-HNb"/>
+                <constraint firstItem="7D7-lB-a41" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="vJi-gG-FFc"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="descLabel" destination="mG8-MH-eZ7" id="wsa-O9-VBC"/>
+                <outlet property="teacherAvatar" destination="SJI-XW-kBi" id="KNc-50-GWC"/>
+                <outlet property="teacher_info" destination="7D7-lB-a41" id="Uuk-qD-juy"/>
+                <outlet property="waitDesc" destination="q2Q-aP-HCM" id="VLq-wX-8Sa"/>
+            </connections>
+            <point key="canvasLocation" x="132.60869565217394" y="-180.46875"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="user_avatarRectangle" width="44" height="44"/>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.h

@@ -0,0 +1,20 @@
+//
+//  ShareMusicCellContentView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ShareMusicCellContentView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)configWithSongName:(NSString *)songName type:(NSString *)type authName:(NSString *)authName sendAvatar:(NSString *)sendAvatar sendName:(NSString *)sendName userId:(NSString *)userId tags:(NSString *)tags;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 113 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.m

@@ -0,0 +1,113 @@
+//
+//  ShareMusicCellContentView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/8.
+//
+
+#import "ShareMusicCellContentView.h"
+
+@interface ShareMusicCellContentView ()
+
+@property (weak, nonatomic) IBOutlet UILabel *songName;
+@property (weak, nonatomic) IBOutlet UILabel *songAuth;
+
+@property (weak, nonatomic) IBOutlet UIImageView *uploaderLogo;
+@property (weak, nonatomic) IBOutlet UILabel *uploaderName;
+@property (weak, nonatomic) IBOutlet UIImageView *typeImage;
+@property (weak, nonatomic) IBOutlet UIView *tagView;
+
+@property (weak, nonatomic) IBOutlet UIImageView *teacher_info;
+
+@end
+
+@implementation ShareMusicCellContentView
+
++ (instancetype)shareInstance {
+    ShareMusicCellContentView *view = [[[NSBundle mainBundle] loadNibNamed:@"ShareMusicCellContentView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configWithSongName:(NSString *)songName type:(NSString *)type authName:(NSString *)authName sendAvatar:(NSString *)sendAvatar sendName:(NSString *)sendName userId:(NSString *)userId tags:(NSString *)tags {
+    self.songName.text = [NSString returnNoNullStringWithString:songName];
+    self.songAuth.text = [NSString returnNoNullStringWithString:authName];
+    NSArray *tagArray = [tags componentsSeparatedByString:@","];
+    NSString *owner = @"";
+    if ([NSString isEmptyString:sendName]) {
+        owner = [NSString stringWithFormat:@"游客%@",userId];
+    }
+    else {
+        owner = sendName;
+    }
+    CGFloat maxWidth = [self getTagViewMaxWidth:owner];
+    [self configTagViewWithTagArray:tagArray maxWidth:maxWidth];
+    NSString *typeImgName = @"";
+    if ([type isEqualToString:@"VIP"]) {
+        typeImgName = @"music_vip";
+    }
+    else if ([type isEqualToString:@"CHARGE"]) {
+        typeImgName = @"music_order";
+    }
+    else {
+        typeImgName = @"music_free";
+    }
+    [self.typeImage setImage:[UIImage imageNamed:typeImgName]];
+    
+    self.uploaderName.text = [NSString returnNoNullStringWithString:owner];
+    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:[sendAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+}
+
+- (CGFloat)getTagViewMaxWidth:(NSString *)teacherName {
+    CGFloat width = [self getStringWidthInLabel:teacherName font:[UIFont systemFontOfSize:12.0f]];
+    return 260 - 45  - 10 - 14 - width - 8;
+}
+
+- (void)configTagViewWithTagArray:(NSArray *)tagArray maxWidth:(CGFloat)maxWidth {
+    [self.tagView removeAllSubViews];
+    CGFloat width = maxWidth;
+    CGFloat xSpace = 0.0f;
+    for (NSInteger i = 0; i < tagArray.count; i++) {
+        NSString *tagString = tagArray[i];
+        CGFloat labelWidth = [self getStringWidthInLabel:tagString font:[UIFont systemFontOfSize:11.0f]];
+        CGFloat viewWidth = labelWidth + 8;
+        if (xSpace + viewWidth > width) {
+            return;
+        }
+        CGRect frame = CGRectMake(xSpace, 0, viewWidth, 16.0f);
+        [self createTagLabelViewWithName:tagString frame:frame];
+        xSpace += (viewWidth + 6);
+    }
+}
+
+- (CGFloat)getStringWidthInLabel:(NSString *)tagString font:(UIFont *)font {
+    CGFloat width = [tagString boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 16.0f) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil].size.width+1;
+    return width;
+}
+
+- (void)createTagLabelViewWithName:(NSString *)name frame:(CGRect)frame {
+    UIView *bgView = [[UIView alloc] initWithFrame:frame];
+    bgView.backgroundColor = HexRGB(0xfff1de);
+    bgView.layer.cornerRadius = 4.0f;
+    [self.tagView addSubview:bgView];
+    
+    UILabel *tagLabel = [[UILabel alloc] init];
+    tagLabel.text = name;
+    tagLabel.textColor = HexRGB(0xff8c00);
+    tagLabel.font = [UIFont systemFontOfSize:11.0f];
+    tagLabel.textAlignment = NSTextAlignmentCenter;
+    [bgView addSubview:tagLabel];
+    [tagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(bgView.mas_left).offset(4);
+        make.right.mas_equalTo(bgView.mas_right).offset(-4);
+        make.top.bottom.mas_equalTo(bgView);
+    }];
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 160 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ShareMusicCellContentView.xib

@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <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"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ShareMusicCellContentView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="100"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UDH-9B-8f6">
+                    <rect key="frame" x="37" y="0.0" width="260" height="100"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="music_logo" translatesAutoresizingMaskIntoConstraints="NO" id="TNu-dS-bgv">
+                            <rect key="frame" x="11" y="10" width="41" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="41" id="9rc-yn-MaD"/>
+                                <constraint firstAttribute="height" constant="40" id="vif-5F-f05"/>
+                            </constraints>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="野蜂飞舞" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qBn-Vj-IOu">
+                            <rect key="frame" x="58" y="10" width="57.5" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="wxA-Zh-cwI"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" 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="g3o-nG-BQH">
+                            <rect key="frame" x="58" y="33" width="192" height="17"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="17" id="nt0-PF-oRj"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="0.41568627450000001" green="0.41568627450000001" blue="0.41568627450000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aOo-WP-h3g">
+                            <rect key="frame" x="10" y="60" width="240" height="1"/>
+                            <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="EyP-io-cfT"/>
+                            </constraints>
+                        </view>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="usw-H3-UWY">
+                            <rect key="frame" x="18" y="69" width="20" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="20" id="5H6-zu-zp2"/>
+                                <constraint firstAttribute="width" constant="20" id="JKy-Fk-af3"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="10"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张老师" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZFp-lo-yiU">
+                            <rect key="frame" x="45" y="71.5" width="37" height="15"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gWr-Wd-yEt">
+                            <rect key="frame" x="90" y="71" width="160" height="16"/>
+                            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="16" id="8gf-Gn-22x"/>
+                            </constraints>
+                        </view>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="music_free" translatesAutoresizingMaskIntoConstraints="NO" id="4bk-5v-taM">
+                            <rect key="frame" x="119.5" y="9" width="55" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="Fyr-Ql-elB"/>
+                                <constraint firstAttribute="width" constant="55" id="W3M-P5-WO2"/>
+                            </constraints>
+                        </imageView>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="qBn-Vj-IOu" firstAttribute="top" secondItem="TNu-dS-bgv" secondAttribute="top" id="7cN-lD-IHi"/>
+                        <constraint firstAttribute="trailing" secondItem="aOo-WP-h3g" secondAttribute="trailing" constant="10" id="AeQ-pR-oLQ"/>
+                        <constraint firstItem="ZFp-lo-yiU" firstAttribute="centerY" secondItem="usw-H3-UWY" secondAttribute="centerY" id="DHU-OS-wY6"/>
+                        <constraint firstItem="TNu-dS-bgv" firstAttribute="top" secondItem="UDH-9B-8f6" secondAttribute="top" constant="10" id="LrD-NH-ECR"/>
+                        <constraint firstItem="4bk-5v-taM" firstAttribute="leading" secondItem="qBn-Vj-IOu" secondAttribute="trailing" constant="4" id="QGx-Jg-p2z"/>
+                        <constraint firstItem="aOo-WP-h3g" firstAttribute="leading" secondItem="UDH-9B-8f6" secondAttribute="leading" constant="10" id="QZX-qF-NSc"/>
+                        <constraint firstItem="usw-H3-UWY" firstAttribute="leading" secondItem="UDH-9B-8f6" secondAttribute="leading" constant="18" id="TIC-gZ-eds"/>
+                        <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="4bk-5v-taM" secondAttribute="trailing" constant="12" id="X8y-kD-r5h"/>
+                        <constraint firstAttribute="trailing" secondItem="gWr-Wd-yEt" secondAttribute="trailing" constant="10" id="ZAs-ed-MNp"/>
+                        <constraint firstItem="qBn-Vj-IOu" firstAttribute="leading" secondItem="TNu-dS-bgv" secondAttribute="trailing" constant="6" id="bPY-jM-HQ6"/>
+                        <constraint firstItem="gWr-Wd-yEt" firstAttribute="centerY" secondItem="ZFp-lo-yiU" secondAttribute="centerY" id="bgp-xc-7EQ"/>
+                        <constraint firstItem="TNu-dS-bgv" firstAttribute="leading" secondItem="UDH-9B-8f6" secondAttribute="leading" constant="11" id="cbA-O2-L9m"/>
+                        <constraint firstItem="gWr-Wd-yEt" firstAttribute="leading" secondItem="ZFp-lo-yiU" secondAttribute="trailing" constant="8" id="hdG-8S-k9I"/>
+                        <constraint firstItem="ZFp-lo-yiU" firstAttribute="leading" secondItem="usw-H3-UWY" secondAttribute="trailing" constant="7" id="k7W-aq-6G1"/>
+                        <constraint firstItem="g3o-nG-BQH" firstAttribute="leading" secondItem="qBn-Vj-IOu" secondAttribute="leading" id="lQ1-Hy-nCw"/>
+                        <constraint firstAttribute="trailing" secondItem="g3o-nG-BQH" secondAttribute="trailing" constant="10" id="viZ-YE-U3R"/>
+                        <constraint firstItem="g3o-nG-BQH" firstAttribute="top" secondItem="4bk-5v-taM" secondAttribute="bottom" constant="2" id="wxh-yd-weN"/>
+                        <constraint firstAttribute="width" constant="260" id="xRn-Do-4Vz"/>
+                        <constraint firstItem="usw-H3-UWY" firstAttribute="top" secondItem="aOo-WP-h3g" secondAttribute="bottom" constant="8" id="xpY-T2-5ut"/>
+                        <constraint firstItem="aOo-WP-h3g" firstAttribute="top" secondItem="TNu-dS-bgv" secondAttribute="bottom" constant="10" id="yji-eH-XQ7"/>
+                        <constraint firstItem="4bk-5v-taM" firstAttribute="centerY" secondItem="qBn-Vj-IOu" secondAttribute="centerY" id="yju-uN-yua"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_avatarRectangle" translatesAutoresizingMaskIntoConstraints="NO" id="8Ex-jS-f6m">
+                    <rect key="frame" x="356" y="0.0" width="44" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="6MA-Gb-oOY"/>
+                        <constraint firstAttribute="width" constant="44" id="Afd-Ym-YsE"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="6"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </imageView>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="8Ex-jS-f6m" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Ecd-iv-QxS"/>
+                <constraint firstItem="UDH-9B-8f6" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="OJt-lz-uN2"/>
+                <constraint firstAttribute="trailing" secondItem="8Ex-jS-f6m" secondAttribute="trailing" constant="14" id="Pu2-cQ-2oW"/>
+                <constraint firstAttribute="bottom" secondItem="UDH-9B-8f6" secondAttribute="bottom" id="iQY-mQ-cgC"/>
+                <constraint firstItem="UDH-9B-8f6" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="37" id="qIO-WV-8Nm"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="songAuth" destination="g3o-nG-BQH" id="0Yd-tt-hJi"/>
+                <outlet property="songName" destination="qBn-Vj-IOu" id="qwd-BR-Kwu"/>
+                <outlet property="tagView" destination="gWr-Wd-yEt" id="w3M-M0-9yI"/>
+                <outlet property="teacher_info" destination="8Ex-jS-f6m" id="Dug-sk-Cuc"/>
+                <outlet property="typeImage" destination="4bk-5v-taM" id="SNc-tt-EW2"/>
+                <outlet property="uploaderLogo" destination="usw-H3-UWY" id="ntN-vb-oOT"/>
+                <outlet property="uploaderName" destination="ZFp-lo-yiU" id="3gE-Pd-5Ia"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="-176.11607142857142"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="music_free" width="55" height="22"/>
+        <image name="music_logo" width="41" height="40"/>
+        <image name="user_avatarRectangle" width="44" height="44"/>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 21 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m

@@ -66,10 +66,27 @@
     self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
 }
 
-- (void)rightBtnClick { 
-    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
-    [self.navigationController pushViewController:webCtrl animated:YES];
+- (void)rightBtnClick { // 获取分享数据
+    
+    
+    [self showhud];
+    [KSNetworkingManager queryMusicShareMessageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+//            if (<#condition#>) {
+//                <#statements#>
+//            }
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
+}
+
+- (void)displayShareView {
+    
 }
 
 - (void)viewWillAppear:(BOOL)animated {

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Model/MusicMessageModel.h

@@ -50,6 +50,8 @@
 @property (nonatomic, assign) double userId;
 @property (nonatomic, strong) NSString *submitAuditTime;
 
+@property (nonatomic, assign) BOOL isChoose;
+
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;
 - (NSDictionary *)dictionaryRepresentation;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -113,7 +113,7 @@
 
 
 - (void)requestData {
-    [KSNetworkingManager musicListRequest:KS_POST auditStatus:self.audioStatus pageNo:self.pages pageSize:self.rows success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager musicListRequest:KS_POST auditStatus:self.audioStatus page:self.pages rows:self.right search:@"" success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m

@@ -48,7 +48,7 @@
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSString *roomId = [dic stringValueForKey:@"data"];
-            [self previewViewWithRoomId:roomId];
+            [self previewViewWithRoomId:roomId liveDesc:content];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -58,9 +58,10 @@
     }];
 }
 
-- (void)previewViewWithRoomId:(NSString *)roomId {
+- (void)previewViewWithRoomId:(NSString *)roomId liveDesc:(NSString *)liveDesc {
     LivePrepareViewController *ctrl = [[LivePrepareViewController alloc] init];
     ctrl.roomId = roomId;
+    ctrl.liveContent = liveDesc;
     CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:ctrl];
     navCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
     [self.navigationController presentViewController:navCtrl animated:YES completion:nil];

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.h

@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) NSString *roomId; // 房间号
 
+@property (nonatomic, strong) NSString *liveContent; // 直播内容
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 21 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m

@@ -11,6 +11,9 @@
 #import "KSEnterLiveroomManager.h"
 #import <RongFaceBeautifier/RongFaceBeautifier.h>
 #import "KSBeautySettingView.h"
+#import "KSShareChooseViewController.h"
+#import <RongIMKit/RongIMKit.h>
+#import "KSChatLiveMessage.h"
 
 @interface LivePrepareViewController ()
 
@@ -87,7 +90,7 @@
             break;
         case PREVIEWLIVEACTION_SHARE: // 分享
         {
-            
+            [self shareLiveRoomMessage];
         }
             break;
         case PREVIEWLIVEACTION_OPEN: // 进入直播间
@@ -100,6 +103,23 @@
     }
 }
 
+- (void)shareLiveRoomMessage {
+    // 选择群组分享
+    KSChatLiveMessage *liveShareMsg = [[KSChatLiveMessage alloc] init];
+    liveShareMsg.roomUID = self.roomId;
+    NSString *teacherName = UserDefaultObjectForKey(NicknameKey);
+    if ([NSString isEmptyString:teacherName]) {
+        teacherName = [NSString stringWithFormat:@"游客%@",UserDefaultObjectForKey(UIDKey)];
+    }
+    liveShareMsg.teacherName = teacherName;
+    liveShareMsg.teacherAvatar = UserDefaultObjectForKey(AvatarUrlKey);
+    liveShareMsg.liveDescMessage = self.liveContent;
+    
+    KSShareChooseViewController *chooseCtrl = [[KSShareChooseViewController alloc] init];
+    chooseCtrl.msgContent = liveShareMsg;
+    [self.navigationController pushViewController:chooseCtrl animated:YES];
+}
+
 - (void)displayBeautyView {
     [self displayBottomView:YES];
     [self.view addSubview:self.settingView];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m

@@ -86,7 +86,7 @@
         self.courseStatus.textColor = HexRGB(0x999999);
         // 判断显示评价还是已评价
         BOOL hasEvaluate = [model.teacherReplied isEqualToString:@"1"] ? YES : NO;
-        if (hasEvaluate) {
+        if (hasEvaluate == NO) {
             self.type = ACCOMPANY_DETAIL;
             self.opreationButton.userInteractionEnabled = YES;
             [self.opreationButton setTitle:@"评价" forState:UIControlStateNormal];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m

@@ -169,7 +169,7 @@
         }];
     }
     else if (self.selectIndex == 4) { // 乐谱
-        [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" pageNo:self.pages pageSize:self.rows success:^(NSDictionary * _Nonnull dic) {
+        [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:@"" success:^(NSDictionary * _Nonnull dic) {
             [self endRefresh];
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
                 NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m

@@ -57,6 +57,7 @@
         [KSNetworkingManager imGroupModify:KS_POST name:self.bodyView.nameField.text groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                UserDefaultSetObjectForKey(self.bodyView.nameField.text, NicknameKey)
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
                     if (weakSelf.callback) {

+ 4 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -192,6 +192,10 @@
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             [self MBPShow:@"修改成功"];
+            if (![NSString isEmptyString:imgUrl]) {
+                UserDefaultSetObjectForKey(imgUrl, AvatarUrlKey);
+            }
+            
             [self requestUserMessage];
         }
         else {

+ 28 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/Controller/KSShareChooseViewController.h

@@ -0,0 +1,28 @@
+//
+//  KSShareChooseViewController.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/9.
+//
+
+#import "KSBaseViewController.h"
+#import <RongIMKit/RongIMKit.h>
+#import "JXCategoryView.h"
+#import "JXPagerView.h"
+
+// 选择分享到的群组或个人
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSShareChooseViewController : KSBaseViewController <JXCategoryListContentViewDelegate>
+
+@property (nonatomic, strong) RCMessageContent *msgContent;
+
+
+
+@property (nonatomic, strong) JXPagerView *pagerView;
+@property (nonatomic, strong, readonly) JXCategoryTitleView *categoryView;
+@property (nonatomic, strong) NSArray <NSString *> *titles;
+@end
+
+NS_ASSUME_NONNULL_END

+ 226 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/Controller/KSShareChooseViewController.m

@@ -0,0 +1,226 @@
+//
+//  KSShareChooseViewController.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/9.
+//
+
+#import "KSShareChooseViewController.h"
+#import "ChatAddressHeaderView.h"
+#import "JXCategoryView.h"
+#import "JXPagerListRefreshView.h"
+#import "ShareChooseMainView.h"
+
+@interface KSShareChooseViewController ()<JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate>
+
+@property (nonatomic, strong) ChatAddressHeaderView *headView;
+
+@property (nonatomic, assign) NSInteger selectedIndex;
+
+@property (nonatomic, strong) NSMutableArray *listViewArray;
+
+@end
+
+@implementation KSShareChooseViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    [self allocTitle:@"分享"];
+    self.titles = @[@"联系人",@"群聊"];
+    [self configUI];
+}
+- (void)configUI {
+    [self.scrollView removeFromSuperview];
+    self.view.backgroundColor = HexRGB(0xf6f8f9);
+    [self.view addSubview:self.headView];
+    self.headView.frame = CGRectMake(0, 0, kScreenWidth, 100);
+    MJWeakSelf;
+    [self.headView chatAddressbookAction:^(CHATADDRESSTYPE type, NSString * _Nullable searchKey) {
+        [weakSelf topViewAction:type search:searchKey];
+    }];
+    
+    _categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 100, kScreenWidth, 10)];
+    _categoryView.backgroundColor = HexRGB(0xf6f8f9);
+    self.categoryView.titles = self.titles;
+    self.categoryView.delegate = self;
+    self.categoryView.titleFont = [UIFont systemFontOfSize:16.0f];
+    self.categoryView.titleSelectedFont = [UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium];
+    self.categoryView.titleSelectedColor = THEMECOLOR;
+    self.categoryView.titleColor = HexRGB(0x777777);
+    self.categoryView.titleColorGradientEnabled = YES;
+    self.categoryView.hidden = YES;
+    _pagerView = [self preferredPagingView];
+    self.pagerView.frame = CGRectMake(0, 100, kScreenWidth, kScreenHeight - kNaviBarHeight-100);
+    self.pagerView.listContainerView.categoryNestPagingEnabled = YES;
+    self.pagerView.mainTableView.gestureDelegate = self;
+    self.pagerView.backgroundColor = [UIColor clearColor];
+    self.pagerView.mainTableView.backgroundColor = [UIColor clearColor];
+    [self.view addSubview:self.pagerView];
+    self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
+}
+
+
+- (void)topViewAction:(CHATADDRESSTYPE)type search:(NSString *)searchKey {
+    switch (type) {
+        case CHATADDRESSTYPE_PERSON: // 联系人
+        {
+            [self.categoryView selectItemAtIndex:0];
+            self.selectedIndex = 0;
+            [self searchRequest:@""];
+        }
+            break;
+        case CHATADDRESSTYPE_GROUP: // 群组
+        {
+            [self.categoryView selectItemAtIndex:1];
+            self.selectedIndex = 1;
+            [self searchRequest:@""];
+        }
+            break;
+        case CHATADDRESSTYPE_SEARCH:  // 搜索
+        {
+            [self searchRequest:searchKey];
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)searchRequest:(NSString *)searchKey {
+    if (self.listViewArray.count > self.selectedIndex) {
+        ShareChooseMainView *listView = self.listViewArray[self.selectedIndex];
+        listView.searchKey = searchKey;
+        [listView refreshAndRequestData];
+    }
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+    if (self.listViewArray.count > self.categoryView.selectedIndex) {
+        id value = self.listViewArray[self.categoryView.selectedIndex];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0);
+}
+
+
+- (JXPagerView *)preferredPagingView {
+    return [[JXPagerListRefreshView alloc] initWithDelegate:self];
+}
+
+#pragma mark - JXPagerViewDelegate
+
+- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
+    return [UIView new];
+}
+
+- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
+    return CGFLOAT_MIN;
+}
+
+- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
+    return 10;
+}
+
+- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
+    return self.categoryView;
+}
+
+- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
+    //和categoryView的item数量一致
+    return self.titles.count;
+}
+
+- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
+    ShareChooseMainView *listView = [[ShareChooseMainView alloc] init];
+    listView.naviController = self.navigationController;
+    [listView shareCallback:^(NSString * _Nonnull targetId, BOOL isGroup) {
+        [self sendShareMessage:targetId isGroup:isGroup];
+    }];
+    [self.listViewArray addObject:listView];
+    if (index == 0) {
+        listView.selectIndex = 0;
+    }else if (index == 1) {
+        listView.selectIndex = 1;
+    }
+    [listView beginFirstRefresh];
+    return listView;
+}
+
+- (void)sendShareMessage:(NSString *)targetId isGroup:(BOOL)isGroup {
+    RCConversationType conversationType = isGroup ? ConversationType_GROUP : ConversationType_PRIVATE;
+    RCMessage *sendMessage = [[RCMessage alloc] initWithType:conversationType targetId:targetId direction:MessageDirection_SEND content:self.msgContent];
+    [[RCIM sharedRCIM] sendMessage:sendMessage pushContent:nil pushData:nil successBlock:^(RCMessage *successMessage) {
+        dispatch_main_async_safe(^{
+            [self MBPShow:@"分享成功"];
+        });
+        
+    } errorBlock:^(RCErrorCode nErrorCode, RCMessage *errorMessage) {
+        dispatch_main_async_safe(^{
+            [self MBPShow:@"分享失败"];
+        });
+    }];
+}
+
+#pragma mark - JXCategoryViewDelegate
+- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
+    BOOL scrollPersonTable = index == 0;
+    [self.headView scrollPersonTable:scrollPersonTable];
+    self.selectedIndex = index;
+}
+
+#pragma mark - JXPagerMainTableViewGestureDelegate
+
+- (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+    //禁止categoryView左右滑动的时候,上下和左右都可以滚动
+    if (otherGestureRecognizer == self.categoryView.collectionView.panGestureRecognizer) {
+        return NO;
+    }
+    return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
+}
+
+
+- (NSMutableArray *)listViewArray {
+    if (!_listViewArray) {
+        _listViewArray = [NSMutableArray array];
+    }
+    return _listViewArray;
+}
+
+#pragma mark - JXCategoryListContentViewDelegate
+
+- (UIView *)listView {
+    return self.view;
+}
+- (ChatAddressHeaderView *)headView {
+    if (!_headView) {
+        _headView = [ChatAddressHeaderView shareInstance];
+    }
+    return _headView;
+}
+
+- (void)setSelectedIndex:(NSInteger)selectedIndex {
+    _selectedIndex = selectedIndex;
+    self.headView.searchField.text = @"";
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/View/ShareChooseMainView.h

@@ -0,0 +1,24 @@
+//
+//  ShareChooseMainView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/9.
+//
+
+#import "KSJXBodyView.h"
+
+typedef void(^ShareChooseCallback)(NSString * _Nonnull targetId, BOOL isGroup);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ShareChooseMainView : KSJXBodyView
+
+@property (nonatomic, strong) NSString *searchKey;
+
+- (void)refreshAndRequestData;
+
+- (void)shareCallback:(ShareChooseCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 424 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/ShareInChat/View/ShareChooseMainView.m

@@ -0,0 +1,424 @@
+//
+//  ShareChooseMainView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/9.
+//
+
+#import "ShareChooseMainView.h"
+#import "SCIndexView.h"
+#import "UITableView+SCIndexView.h"
+#import "KSChatConversationViewController.h"
+#import "GroupListModel.h"
+#import "GroupListViewCell.h"
+#import "ContractListCell.h"
+#import "StateView.h"
+#import "Reachability.h"
+#import "FriendListModel.h"
+
+@interface ShareChooseMainView ()<UITableViewDelegate,UITableViewDataSource>
+
+@property (nonatomic, strong) StateView *promptView;
+@property (nonatomic, strong) UIView *promptPlaceView;
+
+@property (nonatomic, assign) BOOL networkAvaiable; // 网络是否可用
+
+@property (nonatomic, strong) NSMutableArray *classArray; // 班级数据
+
+@property (nonatomic, strong) NSMutableArray *studentArray; // 学生数据
+
+@property (nonatomic, strong) NSMutableArray *sourceIndexArray;
+
+@property (nonatomic, strong) NSMutableArray *sourceArray;
+
+@property (nonatomic, copy) ShareChooseCallback callback;
+
+
+@end
+
+@implementation ShareChooseMainView
+- (void)shareCallback:(ShareChooseCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        self.backgroundColor = HexRGB(0xf6f8f9);
+        self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) style:UITableViewStylePlain];
+        self.tableView.backgroundColor = HexRGB(0xf6f8f9);
+        self.tableView.showsVerticalScrollIndicator = NO;
+
+        self.tableView.dataSource = self;
+        self.tableView.delegate = self;
+        self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        self.tableView.rowHeight = 70;
+        [self addSubview:self.tableView];
+        
+        
+        UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
+        headView.backgroundColor = HexRGB(0xf6f8f9);
+        self.tableView.tableHeaderView = headView;
+        
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
+        bottomView.backgroundColor = HexRGB(0xf6f8f9);
+        self.tableView.tableFooterView = bottomView;
+        
+        [self.tableView registerNib:[UINib nibWithNibName:@"ContractListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ContractListCell"];
+        [self.tableView registerNib:[UINib nibWithNibName:@"GroupListViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"GroupListViewCell"];
+        MJWeakSelf;
+        self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
+            [weakSelf resetParamenter];
+            [weakSelf requestData];
+        }];
+    }
+    return self;
+}
+
+- (void)endRefresh {
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self.tableView.mj_header endRefreshing];
+    });
+}
+
+- (void)refreshAndRequestData {
+    [self resetParamenter];
+    [self requestData];
+}
+
+- (void)requestData {
+    if (self.selectIndex == 0) {
+        [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
+        [KSNetworkingManager imUserFriendRequest:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
+            [self endRefresh];
+            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                NSArray *array = [dic arrayValueForKey:@"data"];
+                for (NSDictionary *parm in array) {
+                    if ([parm isKindOfClass:[NSNull class]]) {
+                        continue;
+                    }
+                    FriendListModel *model = [[FriendListModel alloc] initWithDictionary:parm];
+                    [self.sourceArray addObject:model];
+                }
+                [self evaluateMessge];
+            }
+            else {
+                [MBProgressHUD ksHideHUD];
+                [self MBPShow:MESSAGEKEY];
+                [self changePromptLabelStateWithArray:self.studentArray];
+                
+            }
+        } faliure:^(NSError * _Nonnull error) {
+            [MBProgressHUD ksHideHUD];
+            [self endRefresh];
+            if (self.networkAvaiable == NO) {
+                [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
+            }
+            [self.studentArray removeAllObjects];
+            [self.sourceIndexArray removeAllObjects];
+            [self.tableView reloadData];
+            [self changePromptLabelStateWithArray:self.studentArray];
+        }];
+        
+    }
+    else {
+        [KSNetworkingManager imGroupQueryPage:KS_POST search:self.searchKey success:^(NSDictionary * _Nonnull dic) {
+            [self endRefresh];
+            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                NSArray *array = [dic arrayValueForKey:@"data"];
+                for (NSDictionary *parm in array) {
+                    GroupListModel *model = [[GroupListModel alloc] initWithDictionary:parm];
+                    [self.classArray addObject:model];
+                }
+            }
+            else {
+                [self MBPShow:MESSAGEKEY];
+            }
+            [self.tableView reloadData];
+            [self changePromptLabelStateWithArray:self.classArray];
+        } faliure:^(NSError * _Nonnull error) {
+            [self endRefresh];
+            if (self.networkAvaiable == NO) {
+                [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
+            }
+            [self.classArray removeAllObjects];
+            [self.tableView reloadData];
+            [self changePromptLabelStateWithArray:self.classArray];
+        }];
+    }
+}
+
+- (void)evaluateMessge {
+    @autoreleasepool {
+        NSMutableArray *sourceArray = [self.sourceArray mutableCopy];
+        // 异步线程处理数据
+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            NSMutableArray *sortArr = [NSMutableArray array];
+            for (FriendListModel *model in sourceArray) {
+                if ([NSString isEmptyString:model.friendNickname]) {
+                    model.friendNickname = [NSString stringWithFormat:@"游客%@",model.friendId];
+                }
+                NSString *firstLetter = [NSString getFirstLetterFromString:[NSString returnNoNullStringWithString:model.friendNickname]];
+                model.firstLetter = firstLetter;
+                if (![sortArr containsObject:firstLetter]) {
+                    [sortArr addObject:firstLetter];
+                }
+            }
+            [sortArr sortUsingComparator:^NSComparisonResult(id  _Nonnull obj1, id  _Nonnull obj2) {
+                return [obj1 compare:obj2 options:NSCaseInsensitiveSearch];
+            }];
+            // 将#移动到最后
+            for (NSString *letterStr in sortArr) {
+                if ([letterStr isEqualToString:@"#"]) {
+                    [sortArr removeObject:letterStr];
+                    [sortArr addObject:@"#"];
+                    break;
+                }
+            }
+            for (NSString *sortStr in sortArr) {
+                NSMutableArray *filterArray = [NSMutableArray array];
+                for (FriendListModel *subModel in self.sourceArray) {
+                    if ([sortStr isEqualToString:subModel.firstLetter]) {
+                        [filterArray addObject:subModel];
+                    }
+                }
+                [self.studentArray addObject:filterArray];
+            }
+            
+            self.sourceIndexArray = sortArr;
+            // 主线程刷新
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [MBProgressHUD ksHideHUD];
+                self.tableView.sc_indexViewDataSource = self.sourceIndexArray;
+                [self.tableView reloadData];
+                [self changePromptLabelStateWithArray:self.studentArray];
+            });
+        });
+    };
+}
+
+- (void)resetParamenter {
+    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.tableView];
+    [self.classArray removeAllObjects];
+    [self.sourceArray removeAllObjects];
+    [self.studentArray removeAllObjects];
+    self.sourceIndexArray = [NSMutableArray array];
+    SCIndexViewConfiguration *indexConfiguration = [SCIndexViewConfiguration configuration];
+    indexConfiguration.indexItemSelectedBackgroundColor = THEMECOLOR;
+    indexConfiguration.indicatorBackgroundColor = THEMECOLOR;
+    self.tableView.sc_indexViewConfiguration = indexConfiguration;
+    self.tableView.sc_indexViewDataSource = self.sourceIndexArray;
+    [self.tableView reloadData];
+}
+
+- (void)beginRefreshImmediately {
+    [self.tableView.mj_header beginRefreshing];
+}
+
+- (void)selectCellAtIndexPath:(NSIndexPath *)indexPath {
+    
+    if (self.lastSelectedIndexPath == indexPath) {
+        return;
+    }
+    if (self.lastSelectedIndexPath != nil) {
+        UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:self.lastSelectedIndexPath];
+        [cell setSelected:NO animated:NO];
+    }
+    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
+    [cell setSelected:YES animated:NO];
+    self.lastSelectedIndexPath = indexPath;
+}
+
+- (void)layoutSubviews {
+    [super layoutSubviews];
+    self.tableView.frame = self.bounds;
+}
+
+- (void)beginFirstRefresh {
+    if (!self.isHeaderRefreshed) {
+        [self beginRefreshImmediately];
+    }
+}
+
+#pragma mark - UITableViewDataSource, UITableViewDelegate
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if (self.selectIndex == 0) {
+        if (self.studentArray.count > section) {
+            NSArray *filterArray = self.studentArray[section];
+            return filterArray.count;
+        }
+        return 0;
+    }
+    else {
+        return self.classArray.count;
+    }
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    if (self.selectIndex == 0) {
+        return self.sourceIndexArray.count;
+    }
+    else {
+        return 1;
+    }
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (self.selectIndex == 0) {
+        ContractListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ContractListCell"];
+        NSArray *filterArray = self.studentArray[indexPath.section];
+        FriendListModel *model = filterArray[indexPath.row];
+        [cell configWithSource:model];
+        return cell;
+    }
+    else {
+        GroupListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GroupListViewCell"];
+        GroupListModel *model = self.classArray[indexPath.row];
+        [cell configWithSource:model];
+        return cell;
+    }
+    
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (self.selectIndex == 0) { // 联系人
+        NSArray *filterArray = self.studentArray[indexPath.section];
+        FriendListModel *model = filterArray[indexPath.row];
+        if (self.callback) {
+            self.callback(model.friendId, NO);
+        }
+    }
+    else { // 群聊
+        GroupListModel *model = self.classArray[indexPath.row];
+        self.callback(model.groupId, YES);
+    }
+}
+
+
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    if (self.selectIndex == 1) {
+        return CGFLOAT_MIN;
+    }
+    return 30;
+}
+
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+    if (self.selectIndex == 1) {
+        return [UIView new];
+    }
+    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 30)];
+    view.backgroundColor = HexRGB(0xf6f8f9);
+    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(24, 0, kScreenWidth - 48, 30)];
+    label.textColor = HexRGB(0x999999);
+    label.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium];
+    [view addSubview:label];
+    label.textAlignment = NSTextAlignmentLeft;
+    NSString *titleStr = self.sourceIndexArray[section];
+    label.text = titleStr;
+    return view;
+}
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return CGFLOAT_MIN;
+}
+
+/**
+ 设置没有数据时的显示
+ 
+ @param promptString 提示语
+ @param imgName 图片名称
+ @param view 显示在什么地方
+ */
+- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName inView:(UIView *)view {
+    if (self.promptView != nil) {
+        [self.promptView removeFromSuperview];
+    }
+    else {
+        self.promptView = [[StateView alloc]init];
+        self.promptView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 300);
+    }
+    _promptPlaceView = view;
+    //当请求不到数据时 ,自定义提示view 将会出现;
+    self.promptView.imageName = imgName;
+    self.promptView.alpha = 0.0f;
+    [self.promptView setText:promptString];
+    [view addSubview:self.promptView];
+}
+
+// 结束刷新后调用方法
+- (void)changePromptLabelStateWithArray:(NSMutableArray *)array {
+    NSInteger count;
+    if (array.count) {
+        count = array.count;
+    } else {
+        count = 0;
+    }
+    
+    [UIView animateWithDuration:0.1 animations:^{
+        [[self promptView] setAlpha:count ? 0.0f :1.0f ] ;
+        
+    }] ;
+    
+}
+
+- (BOOL)networkAvaiable {
+    return [self checkNetworkAvaiable];
+}
+
+- (BOOL)checkNetworkAvaiable {
+    BOOL isExistenceNetwork = YES;
+    Reachability *reach = [Reachability reachabilityWithHostName:@"www.apple.com"];
+    switch ([reach currentReachabilityStatus]) {
+        case NotReachable:
+            isExistenceNetwork = NO;
+            //NSLog(@"notReachable");
+            break;
+        case ReachableViaWiFi:
+            isExistenceNetwork = YES;
+            //NSLog(@"WIFI");
+            break;
+        case ReachableViaWWAN:
+            isExistenceNetwork = YES;
+            //NSLog(@"3G");
+            break;
+    }
+    return isExistenceNetwork;
+}
+
+- (NSMutableArray *)classArray {
+    if (!_classArray) {
+        _classArray = [NSMutableArray array];
+    }
+    return _classArray;
+}
+
+- (NSMutableArray *)studentArray {
+    if (!_studentArray) {
+        _studentArray = [NSMutableArray array];
+    }
+    return _studentArray;
+}
+- (NSMutableArray *)sourceIndexArray {
+    if (!_sourceIndexArray) {
+        _sourceIndexArray = [NSMutableArray array];
+    }
+    return _sourceIndexArray;
+}
+
+- (NSMutableArray *)sourceArray {
+    if (!_sourceArray) {
+        _sourceArray = [NSMutableArray array];
+    }
+    return _sourceArray;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end