Browse Source

启动图

Steven 3 years ago
parent
commit
c3b83c30bd
59 changed files with 861 additions and 1842 deletions
  1. 29 37
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 26 74
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 10 2
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  5. 6 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/Contents.json
  6. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/Contents.json
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/launch_image@2x.png
  8. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/launch_image@3x.png
  9. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/Contents.json
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/launch_logo@2x.png
  11. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/launch_logo@3x.png
  12. 34 5
      KulexiuForStudent/KulexiuForStudent/Base.lproj/LaunchScreen.storyboard
  13. 4 6
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  14. 75 2
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  15. 121 3
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  16. 18 2
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSOrderManager.m
  17. 5 5
      KulexiuForStudent/KulexiuForStudent/Common/Base/RCConnectionManager.m
  18. 4 3
      KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch
  19. 1 1
      KulexiuForStudent/KulexiuForStudent/KulexiuForStudent.entitlements
  20. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Search/View/KSSearchResultViewCell.m
  21. 10 13
      KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m
  22. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Classroom/Model/OnlineClassManager.h
  23. 97 0
      KulexiuForStudent/KulexiuForStudent/Module/Classroom/Model/OnlineClassManager.m
  24. 12 2
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  25. 4 3
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  26. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m
  27. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/KSNewsAlert.m
  28. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.h
  29. 8 2
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m
  30. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h
  31. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m
  32. 20 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.h
  33. 38 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.m
  34. 20 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.h
  35. 38 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m
  36. 20 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.h
  37. 39 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.m
  38. 1 5
      KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m
  39. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/InstrumentChooseViewController.m
  40. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m
  41. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib
  42. 1 3
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/MessageManager/MessageDataSource.m
  43. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/MainContainer/EmptyView.m
  44. 0 42
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListCell.h
  45. 0 217
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListCell.m
  46. 0 30
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListSectionView.h
  47. 0 254
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListSectionView.m
  48. 0 29
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListView.h
  49. 0 378
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListView.m
  50. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/RecentShared/RecentSharedView.m
  51. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Title/ClassroomTitleView.m
  52. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/ToolPanel/ToolPanelView.m
  53. 0 12
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/VideoList/VideoListCell.m
  54. 4 6
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomDefine.h
  55. 10 47
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.h
  56. 134 634
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m
  57. 0 1
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.h
  58. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m
  59. 0 6
      KulexiuForStudent/KulexiuForStudent/Module/SealClass/Util/Portrait/RolePortraitView.m

+ 29 - 37
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -358,6 +358,8 @@
 		BC0212FB27FC61D30040569F /* KSSegmentControl.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0212FA27FC61D30040569F /* KSSegmentControl.m */; };
 		BC0212FE27FC66AA0040569F /* InstrumentMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0212FD27FC66AA0040569F /* InstrumentMessageModel.m */; };
 		BC02130127FC6ADD0040569F /* UIView+SubViewExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = BC02130027FC6ADD0040569F /* UIView+SubViewExtension.m */; };
+		BC0A2265284471300065C1AB /* KSLiveBlockUser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0A2264284471300065C1AB /* KSLiveBlockUser.m */; };
+		BC0A2268284471460065C1AB /* KSLiveUnBlockUser.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0A2267284471460065C1AB /* KSLiveUnBlockUser.m */; };
 		BC0D1F6D281013DF00C5D9E5 /* MyVideoCourseBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0D1F6C281013DF00C5D9E5 /* MyVideoCourseBodyView.m */; };
 		BC0D1F71281015B000C5D9E5 /* VideoCourseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0D1F6E281015AF00C5D9E5 /* VideoCourseCell.m */; };
 		BC0D1F72281015B000C5D9E5 /* VideoCourseCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC0D1F6F281015AF00C5D9E5 /* VideoCourseCell.xib */; };
@@ -574,9 +576,6 @@
 		BCB6354427F6D2A300ACFDCF /* RecentSharedView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634BD27F6D2A300ACFDCF /* RecentSharedView.m */; };
 		BCB6354527F6D2A300ACFDCF /* RecentSharedVideoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634BE27F6D2A300ACFDCF /* RecentSharedVideoCell.m */; };
 		BCB6354627F6D2A300ACFDCF /* UpgradeDidApplyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634C327F6D2A300ACFDCF /* UpgradeDidApplyView.m */; };
-		BCB6354727F6D2A300ACFDCF /* PersonListView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634C627F6D2A300ACFDCF /* PersonListView.m */; };
-		BCB6354827F6D2A300ACFDCF /* PersonListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634C727F6D2A300ACFDCF /* PersonListCell.m */; };
-		BCB6354927F6D2A300ACFDCF /* PersonListSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634CB27F6D2A300ACFDCF /* PersonListSectionView.m */; };
 		BCB6354A27F6D2A300ACFDCF /* ToolPanelView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634CD27F6D2A300ACFDCF /* ToolPanelView.m */; };
 		BCB6354B27F6D2A300ACFDCF /* MainContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634D027F6D2A300ACFDCF /* MainContainerView.m */; };
 		BCB6354C27F6D2A300ACFDCF /* VideoMaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB634D227F6D2A300ACFDCF /* VideoMaskView.m */; };
@@ -650,6 +649,7 @@
 		BCBFDF4D28115C7A0052AFE5 /* HomeHotCourseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCBFDF4C28115C7A0052AFE5 /* HomeHotCourseView.xib */; };
 		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 */; };
 		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 */; };
@@ -1350,6 +1350,10 @@
 		BC0212FD27FC66AA0040569F /* InstrumentMessageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstrumentMessageModel.m; sourceTree = "<group>"; };
 		BC0212FF27FC6ADD0040569F /* UIView+SubViewExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+SubViewExtension.h"; sourceTree = "<group>"; };
 		BC02130027FC6ADD0040569F /* UIView+SubViewExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+SubViewExtension.m"; sourceTree = "<group>"; };
+		BC0A2263284471300065C1AB /* KSLiveBlockUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveBlockUser.h; sourceTree = "<group>"; };
+		BC0A2264284471300065C1AB /* KSLiveBlockUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveBlockUser.m; sourceTree = "<group>"; };
+		BC0A2266284471460065C1AB /* KSLiveUnBlockUser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveUnBlockUser.h; sourceTree = "<group>"; };
+		BC0A2267284471460065C1AB /* KSLiveUnBlockUser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveUnBlockUser.m; sourceTree = "<group>"; };
 		BC0D1F6B281013DF00C5D9E5 /* MyVideoCourseBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyVideoCourseBodyView.h; sourceTree = "<group>"; };
 		BC0D1F6C281013DF00C5D9E5 /* MyVideoCourseBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyVideoCourseBodyView.m; sourceTree = "<group>"; };
 		BC0D1F6E281015AF00C5D9E5 /* VideoCourseCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoCourseCell.m; sourceTree = "<group>"; };
@@ -1722,12 +1726,6 @@
 		BCB634C127F6D2A300ACFDCF /* RecentSharedVideoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentSharedVideoCell.h; sourceTree = "<group>"; };
 		BCB634C327F6D2A300ACFDCF /* UpgradeDidApplyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UpgradeDidApplyView.m; sourceTree = "<group>"; };
 		BCB634C427F6D2A300ACFDCF /* UpgradeDidApplyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpgradeDidApplyView.h; sourceTree = "<group>"; };
-		BCB634C627F6D2A300ACFDCF /* PersonListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersonListView.m; sourceTree = "<group>"; };
-		BCB634C727F6D2A300ACFDCF /* PersonListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersonListCell.m; sourceTree = "<group>"; };
-		BCB634C827F6D2A300ACFDCF /* PersonListSectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersonListSectionView.h; sourceTree = "<group>"; };
-		BCB634C927F6D2A300ACFDCF /* PersonListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersonListView.h; sourceTree = "<group>"; };
-		BCB634CA27F6D2A300ACFDCF /* PersonListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersonListCell.h; sourceTree = "<group>"; };
-		BCB634CB27F6D2A300ACFDCF /* PersonListSectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersonListSectionView.m; sourceTree = "<group>"; };
 		BCB634CD27F6D2A300ACFDCF /* ToolPanelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToolPanelView.m; sourceTree = "<group>"; };
 		BCB634CE27F6D2A300ACFDCF /* ToolPanelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolPanelView.h; sourceTree = "<group>"; };
 		BCB634D027F6D2A300ACFDCF /* MainContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainContainerView.m; sourceTree = "<group>"; };
@@ -1866,6 +1864,8 @@
 		BCBFDF4E28115D9A0052AFE5 /* HomeIntroduceView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeIntroduceView.h; sourceTree = "<group>"; };
 		BCBFDF4F28115D9A0052AFE5 /* HomeIntroduceView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeIntroduceView.m; sourceTree = "<group>"; };
 		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>"; };
 		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>"; };
@@ -3939,6 +3939,8 @@
 				BCB6341D27F6D29500ACFDCF /* KSLiveChatroomLike.m */,
 				BCB6341027F6D29500ACFDCF /* KSLiveChatroomMemberCount.h */,
 				BCB6342027F6D29500ACFDCF /* KSLiveChatroomMemberCount.m */,
+				BCEBB8E62840B87100A76BE8 /* KSLiveChatroomMemberUp.h */,
+				BCEBB8E72840B87100A76BE8 /* KSLiveChatroomMemberUp.m */,
 				BCB6341427F6D29500ACFDCF /* KSLiveChatroomSeatApply.h */,
 				BCB6341C27F6D29500ACFDCF /* KSLiveChatroomSeatApply.m */,
 				BCB6341627F6D29500ACFDCF /* KSLiveChatroomSeatResponse.h */,
@@ -3949,6 +3951,10 @@
 				BCB6340D27F6D29500ACFDCF /* KSLiveChatroomWelcome.m */,
 				BCB6340C27F6D29500ACFDCF /* KSRCMessageModel.h */,
 				BCB6341A27F6D29500ACFDCF /* KSRCMessageModel.m */,
+				BC0A2263284471300065C1AB /* KSLiveBlockUser.h */,
+				BC0A2264284471300065C1AB /* KSLiveBlockUser.m */,
+				BC0A2266284471460065C1AB /* KSLiveUnBlockUser.h */,
+				BC0A2267284471460065C1AB /* KSLiveUnBlockUser.m */,
 			);
 			path = LiveRoomMessage;
 			sourceTree = "<group>";
@@ -4072,7 +4078,6 @@
 				BCB634B627F6D2A300ACFDCF /* VideoList */,
 				BCB634BB27F6D2A300ACFDCF /* RecentShared */,
 				BCB634C227F6D2A300ACFDCF /* UpgradeApply */,
-				BCB634C527F6D2A300ACFDCF /* PersonList */,
 				BCB634CC27F6D2A300ACFDCF /* ToolPanel */,
 				BCB634CF27F6D2A300ACFDCF /* MainContainer */,
 			);
@@ -4205,19 +4210,6 @@
 			path = UpgradeApply;
 			sourceTree = "<group>";
 		};
-		BCB634C527F6D2A300ACFDCF /* PersonList */ = {
-			isa = PBXGroup;
-			children = (
-				BCB634C627F6D2A300ACFDCF /* PersonListView.m */,
-				BCB634C727F6D2A300ACFDCF /* PersonListCell.m */,
-				BCB634C827F6D2A300ACFDCF /* PersonListSectionView.h */,
-				BCB634C927F6D2A300ACFDCF /* PersonListView.h */,
-				BCB634CA27F6D2A300ACFDCF /* PersonListCell.h */,
-				BCB634CB27F6D2A300ACFDCF /* PersonListSectionView.m */,
-			);
-			path = PersonList;
-			sourceTree = "<group>";
-		};
 		BCB634CC27F6D2A300ACFDCF /* ToolPanel */ = {
 			isa = PBXGroup;
 			children = (
@@ -4230,12 +4222,12 @@
 		BCB634CF27F6D2A300ACFDCF /* MainContainer */ = {
 			isa = PBXGroup;
 			children = (
-				BCB634D027F6D2A300ACFDCF /* MainContainerView.m */,
 				BCB634D127F6D2A300ACFDCF /* EmptyView.h */,
-				BCB634D227F6D2A300ACFDCF /* VideoMaskView.m */,
-				BCB634D327F6D2A300ACFDCF /* MainContainerView.h */,
 				BCB634D427F6D2A300ACFDCF /* EmptyView.m */,
+				BCB634D327F6D2A300ACFDCF /* MainContainerView.h */,
+				BCB634D027F6D2A300ACFDCF /* MainContainerView.m */,
 				BCB634D527F6D2A300ACFDCF /* VideoMaskView.h */,
+				BCB634D227F6D2A300ACFDCF /* VideoMaskView.m */,
 			);
 			path = MainContainer;
 			sourceTree = "<group>";
@@ -4339,10 +4331,10 @@
 			isa = PBXGroup;
 			children = (
 				BCB634FB27F6D2A300ACFDCF /* ClassroomService.h */,
+				BCB6352927F6D2A300ACFDCF /* ClassroomService.m */,
 				BCB634FC27F6D2A300ACFDCF /* Message */,
 				BCB6351F27F6D2A300ACFDCF /* Model */,
 				BCB6352827F6D2A300ACFDCF /* ClassroomDefine.h */,
-				BCB6352927F6D2A300ACFDCF /* ClassroomService.m */,
 			);
 			path = Classroom;
 			sourceTree = "<group>";
@@ -4443,12 +4435,12 @@
 		BCB6357727F6D2AB00ACFDCF /* Model */ = {
 			isa = PBXGroup;
 			children = (
-				BCB6357827F6D2AB00ACFDCF /* LocalRenderManager.h */,
-				BCB6357927F6D2AB00ACFDCF /* OnlineClassManager.m */,
 				BCB6357A27F6D2AB00ACFDCF /* ClassroomTimerManager.h */,
+				BCB6357D27F6D2AB00ACFDCF /* ClassroomTimerManager.m */,
+				BCB6357827F6D2AB00ACFDCF /* LocalRenderManager.h */,
 				BCB6357B27F6D2AB00ACFDCF /* LocalRenderManager.m */,
 				BCB6357C27F6D2AB00ACFDCF /* OnlineClassManager.h */,
-				BCB6357D27F6D2AB00ACFDCF /* ClassroomTimerManager.m */,
+				BCB6357927F6D2AB00ACFDCF /* OnlineClassManager.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -4458,8 +4450,8 @@
 			children = (
 				BCB6357F27F6D2AB00ACFDCF /* TipsView */,
 				BCB6358227F6D2AB00ACFDCF /* tick.wav */,
-				BCB6358327F6D2AB00ACFDCF /* VideoList */,
 				BCB6358A27F6D2AB00ACFDCF /* tock.wav */,
+				BCB6358327F6D2AB00ACFDCF /* VideoList */,
 				BCB6358B27F6D2AB00ACFDCF /* MainContainer */,
 				BCB6358E27F6D2AB00ACFDCF /* TitleView */,
 				BCB6359127F6D2AB00ACFDCF /* MainToolbar */,
@@ -4479,12 +4471,12 @@
 		BCB6358327F6D2AB00ACFDCF /* VideoList */ = {
 			isa = PBXGroup;
 			children = (
-				BCB6358427F6D2AB00ACFDCF /* ClassVideoListView.h */,
 				BCB6358527F6D2AB00ACFDCF /* ClassVideoListCell.h */,
-				BCB6358627F6D2AB00ACFDCF /* KSBeatView.h */,
+				BCB6358927F6D2AB00ACFDCF /* ClassVideoListCell.m */,
+				BCB6358427F6D2AB00ACFDCF /* ClassVideoListView.h */,
 				BCB6358727F6D2AB00ACFDCF /* ClassVideoListView.m */,
+				BCB6358627F6D2AB00ACFDCF /* KSBeatView.h */,
 				BCB6358827F6D2AB00ACFDCF /* KSBeatView.m */,
-				BCB6358927F6D2AB00ACFDCF /* ClassVideoListCell.m */,
 			);
 			path = VideoList;
 			sourceTree = "<group>";
@@ -4974,6 +4966,7 @@
 				275FA1DA27E7351900CFEA2E /* KSNetworkingManager.m in Sources */,
 				BC8A45B0283DC33400094BBB /* CloudHelpView.m in Sources */,
 				2779358A27E324A80010E277 /* ArchiveTools.m in Sources */,
+				BC0A2268284471460065C1AB /* KSLiveUnBlockUser.m in Sources */,
 				BC8A45AA283DC33400094BBB /* TrackChooseView.m in Sources */,
 				BC8A45B2283DC33400094BBB /* CloudFeedbackView.m in Sources */,
 				BCB6355A27F6D2A300ACFDCF /* KSRemoteUserManager.m in Sources */,
@@ -5183,7 +5176,6 @@
 				BC542E612840A60E00633781 /* UseBodyView.m in Sources */,
 				2779351D27E324A60010E277 /* NSString+zh_SafeAccess.m in Sources */,
 				BC8A45A6283DC33400094BBB /* ScoreAnimationView.m in Sources */,
-				BCB6354727F6D2A300ACFDCF /* PersonListView.m in Sources */,
 				2779351A27E324A60010E277 /* NSObject+AssociatedObject.m in Sources */,
 				BCB635A627F6D90600ACFDCF /* KSLiveEmptyView.m in Sources */,
 				2779359227E324A80010E277 /* WMPlayer.m in Sources */,
@@ -5196,6 +5188,7 @@
 				BC11928D280FB44300A716F7 /* HomeworkVideoView.m in Sources */,
 				277935A227E324A80010E277 /* TZLocationManager.m in Sources */,
 				2723B62827F157D500E0B90B /* KSSelectConversationViewController.m in Sources */,
+				BC0A2265284471300065C1AB /* KSLiveBlockUser.m in Sources */,
 				275FA1E827E7351900CFEA2E /* CustomNavViewController.m in Sources */,
 				BC8A45B5283DC33400094BBB /* EvaluateResultAlert.m in Sources */,
 				BCB6355B27F6D2A300ACFDCF /* ApplySpeechMessage.m in Sources */,
@@ -5298,6 +5291,7 @@
 				275FA23B27E7356B00CFEA2E /* PasswordBodyView.m in Sources */,
 				277935C527E324A90010E277 /* UIView+SDExtension.m in Sources */,
 				2779356E27E324A70010E277 /* UITextField_Toolbar.m in Sources */,
+				BCEBB8E82840B87100A76BE8 /* KSLiveChatroomMemberUp.m in Sources */,
 				277935B027E324A90010E277 /* MSSBrowseActionSheetCell.m in Sources */,
 				2779358827E324A80010E277 /* NSObject+Archiving.m in Sources */,
 				2779354427E324A60010E277 /* NSObject+AutoProperty.m in Sources */,
@@ -5351,7 +5345,6 @@
 				BC40BA0E28117B3B00DEC0D1 /* TYCyclePagerTransformLayout.m in Sources */,
 				277935C227E324A90010E277 /* QWdynamicModel.m in Sources */,
 				2779357E27E324A80010E277 /* KSInputView.m in Sources */,
-				BCB6354927F6D2A300ACFDCF /* PersonListSectionView.m in Sources */,
 				2723B63427F157D500E0B90B /* GroupApplyMemberCell.m in Sources */,
 				BC5082B4283345A10031DD0A /* KSChatListCell.m in Sources */,
 				BCB6345D27F6D29600ACFDCF /* KSLiveChatroomWelcome.m in Sources */,
@@ -5359,7 +5352,6 @@
 				2779359527E324A80010E277 /* TZVideoEditedPreviewController.m in Sources */,
 				2723B63127F157D500E0B90B /* GroupSettingBodyView.m in Sources */,
 				BC119290280FB46100A716F7 /* KSVideoHelper.m in Sources */,
-				BCB6354827F6D2A300ACFDCF /* PersonListCell.m in Sources */,
 				BCB6354A27F6D2A300ACFDCF /* ToolPanelView.m in Sources */,
 				2779358327E324A80010E277 /* LLPhotoBrowser.m in Sources */,
 				BCB6353B27F6D2A300ACFDCF /* MessageDataSource.m in Sources */,

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


+ 26 - 74
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -7,22 +7,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "0D94E6A1-589F-456F-AD71-224B39B9D934"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "16"
-            endingLineNumber = "16"
-            landmarkName = "+joinLiveWithRoomId:inController:callback:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "A811E03D-935E-4812-9BA4-F901FD668906"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -55,54 +39,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "4F6C61A9-D4D5-4F22-B8F3-ED812BE470A4"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "424"
-            endingLineNumber = "424"
-            landmarkName = "-handleScriptMessageSource:"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "4F6C61A9-D4D5-4F22-B8F3-ED812BE470A4 - e7532b659385b76e"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[KSBaseWKWebViewController handleScriptMessageSource:]"
-                  moduleName = "KulexiuForStudent"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "427"
-                  endingLineNumber = "427"
-                  offsetFromSymbolStart = "7908">
-               </Location>
-               <Location
-                  uuid = "4F6C61A9-D4D5-4F22-B8F3-ED812BE470A4 - e7532b659385b76e"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[KSBaseWKWebViewController handleScriptMessageSource:]"
-                  moduleName = "KulexiuForStudent"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "427"
-                  endingLineNumber = "427"
-                  offsetFromSymbolStart = "7924">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "9C309015-F943-43C8-AD3C-0A595D5701FD"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -126,8 +62,8 @@
             filePath = "KulexiuForStudent/Module/Home/Controller/HomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1231"
-            endingLineNumber = "1231"
+            startingLineNumber = "1232"
+            endingLineNumber = "1232"
             landmarkName = "-showNewsWithSource:"
             landmarkType = "7">
          </BreakpointContent>
@@ -142,8 +78,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "553"
-            endingLineNumber = "553"
+            startingLineNumber = "551"
+            endingLineNumber = "551"
             landmarkName = "-refreshUrl:"
             landmarkType = "7">
          </BreakpointContent>
@@ -158,8 +94,8 @@
             filePath = "KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "546"
-            endingLineNumber = "546"
+            startingLineNumber = "544"
+            endingLineNumber = "544"
             landmarkName = "-refreshUrl:"
             landmarkType = "7">
          </BreakpointContent>
@@ -190,8 +126,8 @@
             filePath = "KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "233"
-            endingLineNumber = "233"
+            startingLineNumber = "234"
+            endingLineNumber = "234"
             landmarkName = "-toDetailViewWithTypeString:"
             landmarkType = "7">
          </BreakpointContent>
@@ -206,8 +142,8 @@
             filePath = "KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "222"
-            endingLineNumber = "222"
+            startingLineNumber = "223"
+            endingLineNumber = "223"
             landmarkName = "-readMessage:baseCell:"
             landmarkType = "7">
          </BreakpointContent>
@@ -240,5 +176,21 @@
             stopOnStyle = "0">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D5A12861-F3EE-4ECA-BB55-23DFD4BA69AF"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Chat/Controller/KSChatListViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "135"
+            endingLineNumber = "135"
+            landmarkName = "-willReloadTableData:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 10 - 2
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -151,7 +151,7 @@
 }
 
 - (void)registerSDK {
-    [WXApi registerApp:@"wx149a928c415c137a" universalLink:@"https://dev.colexiu.com/studentApp/"];
+    [WXApi registerApp:@"wx97408cd22c879ff7" universalLink:@"https://dev.colexiu.com/studentApp/"];
 }
 
 - (void)appTrackActionAuth {
@@ -174,7 +174,7 @@
 
 - (void)versionCheck {
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        [KSUpdateManager ks_updateWithAPPID:@"1487057217" withBundleId:nil block:^(NSString * _Nonnull currentVersion, NSString * _Nonnull storeVersion, NSString * _Nonnull openUrl, BOOL isUpdate) {
+        [KSUpdateManager ks_updateWithAPPID:@"1626971695" withBundleId:nil block:^(NSString * _Nonnull currentVersion, NSString * _Nonnull storeVersion, NSString * _Nonnull openUrl, BOOL isUpdate) {
             if (isUpdate) {
                 
                 [KSNetworkingManager appVersionInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
@@ -648,6 +648,14 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     return YES;
 }
 
+- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
+//    if (![[UMSocialManager defaultManager] handleUniversalLink:userActivity options:nil]) {
+//        // 其他SDK的回调
+//        
+//    }
+    return YES;
+}
+
 #pragma mark  ---- lazying
 - (KSUpdateAlert *)alertView {
     if (!_alertView) {

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

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

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/launch_image@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_image.imageset/launch_image@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/launch_logo@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Launch/launch_logo.imageset/launch_logo@3x.png


+ 34 - 5
KulexiuForStudent/KulexiuForStudent/Base.lproj/LaunchScreen.storyboard

@@ -1,8 +1,11 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -11,10 +14,29 @@
             <objects>
                 <viewController id="01J-lp-oVM" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="DNM-9S-ntg">
+                                <rect key="frame" x="0.0" y="104" width="414" height="503"/>
+                            </imageView>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_logo" translatesAutoresizingMaskIntoConstraints="NO" id="cKD-qW-RwA">
+                                <rect key="frame" x="149.5" y="652" width="115" height="34"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="115" id="bfb-mC-dyi"/>
+                                    <constraint firstAttribute="height" constant="34" id="hnt-wp-JRF"/>
+                                </constraints>
+                            </imageView>
+                        </subviews>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="cKD-qW-RwA" firstAttribute="top" secondItem="DNM-9S-ntg" secondAttribute="bottom" constant="45" id="0eY-Uh-8Og"/>
+                            <constraint firstItem="DNM-9S-ntg" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="IOg-8l-ndm"/>
+                            <constraint firstItem="DNM-9S-ntg" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="60" id="ZNt-yc-bv8"/>
+                            <constraint firstItem="cKD-qW-RwA" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="gTR-81-OFR"/>
+                            <constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="DNM-9S-ntg" secondAttribute="trailing" id="zRC-iL-TV5"/>
+                        </constraints>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -22,4 +44,11 @@
             <point key="canvasLocation" x="53" y="375"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="launch_image" width="375" height="503"/>
+        <image name="launch_logo" width="115" height="34"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 4 - 6
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -414,16 +414,14 @@
     else if ([[parm stringValueForKey:@"api"] isEqualToString:@"paymentOrder"]) {
         NSDictionary *content = [parm dictionaryValueForKey:@"content"];
         NSString *channel = [content stringValueForKey:@"payChannel"];
-        if ([channel isEqualToString:@"alipay"]) {
+        if ([channel isEqualToString:@"ali_app"]) {
             NSString *infoMessage = [content stringValueForKey:@"payInfo"];
             [KSOrderManager dealWithAliSDK:infoMessage];
         }
-        else if ([channel isEqualToString:@"wx_lite"]) {
-            
+        else if ([channel isEqualToString:@"wx_app"]) {
+            NSString *infoMessage = [content stringValueForKey:@"payInfo"];
+            [KSOrderManager dealWithWXSDK:infoMessage];
         }
-        
-//        [KSOrderManager dealWithAliOrder:infoMessage];
-        
     }
     else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinChatGroup"]) {
         NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];

+ 75 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -179,11 +179,11 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  退出登录
  
- @param post 请求
+ @param get get请求
  @param success 成功
  @param faliure 失败
  */
-+ (void)logoutRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)logoutRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 #pragma mark ---- 验证码服务
 
@@ -647,6 +647,79 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param success 成功
 /// @param faliure 失败
 + (void)batchSetReadRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+
+
+#pragma mark ------ 网络教室相关改造
+// /room/join
+
+/// 加入网络教室
+/// @param post post
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomJoinRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/joinRoomFailure
+
+/// 加入网络教室失败回调
+/// @param post post
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)joinRoomFailureRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/leave
+
+/// 退出网络教室
+/// @param post post
+/// @param roomId roomID
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomLeaveRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/device/approve
+
+/// 学员同意打开,麦克风、摄像头等设备
+/// @param post post json
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP,EXAM_SONG,MUSIC_SHEET,ACCOMPANIMENT
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)deviceApprove:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/device/reject
+
+/// 学员同意打开,麦克风、摄像头等设备
+/// @param post post json
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP,EXAM_SONG,MUSIC_SHEET,ACCOMPANIMENT
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)deviceReject:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/musicSheetDownNotify
+
+/// 学员伴奏下载状态回调
+/// @param post post
+/// @param roomId roomId
+/// @param status 伴奏下载状态(1下载成功0下载中2下载失败)
+/// @param accompanimentId 伴奏编号
+/// @param success 成功
+/// @param faliure 失败
++ (void)musicSheetDownNotifyRequest:(NSString *)post roomId:(NSString *)roomId status:(NSString *)status accompanimentId:(NSString *)accompanimentId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /room/device/sync
+
+/// 设备状态同步
+/// @param post post
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP
+/// @param roomId roomId
+/// @param enable 是否开启
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomDeviceSync:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId enable:(BOOL)enable success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 121 - 3
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -546,15 +546,15 @@
 /**
  退出登录
  
- @param post 请求
+ @param get get请求
  @param success 成功
  @param faliure 失败
  */
-+ (void)logoutRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)logoutRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodForm];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-auth/exit"];
-    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 
 // /api-student/subject/subjectSelect
@@ -1298,4 +1298,122 @@
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/sysMessage/batchSetRead"];
     [self request:post andWithUrl:url and:nil success:success faliure:faliure];
 }
+
+#pragma mark ------ 网络教室相关改造
+// /room/join
+
+/// 加入网络教室
+/// @param post post
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomJoinRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/join"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+// /room/joinRoomFailure
+
+/// 加入网络教室失败回调
+/// @param post post
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)joinRoomFailureRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/joinRoomFailure"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /room/leave
+
+/// 退出网络教室
+/// @param post post
+/// @param roomId roomID
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomLeaveRequest:(NSString *)post roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/leave"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /room/device/approve
+
+/// 学员同意打开,麦克风、摄像头等设备
+/// @param post post json
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP,EXAM_SONG,MUSIC_SHEET,ACCOMPANIMENT
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)deviceApprove:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/device/approve"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:deviceType forKey:@"deviceType"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /room/device/reject
+
+/// 学员同意打开,麦克风、摄像头等设备
+/// @param post post json
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP,EXAM_SONG,MUSIC_SHEET,ACCOMPANIMENT
+/// @param roomId roomId
+/// @param success 成功
+/// @param faliure 失败
++ (void)deviceReject:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/device/reject"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:deviceType forKey:@"deviceType"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /room/musicSheetDownNotify
+
+/// 学员伴奏下载状态回调
+/// @param post post
+/// @param roomId roomId
+/// @param status 伴奏下载状态(1下载成功0下载中2下载失败)
+/// @param accompanimentId 伴奏编号
+/// @param success 成功
+/// @param faliure 失败
++ (void)musicSheetDownNotifyRequest:(NSString *)post roomId:(NSString *)roomId status:(NSString *)status accompanimentId:(NSString *)accompanimentId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/musicSheetDownNotify"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:status forKey:@"status"];
+    [parm setValue:accompanimentId forKey:@"accompanimentId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /room/device/sync
+
+/// 设备状态同步
+/// @param post post
+/// @param deviceType MICROPHONE,CAMERA,MUSIC_MODE,HAND_UP
+/// @param roomId roomId
+/// @param enable 是否开启
+/// @param success 成功
+/// @param faliure 失败
++ (void)roomDeviceSync:(NSString *)post deviceType:(NSString *)deviceType roomId:(NSString *)roomId enable:(BOOL)enable success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", SEALCLASSHOST, @"/room/device/sync"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomId forKey:@"roomId"];
+    [parm setValue:deviceType forKey:@"deviceType"];
+    [parm setValue:@(enable) forKey:@"enable"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 @end

+ 18 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/KSOrderManager.m

@@ -33,13 +33,24 @@
 }
 
 + (void)dealWithAliSDK:(NSString *)infoMessage {
+    if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"alipays://"]]) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"fail"];
+        return;
+    }
+    else {
+        [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"success"];
+    }
     NSString *appScheme = @"ColexiuStudent";
     [[AlipaySDK defaultService] payOrder:infoMessage fromScheme:appScheme callback:^(NSDictionary *resultDic) {
-            
+        
     }];
 }
 
 + (void)dealWithWXSDK:(NSString *)infoMessage {
+    if (![WXApi isWXAppInstalled]) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"fail"];
+        return;
+    }
     NSDictionary *infoDic = [self convertJsonStringToNSDictionary:infoMessage];
     PayReq *request = [[PayReq alloc] init];
     request.partnerId = [infoDic stringValueForKey:@"partnerid"];
@@ -49,7 +60,12 @@
     request.timeStamp = (UInt32)[infoDic integerValueForKey:@"timestamp"];
     request.sign = [infoDic stringValueForKey:@"sign"];
     [WXApi sendReq:request completion:^(BOOL success) {
-        
+        if (success) {
+            [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"success"];
+        }
+        else {
+            [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"fail"];
+        }
     }];
 }
 

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/Common/Base/RCConnectionManager.m

@@ -7,8 +7,8 @@
 //
 
 #import "RCConnectionManager.h"
-//#import "LoginHelper.h"
-//#import "ClassroomService.h"
+#import "LoginHelper.h"
+#import "ClassroomService.h"
 
 @interface RCConnectionManager ()
 
@@ -31,7 +31,7 @@
     _isNeedJoin = isNeedJoin;
     if (self.isConnected && isNeedJoin) {
         dispatch_main_async_safe(^{
-//            [[LoginHelper sharedInstance] joinRongRTCRoom];
+            [[LoginHelper sharedInstance] joinRongRTCRoom];
         });
     }
     else if (isNeedJoin && !self.isConnected) {
@@ -39,7 +39,7 @@
             NSString *tipsMessage = [NSString isEmptyString:UserDefault(RongTokenKey)] ? @"无IM token,请重新登录获取" : @"IM未能连接上,请检查您的网络";
             [MBProgressHUD ksShowMessage:tipsMessage];
             // 失败回调
-//            [[ClassroomService sharedService] joinRoomStatusNotify:NO];
+            [[ClassroomService sharedService] joinRoomFailerNotify];
         });
     }
 }
@@ -50,7 +50,7 @@
     _isConnected = isConnected;
     if (self.isNeedJoin && isConnected) {
         dispatch_main_async_safe(^{
-//            [[LoginHelper sharedInstance] joinRongRTCRoom];
+            [[LoginHelper sharedInstance] joinRongRTCRoom];
         });
     }
 }

+ 4 - 3
KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch

@@ -36,9 +36,10 @@
 #import "UIView+SubViewExtension.h"
 #import "NSObject+KSDateFormatter.h"
 
-// 加密使用 NSString+MD5
 #define DEALCALLBACKNOTICIFATION (@"DEALCALLBACKNOTICIFATION")
 
+// 加密使用 NSString+MD5
+
 #define DEFAULT_SALT (@"D5sIlPU2")
 #define APPSECRET (@"QuMCIKICAgIH0sCiAgICAicGxhdGZvcm0tZGV2IjogW10")
 
@@ -115,9 +116,9 @@ shouldPrevent = NO; \
 //#ifdef DEBUG
 
 #define hostURL (@"https://dev.colexiu.com")
-#define SEALCLASSHOST (@"https://dev.colexiu.com/api-im")
+#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
 #define WEBHOST (@"https://dev.colexiu.com/student")
-//#define WEBHOST (@"http://192.168.3.63:5000")
+//#define WEBHOST (@"http://192.168.3.120:5000")
 #define SOCKET_URL (@"wss://mteadev.colexiu.com/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)
 #define RCIM_KEY (@"0vnjpoad0jbdz")

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/KulexiuForStudent.entitlements

@@ -4,7 +4,7 @@
 <dict>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
-		<string>applinks:</string>
+		<string>applinks:dev.colexiu.com</string>
 	</array>
 	<key>com.apple.developer.icloud-container-identifiers</key>
 	<array>

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Search/View/KSSearchResultViewCell.m

@@ -27,7 +27,6 @@
         self.selectionStyle = UITableViewCellSelectionStyleNone;
         [self loadView];
     }
-
     return self;
 }
 

+ 10 - 13
KulexiuForStudent/KulexiuForStudent/Module/Classroom/Controller/NewClassRoomViewController.m

@@ -482,7 +482,7 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
     if(member.role != RoleAudience) {
         [self.videoListView reloadVideoList];
     }
-    if (member.role == RoleTeacher || member.role == RoleAssistant) {
+    if (member.role == RoleTeacher) {
         [self.tipsView showTipsMessage:[NSString stringWithFormat:@"老师%@已经进入教室", member.name] inView:self.view];
         if (_isPlay) {
             [self pause];
@@ -505,7 +505,7 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
     if(member.role != RoleAudience) {
         [self.videoListView reloadVideoList];
     }
-    if (member.role == RoleTeacher || member.role == RoleAssistant) {
+    if (member.role == RoleTeacher) {
         // 老师退出房间后,学生如果在节拍器播放时停止节拍器
         if (_isPlay) {
             [self pause];
@@ -700,27 +700,26 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
     }
 }
 
-//助教请求用户打开设备,助教关闭用户设备没有回调。
+// 请求用户打开设备,助教关闭用户设备没有回调。
 - (void)deviceDidInviteEnable:(DeviceType)type ticket:(NSString *)ticket {
-    NSLog(@"deviceDidInviteEnable devicetype:%@ ticket:%@ ",@(type),ticket);
+    NSLog(@"deviceDidInviteEnable devicetype:%@",@(type));
     if (type == DeviceTypeCamera) {
         self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"老师邀请你打开摄像头" leftTitle:@"拒绝" rightTitle:@"同意" cancel:^{
-            [[ClassroomService sharedService] rejectEnableDevice:ticket];
+            [[ClassroomService sharedService] rejectEnableDevice:type];
         } confirm:^{
-            [[ClassroomService sharedService] approveEnableDevice:ticket];
+            [[ClassroomService sharedService] approveEnableDevice:type];
         }];
     }else if (type == DeviceTypeMicrophone) {
         [self.tipsView showTipsMessage:@"老师开启了你的麦克风" inView:self.view];
-        [[ClassroomService sharedService] approveEnableDevice:ticket];
+        [[ClassroomService sharedService] approveEnableDevice:type];
     }
     else if (type == DeviceTypeExamSong) { // 接口自动处理同意
-//        [[ClassroomService sharedService] approveEnableDevice:ticket];
     }
     else if (type == DeviceTypeAccompany || type == DeviceTypeMusicScore) { // 伴奏接口自动处理成同意
-//        [[ClassroomService sharedService] approveEnableDevice:ticket];
+        
     }
     else {
-        [[ClassroomService sharedService] approveEnableDevice:ticket];
+        [[ClassroomService sharedService] approveEnableDevice:type];
     }
 }
 
@@ -1112,9 +1111,7 @@ typedef NS_ENUM(NSInteger, ACCOMPANYACTION) {
 - (void)didPublishStreams:(NSArray <RCRTCInputStream *>*)streams {
     
     NSString *displayUserId;
-    if (([ClassroomService sharedService].currentRoom.currentDisplayType == DisplayAssistant)) {
-        displayUserId = [ClassroomService sharedService].currentRoom.assistant.userId;
-    } else if (([ClassroomService sharedService].currentRoom.currentDisplayType == DisplayTeacher)) {
+    if (([ClassroomService sharedService].currentRoom.currentDisplayType == DisplayTeacher)) {
         displayUserId = [ClassroomService sharedService].currentRoom.teacher.userId;
     }
     else if ([ClassroomService sharedService].currentRoom.currentDisplayType == DisplayTypeStudent) {

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Classroom/Model/OnlineClassManager.h

@@ -7,11 +7,14 @@
 
 #import <Foundation/Foundation.h>
 #import "KSBaseViewController.h"
+#import "NewClassRoomViewController.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface OnlineClassManager : NSObject
 
+- (void)joinRoomWithId:(NSString *)roomId subjectName:(NSString *)subjectName classEndTime:(NSString *)classEndTime inViewController:(KSBaseViewController *)ctrl;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 97 - 0
KulexiuForStudent/KulexiuForStudent/Module/Classroom/Model/OnlineClassManager.m

@@ -6,7 +6,104 @@
 //
 
 #import "OnlineClassManager.h"
+#import "RCConnectionManager.h"
+#import "RTCService.h"
+#import "KSNormalAlertView.h"
+#import "ClassroomService.h"
+#import "NewClassRoomViewController.h"
+#import "LoginHelper.h"
+
+@interface OnlineClassManager ()<ClassroomHelperDelegate>
+
+@property (nonatomic, strong) NSString *roomId;
+// 防止循环引用
+@property (nonatomic, weak) KSBaseViewController *baseCtrl;
+
+@property (nonatomic, strong) NSString *subjectName;
+@property (nonatomic, strong) NSString *classEndTime;
+
+@end
 
 @implementation OnlineClassManager
 
+- (instancetype)init {
+    if (self = [super init]) {
+        [LoginHelper sharedInstance].delegate = self;
+    }
+    return self;
+}
+
+- (void)joinRoomWithId:(NSString *)roomId subjectName:(NSString *)subjectName classEndTime:(NSString *)classEndTime inViewController:(KSBaseViewController *)ctrl {
+    self.roomId = roomId;
+    self.subjectName = subjectName;
+    self.baseCtrl = ctrl;
+    self.classEndTime = classEndTime;
+    [self joinRoom];
+}
+
+- (void)joinRoom {
+    [self.baseCtrl showhud];
+    [self login:NO];
+}
+
+#pragma mark - ClassroomHelperDelegate
+- (void)classroomDidJoin:(Classroom *)classroom{
+    if ([self.baseCtrl.navigationController.topViewController isKindOfClass:[self.baseCtrl class]]) {
+        [self.baseCtrl removehub];
+        [RCConnectionManager shareManager].isNeedShowMessage = YES;
+        // 加入RTC成功反馈给后端
+        [self notiferIsSuccess:YES];
+        
+        [self pushToClassroom];
+    }
+}
+
+- (void)classroomDidJoinFailCode:(NSNumber *)code errorMessage:(nonnull NSString *)message {
+    [self.baseCtrl removehub];
+    NSString *tipsMessage = [NSString isEmptyString:message] ? [NSString stringWithFormat:@"加入房间失败,请重试.错误码:%@",code] : message;
+    [self notiferIsSuccess:NO];
+    [KSNormalAlertView ks_showAlertWithTitle:tipsMessage confirmTitle:@"确定" confirm:^{
+        
+    }];
+}
+
+// 加入RTC房间失败回调
+- (void)classroomDidJoinFailRTC:(NSNumber *)code {
+    [self.baseCtrl removehub];
+    [self notiferIsSuccess:NO];
+    NSString *tipsMessage = [NSString stringWithFormat:@"加入房间失败RTC:%@",code];
+    [KSNormalAlertView ks_showAlertWithTitle:tipsMessage confirmTitle:@"确定" confirm:^{
+        
+    }];
+}
+
+- (void)notiferIsSuccess:(BOOL)isSuccess {
+    if (isSuccess == NO) {
+        [[ClassroomService sharedService] joinRoomFailerNotify];
+    }
+    
+}
+
+- (void)classroomDidOverMaxUserCount {
+    [self.baseCtrl removehub];
+    [KSNormalAlertView ks_showAlertWithTitle:@"教室人数已满!" confirmTitle:@"确认" confirm:^{
+    }];
+}
+
+- (void)pushToClassroom {
+    // 已经到教室页面,不需要再次push
+    [RCConnectionManager shareManager].isNeedJoin = NO;
+    NewClassRoomViewController *vc = [[NewClassRoomViewController alloc] init];
+    vc.courseId = self.roomId;
+    vc.classEndTime = self.classEndTime;
+    vc.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self.baseCtrl presentViewController:vc animated:YES completion:nil];
+}
+
+- (void)login:(BOOL)isAudience {
+    NSString *roomId = [self.roomId stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+    NSString *userName = [UserDefault(NicknameKey) stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+    [[LoginHelper sharedInstance] login:roomId user:userName isAudience:isAudience];
+}
+
 @end

+ 12 - 2
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -21,6 +21,7 @@
 #import "RecordCheckManager.h"
 #import "KSPremissionAlert.h"
 #import "KSMediaManager.h"
+#import "OnlineClassManager.h"
 
 @interface AccompanyDetailViewController ()<UITableViewDelegate,UITableViewDataSource,WMPlayerDelegate>
 {
@@ -47,6 +48,8 @@
 
 @property (nonatomic, strong) AccompanyDetailBottomView *bottomView;
 
+@property (nonatomic, strong) OnlineClassManager *classManager;
+
 @end
 
 @implementation AccompanyDetailViewController
@@ -428,6 +431,14 @@
 }
 
 #pragma mark --- lazying
+
+- (OnlineClassManager *)classManager {
+    if (!_classManager) {
+        _classManager = [[OnlineClassManager alloc] init];
+    }
+    return _classManager;
+}
+
 - (AccompanyDetailBottomView *)bottomView {
     if (!_bottomView) {
         _bottomView = [AccompanyDetailBottomView shareInstance];
@@ -514,8 +525,7 @@
     if (micEnable == PREMISSIONTYPE_YES && cameraEnable == PREMISSIONTYPE_YES) {
         // 进入教室
         // 判断是否进行课前检测
-        
-//        [self.classManager joinRoomWithId:[NSString stringWithFormat:@"%zd", self.courseMessage.internalBaseClassIdentifier] subjectName:self.courseMessage.subjectName subjectId:self.courseMessage.subjectId classEndTime:self.courseMessage.endClassTime quitEndTime:self.quitRomeEndTime inViewController:self];
+        [self.classManager joinRoomWithId:self.courseId subjectName:self.homeworkModel.subjectName classEndTime:self.homeworkModel.endTime inViewController:self];
     }
     else {
         if (micEnable == PREMISSIONTYPE_NO && cameraEnable == PREMISSIONTYPE_NO) { // 如果麦克风权限和摄像头权限都没有

+ 4 - 3
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -50,7 +50,6 @@
 #import "KSNewsAlert.h"
 #import "RecentCourseModel.h"
 #import "AccompanyDetailViewController.h"
-#import "KSOrderManager.h"
 #import "InstrumentChooseViewController.h"
 
 #define BUTTONWIDTH (65)
@@ -878,7 +877,10 @@
         [self.navigationController pushViewController:detailVC animated:YES];
     }
     else { // 直播课详情
-        
+        KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+        NSString *url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/liveDetail?groupId=",courseModel.courseGroupId];
+        ctrl.url = url;
+        [self.navigationController pushViewController:ctrl animated:YES];
     }
 }
 
@@ -1138,7 +1140,6 @@
         [self showInstrumentView:NO];
     }
     else { // 消息中心
-//        [KSOrderManager dealWithAliSDK:@"alipay_sdk=alipay-sdk-java-dynamicVersionNo&app_id=2021000119694065&biz_content=%7B%22out_trade_no%22%3A%2222052519503900001%22%2C%22total_amount%22%3A%220.01%22%2C%22subject%22%3A%22VIP%E6%9C%88%E5%8D%A1%E8%B4%AD%E4%B9%B0%22%2C%22goods_detail%22%3A%5B%7B%22goods_name%22%3A%22VIP%E6%9C%88%E5%8D%A1%E8%B4%AD%E4%B9%B0%22%2C%22quantity%22%3A1%2C%22price%22%3A%220.01%22%2C%22goods_id%22%3A%22446%22%7D%5D%2C%22merchant_order_no%22%3A%2222052519495600001%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay&notify_url=http%3A%2F%2F47.114.1.200%3A8000%2Fapi-student%2Fpayment%2Fcallback%2FORIGINAL%2Fali_app%2FexecutePayment&sign=QdyUZnRs%2BY5HLzJbx42aXQHtg7zk1RCx609Fz%2F5tyjBrUP6lTkpfw5o4gZNRgveZGUTf8007m2jiCrRn%2BMOubJyIBW6pVVyTmQ8FbmnZa0bvHrNLh4yNRehEL2fIn40zMgosiQE2YibfZN9v5IGbHFT56O4KFBCeb1jzrPDlEaCBRealKEclYFMPKm9JSZ0roEB84gq6n9nHQP%2BlY%2FIkpjtcD1LWdBb1YSAHvrZpX%2F%2FX71seqzTPJhx8Kik9aGiMptfcursaenYHtV8UMiNiU1Vv7BoLsUM5Q31p0bDfWYogaDHMatPUKoP6x20S%2BRrJzZbSORA5xG6Qnrafnu2OLw%3D%3D&sign_type=RSA2&timestamp=2022-05-25+19%3A50%3A39&version=1.0"];
         
         NotiferMessageViewController *ctrl = [[NotiferMessageViewController alloc] init];
         [self.navigationController pushViewController:ctrl animated:YES];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/NoticeCenter/Controller/NotiferMessageViewController.m

@@ -216,6 +216,7 @@
 - (void)readMessage:(NotiferMessageModel *)model baseCell:(NotiferMessageCell *)cell {
     [KSNetworkingManager setReadMessage:KS_POST messageId:model.internalBaseClassIdentifier success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            [self queryUnReadCount];
             model.readStatus = 1;
             cell.isRead = YES;
             // 跳转页面

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Home/View/KSNewsAlert.m

@@ -31,7 +31,7 @@
 
 - (void)evaluateWithMessage:(NSString *)imgUrl linkUrl:(NSString *)linkUrl callbackAction:(NewsCallback)callback {
     self.linkUrl = linkUrl;
-    [self.newsImage sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:[UIImage new]];
+    [self.newsImage sd_setImageWithURL:[NSURL URLWithString:[imgUrl getUrlEndcodeString]] placeholderImage:[UIImage new]];
     if (callback) {
         self.callback = callback;
     }

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.h

@@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
 /// 直播间自动关闭时间
 @property (nonatomic, assign) NSInteger expiredMinute;
 
+/// 是否在黑名单中
+@property (nonatomic, assign) BOOL blacklistFlag;
+
 - (void)quitAction;
 
 @end

+ 8 - 2
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -924,8 +924,14 @@ static int clickPraiseBtnTimes  = 0;
                     return;
                 }
                 // 人数同步
-                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomMemberCount class]]) {
-                    KSLiveChatroomMemberCount *member = (KSLiveChatroomMemberCount *)rcMessage.content;
+//                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomMemberCount class]]) {
+//                    KSLiveChatroomMemberCount *member = (KSLiveChatroomMemberCount *)rcMessage.content;
+//                    __blockSelf.totalCount = member.count;
+//                    [__blockSelf countMemberCount];
+//                    return;
+//                }
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomMemberUp class]]) {
+                    KSLiveChatroomMemberUp *member = (KSLiveChatroomMemberUp *)rcMessage.content;
                     __blockSelf.totalCount = member.count;
                     [__blockSelf countMemberCount];
                     return;

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h

@@ -16,9 +16,12 @@
 #import "KSLiveChatroomSeatApply.h"
 #import "KSLiveChatroomSeatResponse.h"
 #import "KSLiveChatroomMemberCount.h"
+#import "KSLiveChatroomMemberUp.h"
 
 #import "KSLiveChatroomClose.h"
 #import "KSLiveChatroomKickOut.h"
+#import "KSLiveBlockUser.h"
+#import "KSLiveUnBlockUser.h"
 
 typedef void(^RCChatroomMessageSuccess)(long messageId);
 typedef void(^RCChatroomMessageError)(RCErrorCode errorCode, long messageId);

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m

@@ -37,6 +37,9 @@
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomClose class]];
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomKickOut class]];
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomMemberCount class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomMemberUp class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSLiveBlockUser class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSLiveUnBlockUser class]];
 }
 
 + (void)sendChatMessage:(NSString *)roomId content:(RCMessageContent *)content

+ 20 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.h

@@ -0,0 +1,20 @@
+//
+//  KSLiveBlockUser.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/30.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSLiveBlockUser : RCMessageContent
+/**
+ 用户 Id
+*/
+@property(nonatomic, copy, nonnull) NSString *userId;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 38 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveBlockUser.m

@@ -0,0 +1,38 @@
+//
+//  KSLiveBlockUser.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/30.
+//
+
+#import "KSLiveBlockUser.h"
+
+@implementation KSLiveBlockUser
+
+- (NSData *)encode {
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setObject:self.userId forKey:@"userId"];
+    return [NSJSONSerialization dataWithJSONObject:mutableDict 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.userId = [[json dictionaryValueForKey:@"content"] stringValueForKey:@"userId"];
+}
+
++ (NSString *)getObjectName {
+  return @"RC:BLOCK_BLACK_USER";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end

+ 20 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.h

@@ -0,0 +1,20 @@
+//
+//  KSLiveChatroomMemberUp.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/27.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSLiveChatroomMemberUp : RCMessageContent
+/**
+    当前观众数量
+*/
+@property(nonatomic, assign) NSInteger count;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 38 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m

@@ -0,0 +1,38 @@
+//
+//  KSLiveChatroomMemberUp.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/27.
+//
+
+#import "KSLiveChatroomMemberUp.h"
+
+@implementation KSLiveChatroomMemberUp
+
+- (NSData *)encode {
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setObject:@(self.count) forKey:@"count"];
+    return [NSJSONSerialization dataWithJSONObject:mutableDict 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.count = [[json dictionaryValueForKey:@"content"] integerValueForKey:@"count"];
+}
+
++ (NSString *)getObjectName {
+    return @"RC:Chatroom:MemberCountUp";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+    return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+    return MessagePersistent_NONE;
+}
+
+@end

+ 20 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.h

@@ -0,0 +1,20 @@
+//
+//  KSLiveUnBlockUser.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/30.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSLiveUnBlockUser : RCMessageContent
+/**
+ 用户 Id
+*/
+@property(nonatomic, copy, nonnull) NSString *userId;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 39 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSLiveUnBlockUser.m

@@ -0,0 +1,39 @@
+//
+//  KSLiveUnBlockUser.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/5/30.
+//
+
+#import "KSLiveUnBlockUser.h"
+
+@implementation KSLiveUnBlockUser
+
+- (NSData *)encode {
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setObject:self.userId forKey:@"userId"];
+    return [NSJSONSerialization dataWithJSONObject:mutableDict 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.userId = [[json dictionaryValueForKey:@"content"] stringValueForKey:@"userId"];
+}
+
++ (NSString *)getObjectName {
+  return @"RC:UNBLOCK_BLACK_USER";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+
+@end

+ 1 - 5
KulexiuForStudent/KulexiuForStudent/Module/Live/Model/KSEnterLiveroomManager.m

@@ -21,11 +21,6 @@
             [self MBShowInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-//        [self joinRoomWithMessage:@{@"roomUid" : @"COOLESHOW-TEMP-7-1648802348522",
-//                                    @"speakerId" : @"7",
-//                                    @"speakerName": @"znangs",
-//                                    @"roomType": @"TEMP",
-//                                  } controller:navCtrl];
         callback();
     }];
 }
@@ -39,6 +34,7 @@
     liveVC.createrAvatal = [source stringValueForKey:@"speakerPic"];
     liveVC.likeCount = [source integerValueForKey:@"likeNum"]; // 点赞数
     NSInteger lookCount = [source integerValueForKey:@"lookNum"] + 1;
+    liveVC.blacklistFlag = [source integerValueForKey:@"blacklistFlag"] == 1 ? YES : NO;
     liveVC.totalCount = lookCount; // 观看人数
     
     BOOL isTemp = [[source stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Login/Controller/InstrumentChooseViewController.m

@@ -37,7 +37,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"可教授乐器"];
+    [self allocTitle:@"乐器选择"];
     [self configUI];
     [self requestInstrumentMessage];
 }
@@ -261,7 +261,7 @@
 
 - (void)chooseInstrumentAction {
     if (self.chooseArray.count == 0) {
-        [self MBPShow:@"请选择可教授乐器"];
+        [self MBPShow:@"请选择乐器"];
         return;
     }
     NSMutableArray *instrumentArray = [NSMutableArray array];

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -316,7 +316,7 @@
 }
 
 - (void)logoutAction {
-    [KSNetworkingManager logoutRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager logoutRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         [self clearSource];
     } faliure:^(NSError * _Nonnull error) {
         [self clearSource];

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/SettingBodyView.xib

@@ -69,7 +69,7 @@
                                 <outletCollection property="gestureRecognizers" destination="39y-5f-REt" appends="YES" id="NSl-rj-tKk"/>
                             </connections>
                         </view>
-                        <view tag="1005" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IrL-hq-2eU">
+                        <view tag="1002" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IrL-hq-2eU">
                             <rect key="frame" x="0.0" y="50" width="386" height="50"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="进入课堂时进行网络&amp;设备检测" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="x6m-6D-CUC">
@@ -110,7 +110,7 @@
                                 <constraint firstAttribute="trailing" secondItem="qbj-na-VSL" secondAttribute="trailing" constant="9" id="wfV-kR-CF3"/>
                             </constraints>
                         </view>
-                        <view tag="1002" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l7Z-Gj-hWL">
+                        <view tag="1003" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l7Z-Gj-hWL">
                             <rect key="frame" x="0.0" y="100" width="386" height="50"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="安全隐私" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nw6-Cw-1IV">
@@ -153,7 +153,7 @@
                                 <outletCollection property="gestureRecognizers" destination="WVN-s2-eTZ" appends="YES" id="cfU-f6-1Uf"/>
                             </connections>
                         </view>
-                        <view tag="1003" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="anE-I3-Co0">
+                        <view tag="1004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="anE-I3-Co0">
                             <rect key="frame" x="0.0" y="150" width="386" height="50"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="意见反馈" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gdi-Lt-ODx">
@@ -206,7 +206,7 @@
                                 <outletCollection property="gestureRecognizers" destination="hfQ-Uy-nSc" appends="YES" id="cKc-XC-g09"/>
                             </connections>
                         </view>
-                        <view tag="1004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fae-Ws-ND6">
+                        <view tag="1005" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fae-Ws-ND6">
                             <rect key="frame" x="0.0" y="200" width="386" height="50"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="关于我们" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7NY-Jl-Fvk">

+ 1 - 3
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Chat/MessageManager/MessageDataSource.m

@@ -328,9 +328,7 @@ const NSUInteger numOfMessages = 20;
         name = NSLocalizedStringFromTable(@"You", @"SealClass", nil);
     }
     NSString *info;
-    if (role == RoleAssistant) {
-        info = [NSString stringWithFormat:NSLocalizedStringFromTable(@"BecomeAssistant", @"SealClass", nil),name];
-    }else if (role == RoleTeacher) {
+    if (role == RoleTeacher) {
         info = [NSString stringWithFormat:NSLocalizedStringFromTable(@"BecomeTeacher", @"SealClass", nil),name];
     }else if (role == RoleStudent) {
         info = [NSString stringWithFormat:NSLocalizedStringFromTable(@"BecomeStudent", @"SealClass", nil),name];

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/MainContainer/EmptyView.m

@@ -44,7 +44,6 @@
 - (void)changeRole:(Role)role {
     self.currentRole = role;
     switch (role) {
-        case RoleAssistant:
         case RoleTeacher:
             self.emptyImageView.image = [UIImage imageNamed:@"empty_teacher"];
             self.emptyLabel.text = @"当前无共享内容,您可以新建共享内容";

+ 0 - 42
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListCell.h

@@ -1,42 +0,0 @@
-//
-//  PersonListCell.h
-//  SealClass
-//
-//  Created by liyan on 2019/3/5.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "RoomMember.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef enum : NSUInteger {
-    PersonListCellActionTagAssistantTransfer,//转让助教
-    PersonListCellActionTagSetSpeaker,//设置讲师
-    PersonListCellActionTagSetVoice,//设置麦克风
-    PersonListCellActionTagSetCamera,//设置摄像头
-    PersonListCellActionTagDownGrade,//降级
-    PersonListCellActionTagDeletelPerson,//删除人
-} PersonListCellActionTag;
-
-@class PersonListCell;
-@protocol PersonListCellDelegate <NSObject>
-
-- (void)PersonListCell:(PersonListCell *)cell didTapButton:(UIButton *)button;
-
-@end
-
-@interface PersonListCell : UITableViewCell
-
-@property (nonatomic, weak) id<PersonListCellDelegate> delegate;
-
-@property (nonatomic, strong) RoomMember *member;
-
-@property (nonatomic, strong) NSMutableArray *buttonArray;
-
-- (void)setModel:(RoomMember *)member;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 217
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListCell.m

@@ -1,217 +0,0 @@
-//
-//  PersonListCell.m
-//  SealClass
-//
-//  Created by liyan on 2019/3/5.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import "PersonListCell.h"
-#import "Masonry.h"
-#import "ClassroomService.h"
-
-#define PCellButtonCount 6
-#define PCellButtonWidth 22
-#define PCellButtonMargin ((240 - 6 * 22) / 7)
-
-@interface PersonListCell()
-
-@property (nonatomic, strong) UIButton *setTransferBtn;
-@property (nonatomic, strong) UIButton *setSpeakerBtn;
-@property (nonatomic, strong) UIButton *setVoiceBtn;
-@property (nonatomic, strong) UIButton *setCameraBtn;
-@property (nonatomic, strong) UIButton *setDowngradeBtn;
-@property (nonatomic, strong) UIButton *deletePersonBtn;
-@property (nonatomic, strong) NSArray *buttonImageArray;
-@property (nonatomic, strong) NSArray *buttonDisableImageArray;
-@property (nonatomic, strong) NSArray *buttonHighlightedImageArray;
-
-@end
-
-@implementation PersonListCell
-
-- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
-{
-    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
-    if (self) {
-        self.selectionStyle = UITableViewCellSelectionStyleNone;
-        self.backgroundColor = [UIColor clearColor];
-        self.buttonImageArray = @[@"transfer", @"speaker", @"voice", @"camera", @"downgrade", @"deletelperson"];
-        self.buttonDisableImageArray = @[@"transfer_disable",@"speaker_disable", @"voice_disable", @"camera_disable", @"downgrade_disable", @"deletelperson_disable"];
-        self.buttonHighlightedImageArray = @[@"transfer_selected", @"speaker_selected", @"voice_selected", @"camera_selected", @"downgrade_selected", @"deletelperson_selected"];
-        [self.buttonArray addObjectsFromArray:@[self.setTransferBtn,self.setSpeakerBtn,self.setVoiceBtn,self.setCameraBtn,self.setDowngradeBtn,self.deletePersonBtn]];
-        [self addSubviews];
-        [self setButtonDefaultStyle];
-    }
-    return self;
-}
-
-- (void)addSubviews {
-    [self.contentView addSubview:self.setTransferBtn];
-    [self.contentView addSubview:self.setSpeakerBtn];
-    [self.contentView addSubview:self.setVoiceBtn];
-    [self.contentView addSubview:self.setCameraBtn];
-    [self.contentView addSubview:self.setDowngradeBtn];
-    [self.contentView addSubview:self.deletePersonBtn];
-    [self.buttonArray mas_distributeViewsAlongAxis:MASAxisTypeHorizontal withFixedItemLength:PCellButtonWidth leadSpacing:PCellButtonMargin tailSpacing:PCellButtonMargin];
-    [self.buttonArray mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(self.contentView.mas_top).offset(PCellButtonMargin);
-        make.height.equalTo(@PCellButtonWidth);
-    }];
-}
-
-- (void)tapEvent:(UIButton *)btn {
-    btn.selected = !btn.selected;
-    if(self.delegate && [self.delegate respondsToSelector:@selector(PersonListCell:didTapButton:)]) {
-        [self.delegate PersonListCell:self didTapButton:btn];
-    }
-}
-
-- (NSMutableArray *)buttonArray {
-    if (!_buttonArray) {
-        _buttonArray = [[NSMutableArray alloc] init];
-    }
-    return _buttonArray;
-}
-
-- (void)setModel:(RoomMember *)member {
-    if (!member ) {
-        return;
-    }
-    self.member = member;
-    [self setButtonDefaultStyle];
-    
-    RoomMember *currentMember = [ClassroomService sharedService].currentRoom.currentMember;
-    SealClassLog(@"memberID = %@ ,memberRole = %lu",member.userId,(unsigned long)member.role);
-    SealClassLog(@"currentMemberID = %@ ,currentMemberRole = %lu",currentMember.userId,(unsigned long)currentMember.role);
-    switch (currentMember.role) {
-        case RoleAssistant:
-                [self refreshCameraAndMicoroPhone:self.setVoiceBtn enable:member.microphoneEnable];
-                [self refreshCameraAndMicoroPhone:self.setCameraBtn enable:member.cameraEnable];
-            if (member.role == RoleTeacher) {
-                [self setButton:self.setSpeakerBtn enable:NO];
-            }
-            if (member.role == RoleAudience) {
-                [self setButton:self.setTransferBtn enable:NO];
-                [self setButton:self.setSpeakerBtn enable:NO];
-                [self setButton:self.setVoiceBtn enable:NO];
-                [self setButton:self.setCameraBtn enable:NO];
-                [self changeUpgradeButtonEnable:YES];
-                [self setButton:self.deletePersonBtn enable:YES];
-            }
-            break;
-            
-        case RoleTeacher:  case RoleStudent:  case RoleAudience:
-            [self setButton:self.setTransferBtn enable:NO];
-            [self setButton:self.setSpeakerBtn enable:NO];
-            [self setButton:self.setVoiceBtn enable:NO];
-            [self setButton:self.setCameraBtn enable:NO];
-            if (member.role == RoleAudience) {
-                [self changeUpgradeButtonEnable:NO];
-            }else {
-                [self setButton:self.setDowngradeBtn enable:NO];
-            }
-            [self setButton:self.deletePersonBtn enable:NO];
-            break;
-            
-        default:
-            break;
-    }
-}
-
-- (void)refreshCameraAndMicoroPhone:(UIButton *)button enable:(BOOL)enable {
-    if (button.tag == PersonListCellActionTagSetVoice) {
-        enable ?  [self.setVoiceBtn setBackgroundImage:[UIImage imageNamed:@"voice"] forState:UIControlStateNormal] :[self.setVoiceBtn setBackgroundImage:[UIImage imageNamed:@"voice_close"] forState:UIControlStateNormal];
-    }
-    if (button.tag == PersonListCellActionTagSetCamera) {
-        enable ?  [self.setCameraBtn setBackgroundImage:[UIImage imageNamed:@"camera"] forState:UIControlStateNormal] :[self.setCameraBtn setBackgroundImage:[UIImage imageNamed:@"camera_close"] forState:UIControlStateNormal];
-    }
-}
-
-- (void)changeUpgradeButtonEnable:(BOOL)enable {
-    if (enable) {
-        self.setDowngradeBtn.enabled = YES;
-        [self.setDowngradeBtn setBackgroundImage:[UIImage imageNamed:@"upgrade"] forState:UIControlStateNormal];
-    }else {
-        self.setDowngradeBtn.enabled = NO;
-        [self.setDowngradeBtn setBackgroundImage:[UIImage imageNamed:@"upgrade_disable"] forState:UIControlStateNormal];
-    }
-    [self.setDowngradeBtn setBackgroundImage:[UIImage imageNamed:@"upgrade_selected"] forState:UIControlStateHighlighted];
-    
-}
-
-- (void)setButton:(UIButton *)button enable:(BOOL)enable {
-    button.enabled = enable;
-    if (enable) {
-        [button setBackgroundImage:[UIImage imageNamed:[self.buttonImageArray objectAtIndex:button.tag]] forState:UIControlStateNormal];
-    }else {
-        [button setBackgroundImage:[UIImage imageNamed:[self.buttonDisableImageArray objectAtIndex:button.tag]] forState:UIControlStateNormal];
-    }
-    [button setBackgroundImage:[UIImage imageNamed:[self.buttonHighlightedImageArray objectAtIndex:button.tag]] forState:UIControlStateHighlighted];
-
-}
-
-- (void)setButtonDefaultStyle {
-    [self setButton:self.setTransferBtn enable:YES];
-    [self setButton:self.setSpeakerBtn enable:YES];
-    [self setButton:self.setVoiceBtn enable:YES];
-    [self setButton:self.setCameraBtn enable:YES];
-    [self setButton:self.setDowngradeBtn enable:YES];
-    [self setButton:self.deletePersonBtn enable:YES];
-}
-
-- (UIButton *)setTransferBtn {
-    if(!_setTransferBtn) {
-        _setTransferBtn = [[UIButton alloc] init];
-        [_setTransferBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        _setTransferBtn.tag = PersonListCellActionTagAssistantTransfer;
-        
-    }
-    return _setTransferBtn;
-}
-- (UIButton *)setSpeakerBtn {
-    if(!_setSpeakerBtn) {
-        _setSpeakerBtn = [[UIButton alloc] init];
-        [_setSpeakerBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        _setSpeakerBtn.tag = PersonListCellActionTagSetSpeaker;
-    }
-    return _setSpeakerBtn;
-}
-- (UIButton *)setVoiceBtn {
-    if(!_setVoiceBtn) {
-        _setVoiceBtn = [[UIButton alloc] init];
-        [_setVoiceBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        _setVoiceBtn.tag = PersonListCellActionTagSetVoice;
-    }
-    return _setVoiceBtn;
-}
-- (UIButton *)setCameraBtn {
-    if(!_setCameraBtn) {
-        _setCameraBtn = [[UIButton alloc] init];
-        [_setCameraBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        _setCameraBtn.tag = PersonListCellActionTagSetCamera;
-        
-    }
-    return _setCameraBtn;
-}
-- (UIButton *)setDowngradeBtn {
-    if(!_setDowngradeBtn) {
-        _setDowngradeBtn = [[UIButton alloc] init];
-        [_setDowngradeBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        _setDowngradeBtn.tag =  PersonListCellActionTagDownGrade;
-        
-    }
-    return _setDowngradeBtn;
-}
-- (UIButton *)deletePersonBtn {
-    if(!_deletePersonBtn) {
-        _deletePersonBtn = [[UIButton alloc] init];
-        _deletePersonBtn.tag =  PersonListCellActionTagDeletelPerson;
-        [_deletePersonBtn addTarget:self action:@selector(tapEvent:) forControlEvents:UIControlEventTouchUpInside];
-        
-    }
-    return _deletePersonBtn;
-}
-
-@end
-

+ 0 - 30
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListSectionView.h

@@ -1,30 +0,0 @@
-//
-//  PersonListSectionView.h
-//  SealClass
-//
-//  Created by liyan on 2019/3/4.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "RoomMember.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class PersonListSectionView;
-@protocol PersonListSectionViewDelegate <NSObject>
-
-- (void)didTapPersonListSectionView:(NSInteger)sectionTag;
-- (void)didTapApplySpearker:(UIButton *)applyButton;
-
-@end
-
-@interface PersonListSectionView : UIView
-
-@property (nonatomic, weak) id<PersonListSectionViewDelegate> delegate;
-
-- (void)setModel:(RoomMember *)member applySpeaking:(BOOL)applySpeaking;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 254
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListSectionView.m

@@ -1,254 +0,0 @@
-//
-//  PersonListSectionView.m
-//  SealClass
-//
-//  Created by liyan on 2019/3/4.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import "PersonListSectionView.h"
-#import "Masonry.h"
-#import "ClassroomService.h"
-
-#define LeftMargin   20
-#define NormalMargin   10
-#define HeaderImageViewWidth   40
-#define PortraitLableWidth 30
-#define NameLableHeight   22.5
-#define NameLableWidth   96
-#define PersonRoleLableHeight   14
-#define PersonRoleLableWidth   30
-#define ApplyButtonHeight  30
-#define ApplyButtonWidth 61
-
-
-@interface PersonListSectionView()
-
-@property (nonatomic, strong) UIImageView *headerImageView;
-@property (nonatomic, strong) UILabel *portraitLable;
-@property (nonatomic, strong) UILabel *nameLable;
-@property (nonatomic, strong) UILabel *personRoleLable;
-@property (nonatomic, strong) UIButton *applySpeakerButton;
-@property (nonatomic, strong) RoomMember *member;
-
-@end
-
-@implementation PersonListSectionView
-
-- (instancetype)initWithFrame:(CGRect)frame
-{
-    self = [super initWithFrame:frame];
-    if (self) {
-        self.backgroundColor = [UIColor clearColor];
-        self.userInteractionEnabled = YES;
-        UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapHandler:)];
-        [self addGestureRecognizer:gesture];
-        [self addSubViews];
-    }
-    return self;
-}
-
-- (void)addSubViews {
-    [self addSubview:self.headerImageView];
-    [self addSubview:self.portraitLable];
-    [self addSubview:self.nameLable];
-    [self addSubview:self.personRoleLable];
-    [self addSubview:self.applySpeakerButton];
-    [self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(self.mas_top).offset(NormalMargin);
-        make.left.equalTo(self.mas_left).offset(LeftMargin);
-        make.width.equalTo(@HeaderImageViewWidth);
-        make.height.equalTo(@HeaderImageViewWidth);
-    }];
-    [self.portraitLable mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.centerY.equalTo(self.headerImageView.mas_centerY);
-        make.centerX.equalTo(self.headerImageView.mas_centerX);
-        make.width.equalTo(@PortraitLableWidth);
-        make.height.equalTo(@PortraitLableWidth);
-    }];
-    
-    [self.nameLable mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.headerImageView.mas_right).offset(NormalMargin);
-        make.centerY.equalTo(self.headerImageView.mas_centerY);
-        make.height.equalTo(@NameLableHeight);
-        make.width.equalTo(@NameLableWidth);
-    }];
-    [self.personRoleLable mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.nameLable.mas_right).offset(NormalMargin);
-        make.centerY.equalTo(self.headerImageView.mas_centerY);
-        make.height.equalTo(@PersonRoleLableHeight);
-        make.width.equalTo(@PersonRoleLableWidth);
-    }];
-    [self.applySpeakerButton mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.right.equalTo(self.mas_right).offset(-6);
-        make.centerY.equalTo(self.headerImageView.mas_centerY);
-        make.height.equalTo(@ApplyButtonHeight);
-        make.width.equalTo(@ApplyButtonWidth);
-    }];
-}
-
-- (void)setModel:(RoomMember *)member applySpeaking:(BOOL)applySpeaking{
-    if (!member) {
-        return;
-    }
-    [self resetDefaultStyle];
-    self.member = member;
-    RoomMember *curMember = [ClassroomService sharedService].currentRoom.currentMember;
-        if (curMember.role == RoleAudience && [member.userId isEqualToString:curMember.userId] && curMember != nil) {
-            self.applySpeakerButton.hidden = NO;
-            if (applySpeaking) {
-                self.applySpeakerButton.enabled = NO;
-                [self.applySpeakerButton setTitle:NSLocalizedStringFromTable(@"ApplySpeakering", @"SealClass", nil) forState:UIControlStateNormal];
-            }
-        }
-    
-    CAGradientLayer *gradientLayer;
-    switch (member.role) {
-        case RoleAssistant:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"FCCF31" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"F56352" alpha:1].CGColor]];
-            [self.headerImageView.layer addSublayer:gradientLayer];
-            self.personRoleLable.backgroundColor = [UIColor colorWithHexString:@"F5A623" alpha:1];
-            self.personRoleLable.text = NSLocalizedStringFromTable(@"RoleAssitant", @"SealClass", nil);
-            break;
-        case RoleTeacher:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"FBA276" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"EB5756" alpha:1].CGColor]];
-            [self.headerImageView.layer addSublayer:gradientLayer];
-            self.personRoleLable.backgroundColor = [UIColor colorWithHexString:@"FF5500" alpha:1];
-            self.personRoleLable.text = NSLocalizedStringFromTable(@"RoleTeacher", @"SealClass", nil);
-            break;
-        case RoleStudent:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"0ABFDC" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"048BB7" alpha:1].CGColor]];
-            [self.headerImageView.layer addSublayer:gradientLayer];
-            self.personRoleLable.hidden = YES;
-            break;
-        case RoleAudience:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"B9D5DC" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"83ABB6" alpha:1].CGColor]];
-            [self.headerImageView.layer addSublayer:gradientLayer];
-            self.personRoleLable.hidden = YES;
-            
-            break;
-            
-        default:
-            break;
-    }
-    [self remakeNameLable:member];
-    self.portraitLable.text = [self setLabelWithName:member.name];
-}
-
-- (void)resetDefaultStyle {
-    self.personRoleLable.hidden = NO;
-    self.personRoleLable.text = nil;
-    self.applySpeakerButton.hidden = YES;
-    self.applySpeakerButton.enabled = YES;
-}
-
-- (void)remakeNameLable:(RoomMember *)member {
-    NSString * nameTxt = [[NSString alloc] init];
-    nameTxt =  member.name.length > 3 ? [NSString stringWithFormat:@"%@...",[member.name substringToIndex:3]] : member.name;
-    self.nameLable.text = nameTxt;
-    CGSize textSize = [nameTxt sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}];
-    [self.nameLable mas_updateConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo([NSNumber numberWithFloat:(ceil(textSize.width)+10)]);
-    }];
-}
-
-- (void)tapHandler:(UITapGestureRecognizer *)gestureRecognizer {
-    RoomMember *currentMember = [ClassroomService sharedService].currentRoom.currentMember;
-    if ([currentMember.userId isEqualToString:self.member.userId] || currentMember == nil) {
-        return;
-    }
-    if ([self.delegate respondsToSelector:@selector(didTapPersonListSectionView:)]) {
-        [self.delegate didTapPersonListSectionView:self.tag];
-    }
-}
-
-- (void)didTapApplySpearker:(UIButton *)applyButton {
-    applyButton.enabled = NO;
-    [self.applySpeakerButton setTitle:NSLocalizedStringFromTable(@"ApplySpeakering", @"SealClass", nil) forState:UIControlStateNormal];
-    if ([self.delegate respondsToSelector:@selector(didTapApplySpearker:)]) {
-        [self.delegate didTapApplySpearker:applyButton];
-    }
-}
-
-- (CAGradientLayer *)createGradientLayerWithColors:(NSArray *)colors {
-    CAGradientLayer * gradientLayer = [CAGradientLayer layer];
-    gradientLayer.colors = colors;
-    gradientLayer.startPoint = CGPointMake(0, 0);
-    gradientLayer.endPoint = CGPointMake(0, 1);
-    gradientLayer.frame = CGRectMake(0, 0, HeaderImageViewWidth, HeaderImageViewWidth);
-    return gradientLayer;
-}
-
-- (NSString *)setLabelWithName:(NSString *)name {
-    NSString *firstLetter = nil;
-    if (name.length > 0) {
-        firstLetter = [name substringFromIndex:name.length - 1];
-    } else {
-        firstLetter = @"#";
-    }
-    return firstLetter;
-}
-
-
-- (UIImageView *)headerImageView {
-    if(!_headerImageView) {
-        _headerImageView = [[UIImageView alloc] init];
-        _headerImageView.layer.cornerRadius = HeaderImageViewWidth / 2;
-        _headerImageView.layer.masksToBounds = YES;
-    }
-    return _headerImageView;
-}
-
-- (UILabel *)portraitLable {
-    if(!_portraitLable) {
-        _portraitLable = [[UILabel alloc] init];
-        _portraitLable.font = [UIFont systemFontOfSize:18];
-        _portraitLable.textAlignment = NSTextAlignmentCenter;
-        _portraitLable.textColor = [UIColor colorWithHexString:@"FFFFFF" alpha:1];
-    }
-    return _portraitLable;
-}
-
-- (UILabel *)nameLable {
-    if(!_nameLable) {
-        _nameLable = [[UILabel alloc] init];
-        _nameLable.font = [UIFont systemFontOfSize:16];
-        _nameLable.textColor = [UIColor colorWithHexString:@"FFFFFF" alpha:1];
-    }
-    return _nameLable;
-}
-
-- (UILabel *)personRoleLable {
-    if(!_personRoleLable) {
-        _personRoleLable = [[UILabel alloc] init];
-        _personRoleLable.font = [UIFont systemFontOfSize:10];
-        _personRoleLable.textColor = [UIColor colorWithHexString:@"FFFFFF" alpha:1];
-        _personRoleLable.textAlignment = NSTextAlignmentCenter;
-        _personRoleLable.layer.cornerRadius = 4;
-        _personRoleLable.layer.masksToBounds = YES;
-        
-    }
-    return _personRoleLable;
-}
-
-- (UIButton *)applySpeakerButton {
-    if(!_applySpeakerButton) {
-        _applySpeakerButton = [[UIButton alloc] init];
-        _applySpeakerButton.backgroundColor =  [UIColor clearColor];
-        [_applySpeakerButton.titleLabel setFont:[UIFont systemFontOfSize:12]];
-        [_applySpeakerButton setTitleColor:[UIColor colorWithHexString:@"21C194" alpha:1] forState:UIControlStateNormal];
-        [_applySpeakerButton setTitle:NSLocalizedStringFromTable(@"ApplySpeaker", @"SealClass", nil) forState:UIControlStateNormal];
-        _applySpeakerButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
-        _applySpeakerButton.layer.cornerRadius = 15;
-        _applySpeakerButton.layer.masksToBounds = YES;
-        [_applySpeakerButton.layer setBorderColor:[UIColor colorWithHexString:@"21C194" alpha:1].CGColor];
-        [_applySpeakerButton.layer setBorderWidth:1.0];
-        [_applySpeakerButton addTarget:self action:@selector(didTapApplySpearker:) forControlEvents:UIControlEventTouchUpInside];
-        _applySpeakerButton.hidden = YES;
-        _applySpeakerButton.enabled = YES;
-    }
-    return _applySpeakerButton;
-}
-
-@end
-

+ 0 - 29
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListView.h

@@ -1,29 +0,0 @@
-//
-//  PersonListView.h
-//  SealClass
-//
-//  Created by Sin on 2019/2/28.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "RoomMember.h"
-
-typedef enum : NSUInteger {
-    RefreshPersonListTagRemove,//删除人员
-    RefreshPersonListTagRefresh,//刷新人员
-} RefreshPersonListTag;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface PersonListView : UIView
-
-@property (nonatomic, assign) BOOL curMemberApplying;
-
-- (void)reloadPersonList;
-
-- (void)reloadPersonList:(RoomMember *)member tag:(RefreshPersonListTag)tag;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 378
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/PersonList/PersonListView.m

@@ -1,378 +0,0 @@
-//
-//  PersonListView.m
-//  SealClass
-//
-//  Created by Sin on 2019/2/28.
-//  Copyright © 2019年 RongCloud. All rights reserved.
-//
-
-#import "PersonListView.h"
-#import "PersonListSectionView.h"
-#import "PersonListCell.h"
-#import "ClassroomService.h"
-#import "NormalAlertView.h"
-
-#define RTitleViewWidth   100
-#define RLeftMargin   20
-#define RTableViewHeaderViewHeight   50
-#define RTableViewSectionViewHeight   60
-
-@interface PersonListView ()<UITableViewDelegate, UITableViewDataSource, PersonListSectionViewDelegate, PersonListCellDelegate>
-
-@property (nonatomic, strong) UITableView *personListTableView;
-@property (nonatomic, strong) NSMutableArray *personDataSource;
-@property (nonatomic, assign) NSInteger currentSection;
-@property (nonatomic, strong) dispatch_queue_t personListQueue;
-
-@end
-
-@implementation PersonListView
-
-- (instancetype)initWithFrame:(CGRect)frame
-{
-    self = [super initWithFrame:frame];
-    if (self) {
-        self.backgroundColor = [UIColor colorWithHexString:@"131B23" alpha:0.9];
-        [self addSubview:self.personListTableView];
-        [self getDataSource];
-        self.currentSection = -1;
-        self.curMemberApplying = NO;
-        
-    }
-    return self;
-}
-
-- (void)getDataSource {
-    // 第一个是自己,第二个是讲师,第三个是助教
-    dispatch_async(self.personListQueue, ^{
-        NSArray *tempArray = [ClassroomService sharedService].currentRoom.memberList;
-        if (tempArray.count <= 0) {
-            return;
-        }
-        NSSortDescriptor * des = [[NSSortDescriptor alloc] initWithKey:@"joinTime" ascending:YES];
-        NSMutableArray *sortArray = [[tempArray sortedArrayUsingDescriptors:@[des]] mutableCopy];
-        RoomMember *currentMember = [ClassroomService sharedService].currentRoom.currentMember;
-        __block NSInteger assistantIdx = -1;
-        __block NSInteger teacherIdx = -1;
-        __block NSInteger meIdx = -1;
-        NSMutableArray *students = [[NSMutableArray alloc] init];
-        NSMutableArray *audiences = [[NSMutableArray alloc] init];
-        for ( int i = 0; i < [sortArray count]; i++) {
-            RoomMember *member = [sortArray objectAtIndex:i];
-            if ([member.userId isEqualToString:currentMember.userId]) {
-                meIdx = i;
-            }else {
-                switch (member.role) {
-                    case RoleAssistant:
-                        assistantIdx = i;
-                        break;
-                    case RoleTeacher:
-                        teacherIdx = i;
-                        break;
-                    case RoleStudent:
-                        [students addObject:member];
-                        break;
-                    case RoleAudience:
-                        [audiences addObject:member];
-                        break;
-                }
-            }
-        }
-        NSMutableArray *lastArray = [[NSMutableArray alloc] init];
-        if (meIdx != -1) {
-            [lastArray addObject:currentMember];
-        }
-        if (teacherIdx != -1) {
-            [lastArray addObject:[sortArray objectAtIndex:teacherIdx]];
-        }
-        if (assistantIdx != -1) {
-            [lastArray addObject:[sortArray objectAtIndex:assistantIdx]];
-        }
-        [lastArray addObjectsFromArray:students];
-        [lastArray addObjectsFromArray:audiences];
-        dispatch_async(dispatch_get_main_queue(), ^{
-            self.personDataSource = lastArray;
-            [self.personListTableView reloadData];
-        });
-    });
-    
-}
-
-- (void)reloadPersonList {
-    [self getDataSource];
-}
-
-- (void)reloadPersonList:(RoomMember *)member tag:(RefreshPersonListTag)tag {
-    if (!member || self.personDataSource.count <= 0) {
-        return;
-    }
-    switch (tag) {
-        case RefreshPersonListTagRemove:{
-            dispatch_async(self.personListQueue, ^{
-                for(int i = 0;i < self.personDataSource.count; i++) {
-                    RoomMember *sourceMember = self.personDataSource[i];
-                    if([member.userId isEqualToString:sourceMember.userId]) {
-                        dispatch_async(dispatch_get_main_queue(), ^{
-                            [self.personDataSource removeObjectAtIndex:i];
-                            [self.personListTableView reloadData];
-                        });
-                        break;
-                    }
-                }
-            });
-            
-        }
-            break;
-        case RefreshPersonListTagRefresh: {
-            dispatch_async(self.personListQueue, ^{
-                for(int i = 0;i < self.personDataSource.count; i++) {
-                    RoomMember *sourceMember = self.personDataSource[i];
-                    if([member.userId isEqualToString:sourceMember.userId]) {
-                        NSIndexSet *indexSet=[[NSIndexSet alloc] initWithIndex:i];
-                        dispatch_async(dispatch_get_main_queue(), ^{
-                            [self.personListTableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationFade];
-                        });
-                        break;
-                    }
-                }
-            });
-            
-        }
-            break;
-    }
-}
-
-//申请发言
-- (void)didTapApplySpearker:(PersonListSectionView *)personListSectionView {
-    self.curMemberApplying = YES;
-    [[ClassroomService sharedService] applyUpgrade];
-}
-
-#pragma mark - PersonListCellDelegate
-- (void)PersonListCell:(PersonListCell *)cell didTapButton:(UIButton *)button {
-    switch (button.tag) {
-        case PersonListCellActionTagAssistantTransfer:
-        {
-            [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"ConfirmTransfer", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                
-            } confirm:^{
-                [[ClassroomService sharedService] transferAssistant:cell.member.userId];
-            }];
-            break;
-        }
-        case PersonListCellActionTagSetSpeaker:
-        {
-            [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"ConfirmSetTeacher", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                
-            } confirm:^{
-                [[ClassroomService sharedService] assignTeacher:cell.member.userId];
-            }];
-            break;
-        }
-        case PersonListCellActionTagSetVoice:
-        {
-            if (!cell.member.microphoneEnable) {
-                [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"确认打开成员的麦克风吗?", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                    
-                } confirm:^{
-                    [[ClassroomService sharedService] enableDevice:YES type:DeviceTypeMicrophone forUser:cell.member.userId];
-                }];
-            }else {
-                [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"ConfirmProhibitMicrophone", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                    
-                } confirm:^{
-                    [[ClassroomService sharedService] enableDevice:NO type:DeviceTypeMicrophone forUser:cell.member.userId];
-                }];
-            }
-        }
-            break;
-        case PersonListCellActionTagSetCamera:
-        {
-            if (!cell.member.cameraEnable) {
-                [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"确认打开成员的摄像头吗?", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                    
-                } confirm:^{
-                    [[ClassroomService sharedService] enableDevice:YES type:DeviceTypeCamera forUser:cell.member.userId];
-                }];
-                
-            }else {
-                [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"ConfirmProhibitCamera", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                    
-                } confirm:^{
-                    [[ClassroomService sharedService] enableDevice:NO type:DeviceTypeCamera forUser:cell.member.userId];
-                }];
-            }
-            
-            break;
-        }
-        case PersonListCellActionTagDownGrade:
-        {
-            SealClassLog(@"cell.memberId = %@ ,cell.member.role = %lu",cell.member.userId,(unsigned long)cell.member.role);
-            if (cell.member.role == RoleAudience) {
-                NSArray *memberArray =  [ClassroomService sharedService].currentRoom.memberList;
-                NSInteger count = 0;
-                for (RoomMember *member in memberArray) {
-                    if (member.role != RoleAudience) {
-                        count ++;
-                    }
-                }
-                if (count > 16) {
-                    [ NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"Above", @"SealClass", nil) confirmTitle:NSLocalizedStringFromTable(@"GotIt", @"SealClass", nil) confirm:^{
-                    }];
-                }else {
-                    [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"UpgradeAudience", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                        
-                    } confirm:^{
-                        [[ClassroomService sharedService] inviteUpgrade:cell.member.userId];
-                    }];
-                }
-            }else {
-                [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"ConfirmDownGrade", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                    
-                } confirm:^{
-                    [[ClassroomService sharedService] downgradeMembers:@[cell.member.userId]];
-                }];
-            }
-            break;
-        }
-        case PersonListCellActionTagDeletelPerson:
-            [NormalAlertView showAlertWithTitle:NSLocalizedStringFromTable(@"KickMember", @"SealClass", nil) leftTitle:NSLocalizedStringFromTable(@"Cancel", @"SealClass", nil) rightTitle:NSLocalizedStringFromTable(@"OK", @"SealClass", nil) cancel:^{
-                
-            } confirm:^{
-                [[ClassroomService sharedService] kickMember:cell.member.userId];
-            }];
-            break;
-    }
-    
-}
-
-#pragma mark - PersonListSectionViewDelegate
-- (void)didTapPersonListSectionView:(NSInteger)sectionTag {
-    CGPoint point  = self.personListTableView.contentOffset;
-    if (sectionTag == self.currentSection) {
-        self.currentSection = -2;// -2 是为了标记和上次点击的是相同的 , -1 是为了标记是第一次进入这个列表也面
-    } else {
-        NSMutableIndexSet *mutableIndexSet = [NSMutableIndexSet new];
-        if (self.currentSection != -1 && self.currentSection != -2) {
-            [mutableIndexSet addIndex:self.currentSection];
-        }
-        [mutableIndexSet addIndex:sectionTag];
-        self.currentSection = sectionTag;
-    }
-    [self.personListTableView reloadData];
-    if (self.currentSection < 0) {
-        return;
-    }
-    CGRect sectionR = [self.personListTableView rectForSection:self.currentSection];
-    //判断当前操作工具栏是否被遮挡,如果被遮挡,需要调整contentOffset,使其显示出来
-    if(CGRectGetMaxY(sectionR) - point.y > UIScreenHeight){
-        point.y += CGRectGetMaxY(sectionR) - point.y - UIScreenHeight;
-    }
-    [self.personListTableView setContentOffset:point animated:NO];
-}
-
-#pragma mark - tableViewDelegate
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString * cellName = @"PersonListCell";
-    PersonListCell * cell = [tableView dequeueReusableCellWithIdentifier:cellName];
-    if (cell == nil) {
-        cell = [[PersonListCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellName];
-    }
-    cell.delegate = self;
-    if (self.personDataSource.count > 0) {
-        [cell setModel: [self.personDataSource objectAtIndex:indexPath.section]];
-    }
-    return cell;
-}
-
--(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    if (self.personDataSource.count > 0) {
-        return [self.personDataSource count];
-    }
-    return 0;
-}
-
--(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    if (self.currentSection == -2) {
-        return 0;
-    }
-    if (self.currentSection == section) {
-        return 1;
-    }
-    return 0;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
-{
-    return 0.01f;
-}
-
-- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
-{
-    UIView *view=[[UIView alloc] initWithFrame:CGRectZero];
-    return view;
-}
-
--(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
-{
-    PersonListSectionView *sectionView = [[PersonListSectionView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, RTableViewSectionViewHeight)];
-    sectionView.delegate = self;
-    sectionView.tag = section;
-    if (self.personDataSource.count > 0) {
-        if (section == 0) {
-            [sectionView setModel:[self.personDataSource objectAtIndex:section] applySpeaking:self.curMemberApplying];
-        }else{
-            [sectionView setModel:[self.personDataSource objectAtIndex:section] applySpeaking:NO];
-        }
-    }
-    return sectionView;
-}
--(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
-{
-    return RTableViewSectionViewHeight;
-}
-
-- (UITableView *)personListTableView {
-    if(!_personListTableView) {
-        CGSize size = self.bounds.size;
-        _personListTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height) style:UITableViewStyleGrouped];
-        _personListTableView.backgroundColor = [UIColor clearColor];
-        _personListTableView.delegate = self;
-        _personListTableView.dataSource = self;
-        _personListTableView.bounces = NO;
-        _personListTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
-        _personListTableView.separatorStyle=UITableViewCellSeparatorStyleNone;
-        _personListTableView.estimatedRowHeight = 0;
-        _personListTableView.estimatedSectionFooterHeight = 0;
-        _personListTableView.estimatedSectionHeaderHeight = 0;
-        if (@available(iOS 11.0, *)) {
-            _personListTableView.insetsContentViewsToSafeArea = NO;
-        }
-        UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _personListTableView.bounds.size.width, RTableViewHeaderViewHeight)];
-        UILabel * headerLable = [[UILabel alloc] initWithFrame:CGRectMake(RLeftMargin, 0, headerView.bounds.size.width - RLeftMargin, RTableViewHeaderViewHeight)];
-        headerLable.text = NSLocalizedStringFromTable(@"OnlinePerson", @"SealClass", nil);
-        headerLable.textColor = [UIColor colorWithHexString:@"FFFFFF" alpha:1];
-        headerLable.textAlignment = NSTextAlignmentLeft;
-        headerLable.font = [UIFont systemFontOfSize:16];
-        [headerView addSubview:headerLable];
-        _personListTableView.tableHeaderView = headerView;
-        
-    }
-    return _personListTableView;
-}
-
-- (NSMutableArray *)personDataSource {
-    if(!_personDataSource) {
-        _personDataSource = [[NSMutableArray alloc] init];
-    }
-    return _personDataSource;
-}
-
-- (dispatch_queue_t)personListQueue {
-    if(!_personListQueue) {
-        _personListQueue = dispatch_queue_create("cn.rongcloud.sealclass.personlist", DISPATCH_QUEUE_SERIAL);
-    }
-    return _personListQueue;
-}
-
-@end

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/RecentShared/RecentSharedView.m

@@ -46,7 +46,7 @@
                 [self.recentSharedDataSource removeAllObjects];
                 NSArray *memberArray = [ClassroomService sharedService].currentRoom.memberList;
                 for (RoomMember *member in memberArray) {
-                    if (member.role == RoleTeacher || member.role == RoleAssistant) {
+                    if (member.role == RoleTeacher) {
                         [self.recentSharedDataSource addObject:member];
                     }
                 }
@@ -64,7 +64,7 @@
         [self.recentSharedDataSource removeAllObjects];
         NSArray *memberArray = [ClassroomService sharedService].currentRoom.memberList;
         for (RoomMember *member in memberArray) {
-            if (member.role == RoleTeacher || member.role == RoleAssistant) {
+            if (member.role == RoleTeacher) {
                 [self.recentSharedDataSource addObject:member];
             }
         }

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/Title/ClassroomTitleView.m

@@ -118,7 +118,6 @@
     [self setDefaultButtons];
     RoomMember *curMember = [ClassroomService sharedService].currentRoom.currentMember;
     switch (curMember.role) {
-        case RoleAssistant:
         case RoleTeacher:
         case RoleStudent:{
             [self isCameraAvailable:^(bool avilable) {

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/ToolPanel/ToolPanelView.m

@@ -129,7 +129,7 @@
     RoomMember *currentMember = [ClassroomService sharedService].currentRoom.currentMember;
     for (UIButton * button in self.buttonArray) {
         if (button.tag == ToolPanelViewActionTagWhiteboard) {
-            if (currentMember.role != RoleAssistant && currentMember.role !=RoleTeacher) {
+            if (currentMember.role !=RoleTeacher) {
                 [button setBackgroundImage:[UIImage imageNamed:@"whiteboard_disable"] forState:UIControlStateNormal];
                 button.enabled = NO;
             }else {
@@ -138,7 +138,7 @@
             }
         }
         if (button.tag == ToolPanelViewActionTagRecentlyShared) {
-            if (currentMember.role != RoleAssistant && currentMember.role !=RoleTeacher) {
+            if (currentMember.role !=RoleTeacher) {
                 [button setBackgroundImage:[UIImage imageNamed:@"recentlyshared_disable"] forState:UIControlStateNormal];
                 button.enabled = NO;
             }else {
@@ -147,7 +147,7 @@
             }
         }
         if (button.tag == ToolPanelViewActionTagOnlinePerson) {
-            if (currentMember.role != RoleAssistant && currentMember.role !=RoleTeacher) {
+            if (currentMember.role !=RoleTeacher) {
                 [button setBackgroundImage:[UIImage imageNamed:@"onlineperson_selected"] forState:UIControlStateNormal];
                 button.enabled = NO;
             }else {

+ 0 - 12
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Sections/Classroom/View/VideoList/VideoListCell.m

@@ -94,18 +94,6 @@
         self.videoView.hidden = YES;
     }else {
         switch (member.role) {
-            case RoleAssistant:
-                if (assistentPrompt) {
-                    self.promptLable.hidden = NO;
-                    self.videoView.hidden = YES;
-                    self.promptLable.text = NSLocalizedStringFromTable(@"Assitaning", @"SealClass", nil);
-                }else {
-                    self.videoView.hidden = NO;
-                    self.promptLable.hidden = YES;
-                }
-                self.roleLable.backgroundColor = RoleAssistantColor;
-                self.roleLable.text = NSLocalizedStringFromTable(@"RoleAssitant", @"SealClass", nil);
-                break;
             case RoleTeacher:
                 if (teacherPrompt) {
                     self.videoView.hidden = YES;

+ 4 - 6
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomDefine.h

@@ -10,14 +10,12 @@
 #define ClassroomDefine_h
 
 typedef NS_ENUM(NSUInteger, Role) {
-    //助教
-    RoleAssistant = 1,
-    //老师
-    RoleTeacher = 2,
     //学生
-    RoleStudent = 3,
+    RoleStudent = 0,
+    //老师
+    RoleTeacher = 1,
     //旁观者
-    RoleAudience = 4,
+    RoleAudience = 2,
 };
 
 typedef NS_ENUM(NSUInteger, DeviceType) {

+ 10 - 47
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.h

@@ -23,16 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)memberDidJoin:(RoomMember *)member;
 - (void)memberDidLeave:(RoomMember *)member;
 - (void)memberDidKick:(RoomMember *)member;
-//转让助教,助教收到的回调
-- (void)assistantDidTransfer:(RoomMember *)oldAssistant newAssistant:(RoomMember *)newAssistant;
-//除降级外其它角色变化
-- (void)roleDidChange:(Role)role
-              forUser:(RoomMember *)member;
+
 //设备打开/关闭回调
 - (void)deviceDidEnable:(BOOL)enable
                    type:(DeviceType)type
                 forUser:(RoomMember *)member operator:(NSString *)operatorId;
-//助教请求用户打开设备的回调,助教关闭用户设备没有回调。
+//请求用户打开设备的回调,关闭用户设备没有回调。
 - (void)deviceDidInviteEnable:(DeviceType)type ticket:(NSString *)ticket;
 - (void)deviceInviteEnableDidApprove:(RoomMember *)member
                           type:(DeviceType)type;
@@ -58,8 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)whiteboardDidDisplay:(NSString *)boardId;
 //显示老师的回调
 - (void)teacherDidDisplay;
-//显示助教的回调
-- (void)assistantDidDisplay;
+
 // 显示学生的回调
 - (void)studentDidDisplay:(NSString *)studentId;
 //显示共享屏幕的回调
@@ -92,53 +87,21 @@ NS_ASSUME_NONNULL_BEGIN
 isAudience:(BOOL)audience
    success:(void (^)(Classroom *classroom))successBlock
      error:(void (^)(ErrorCode errorCode, NSString *message))errorBlock;
-- (void)joinRoomStatusNotify:(BOOL)requestStatus;
+
+- (void)joinRoomFailerNotify;
 - (void)leaveClassroom;
-- (void)getWhiteboardList:(void (^)( NSArray <Whiteboard *> * _Nullable boardList))completeBlock;
 
 // 下载伴奏完成回调
 - (void)adjustAccompanySongNotifer:(NSString *_Nullable)songId status:(BOOL)status;
 
-#pragma mark 角色权限相关,仅助教有权限
-//将学员降级为旁观者
-- (void)downgradeMembers:(NSArray <NSString *> *)members;
-//邀请旁观者升级为学员
-- (void)inviteUpgrade:(NSString *)userId;
-//指定学员为老师
-- (void)assignTeacher:(NSString *)userId;
-//转让助教
-- (void)transferAssistant:(NSString *)userId;
-//同意旁观者升级为学员(对应 applyUpgrade)
-- (void)approveUpgrade:(NSString *)ticket;
-//拒绝旁观者升级为学员(对应 applyUpgrade)
-- (void)rejectUpgrade:(NSString *)ticket;
-- (void)kickMember:(NSString *)userId;
-- (void)enableDevice:(BOOL)enable
-                type:(DeviceType)type
-             forUser:(NSString *)userId;
-#pragma mark 教室显示相关,仅助教/老师有权限
-- (void)createWhiteboard;
-- (void)deleteWhiteboard:(NSString *)boardId;
-- (void)displayWhiteboard:(NSString *)boardId;
-- (void)displayTeacher;
-- (void)displayAssistant;
 #pragma mark 操作当前用户设备状态,仅助教/老师/学员有权限
 - (void)enableDevice:(BOOL)enable
             withType:(DeviceType)type;
-//用户同意助教打开设备
-- (void)approveEnableDevice:(NSString *)ticket;
-//用户拒绝助教打开设备
-- (void)rejectEnableDevice:(NSString *)ticket;
-#pragma mark 旁观者升级相关,仅旁观者有权限
-//申请成为学员
-- (void)applyUpgrade;
-//同意助教邀请自己成为学员(对应 inviteUpgrade)
-- (void)approveInvite:(NSString *)ticket;
-//拒绝助教邀请自己成为学员(对应 inviteUpgrade)
-- (void)rejectInvite:(NSString *)ticket;
-
-#pragma mark - Util
-- (NSString *)generateWhiteboardURL:(NSString *)boardId;
+//用户同意打开设备
+- (void)approveEnableDevice:(DeviceType)type;
+//用户拒绝打开设备
+- (void)rejectEnableDevice:(DeviceType)type;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 134 - 634
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/ClassroomService.m

@@ -7,7 +7,6 @@
 //
 
 #import "ClassroomService.h"
-#import "HTTPUtility.h"
 #import "MemberChangeMessage.h"
 #import "WhiteboardMessage.h"
 #import "DeviceMessage.h"
@@ -124,59 +123,54 @@
 }
 
 #pragma mark - HTTP
+
 - (void)joinClassroom:(NSString *)roomId
-  userName:(NSString *)userName
-isAudience:(BOOL)audience
-   success:(void (^)(Classroom *classroom))successBlock
-     error:(void (^)(ErrorCode errorCode, NSString *message))errorBlock {
+             userName:(NSString *)userName
+           isAudience:(BOOL)audience
+              success:(void (^)(Classroom * _Nonnull))successBlock
+                error:(void (^)(ErrorCode, NSString * _Nonnull))errorBlock {
     if (roomId.length == 0 || userName.length == 0) {
         [self callbackFailureDescription:ErrorCodeParameterError];
         return;
     }
-    [HTTPUtility setAuthHeader:[NSString stringWithFormat:@"%@ %@", UserDefault(Token_type), UserDefault(TokenKey)]];
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:roomId forKey:@"roomId"];
-    [dic setObject:@(audience) forKey:@"audience"];
-    [dic setObject:userName forKey:@"userName"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/join"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      NSDictionary *resultDic = result.content[@"result"];
-                                      
-                                      Classroom *room = [Classroom classroomFromJson:resultDic];
-                                      self.currentRoom = room;
-                                      if (successBlock) {
-                                          dispatch_main_async_safe(^{
-                                              successBlock(room);
-                                          })
-                                      }
-                                  } else {
-                                      if (errorBlock) {
-                                          dispatch_main_async_safe(^{
-                                              errorBlock(result.errorCode, result.message);
-                                          })
-                                      }
-                                  }
-                              }];
+    [KSNetworkingManager roomJoinRequest:KS_POST roomId:roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            Classroom *room = [Classroom classroomFromJson:[dic dictionaryValueForKey:@"data"]];
+            self.currentRoom = room;
+            if (successBlock) {
+                dispatch_main_async_safe(^{
+                    successBlock(room);
+                })
+            }
+        }
+        else {
+            errorBlock([dic integerValueForKey:@"code"], MESSAGEKEY);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        if (errorBlock) {
+            dispatch_main_async_safe(^{
+                errorBlock(error.code, @"加入房间失败");
+            })
+        }
+    }];
 }
 
-- (void)joinRoomStatusNotify:(BOOL)requestStatus {
+- (void)joinRoomFailerNotify {
     if (![self checkWhetherInRoom]) {
         if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
             [self.classroomDelegate roomDidLeave];
         }
         return;
     }
-    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", self.currentRoom.currentMemberId, @"userId", @(requestStatus),@"requestStatus",[KeyChainTools getUUID],@"deviceNum",nil];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"room/joinRoomStatusNotify" parameters:dic response:^(HTTPResult *result) {
-        if (result.success) {
+    [KSNetworkingManager joinRoomFailureRequest:KS_POST roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSLog(@"------ 通知成功");
         }
         else {
             NSLog(@"------ 通知失败");
         }
+    } faliure:^(NSError * _Nonnull error) {
+        NSLog(@"------ 通知失败");
     }];
 }
 
@@ -188,543 +182,146 @@ isAudience:(BOOL)audience
         return;
     }
     NSLog(@"leave classroom start");
-    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", self.currentRoom.currentMemberId, @"userId",nil];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/leave"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  SealClassLog(@"离开 ClassRoomService code = %ld",(long)result.httpCode);
-                                  if (result.success) {
-//                                      self.currentRoom = nil;
-                                      dispatch_main_async_safe(^{
-                                          if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
-                                              [self.classroomDelegate roomDidLeave];
-                                          }
-                                      });
-                                  } else {
-                                      dispatch_main_async_safe(^{
-                                          if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
-                                              [self.classroomDelegate roomDidLeave];
-                                          }
-                                      });
-                                      NSLog(@"退出失败:%@",result);
-                                  }
-                              }];
-}
-
-- (void)getWhiteboardList:(void (^)(NSArray<Whiteboard *> * _Nullable))completeBlock {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        if (completeBlock) {
-            completeBlock(nil);
+    
+    [KSNetworkingManager roomLeaveRequest:KS_POST roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            dispatch_main_async_safe(^{
+                if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
+                    [self.classroomDelegate roomDidLeave];
+                }
+            });
         }
-        return;
-    }
-    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", nil];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodGet
-                             URLString:@"/room/whiteboard/list"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      NSMutableArray *boardList = [[NSMutableArray alloc] init];
-                                      NSArray *arr = result.content[@"result"];
-                                      for (NSDictionary *boardDic in arr) {
-                                          Whiteboard *board = [Whiteboard whiteboardFromJson:boardDic];
-                                          [boardList addObject:board];
-                                      }
-                                      if (completeBlock) {
-                                          dispatch_main_async_safe(^{
-                                              completeBlock(boardList);
-                                          });
-                                      }
-                                  } else {
-                                      if (completeBlock) {
-                                          dispatch_main_async_safe(^{
-                                              completeBlock(nil);
-                                          });
-                                      }
-                                  }
-                              }];
+        else {
+            dispatch_main_async_safe(^{
+                if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
+                    [self.classroomDelegate roomDidLeave];
+                }
+            });
+            NSLog(@"退出失败:%@",MESSAGEKEY);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        dispatch_main_async_safe(^{
+            if ([self.classroomDelegate respondsToSelector:@selector(roomDidLeave)]) {
+                [self.classroomDelegate roomDidLeave];
+            }
+        });
+        NSLog(@"退出失败");
+    }];
 }
 
+
 // 下载伴奏完成回调
 - (void)adjustAccompanySongNotifer:(NSString *)songId status:(BOOL)status {
     if (![self checkWhetherInRoom]) {
         [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
         return;
     }
-    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
-    [dic setValue:@(status) forKey:@"status"];
-    [dic setValue:songId forKey:@"musicScoreAccompanimentId"];
-    [dic setValue:self.currentRoom.roomId forKey:@"roomId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"room/adjustMusicScore" parameters:dic response:^(HTTPResult *result) {
-        if (result.success) {
-        } else {
-            [self callbackFailureDescription:result.errorCode];
+    
+    NSString *statusString = status == YES ? @"1" : @"2";
+    [KSNetworkingManager  musicSheetDownNotifyRequest:KS_POST roomId:self.currentRoom.roomId status:statusString accompanimentId:songId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            
         }
+        else {
+            [self callbackFailureDescription:ErrorCodeOther];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self callbackFailureDescription:ErrorCodeOther];
     }];
+    
 }
 
-#pragma mark 角色权限相关,仅助教有权限
-- (void)downgradeMembers:(NSArray <NSString *> *)members {
+#pragma mark 操作当前用户设备状态,仅老师/学员有权限
+- (void)enableDevice:(BOOL)enable
+            withType:(DeviceType)type {
     if (![self checkWhetherInRoom]) {
         [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
         return;
     }
-    if (members.count < 1) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    NSMutableArray *users = [[NSMutableArray alloc] init];
-    for (NSString *userId in members) {
-        if (userId.length > 0) {
-            [users addObject:@{@"userId":userId,@"role":@(RoleAudience)}];
+    
+    NSString *deviceType = [self getDeviceTypeDesc:type];
+    
+    [KSNetworkingManager roomDeviceSync:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId enable:enable success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            if (type == DeviceTypeMicrophone) {
+                [self.currentRoom updateMember:self.currentRoom.currentMember.userId forMicrophone:enable];
+            } else if (type == DeviceTypeCamera)  {
+                [self.currentRoom updateMember:self.currentRoom.currentMember.userId forCamera:enable];
+            }
+            else if (type == DeviceTypeMusicMode) {
+                [self.currentRoom updateMember:self.currentRoom.currentMember.userId forMusicMode:enable];
+            }
         }
-    }
-    [dic setObject:users forKey:@"users"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"/room/downgrade" parameters:dic response:^(HTTPResult *result) {
-        if(result.success) {
-        }else {
-            [self callbackFailureDescription:result.errorCode];
+        else {
+            [self callbackFailureDescription:ErrorCodeOther];
         }
+    } faliure:^(NSError * _Nonnull error) {
+        [self callbackFailureDescription:ErrorCodeOther];
     }];
 }
 
-- (void)inviteUpgrade:(NSString *)userId {
+- (void)approveEnableDevice:(DeviceType)type {
     if (![self checkWhetherInRoom]) {
         [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
         return;
     }
-    if (userId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:userId forKey:@"userId"];
-    [dic setObject:@(RoleStudent) forKey:@"role"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/upgrade/invite"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)assignTeacher:(NSString *)userId {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (userId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:userId forKey:@"userId"];
-    [dic setObject:@(RoleTeacher) forKey:@"role"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"/room/change-role" parameters:dic response:^(HTTPResult *result) {
-        if(result.success){
-        }else {
-            [self callbackFailureDescription:result.errorCode];
+    
+    NSString *deviceType = [self getDeviceTypeDesc:type];
+    
+    [KSNetworkingManager deviceApprove:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            
         }
-    }];
-}
-
-- (void)transferAssistant:(NSString *)userId {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (userId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:userId forKey:@"userId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"/room/transfer" parameters:dic response:^(HTTPResult *result) {
-        if(result.success){
-        }else {
-            [self callbackFailureDescription:result.errorCode];
+        else {
+            [self callbackFailureDescription:ErrorCodeOther];
         }
+    } faliure:^(NSError * _Nonnull error) {
+        [self callbackFailureDescription:ErrorCodeOther];
     }];
 }
 
-- (void)approveUpgrade:(NSString *)ticket{
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"/room/speech/approve" parameters:dic response:^(HTTPResult *result) {
-        if(result.success){
-        }else {
-            [self callbackFailureDescription:result.errorCode];
-        }
-    }];
-}
 
-- (void)rejectUpgrade:(NSString *)ticket {
+- (void)rejectEnableDevice:(DeviceType)type {
     if (![self checkWhetherInRoom]) {
         [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
         return;
     }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"/room/speech/reject" parameters:dic response:^(HTTPResult *result) {
-        if(result.success){
-        }else {
-            [self callbackFailureDescription:result.errorCode];
+    NSString *deviceType = [self getDeviceTypeDesc:type];
+    [KSNetworkingManager deviceReject:KS_POST deviceType:deviceType roomId:self.currentRoom.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            
         }
+        else {
+            [self callbackFailureDescription:ErrorCodeOther];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self callbackFailureDescription:ErrorCodeOther];
     }];
 }
 
-- (void)kickMember:(NSString *)userId {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (userId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:userId forKey:@"userId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/kick"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)enableDevice:(BOOL)enable
-                type:(DeviceType)type
-             forUser:(NSString *)userId {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (userId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    if(DeviceTypeCamera == type) {
-        [dic setObject:@(enable) forKey:@"cameraOn"];
-    }else if (DeviceTypeMicrophone == type) {
-        [dic setObject:@(enable) forKey:@"microphoneOn"];
-    }
-    else if (DeviceTypeHandup == type) {
-        [dic setObject:@(enable) forKey:@"handUpOn"];
-    }
-    else if (DeviceTypeMusicMode == type) {
-        [dic setObject:@(enable) forKey:@"musicModeOn"];
-    }
-    else if (DeviceTypeExamSong == type) {
-        [dic setObject:@(enable) forKey:@"examSongOn"];
-    }
-    [dic setObject:userId forKey:@"userId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/device/control"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-#pragma mark 教室显示相关,仅助教/老师有权限
-- (void)createWhiteboard {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", nil];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/whiteboard/create"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      Whiteboard *board = [[Whiteboard alloc] init];
-                                      board.boardId = result.content[@"result"];
-                                      dispatch_main_async_safe(^{
-                                          if ([self.classroomDelegate respondsToSelector:@selector(whiteboardDidCreate:)]) {
-                                              [self.classroomDelegate whiteboardDidCreate:board];
-                                          }
-                                      });
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)deleteWhiteboard:(NSString *)boardId {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (boardId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:boardId forKey:@"whiteboardId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/whiteboard/delete"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)display:(DisplayType)type
-       withInfo:(NSString *)info {
-    SealClassLog(@"display:%ld,info:%@,currentRoom.roomId=%@",type,info,self.currentRoom.roomId);
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (info.length == 0 || self.currentRoom.roomId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:@(type) forKey:@"type"];
-    if (type == DisplayWhiteboard) {
-        [dic setObject:info forKey:@"uri"];
-    } else {
-        [dic setObject:info forKey:@"userId"];
-    }
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/display"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      self.currentRoom.currentDisplayType = type;
-                                      self.currentRoom.currentDisplayURI = info;
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)displayWhiteboard:(NSString *)boardId {
-    if (boardId.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    [self display:DisplayWhiteboard withInfo:boardId];
-}
-
-- (void)displayTeacher {
-    [self display:DisplayTeacher withInfo:self.currentRoom.teacher.userId];
-}
-
-- (void)displayAssistant {
-    [self display:DisplayAssistant withInfo:self.currentRoom.assistant.userId];
-}
-
-#pragma mark 操作当前用户设备状态,仅助教/老师/学员有权限
-- (void)enableDevice:(BOOL)enable
-            withType:(DeviceType)type {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    if (type == DeviceTypeCamera) {
-        [dic setObject:@(enable) forKey:@"cameraOn"];
-    } else if (type == DeviceTypeMicrophone) {
-        [dic setObject:@(enable) forKey:@"microphoneOn"];
-    }
-    else if (type == DeviceTypeMusicMode) {
-        [dic setObject:@(enable) forKey:@"musicModeOn"];
-    }
-    else if (type == DeviceTypeHandup) {
-        [dic setObject:@(enable) forKey:@"handUpOn"];
-    }
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/device/sync"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      if (type == DeviceTypeMicrophone) {
-                                          [self.currentRoom updateMember:self.currentRoom.currentMember.userId forMicrophone:enable];
-                                      } else if (type == DeviceTypeCamera)  {
-                                          [self.currentRoom updateMember:self.currentRoom.currentMember.userId forCamera:enable];
-                                      }
-                                      else if (type == DeviceTypeMusicMode) {
-                                          [self.currentRoom updateMember:self.currentRoom.currentMember.userId forMusicMode:enable];
-                                      }
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)approveEnableDevice:(NSString *)ticket {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/device/approve"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-- (void)rejectEnableDevice:(NSString *)ticket  {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/device/reject"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
-
-#pragma mark 旁观者升级相关,仅旁观者有权限
-- (void)applyUpgrade {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/speech/apply"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      dispatch_main_async_safe(^{
-                                          if ([self.classroomDelegate respondsToSelector:@selector(applyDidFailed:)]) {
-                                              [self.classroomDelegate applyDidFailed:result.errorCode];
-                                          }
-                                      });
-                                  }
-                              }];
-}
-
-- (void)approveInvite:(NSString *)ticket {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
-    }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/upgrade/approve"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
-}
+#pragma mark - Util
 
-- (void)rejectInvite:(NSString *)ticket {
-    if (![self checkWhetherInRoom]) {
-        [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
-        return;
+- (NSString *)getDeviceTypeDesc:(DeviceType)type {
+    switch (type) {
+        case DeviceTypeCamera:
+            return @"CAMERA";
+        case DeviceTypeMicrophone:
+            return @"MICROPHONE";
+        case DeviceTypeMusicMode:
+            return @"MUSIC_MODE";
+        case DeviceTypeHandup:
+            return @"HAND_UP";
+        case DeviceTypeExamSong:
+            return @"EXAM_SONG";
+        case DeviceTypeMusicScore:
+            return @"MUSIC_SHEET";
+        case DeviceTypeAccompany:
+            return @"ACCOMPANIMENT";
+        default:
+            return @"";
     }
-    if (ticket.length == 0) {
-        [self callbackFailureDescription:ErrorCodeParameterError];
-        return;
-    }
-    NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
-    [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
-    [dic setObject:ticket forKey:@"ticket"];
-    [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
-                             URLString:@"/room/upgrade/reject"
-                            parameters:dic
-                              response:^(HTTPResult *result) {
-                                  if (result.success) {
-                                      
-                                  } else {
-                                      [self callbackFailureDescription:result.errorCode];
-                                  }
-                              }];
 }
 
-#pragma mark - Util
-- (NSString *)generateWhiteboardURL:(NSString *)boardId {
-    if (![self checkWhetherInRoom]) {
-        return nil;
-    }
-    Role role = self.currentRoom.currentMember.role;
-    NSString *roomId = self.currentRoom.roomId;
-    return [NSString stringWithFormat:@"%@&role=%@&roomId=%@&authorization=%@", boardId, @(role), roomId, self.auth];
-}
 
 #pragma mark - Helper
 - (BOOL)checkWhetherInRoom {
@@ -857,11 +454,7 @@ isAudience:(BOOL)audience
     dispatch_main_async_safe(^{
         [self.currentRoom updateDisplayUri:msg.display];
         DisplayType type = self.currentRoom.currentDisplayType;
-        if (type == DisplayAssistant) {
-            if ([self.classroomDelegate respondsToSelector:@selector(assistantDidDisplay)]) {
-                [self.classroomDelegate assistantDidDisplay];
-            }
-        } else if (type == DisplayTeacher) {
+        if (type == DisplayTeacher) {
             if ([self.classroomDelegate respondsToSelector:@selector(teacherDidDisplay)]) {
                 [self.classroomDelegate teacherDidDisplay];
             }
@@ -887,112 +480,29 @@ isAudience:(BOOL)audience
 }
 
 - (void)onReceiveApplySpeechMessage:(ApplySpeechMessage *)msg {
-    dispatch_main_async_safe(^{
-        if (self.currentRoom.currentMember.role == RoleAssistant) {
-            if ([self.classroomDelegate respondsToSelector:@selector(upgradeDidApply:ticket:overMaxCount:)]) {
-                RoomMember *mem = [self.currentRoom getMember:msg.requestUserId];
-                if(!mem) {
-                    mem = [[RoomMember alloc] init];
-                    mem.userId = msg.requestUserId;
-                    mem.name = msg.requestUserName;
-                }
-                BOOL isMaxCount = [self.currentRoom getMemberCountWithoutAudience] >= 16 ? YES : NO;
-                [self.classroomDelegate upgradeDidApply:mem ticket:msg.ticket overMaxCount:isMaxCount];
-            }
-        }
-    });
 }
 
 - (void)onReceiveSpeechResultMessage:(ApplySpeechResultMessage *)msg {
-    dispatch_main_async_safe(^{
-        if (msg.action == SpeechResultApprove) {
-            if ([self.classroomDelegate respondsToSelector:@selector(applyDidApprove)]) {
-                [self.classroomDelegate applyDidApprove];
-            }
-        } else if (msg.action == SpeechResultReject) {
-            if ([self.classroomDelegate respondsToSelector:@selector(applyDidReject)]) {
-                [self.classroomDelegate applyDidReject];
-            }
-        }
-    });
 }
 
 - (void)onReceiveTurnPageMessage:(TurnPageMessage *)msg {
-    dispatch_main_async_safe(^{
-        
-    });
+    
 }
 
 - (void)onReceiveRoleChangedMessage:(RoleChangedMessage *)msg {
-    dispatch_main_async_safe(^{
-        for(NSDictionary *dic in msg.users) {
-            NSString *userId = dic[@"userId"];
-            Role role = (Role)[dic[@"role"] intValue];
-            if([self.classroomDelegate respondsToSelector:@selector(roleDidChange:forUser:)]) {
-                [self.currentRoom updateMemeber:userId forRole:role];
-                [self.classroomDelegate roleDidChange:role forUser:[self.currentRoom getMember:userId]];
-            }
-        }
-    });
+   
 }
 
 - (void)onReceiveAssistantTransferMessage:(AssistantTransferMessage *)msg {
-    dispatch_main_async_safe(^{
-        if([self.classroomDelegate respondsToSelector:@selector(roleDidChange:forUser:)]) {
-            [self.currentRoom updateMemeber:msg.toUserId forRole:RoleAssistant];
-            [self.currentRoom updateMemeber:msg.operatorId forRole:RoleStudent];
-            [self.classroomDelegate roleDidChange:RoleAssistant forUser:[self.currentRoom getMember:msg.toUserId]];
-//            [self.classroomDelegate roleDidChange:RoleStudent forUser:[self.currentRoom getMember:msg.operatorId]];
-        }
-        if ([self.classroomDelegate respondsToSelector:@selector(assistantDidTransfer:newAssistant:)]){
-            [self.classroomDelegate assistantDidTransfer:[self.currentRoom getMember:msg.operatorId] newAssistant:[self.currentRoom getMember:msg.toUserId]];
-        }
-    });
+   
 }
 
 - (void)onReceiveTicketExpiredMessage:(TicketExpiredMessage *)msg {
-    dispatch_main_async_safe(^{
-        if ([self.classroomDelegate respondsToSelector:@selector(ticketDidExpire:)]) {
-            [self.classroomDelegate ticketDidExpire:msg.ticket];
-        }
-    });
+    
 }
 
 - (void)onReceiveInviteUpgradeMessage:(InviteUpgradeMessage *)msg {
-    dispatch_main_async_safe(^{
-        if (msg.action == InviteUpgradeActionInvite) {
-            if (self.currentRoom.currentMember.role == RoleAudience) {
-                if ([self.classroomDelegate respondsToSelector:@selector(upgradeDidInvite:)]) {
-                    [self.classroomDelegate upgradeDidInvite:msg.ticket];
-                }
-            }
-        } else if (msg.action == InviteUpgradeActionApprove) {
-            if (self.currentRoom.currentMember.role == RoleAssistant) {
-                if ([self.classroomDelegate respondsToSelector:@selector(inviteDidApprove:)]) {
-                    RoomMember *mem = [self.currentRoom getMember:msg.operatorId];
-                    if(!mem) {
-                        mem = [[RoomMember alloc] init];
-                        mem.userId = msg.operatorId;
-                        mem.name = msg.operatorName;
-                    }
-                    mem.role = msg.role;
-                    [self.classroomDelegate inviteDidApprove:mem];
-                }
-            }
-        } else if (msg.action == InviteUpgradeActionReject) {
-            if (self.currentRoom.currentMember.role == RoleAssistant) {
-                if ([self.classroomDelegate respondsToSelector:@selector(inviteDidReject:)]) {
-                    RoomMember *mem = [self.currentRoom getMember:msg.operatorId];
-                    if(!mem) {
-                        mem = [[RoomMember alloc] init];
-                        mem.userId = msg.operatorId;
-                        mem.name = msg.operatorName;
-                    }
-                    [self.classroomDelegate inviteDidReject:mem];
-                }
-            }
-        }
-    });
+
 }
 
 - (void)onReceiveControlDeviceNotifyMessage:(ControlDeviceNotifyMessage *)msg {
@@ -1002,19 +512,9 @@ isAudience:(BOOL)audience
                 [self.classroomDelegate deviceDidInviteEnable:msg.type ticket:msg.ticket];
             }
         } else if (msg.action == ControlDeviceActionApprove) {
-            if (self.currentRoom.currentMember.role == RoleAssistant) {
-                if ([self.classroomDelegate respondsToSelector:@selector(deviceInviteEnableDidApprove:type:)]) {
-                    RoomMember *mem = [self.currentRoom getMember:msg.opUserId];
-                    [self.classroomDelegate deviceInviteEnableDidApprove:mem type:msg.type];
-                }
-            }
+            
         } else if (msg.action == ControlDeviceActionReject) {
-            if (self.currentRoom.currentMember.role == RoleAssistant) {
-                if ([self.classroomDelegate respondsToSelector:@selector(deviceInviteEnableDidReject:type:)]) {
-                    RoomMember *mem = [self.currentRoom getMember:msg.opUserId];
-                    [self.classroomDelegate deviceInviteEnableDidReject:mem type:msg.type];
-                }
-            }
+            
         }
     });
 }

+ 0 - 1
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.h

@@ -13,7 +13,6 @@
 NS_ASSUME_NONNULL_BEGIN
 
 typedef NS_ENUM(NSUInteger, DisplayType) {
-    DisplayAssistant = 0,
     DisplayTeacher = 1,
     DisplayWhiteboard = 2,
     DisplaySharedScreen = 3,

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Services/Classroom/Model/Classroom.m

@@ -188,7 +188,7 @@
         uri =[display substringWithRange:NSMakeRange(NSMaxRange(uriRange), display.length-NSMaxRange(uriRange))];
     }
     self.currentDisplayType = type;
-    if(type == DisplayAssistant || type == DisplayTeacher || type == DisplaySharedScreen || type == DisplayTypeStudent) {
+    if(type == DisplayTeacher || type == DisplaySharedScreen || type == DisplayTypeStudent) {
         self.currentDisplayURI = userId;
     }
     else if (type == DisplayWhiteboard) {
@@ -219,7 +219,7 @@
 
 - (RoomMember *)assistant {
     for(RoomMember *mem in self.memberList) {
-        if(mem.role == RoleAssistant) {
+        if(mem.role == RoleTeacher) {
             return mem;
         }
     }

+ 0 - 6
KulexiuForStudent/KulexiuForStudent/Module/SealClass/Util/Portrait/RolePortraitView.m

@@ -39,12 +39,6 @@
 - (CAGradientLayer *)getRoleHeaderGradientLayer:(RoomMember *)member{
     CAGradientLayer *gradientLayer;
     switch (member.role) {
-        case RoleAssistant:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"FCCF31" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"F56352" alpha:1].CGColor]];
-            break;
-        case RoleTeacher:
-            gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"FBA276" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"EB5756" alpha:1].CGColor]];
-            break;
         case RoleStudent:
             gradientLayer = [self createGradientLayerWithColors:@[(__bridge id)[UIColor colorWithHexString:@"0ABFDC" alpha:1].CGColor,(__bridge id)[UIColor colorWithHexString:@"048BB7" alpha:1].CGColor]];
             break;