Browse Source

分享点击进入

Steven 2 years ago
parent
commit
25557784f7
56 changed files with 1538 additions and 83 deletions
  1. 56 6
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 6 22
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 12 8
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  5. 6 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/Contents.json
  6. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/Contents.json
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/music_free@2x.png
  8. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/music_free@3x.png
  9. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/Contents.json
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/music_logo@2x.png
  11. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/music_logo@3x.png
  12. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/Contents.json
  13. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/music_order@2x.png
  14. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/music_order@3x.png
  15. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/Contents.json
  16. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/music_vip@2x.png
  17. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/music_vip@3x.png
  18. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/user_avatarRectangle.imageset/Contents.json
  19. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@2x.png
  20. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@3x.png
  21. 3 1
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m
  22. 9 5
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  23. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  24. 3 4
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSRCIMDataSource.m
  25. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch
  26. 7 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m
  27. 31 5
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m
  28. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m
  29. 4 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSSelectConversationViewController.m
  30. 28 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/FriendListModel.h
  31. 148 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/FriendListModel.m
  32. 25 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatLiveMessage.h
  33. 70 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatLiveMessage.m
  34. 31 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatMusicMessage.h
  35. 90 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Model/KSChatMusicMessage.m
  36. 3 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m
  37. 25 17
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatAddressBodyView.m
  38. 23 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ContractListCell.m
  39. 6 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ContractListCell.xib
  40. 17 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatLiveShareCell.h
  41. 90 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatLiveShareCell.m
  42. 16 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatMusicShareCell.h
  43. 74 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatMusicShareCell.m
  44. 20 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareLiveCellContentView.h
  45. 53 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareLiveCellContentView.m
  46. 203 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareLiveCellContentView.xib
  47. 20 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareMusicCellContentView.h
  48. 113 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareMusicCellContentView.m
  49. 159 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareMusicCellContentView.xib
  50. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/View/AccompanyCourseCell.m
  51. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/SeatContentView.m
  52. 34 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m
  53. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.h
  54. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.m
  55. 23 0
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib
  56. 7 4
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m

+ 56 - 6
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -637,6 +637,14 @@
 		BCB635AE27F6E06500ACFDCF /* LiveRoomHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB635AC27F6E06500ACFDCF /* LiveRoomHeadView.xib */; };
 		BCB635B227F6E1A600ACFDCF /* LiveRoomBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB635B027F6E1A600ACFDCF /* LiveRoomBottomView.m */; };
 		BCB635B327F6E1A600ACFDCF /* LiveRoomBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB635B127F6E1A600ACFDCF /* LiveRoomBottomView.xib */; };
+		BCB908E22850B07300F5FF69 /* KSChatMusicMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908DE2850B07300F5FF69 /* KSChatMusicMessage.m */; };
+		BCB908E32850B07300F5FF69 /* KSChatLiveMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908DF2850B07300F5FF69 /* KSChatLiveMessage.m */; };
+		BCB908EE2850B08D00F5FF69 /* ShareLiveCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908E42850B08C00F5FF69 /* ShareLiveCellContentView.m */; };
+		BCB908EF2850B08D00F5FF69 /* ShareMusicCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908E82850B08C00F5FF69 /* ShareMusicCellContentView.m */; };
+		BCB908F02850B08D00F5FF69 /* KSChatLiveShareCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908EA2850B08D00F5FF69 /* KSChatLiveShareCell.m */; };
+		BCB908F12850B08D00F5FF69 /* KSChatMusicShareCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB908EB2850B08D00F5FF69 /* KSChatMusicShareCell.m */; };
+		BCB908F22850B08D00F5FF69 /* ShareMusicCellContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908EC2850B08D00F5FF69 /* ShareMusicCellContentView.xib */; };
+		BCB908F32850B08D00F5FF69 /* ShareLiveCellContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB908ED2850B08D00F5FF69 /* ShareLiveCellContentView.xib */; };
 		BCBFDF3728110C660052AFE5 /* HomeNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBFDF3628110C660052AFE5 /* HomeNavView.m */; };
 		BCBFDF3928110C6F0052AFE5 /* HomeNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCBFDF3828110C6F0052AFE5 /* HomeNavView.xib */; };
 		BCBFDF3C281156430052AFE5 /* HomeBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBFDF3B281156430052AFE5 /* HomeBannerView.m */; };
@@ -650,6 +658,7 @@
 		BCBFDF5028115D9A0052AFE5 /* HomeIntroduceView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBFDF4F28115D9A0052AFE5 /* HomeIntroduceView.m */; };
 		BCBFDF5228115DA40052AFE5 /* HomeIntroduceView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCBFDF5128115DA40052AFE5 /* HomeIntroduceView.xib */; };
 		BCEBB8E82840B87100A76BE8 /* KSLiveChatroomMemberUp.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEBB8E72840B87100A76BE8 /* KSLiveChatroomMemberUp.m */; };
+		BCED5CA7284F55A0009A42DE /* FriendListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCED5CA6284F55A0009A42DE /* FriendListModel.m */; };
 		BCFE53E72812765600AD6786 /* HomeHotAlbumCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE53E52812765600AD6786 /* HomeHotAlbumCell.m */; };
 		BCFE53E82812765600AD6786 /* HomeHotAlbumCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCFE53E62812765600AD6786 /* HomeHotAlbumCell.xib */; };
 		BCFE53EC2812897600AD6786 /* HomeLiveCouseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE53EA2812897600AD6786 /* HomeLiveCouseCell.m */; };
@@ -1846,6 +1855,20 @@
 		BCB635AF27F6E1A600ACFDCF /* LiveRoomBottomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveRoomBottomView.h; sourceTree = "<group>"; };
 		BCB635B027F6E1A600ACFDCF /* LiveRoomBottomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveRoomBottomView.m; sourceTree = "<group>"; };
 		BCB635B127F6E1A600ACFDCF /* LiveRoomBottomView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LiveRoomBottomView.xib; sourceTree = "<group>"; };
+		BCB908DE2850B07300F5FF69 /* KSChatMusicMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSChatMusicMessage.m; sourceTree = "<group>"; };
+		BCB908DF2850B07300F5FF69 /* KSChatLiveMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSChatLiveMessage.m; sourceTree = "<group>"; };
+		BCB908E02850B07300F5FF69 /* KSChatMusicMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSChatMusicMessage.h; sourceTree = "<group>"; };
+		BCB908E12850B07300F5FF69 /* KSChatLiveMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSChatLiveMessage.h; sourceTree = "<group>"; };
+		BCB908E42850B08C00F5FF69 /* ShareLiveCellContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareLiveCellContentView.m; sourceTree = "<group>"; };
+		BCB908E52850B08C00F5FF69 /* ShareMusicCellContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareMusicCellContentView.h; sourceTree = "<group>"; };
+		BCB908E62850B08C00F5FF69 /* ShareLiveCellContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareLiveCellContentView.h; sourceTree = "<group>"; };
+		BCB908E72850B08C00F5FF69 /* KSChatLiveShareCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSChatLiveShareCell.h; sourceTree = "<group>"; };
+		BCB908E82850B08C00F5FF69 /* ShareMusicCellContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareMusicCellContentView.m; sourceTree = "<group>"; };
+		BCB908E92850B08C00F5FF69 /* KSChatMusicShareCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSChatMusicShareCell.h; sourceTree = "<group>"; };
+		BCB908EA2850B08D00F5FF69 /* KSChatLiveShareCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSChatLiveShareCell.m; sourceTree = "<group>"; };
+		BCB908EB2850B08D00F5FF69 /* KSChatMusicShareCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSChatMusicShareCell.m; sourceTree = "<group>"; };
+		BCB908EC2850B08D00F5FF69 /* ShareMusicCellContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShareMusicCellContentView.xib; sourceTree = "<group>"; };
+		BCB908ED2850B08D00F5FF69 /* ShareLiveCellContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShareLiveCellContentView.xib; sourceTree = "<group>"; };
 		BCBFDF3528110C660052AFE5 /* HomeNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeNavView.h; sourceTree = "<group>"; };
 		BCBFDF3628110C660052AFE5 /* HomeNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeNavView.m; sourceTree = "<group>"; };
 		BCBFDF3828110C6F0052AFE5 /* HomeNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeNavView.xib; sourceTree = "<group>"; };
@@ -1866,6 +1889,8 @@
 		BCBFDF5128115DA40052AFE5 /* HomeIntroduceView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeIntroduceView.xib; sourceTree = "<group>"; };
 		BCEBB8E62840B87100A76BE8 /* KSLiveChatroomMemberUp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveChatroomMemberUp.h; sourceTree = "<group>"; };
 		BCEBB8E72840B87100A76BE8 /* KSLiveChatroomMemberUp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveChatroomMemberUp.m; sourceTree = "<group>"; };
+		BCED5CA5284F55A0009A42DE /* FriendListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FriendListModel.h; sourceTree = "<group>"; };
+		BCED5CA6284F55A0009A42DE /* FriendListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FriendListModel.m; sourceTree = "<group>"; };
 		BCFE53E42812765600AD6786 /* HomeHotAlbumCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotAlbumCell.h; sourceTree = "<group>"; };
 		BCFE53E52812765600AD6786 /* HomeHotAlbumCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotAlbumCell.m; sourceTree = "<group>"; };
 		BCFE53E62812765600AD6786 /* HomeHotAlbumCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotAlbumCell.xib; sourceTree = "<group>"; };
@@ -2370,12 +2395,18 @@
 		275FA20127E7356B00CFEA2E /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				BCED5CA5284F55A0009A42DE /* FriendListModel.h */,
+				BCED5CA6284F55A0009A42DE /* FriendListModel.m */,
 				2723B5C927F157BA00E0B90B /* GroupListModel.h */,
 				2723B5C827F157B900E0B90B /* GroupListModel.m */,
 				2723B5CB27F157BD00E0B90B /* GroupMemberModel.h */,
 				2723B5CC27F157BE00E0B90B /* GroupMemberModel.m */,
 				2723B5C727F157B800E0B90B /* KSRCloudMediaManager.h */,
 				2723B5CA27F157BB00E0B90B /* KSRCloudMediaManager.m */,
+				BCB908E12850B07300F5FF69 /* KSChatLiveMessage.h */,
+				BCB908DF2850B07300F5FF69 /* KSChatLiveMessage.m */,
+				BCB908E02850B07300F5FF69 /* KSChatMusicMessage.h */,
+				BCB908DE2850B07300F5FF69 /* KSChatMusicMessage.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -2405,6 +2436,16 @@
 				2723B5B427F157AE00E0B90B /* KSChatListSearchView.xib */,
 				BC5082B2283345A10031DD0A /* KSChatListCell.h */,
 				BC5082B3283345A10031DD0A /* KSChatListCell.m */,
+				BCB908E72850B08C00F5FF69 /* KSChatLiveShareCell.h */,
+				BCB908EA2850B08D00F5FF69 /* KSChatLiveShareCell.m */,
+				BCB908E92850B08C00F5FF69 /* KSChatMusicShareCell.h */,
+				BCB908EB2850B08D00F5FF69 /* KSChatMusicShareCell.m */,
+				BCB908E62850B08C00F5FF69 /* ShareLiveCellContentView.h */,
+				BCB908E42850B08C00F5FF69 /* ShareLiveCellContentView.m */,
+				BCB908ED2850B08D00F5FF69 /* ShareLiveCellContentView.xib */,
+				BCB908E52850B08C00F5FF69 /* ShareMusicCellContentView.h */,
+				BCB908E82850B08C00F5FF69 /* ShareMusicCellContentView.m */,
+				BCB908EC2850B08D00F5FF69 /* ShareMusicCellContentView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -2471,8 +2512,8 @@
 		275FA20A27E7356B00CFEA2E /* Controller */ = {
 			isa = PBXGroup;
 			children = (
-				275FA20B27E7356B00CFEA2E /* ShopMallViewController.m */,
 				275FA20C27E7356B00CFEA2E /* ShopMallViewController.h */,
+				275FA20B27E7356B00CFEA2E /* ShopMallViewController.m */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -4383,14 +4424,14 @@
 		BCB6351F27F6D2A300ACFDCF /* Model */ = {
 			isa = PBXGroup;
 			children = (
-				BCB6352027F6D2A300ACFDCF /* Whiteboard.m */,
-				BCB6352127F6D2A300ACFDCF /* RoomMember.m */,
-				BCB6352227F6D2A300ACFDCF /* ClassSongMessage.m */,
-				BCB6352327F6D2A300ACFDCF /* Classroom.m */,
-				BCB6352427F6D2A300ACFDCF /* Whiteboard.h */,
 				BCB6352527F6D2A300ACFDCF /* Classroom.h */,
+				BCB6352327F6D2A300ACFDCF /* Classroom.m */,
 				BCB6352627F6D2A300ACFDCF /* ClassSongMessage.h */,
+				BCB6352227F6D2A300ACFDCF /* ClassSongMessage.m */,
 				BCB6352727F6D2A300ACFDCF /* RoomMember.h */,
+				BCB6352127F6D2A300ACFDCF /* RoomMember.m */,
+				BCB6352427F6D2A300ACFDCF /* Whiteboard.h */,
+				BCB6352027F6D2A300ACFDCF /* Whiteboard.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -4657,6 +4698,7 @@
 				275FA23D27E7356B00CFEA2E /* PasswordBodyView.xib in Resources */,
 				2723B66227F15CFC00E0B90B /* FeedbackBodyView.xib in Resources */,
 				BC5367C4283F6D58008428E8 /* HomeLiveCourseView.xib in Resources */,
+				BCB908F32850B08D00F5FF69 /* ShareLiveCellContentView.xib in Resources */,
 				2723B66527F15CFC00E0B90B /* ModifyBodyView.xib in Resources */,
 				BCB6353027F6D2A300ACFDCF /* SealClass.strings in Resources */,
 				BCB635AE27F6E06500ACFDCF /* LiveRoomHeadView.xib in Resources */,
@@ -4667,6 +4709,7 @@
 				BC8C2C5B2823F57100FBA5D5 /* AddressBottomView.xib in Resources */,
 				BC40BA202812552300DEC0D1 /* KSHomeButton.xib in Resources */,
 				BC7663162827E49900C91A1D /* NotiferHeadView.xib in Resources */,
+				BCB908F22850B08D00F5FF69 /* ShareMusicCellContentView.xib in Resources */,
 				2723B5C427F157B100E0B90B /* KSChatListSearchView.xib in Resources */,
 				BC8A459A283DC33400094BBB /* SubjectFinger.plist in Resources */,
 				2779359B27E324A80010E277 /* TZImagePickerController.bundle in Resources */,
@@ -4917,6 +4960,7 @@
 				2779352427E324A60010E277 /* KSUtilities.m in Sources */,
 				2779359627E324A80010E277 /* TZVideoCropController.m in Sources */,
 				277935AB27E324A80010E277 /* UIImage+MSSScale.m in Sources */,
+				BCB908E32850B07300F5FF69 /* KSChatLiveMessage.m in Sources */,
 				BCB6353127F6D2A300ACFDCF /* ZoomControl.m in Sources */,
 				2779353427E324A60010E277 /* UIImageView+CornerRadius.m in Sources */,
 				2779357827E324A70010E277 /* NSString+phone.m in Sources */,
@@ -4957,6 +5001,7 @@
 				275FA22E27E7356B00CFEA2E /* MineViewController.m in Sources */,
 				BC8A4597283DC33400094BBB /* CAudioUnit.m in Sources */,
 				2779354627E324A60010E277 /* UIView+Animation.m in Sources */,
+				BCB908EF2850B08D00F5FF69 /* ShareMusicCellContentView.m in Sources */,
 				2723B68327F15D3D00E0B90B /* ModifyViewController.m in Sources */,
 				2779356327E324A70010E277 /* HomeButton.m in Sources */,
 				2779358227E324A80010E277 /* NSDate+KSBaseDatePicker.m in Sources */,
@@ -4967,6 +5012,7 @@
 				BC8A45B0283DC33400094BBB /* CloudHelpView.m in Sources */,
 				2779358A27E324A80010E277 /* ArchiveTools.m in Sources */,
 				BC0A2268284471460065C1AB /* KSLiveUnBlockUser.m in Sources */,
+				BCB908F12850B08D00F5FF69 /* KSChatMusicShareCell.m in Sources */,
 				BC8A45AA283DC33400094BBB /* TrackChooseView.m in Sources */,
 				BC8A45B2283DC33400094BBB /* CloudFeedbackView.m in Sources */,
 				BCB6355A27F6D2A300ACFDCF /* KSRemoteUserManager.m in Sources */,
@@ -5148,6 +5194,7 @@
 				277935D427E324A90010E277 /* UIView+ALFrame.m in Sources */,
 				275FA23C27E7356B00CFEA2E /* VefiBodyView.m in Sources */,
 				2779358027E324A80010E277 /* sortButton.m in Sources */,
+				BCED5CA7284F55A0009A42DE /* FriendListModel.m in Sources */,
 				2779356027E324A70010E277 /* KSRecordStatusView.m in Sources */,
 				2723B62B27F157D500E0B90B /* ApplyMemberModel.m in Sources */,
 				BC40B9FE281177BD00DEC0D1 /* HomeInformationCell.m in Sources */,
@@ -5198,6 +5245,7 @@
 				BC27A06F280FF56C00F91E27 /* AccompanyStudentEvaCell.m in Sources */,
 				BCB6355727F6D2A300ACFDCF /* HTTPResult.m in Sources */,
 				BC0212FB27FC61D30040569F /* KSSegmentControl.m in Sources */,
+				BCB908E22850B07300F5FF69 /* KSChatMusicMessage.m in Sources */,
 				BC119223280ED6F500A716F7 /* AccompanyLessonModel.m in Sources */,
 				277935B227E324A90010E277 /* UIView+MSSLayout.m in Sources */,
 				275FA1E427E7351900CFEA2E /* KSWebNavView.m in Sources */,
@@ -5261,6 +5309,7 @@
 				275FA1DF27E7351900CFEA2E /* RCConnectionManager.m in Sources */,
 				275FA22B27E7356B00CFEA2E /* HomeViewController.m in Sources */,
 				BCFE53F12812898700AD6786 /* HomeVideoCourseCell.m in Sources */,
+				BCB908F02850B08D00F5FF69 /* KSChatLiveShareCell.m in Sources */,
 				277935C027E324A90010E277 /* FSCalendarTransitionCoordinator.m in Sources */,
 				2779355B27E324A70010E277 /* KSStatusView.m in Sources */,
 				2779355227E324A70010E277 /* VoMemoryCache.m in Sources */,
@@ -5377,6 +5426,7 @@
 				2779353627E324A60010E277 /* CALayer+Layout.m in Sources */,
 				BC40BA1828124D3D00DEC0D1 /* NotiferMessageViewController.m in Sources */,
 				275FA22D27E7356B00CFEA2E /* ChatViewController.m in Sources */,
+				BCB908EE2850B08D00F5FF69 /* ShareLiveCellContentView.m in Sources */,
 				BCB6354127F6D2A300ACFDCF /* VideoListCell.m in Sources */,
 				2723B5A427F1578300E0B90B /* KSChatConversationViewController.m in Sources */,
 				BC8A45A2283DC33400094BBB /* SettingPageView.m in Sources */,

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 22
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -78,8 +78,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "551"
-            endingLineNumber = "551"
+            startingLineNumber = "555"
+            endingLineNumber = "555"
             landmarkName = "-refreshUrl:"
             landmarkType = "7">
          </BreakpointContent>
@@ -94,8 +94,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "544"
-            endingLineNumber = "544"
+            startingLineNumber = "548"
+            endingLineNumber = "548"
             landmarkName = "-refreshUrl:"
             landmarkType = "7">
          </BreakpointContent>
@@ -110,8 +110,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "344"
-            endingLineNumber = "344"
+            startingLineNumber = "345"
+            endingLineNumber = "345"
             landmarkName = "-handleScriptMessageSource:"
             landmarkType = "7">
          </BreakpointContent>
@@ -149,22 +149,6 @@
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "D5E3B422-122A-4823-9B39-37B001FCDAC9"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "181"
-            endingLineNumber = "181"
-            landmarkName = "-updateUI:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
          <BreakpointContent
             uuid = "EBB87FB0-8EEB-4CB8-96AB-84A8BBE18213"

+ 12 - 8
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -169,7 +169,7 @@
 }
 
 - (void)configUM {
-    [UMConfigure initWithAppkey:@"5e6f6458978eea0774044b88" channel:@"App Store"];
+    [UMConfigure initWithAppkey:@"62a2a806eae04539a8e253ed" channel:@"App Store"];
 }
 
 - (void)versionCheck {
@@ -273,6 +273,8 @@
     
     //开启用户信息和群组信息的持久化
     [RCIM sharedRCIM].enablePersistentUserInfoCache = YES;
+    // 在发送的所有消息中携带当前登录的用户信息
+    [RCIM sharedRCIM].enableMessageAttachUserInfo = YES;
     // 关闭所有提示音
     RCKitConfigCenter.message.disableMessageAlertSound = YES;
     
@@ -282,7 +284,9 @@
     // 左右上角按钮颜色
     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 +428,11 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     if (message.conversationType == ConversationType_CHATROOM) { // 聊天室类型为直播
         [[KSIMService sharedService] ksOnReceivedChatroom:message left:left object:@""];
     }
-    if (![message.targetId containsString:@"S"] && ![message.targetId containsString:@"DAYA"] && ![message.targetId containsString:@"I"]) {
+    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 +455,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             }
         });
     }
-    // 小班课视频聊天
-    else {
-        [[RCIMClient sharedRCIMClient] clearMessagesUnreadStatus:ConversationType_GROUP targetId:message.targetId];
-        [[KSIMService sharedService] ksOnReceived:message left:left object:@""];
-    }
+    
 }
 
 

+ 6 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/Contents.json

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

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/music_free@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_free.imageset/music_free@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/music_logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_logo.imageset/music_logo@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/music_order@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_order.imageset/music_order@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/music_vip@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Share/music_vip.imageset/music_vip@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/user_avatarRectangle.imageset/user_avatarRectangle@3x.png


+ 3 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m

@@ -193,7 +193,9 @@
     }
     
     [self.view addSubview:self.viewContainer];
-    self.viewContainer.frame = CGRectMake(0, 0, kScreenWidth, kScreen_Height);
+    [self.viewContainer mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.view);
+    }];
     
     if (self.myWebView == nil) {
         

+ 9 - 5
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -20,6 +20,7 @@
 #import "KSChatConversationViewController.h"
 #import "KSOrderManager.h"
 #import "AddressListViewController.h"
+#import "KSEnterLiveroomManager.h"
 
 @interface KSBaseWKWebViewController ()
 
@@ -450,11 +451,14 @@
         }];
         [self.navigationController pushViewController:ctrl animated:YES];
     }
-//    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"enterLiveRoom"]) { // 进入直播间
-//        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-//        NSString *roomId = [valueDic stringValueForKey:@"roomId"];
-//        [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController];
-//    }
+    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 {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -877,7 +877,7 @@
 /// @param faliure 失败
 + (void)LiveroomQuit:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
-    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/api-student/liveRoom/syncUserStatus"];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/liveRoom/syncUserStatus"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:@"iOS" forKey:@"os"];
     [parm setValue:@"3" forKey:@"status"];

+ 3 - 4
KulexiuForStudent/KulexiuForStudent/Common/Base/KSRCIMDataSource.m

@@ -64,7 +64,6 @@
     } faliure:^(NSError * _Nonnull error) {
         resultBlock(nil);
     }];
-    
 }
 
 #pragma mark -- userInfo
@@ -80,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 {

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch

@@ -119,7 +119,7 @@ shouldPrevent = NO; \
 #define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
 #define WEBHOST (@"https://dev.colexiu.com/student")
 //#define WEBHOST (@"http://192.168.3.120:5000")
-#define SOCKET_URL (@"wss://mteadev.colexiu.com/audioAnalysis")
+#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)
 #define RCIM_KEY (@"0vnjpoad0jbdz")
 #define SUBMIT_UUID (NO)

+ 7 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m

@@ -95,6 +95,13 @@
 - (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 {

+ 31 - 5
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m

@@ -18,6 +18,14 @@
 #import "GroupMemberModel.h"
 #define SHARE_MUSIC_TAG (2001)
 
+#import "KSChatLiveMessage.h"
+#import "KSChatLiveShareCell.h"
+#import "KSChatMusicShareCell.h"
+#import "KSChatMusicMessage.h"
+
+#import "KSEnterLiveroomManager.h"
+#import "KSAccompanyWebViewController.h"
+
 @interface RCNaviDataInfo : NSObject
 
 @property (nonatomic, assign) NSTimeInterval uploadVideoDurationLimit;
@@ -83,10 +91,12 @@
         
         
         UIImage *homeworkEnter = [UIImage imageNamed:@"share_music"];
-        [pluginBoardView insertItem:homeworkEnter highlightedImage:homeworkEnter title:@"曲谱" atIndex:4 tag:SHARE_MUSIC_TAG];
+//        [pluginBoardView insertItem:homeworkEnter highlightedImage:homeworkEnter title:@"曲谱" atIndex:4 tag:SHARE_MUSIC_TAG];
     }
     
     // 注册自定义消息
+    [self registerClass:[KSChatLiveShareCell class] forMessageClass:[KSChatLiveMessage class]];
+    [self registerClass:[KSChatMusicShareCell class] forMessageClass:[KSChatMusicMessage class]];
     
     [self leftRightButton];
     [self refreshUserInfoOrGroupInfo];
@@ -187,9 +197,26 @@
 #pragma mark override
 // 点击消息的处理
 - (void)didTapMessageCell:(RCMessageModel *)model {
-    
+    if ([model.objectName isEqualToString:@"RC:CHATSHARE:LIVE"]) { // 直播消息
+        KSChatLiveMessage *liveShareMsg = (KSChatLiveMessage *)model.content;
+        [KSEnterLiveroomManager joinLiveWithRoomId:liveShareMsg.roomUID inController:(CustomNavViewController *)self.navigationController callback:^{
+            
+        }];
+    }
+    else if ([model.objectName isEqualToString:@"RC:CHATSHARE:MUSIC"]) { // 曲谱消息
+        KSChatMusicMessage *musicShareMsg = (KSChatMusicMessage *)model.content;
+        KSAccompanyWebViewController *detailCtrl = [[KSAccompanyWebViewController alloc] init];
+        detailCtrl.url = [NSString stringWithFormat:@"%@//accompany?id=%@",WEBHOST, musicShareMsg.songId];
+        detailCtrl.hiddenNavBar = YES;
+        detailCtrl.parmDic = @{@"isOpenLight" : @(YES), @"orientation" : @(1),@"isHideTitle" : @(YES)};
+        [self.navigationController pushViewController:detailCtrl animated:YES];
+    }
+    else {
+        [super didTapMessageCell:model];
+    }
 }
 
+
 - (void)playVideoWithUrl:(NSString *)fileUrl {
     fileUrl = [fileUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     _playerFrame = CGRectMake(0, iPhoneXSafeTopMargin, kScreenWidth, kScreenHeight - iPhoneXSafeTopMargin - iPhoneXSafeBottomMargin);
@@ -288,9 +315,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];
                 }

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m

@@ -133,11 +133,11 @@
 - (NSMutableArray *)willReloadTableData:(NSMutableArray *)dataSource {
     NSMutableArray *array = [NSMutableArray array];
     for (RCConversationModel *model in dataSource) {
-        if (![model.targetId containsString:@"S"] && ![model.targetId containsString:@"DAYA"] && ![model.targetId containsString:@"I"]) {
-            [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];
+            [array addObject:model];
         }
     }
     dispatch_async(dispatch_get_main_queue(), ^{

+ 4 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSSelectConversationViewController.m

@@ -52,7 +52,10 @@ typedef void (^CompleteBlock)(NSArray *conversationList);
     NSMutableArray *listArray = [NSMutableArray array];
     NSArray *conversationArray = [[RCIMClient sharedRCIMClient] getConversationList:@[ @(ConversationType_PRIVATE), @(ConversationType_GROUP)]];
     for (RCConversation *conversation in conversationArray) {
-        if (![conversation.targetId containsString:@"S"] && ![conversation.targetId containsString:@"DAYA"] && ![conversation.targetId containsString:@"I"]) {
+        if (conversation.conversationType == ConversationType_GROUP && ![conversation.targetId containsString:@"FAN"] && ![conversation.targetId containsString:@"LIVE"]) { // 视频聊天群不添加
+            
+        }
+        else {
             [listArray addObject:conversation];
         }
     }

+ 28 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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

+ 3 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Search/Controller/KSSearchHistoryMessageController.m

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

+ 25 - 17
KulexiuForStudent/KulexiuForStudent/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];

+ 23 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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="U0E-W5-93f"/>
+                <outlet property="friendName" destination="8fl-pa-IHx" id="ADl-id-NuZ"/>
+            </connections>
             <point key="canvasLocation" x="178.2608695652174" y="95.424107142857139"/>
         </tableViewCell>
     </objects>

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatLiveShareCell.h

@@ -0,0 +1,17 @@
+//
+//  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

+ 90 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatLiveShareCell.m

@@ -0,0 +1,90 @@
+//
+//  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];
+        UITapGestureRecognizer *tap =
+            [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapMessageContentView)];
+        tap.numberOfTapsRequired = 1;
+        tap.numberOfTouchesRequired = 1;
+        [_liveContentView addGestureRecognizer:tap];
+        _liveContentView.userInteractionEnabled = YES;
+    }
+    return _liveContentView;
+}
+
+- (void)didTapMessageContentView{
+    if (self.delegate && [self.delegate respondsToSelector:@selector(didTapMessageCell:)]) {
+        [self.delegate didTapMessageCell:self.model];
+    }
+}
+
+- (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
KulexiuForStudent/KulexiuForStudent/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

+ 74 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/KSChatMusicShareCell.m

@@ -0,0 +1,74 @@
+//
+//  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];
+        UITapGestureRecognizer *tap =
+            [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapMessageContentView)];
+        tap.numberOfTapsRequired = 1;
+        tap.numberOfTouchesRequired = 1;
+        [_musicContentView addGestureRecognizer:tap];
+        _musicContentView.userInteractionEnabled = YES;
+    }
+    return _musicContentView;
+}
+
+- (void)didTapMessageContentView{
+    if (self.delegate && [self.delegate respondsToSelector:@selector(didTapMessageCell:)]) {
+        [self.delegate didTapMessageCell:self.model];
+    }
+}
+
+- (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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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

+ 203 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareLiveCellContentView.xib

@@ -0,0 +1,203 @@
+<?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="88" 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="q2Q-aP-HCM" secondAttribute="trailing" constant="12" id="AGB-7W-6s4"/>
+                        <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 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="gSu-yX-K9X">
+                    <rect key="frame" x="14" y="0.0" width="44" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="44" id="0EV-n1-hvY"/>
+                        <constraint firstAttribute="height" constant="44" id="T7L-RF-8bB"/>
+                    </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="gSu-yX-K9X" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="7t6-aT-d6Z"/>
+                <constraint firstItem="yd2-ur-hRq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="K8Q-lg-bH5"/>
+                <constraint firstItem="yd2-ur-hRq" firstAttribute="leading" secondItem="gSu-yX-K9X" secondAttribute="trailing" constant="30" id="jfK-m2-EUj"/>
+                <constraint firstItem="gSu-yX-K9X" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="mo9-mn-GBo"/>
+                <constraint firstAttribute="bottom" secondItem="yd2-ur-hRq" secondAttribute="bottom" id="uhj-Y8-HNb"/>
+            </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="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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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

+ 159 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ShareMusicCellContentView.xib

@@ -0,0 +1,159 @@
+<?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="88" 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" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <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="P84-NW-Sav">
+                    <rect key="frame" x="14" y="0.0" width="44" height="44"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="44" id="XPk-Kv-NCK"/>
+                        <constraint firstAttribute="height" constant="44" id="vqV-sI-xZc"/>
+                    </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="UDH-9B-8f6" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="OJt-lz-uN2"/>
+                <constraint firstItem="P84-NW-Sav" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="YBF-NS-EjE"/>
+                <constraint firstAttribute="bottom" secondItem="UDH-9B-8f6" secondAttribute="bottom" id="iQY-mQ-cgC"/>
+                <constraint firstItem="UDH-9B-8f6" firstAttribute="leading" secondItem="P84-NW-Sav" secondAttribute="trailing" constant="30" id="jlg-BL-151"/>
+                <constraint firstItem="P84-NW-Sav" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="xEF-rR-LNy"/>
+            </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="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>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/View/AccompanyCourseCell.m

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

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/View/SeatContentView.m

@@ -101,7 +101,7 @@
     [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:userId success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.nameLabel.text = [result stringValueForKey:@"nickname"];
+            self.nameLabel.text = [result stringValueForKey:@"friendNickname"];
         }
         else {
             self.nameLabel.text = @"连麦用户";

+ 34 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/SettingViewController.m

@@ -11,6 +11,11 @@
 #import "FeedbackViewController.h"
 #import "AboutUsViewController.h"
 #import "AddressListViewController.h"
+#import "RCConnectionManager.h"
+#import "LoginViewController.h"
+#import "AppDelegate.h"
+#import "CustomNavViewController.h"
+#import "JPUSHService.h"
 
 @interface SettingViewController ()
 
@@ -81,12 +86,41 @@
             [self.navigationController pushViewController:aboutUs animated:YES];
         }
             break;
+        case SETTINGACTION_LOGOUT:
+        {
+            [self logoutAction];
+        }
         default:
             break;
     }
 }
 
+- (void)logoutAction {
+    [KSNetworkingManager logoutRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        [self clearSource];
+    } faliure:^(NSError * _Nonnull error) {
+        [self clearSource];
+    }];
+}
 
+- (void)clearSource {
+    [RCConnectionManager shareManager].isNeedJoin = NO;
+    [RCConnectionManager shareManager].isNeedShowMessage = NO;
+    [[RCIM sharedRCIM] logout];
+    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
+    // 取消推送别名
+    [JPUSHService deleteAlias:nil seq:0];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:TokenKey];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:Token_type];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RefreshToken];
+    [[NSUserDefaults standardUserDefaults] removeObjectForKey:RongTokenKey];
+    [[NSUserDefaults standardUserDefaults] synchronize];
+    [KSNetworkingManager clearRequestHeader];
+    LoginViewController *loginVC = [[LoginViewController alloc] init];
+    CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:loginVC];
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    appDelegate.window.rootViewController = navCtrl;
+}
 /*
 #pragma mark - Navigation
 

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.h

@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, SETTINGACTION) {
     SETTINGACTION_PRIVACY,  // 隐私
     SETTINGACTION_FEEEDBACK, // 反馈
     SETTINGACTION_ABOUTUS,  // 关于我们
+    SETTINGACTION_LOGOUT,   // 退出
 };
 
 typedef void(^SettingCallback)(SETTINGACTION type);

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.m

@@ -47,6 +47,11 @@
     [self.switchButton setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
 }
 
+- (IBAction)logoutAction:(id)sender {
+    if (self.callback) {
+        self.callback(SETTINGACTION_LOGOUT);
+    }
+}
 /*
  // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 23 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib

@@ -275,12 +275,35 @@
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
                 </view>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6YJ-Ux-PMN">
+                    <rect key="frame" x="14" y="826" width="386" height="50"/>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="50" id="mN9-Qe-gqX"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <state key="normal" title="退出登录">
+                        <color key="titleColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </state>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="logoutAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="cSa-5v-igG"/>
+                    </connections>
+                </button>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="5n4-bb-LbN"/>
                 <constraint firstAttribute="trailing" secondItem="bvI-vo-wNV" secondAttribute="trailing" constant="14" id="7ac-ck-hbr"/>
+                <constraint firstAttribute="trailing" secondItem="6YJ-Ux-PMN" secondAttribute="trailing" constant="14" id="HgM-Qa-LP6"/>
                 <constraint firstItem="bvI-vo-wNV" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="QbZ-et-vlc"/>
+                <constraint firstAttribute="bottom" secondItem="6YJ-Ux-PMN" secondAttribute="bottom" constant="20" id="ee5-re-JQh"/>
+                <constraint firstItem="6YJ-Ux-PMN" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="tjy-fb-nU4"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>

+ 7 - 4
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m

@@ -25,18 +25,21 @@
     NSString *display = dic[@"display"];
     
     [room updateDisplayUri:display];
-    NSArray *memberArray = dic[@"members"];
+    NSArray *memberArray = dic[@"roomMemberList"];
     NSMutableArray *memberList = [[NSMutableArray alloc] init];
     for (NSDictionary *memberDic in memberArray) {
-        RoomMember *member = [RoomMember memberFromJson:memberDic];
+        NSMutableDictionary *memDic = [NSMutableDictionary dictionaryWithDictionary:memberDic];
+        [memberDic setValue:[dic dictionaryValueForKey:@"midiJson"] forKey:@"playMidiJson"];
+        RoomMember *member = [RoomMember memberFromJson:memDic];
         [memberList addObject:member];
     }
     room.memberList = memberList;
-    NSDictionary *userDic = dic[@"userInfo"];
+    NSDictionary *userDic = [dic dictionaryValueForKey:@"roomMember"];
     RoomMember *currentMember = [RoomMember memberFromJson:userDic];
     room.currentMemberId = currentMember.userId;
     room.joinTime = currentMember.joinTime;
-    room.autoCloseFlag = [dic[@"autoCloseFlag"] boolValue];
+//    room.autoCloseFlag = [dic[@"autoCloseFlag"] boolValue];
+    room.autoCloseFlag = YES;
     room.autoCloseNetworkRoomTime = [dic[@"autoCloseNetworkRoomTime"] integerValue];
     room.soundVolume = [dic[@"soundVolume"] integerValue];
     return room;