Steven 2 years ago
parent
commit
e77d82c3c9
38 changed files with 1346 additions and 77 deletions
  1. 48 0
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 19 19
      KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/Contents.json
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/mic_connting@2x.png
  6. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/mic_connting@3x.png
  7. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/Contents.json
  8. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@2x.png
  9. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@3x.png
  10. 2 2
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.m
  11. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/View/CourseForLiveCell.m
  12. 28 8
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/NewHomeViewController.m
  13. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/HomeButtonView.xib
  14. 6 6
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/KSHomeButton.xib
  15. 136 28
      KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m
  16. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h
  17. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m
  18. 17 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.h
  19. 43 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.m
  20. 5 1
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.m
  21. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRCShopRushMessage.m
  22. 17 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.h
  23. 43 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.m
  24. 5 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/RCChatroomSeatsControl.m
  25. 48 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m
  26. 22 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.h
  27. 39 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.m
  28. 115 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.xib
  29. 28 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.h
  30. 95 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.m
  31. 90 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.xib
  32. 31 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.h
  33. 90 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.m
  34. 125 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.xib
  35. 25 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomAlertView.h
  36. 198 0
      KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomAlertView.m
  37. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyVideoCourseBodyView.m
  38. 12 8
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VideoCourseCell.m

+ 48 - 0
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -583,6 +583,13 @@
 		BC802DBA28BC8C810079E350 /* HomeHotVideoCourseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802DB928BC8C810079E350 /* HomeHotVideoCourseView.xib */; };
 		BC802DBD28BC8E2C0079E350 /* HomeHotLiveCourseView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802DBC28BC8E2C0079E350 /* HomeHotLiveCourseView.m */; };
 		BC802DBF28BC8E350079E350 /* HomeHotLiveCourseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802DBE28BC8E350079E350 /* HomeHotLiveCourseView.xib */; };
+		BC802D8528B872AB0079E350 /* KSLiveAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D8428B872AB0079E350 /* KSLiveAlertView.m */; };
+		BC802D8728B872B40079E350 /* KSLiveAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802D8628B872B40079E350 /* KSLiveAlertView.xib */; };
+		BC802D8A28B876720079E350 /* LiveRoomAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D8928B876720079E350 /* LiveRoomAlertView.m */; };
+		BC802D8D28B896460079E350 /* LiveApplyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D8C28B896460079E350 /* LiveApplyView.m */; };
+		BC802D8F28B8964C0079E350 /* LiveApplyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802D8E28B8964C0079E350 /* LiveApplyView.xib */; };
+		BC802D9228B897610079E350 /* LiveApplyingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC802D9128B897610079E350 /* LiveApplyingView.m */; };
+		BC802D9428B897670079E350 /* LiveApplyingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC802D9328B897670079E350 /* LiveApplyingView.xib */; };
 		BC8A4593283DC33400094BBB /* KSCloudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A4548283DC33400094BBB /* KSCloudViewController.m */; };
 		BC8A4594283DC33400094BBB /* MidiPlayerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A454A283DC33400094BBB /* MidiPlayerEngine.m */; };
 		BC8A4595283DC33400094BBB /* GCDTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8A454B283DC33400094BBB /* GCDTimer.m */; };
@@ -649,6 +656,8 @@
 		BC8C2C7E28265D8E00FBA5D5 /* KSNewsAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C7C28265D8D00FBA5D5 /* KSNewsAlert.m */; };
 		BC8C2C7F28265D8E00FBA5D5 /* KSNewsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */; };
 		BC8EC02A28926D6E00D51094 /* KSCustomLoadingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */; };
+		BC9BA9A828B352B30031ECD2 /* KSRejectAllSeatMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */; };
+		BC9BA9A928B352B30031ECD2 /* KSDownSeatAllMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */; };
 		BCA1135D28A3A2BB007FAFB9 /* bass.txt in Resources */ = {isa = PBXBuildFile; fileRef = BCA1135A28A3A2BB007FAFB9 /* bass.txt */; };
 		BCA1135E28A3A2BB007FAFB9 /* bass.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1135B28A3A2BB007FAFB9 /* bass.xcframework */; };
 		BCA1136228A3A2D0007FAFB9 /* bassmidi.txt in Resources */ = {isa = PBXBuildFile; fileRef = BCA1136028A3A2D0007FAFB9 /* bassmidi.txt */; };
@@ -1913,6 +1922,17 @@
 		BC802DBB28BC8E2C0079E350 /* HomeHotLiveCourseView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotLiveCourseView.h; sourceTree = "<group>"; };
 		BC802DBC28BC8E2C0079E350 /* HomeHotLiveCourseView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotLiveCourseView.m; sourceTree = "<group>"; };
 		BC802DBE28BC8E350079E350 /* HomeHotLiveCourseView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotLiveCourseView.xib; sourceTree = "<group>"; };
+		BC802D8328B872AB0079E350 /* KSLiveAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveAlertView.h; sourceTree = "<group>"; };
+		BC802D8428B872AB0079E350 /* KSLiveAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveAlertView.m; sourceTree = "<group>"; };
+		BC802D8628B872B40079E350 /* KSLiveAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSLiveAlertView.xib; sourceTree = "<group>"; };
+		BC802D8828B876720079E350 /* LiveRoomAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveRoomAlertView.h; sourceTree = "<group>"; };
+		BC802D8928B876720079E350 /* LiveRoomAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveRoomAlertView.m; sourceTree = "<group>"; };
+		BC802D8B28B896460079E350 /* LiveApplyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveApplyView.h; sourceTree = "<group>"; };
+		BC802D8C28B896460079E350 /* LiveApplyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LiveApplyView.m; sourceTree = "<group>"; };
+		BC802D8E28B8964C0079E350 /* LiveApplyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LiveApplyView.xib; sourceTree = "<group>"; };
+		BC802D9028B897610079E350 /* LiveApplyingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveApplyingView.h; sourceTree = "<group>"; };
+		BC802D9128B897610079E350 /* LiveApplyingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LiveApplyingView.m; sourceTree = "<group>"; };
+		BC802D9328B897670079E350 /* LiveApplyingView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LiveApplyingView.xib; sourceTree = "<group>"; };
 		BC8A4547283DC33400094BBB /* KSCloudViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSCloudViewController.h; sourceTree = "<group>"; };
 		BC8A4548283DC33400094BBB /* KSCloudViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSCloudViewController.m; sourceTree = "<group>"; };
 		BC8A454A283DC33400094BBB /* MidiPlayerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MidiPlayerEngine.m; sourceTree = "<group>"; };
@@ -2021,6 +2041,10 @@
 		BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSNewsAlert.xib; sourceTree = "<group>"; };
 		BC8EC02828926D6E00D51094 /* KSCustomLoadingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSCustomLoadingManager.h; sourceTree = "<group>"; };
 		BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSCustomLoadingManager.m; sourceTree = "<group>"; };
+		BC9BA9A428B352B30031ECD2 /* KSRejectAllSeatMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRejectAllSeatMessage.h; sourceTree = "<group>"; };
+		BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRejectAllSeatMessage.m; sourceTree = "<group>"; };
+		BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSDownSeatAllMessage.m; sourceTree = "<group>"; };
+		BC9BA9A728B352B30031ECD2 /* KSDownSeatAllMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSDownSeatAllMessage.h; sourceTree = "<group>"; };
 		BCA1135A28A3A2BB007FAFB9 /* bass.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bass.txt; sourceTree = "<group>"; };
 		BCA1135B28A3A2BB007FAFB9 /* bass.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = bass.xcframework; sourceTree = "<group>"; };
 		BCA1135C28A3A2BB007FAFB9 /* bass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bass.h; sourceTree = "<group>"; };
@@ -5053,6 +5077,10 @@
 				BC0A2264284471300065C1AB /* KSLiveBlockUser.m */,
 				BC0A2266284471460065C1AB /* KSLiveUnBlockUser.h */,
 				BC0A2267284471460065C1AB /* KSLiveUnBlockUser.m */,
+				BC9BA9A728B352B30031ECD2 /* KSDownSeatAllMessage.h */,
+				BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */,
+				BC9BA9A428B352B30031ECD2 /* KSRejectAllSeatMessage.h */,
+				BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */,
 			);
 			path = LiveRoomMessage;
 			sourceTree = "<group>";
@@ -5119,6 +5147,17 @@
 				BCB9091528530E9C00F5FF69 /* KSShopCardView.h */,
 				BCB9091628530E9C00F5FF69 /* KSShopCardView.m */,
 				BCB9091828530EA500F5FF69 /* KSShopCardView.xib */,
+				BC802D8328B872AB0079E350 /* KSLiveAlertView.h */,
+				BC802D8428B872AB0079E350 /* KSLiveAlertView.m */,
+				BC802D8628B872B40079E350 /* KSLiveAlertView.xib */,
+				BC802D8828B876720079E350 /* LiveRoomAlertView.h */,
+				BC802D8928B876720079E350 /* LiveRoomAlertView.m */,
+				BC802D8B28B896460079E350 /* LiveApplyView.h */,
+				BC802D8C28B896460079E350 /* LiveApplyView.m */,
+				BC802D8E28B8964C0079E350 /* LiveApplyView.xib */,
+				BC802D9028B897610079E350 /* LiveApplyingView.h */,
+				BC802D9128B897610079E350 /* LiveApplyingView.m */,
+				BC802D9328B897670079E350 /* LiveApplyingView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -5970,6 +6009,7 @@
 				BC71D24F288804CD0010F14B /* img_7.png in Resources */,
 				2723B5BA27F157B100E0B90B /* ChatAddressHeaderView.xib in Resources */,
 				BCC583C228A9EC6400BAB4CF /* cloud_animation_28.png in Resources */,
+				BC802D8728B872B40079E350 /* KSLiveAlertView.xib in Resources */,
 				BC8C2C7F28265D8E00FBA5D5 /* KSNewsAlert.xib in Resources */,
 				BC494A7D286958EC00CCD343 /* MusicRoomCourseInfoCell.xib in Resources */,
 				BC119235280ED97C00A716F7 /* CourseForLiveCell.xib in Resources */,
@@ -6147,6 +6187,7 @@
 				BC27A070280FF56C00F91E27 /* AccompanyStudentEvaCell.xib in Resources */,
 				2723B63927F157D500E0B90B /* GroupMemberListCell.xib in Resources */,
 				BC8A45A0283DC33400094BBB /* JudgePageView.xib in Resources */,
+				BC802D9428B897670079E350 /* LiveApplyingView.xib in Resources */,
 				BC71D244288804CD0010F14B /* img_10.png in Resources */,
 				BC0212F827FC4A080040569F /* SubjectImageCell.xib in Resources */,
 				BCC583B728A9EC6400BAB4CF /* cloud_animation_21.png in Resources */,
@@ -6171,6 +6212,7 @@
 				BCC583CA28A9EC6400BAB4CF /* cloud_animation_6.png in Resources */,
 				2723B5C527F157B100E0B90B /* ContractListCell.xib in Resources */,
 				BCBFDF48281159A40052AFE5 /* HomeHotAlbumView.xib in Resources */,
+				BC802D8F28B8964C0079E350 /* LiveApplyView.xib in Resources */,
 				BC71D24E288804CD0010F14B /* img_16.png in Resources */,
 				27F9033727E87C8B00C08A19 /* MineNavView.xib in Resources */,
 				BC8A45AB283DC33400094BBB /* TrackChooseView.xib in Resources */,
@@ -6402,6 +6444,7 @@
 				2779353427E324A60010E277 /* UIImageView+CornerRadius.m in Sources */,
 				2779357827E324A70010E277 /* NSString+phone.m in Sources */,
 				BC5367C7283F6D6B008428E8 /* HomeVideoCourseView.m in Sources */,
+				BC802D8528B872AB0079E350 /* KSLiveAlertView.m in Sources */,
 				2779357D27E324A80010E277 /* KSMessageInputView.m in Sources */,
 				277935BE27E324A90010E277 /* FSCalendarCalculator.m in Sources */,
 				BCB6347727F6D29600ACFDCF /* LiveRoomLikeLayer.m in Sources */,
@@ -6642,6 +6685,7 @@
 				BCB6353327F6D2A300ACFDCF /* CREmojiCollectionCell.m in Sources */,
 				BCB6356B27F6D2A300ACFDCF /* NodePlayMessage.m in Sources */,
 				2779352327E324A60010E277 /* UILabel+Extension.m in Sources */,
+				BC802D8D28B896460079E350 /* LiveApplyView.m in Sources */,
 				BCB635A327F6D3FE00ACFDCF /* KSNormalAlertView.m in Sources */,
 				2723B63027F157D500E0B90B /* GroupApplyChooseAllCell.m in Sources */,
 				2723B61F27F157D500E0B90B /* GroupNoticeModel.m in Sources */,
@@ -6797,6 +6841,7 @@
 				BC02382528685F87005560CA /* KSRCShopRushMessage.m in Sources */,
 				BC119259280FA85300A716F7 /* HomeworkListCell.m in Sources */,
 				BCA1136628A3A2EA007FAFB9 /* BassMidiEngine.m in Sources */,
+				BC9BA9A828B352B30031ECD2 /* KSRejectAllSeatMessage.m in Sources */,
 				2779353827E324A60010E277 /* UIView+KSExtension.m in Sources */,
 				2723B5CD27F157BE00E0B90B /* GroupListModel.m in Sources */,
 				2779354B27E324A60010E277 /* KSVideoEditor.m in Sources */,
@@ -6806,6 +6851,7 @@
 				BCB6354D27F6D2A300ACFDCF /* EmptyView.m in Sources */,
 				2723B63327F157D500E0B90B /* ChatComplainBodyView.m in Sources */,
 				2779357927E324A70010E277 /* KSImageButton.m in Sources */,
+				BC802D9228B897610079E350 /* LiveApplyingView.m in Sources */,
 				2779351827E324A60010E277 /* NSObject+KSImpChangeTool.m in Sources */,
 				BC8C2C5D2823F57100FBA5D5 /* AddressDetailBodyView.m in Sources */,
 				2779359D27E324A80010E277 /* TZImageManager.m in Sources */,
@@ -6905,6 +6951,7 @@
 				BC119264280FA90100A716F7 /* HomeworkListModel.m in Sources */,
 				2779354A27E324A60010E277 /* UIImage+Resize.m in Sources */,
 				2723B5A327F1578300E0B90B /* KSChatListViewController.m in Sources */,
+				BC9BA9A928B352B30031ECD2 /* KSDownSeatAllMessage.m in Sources */,
 				BC8A45A1283DC33400094BBB /* KSCloudSettingView.m in Sources */,
 				BC119271280FAF7D00A716F7 /* AccompanyCourseInfoCell.m in Sources */,
 				BC2DFF5728BE143A0056105A /* HomeTempLiveCell.m in Sources */,
@@ -6931,6 +6978,7 @@
 				BCB6353D27F6D2A300ACFDCF /* MessageModel.m in Sources */,
 				277935AA27E324A80010E277 /* MSSBrowseNetworkViewController.m in Sources */,
 				2723B63627F157D500E0B90B /* GroupMemberListCell.m in Sources */,
+				BC802D8A28B876720079E350 /* LiveRoomAlertView.m in Sources */,
 				2723B62227F157D500E0B90B /* LFPopupMenu.m in Sources */,
 				BCB6348027F6D29600ACFDCF /* LiveSeatApplyView.m in Sources */,
 				2779357F27E324A80010E277 /* KeyChainTools.m in Sources */,

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


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

@@ -126,9 +126,9 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "731"
-            endingLineNumber = "731"
-            landmarkName = "-updateVideoViewContainer"
+            startingLineNumber = "708"
+            endingLineNumber = "708"
+            landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -478,8 +478,8 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "653"
-            endingLineNumber = "653"
+            startingLineNumber = "643"
+            endingLineNumber = "643"
             landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
          </BreakpointContent>
@@ -510,9 +510,9 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1147"
-            endingLineNumber = "1147"
-            landmarkName = "-showInviteAlertMessage:"
+            startingLineNumber = "1119"
+            endingLineNumber = "1119"
+            landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -526,8 +526,8 @@
             filePath = "KulexiuForStudent/Module/Home/Controller/NewHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1214"
-            endingLineNumber = "1214"
+            startingLineNumber = "1227"
+            endingLineNumber = "1227"
             landmarkName = "-homeNavAction:"
             landmarkType = "7">
          </BreakpointContent>
@@ -542,9 +542,9 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1380"
-            endingLineNumber = "1380"
-            landmarkName = "-didReceiveMessageNotification:"
+            startingLineNumber = "1352"
+            endingLineNumber = "1352"
+            landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
             <Locations>
                <Location
@@ -590,9 +590,9 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1370"
-            endingLineNumber = "1370"
-            landmarkName = "-didReceiveMessageNotification:"
+            startingLineNumber = "1342"
+            endingLineNumber = "1342"
+            landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
             <Locations>
                <Location
@@ -638,9 +638,9 @@
             filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1297"
-            endingLineNumber = "1297"
-            landmarkName = "-didReceiveMessageNotification:"
+            startingLineNumber = "1269"
+            endingLineNumber = "1269"
+            landmarkName = "-connectHostWithStatus:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/mic_connting@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/mic_connting.imageset/mic_connting@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Live/seating_image.imageset/seating_image@3x.png


+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.m

@@ -38,7 +38,7 @@
             UIWindow *window = [[UIApplication sharedApplication ] keyWindow];
             if (!self->t_MBProgressHUD ) {
                 self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:nil
+                                                               HintsText:@"加载中..."
                                                                    Image:nil
                                                           hideAfterDelay:200.0f
                                                                  HaveDim:NO];
@@ -49,7 +49,7 @@
                 
                 [self->t_MBProgressHUD hideAnimated:YES afterDelay:0.0];
                 self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:nil
+                                                               HintsText:@"加载中..."
                                                                    Image:nil
                                                           hideAfterDelay:200.0f
                                                                  HaveDim:NO];

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

@@ -43,7 +43,7 @@
     
     self.courseName.text = [NSString returnNoNullStringWithString:model.name];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
-    self.descLabel.text = [NSString stringWithFormat:@"%@人已购买", model.payCount];
+    self.descLabel.text = [NSString stringWithFormat:@"%@人", model.payCount];
     if ([model.status isEqualToString:@"NOT_START"]) { // 未开始
         self.courseStatusLabel.text = @"未开始";
         self.courseStatusLabel.textColor = HexRGB(0xff802C);

+ 28 - 8
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/NewHomeViewController.m

@@ -148,6 +148,8 @@
 @property (nonatomic, strong) NSMutableArray *liveListArray;
 @property (nonatomic, strong) NSMutableArray *informationArray;
 
+@property (nonatomic, strong) UIView *headBgView;
+
 @end
 
 @implementation NewHomeViewController
@@ -179,9 +181,7 @@
 }
 
 - (void)configHeadView {
-    UIView *headBgView = [[UIView alloc] init];
-    headBgView.backgroundColor = [UIColor whiteColor];
-    [self.headView addSubview:headBgView];
+    [self.headView addSubview:self.headBgView];
     
     // banner
     [self.headView addSubview:self.bannerView];
@@ -272,15 +272,15 @@
     }];
     self.liveCourseView.hidden = YES;
     
-    [headBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+    [self.headBgView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.headView);
         make.top.mas_equalTo(self.bannerView.mas_top);
         make.bottom.mas_equalTo(self.buttonContainer.mas_bottom);
     }];
     
-    headBgView.layer.masksToBounds = YES;
-    headBgView.layer.cornerRadius = 10.0f;
-    headBgView.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
+    self.headBgView.layer.masksToBounds = YES;
+    self.headBgView.layer.cornerRadius = 18.0f;
+    self.headBgView.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
     
     [self refreshHeadHeight];
 }
@@ -722,7 +722,7 @@
 
 - (void)refreshViewLocation {
     // 如果有课程和公告 且有按钮
-    CGFloat buttonViewDefaultHeight = self.buttonArray.count > 5 ? [HomeButtonView getViewHeight] : [HomeButtonView getViewHeight] - 20;
+    CGFloat buttonViewDefaultHeight = self.buttonArray.count > 5 ? [HomeButtonView getViewHeight] : [HomeButtonView getViewHeight] - 10;
     
     if (self.noticeTitleArray.count && self.recentCourseModel && self.buttonArray.count) {
         self.noticeViewHeight = [PublicNoticeView getViewHeight];
@@ -743,6 +743,12 @@
             make.top.mas_equalTo(self.buttonContainer.mas_bottom);
             make.height.mas_equalTo(self.courseViewHeight);
         }];
+        
+        [self.headBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.mas_equalTo(self.headView);
+            make.top.mas_equalTo(self.bannerView.mas_top);
+            make.bottom.mas_equalTo(self.buttonContainer.mas_bottom);
+        }];
     }
     else {
         self.buttonViewHeight = self.buttonArray.count ? buttonViewDefaultHeight : CGFLOAT_MIN;
@@ -757,6 +763,13 @@
             make.top.mas_equalTo(self.buttonContainer.mas_bottom);
             make.height.mas_equalTo(self.noticeViewHeight);
         }];
+        
+        [self.headBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.mas_equalTo(self.headView);
+            make.top.mas_equalTo(self.bannerView.mas_top);
+            make.bottom.mas_equalTo(self.noticeView.mas_bottom);
+        }];
+        
         CGFloat courseViewHeight = self.recentCourseModel ? 90.0f : CGFLOAT_MIN;
         self.courseViewHeight = courseViewHeight;
         [self.courseView mas_remakeConstraints:^(MASConstraintMaker *make) {
@@ -1345,6 +1358,13 @@
 }
 
 #pragma mark ---- notice view
+- (UIView *)headBgView {
+    if (!_headBgView) {
+        _headBgView = [[UIView alloc] init];
+        _headBgView.backgroundColor = [UIColor whiteColor];
+    }
+    return _headBgView;
+}
 - (PublicNoticeView *)noticeView {
     if (!_noticeView) {
         _noticeView = [PublicNoticeView shareInstance];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/HomeButtonView.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FDF-ZT-TJx">
-                    <rect key="frame" x="0.0" y="10" width="414" height="100"/>
+                    <rect key="frame" x="0.0" y="5" width="414" height="100"/>
                     <subviews>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hu0-Qz-IjA">
                             <rect key="frame" x="189" y="86" width="36" height="4"/>
@@ -57,7 +57,7 @@
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
-                <constraint firstItem="FDF-ZT-TJx" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="10" id="D3O-sT-Grz"/>
+                <constraint firstItem="FDF-ZT-TJx" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="5" id="D3O-sT-Grz"/>
                 <constraint firstItem="FDF-ZT-TJx" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="WkT-zx-U1t"/>
                 <constraint firstAttribute="trailing" secondItem="FDF-ZT-TJx" secondAttribute="trailing" id="vJG-sS-Gpn"/>
             </constraints>

+ 6 - 6
KulexiuForStudent/KulexiuForStudent/Module/Home/View/HomeButton/KSHomeButton.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="专项训练" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1ld-By-usD">
-                    <rect key="frame" x="2" y="63" width="76" height="17"/>
+                    <rect key="frame" x="2" y="53" width="76" height="17"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="17" id="HmM-NJ-9X6"/>
                     </constraints>
@@ -29,10 +29,10 @@
                     </constraints>
                 </button>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_accompany" translatesAutoresizingMaskIntoConstraints="NO" id="fGp-yj-UZk">
-                    <rect key="frame" x="14.5" y="5" width="51" height="51"/>
+                    <rect key="frame" x="15" y="2" width="50" height="50"/>
                     <constraints>
-                        <constraint firstAttribute="width" constant="51" id="a4B-wg-004"/>
-                        <constraint firstAttribute="height" constant="51" id="xmk-HE-99v"/>
+                        <constraint firstAttribute="width" constant="50" id="a4B-wg-004"/>
+                        <constraint firstAttribute="height" constant="50" id="xmk-HE-99v"/>
                     </constraints>
                 </imageView>
             </subviews>
@@ -45,8 +45,8 @@
                 <constraint firstItem="1ld-By-usD" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Zfj-98-cxn"/>
                 <constraint firstAttribute="trailing" secondItem="1ld-By-usD" secondAttribute="trailing" constant="2" id="bfB-Zj-nct"/>
                 <constraint firstItem="Z8s-SG-JhM" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="gyu-3P-I55"/>
-                <constraint firstItem="fGp-yj-UZk" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="5" id="t2k-gD-lM1"/>
-                <constraint firstAttribute="bottom" secondItem="1ld-By-usD" secondAttribute="bottom" id="ygh-pf-cwF"/>
+                <constraint firstItem="1ld-By-usD" firstAttribute="top" secondItem="fGp-yj-UZk" secondAttribute="bottom" constant="1" id="rks-6W-iJb"/>
+                <constraint firstItem="fGp-yj-UZk" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="2" id="t2k-gD-lM1"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>

+ 136 - 28
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -14,7 +14,7 @@
 #import "KSChatroomMessageCenter.h"
 #import <RongIMKit/RongIMKit.h>
 #import "KSChatroomTextCell.h"
-#import "KSNormalAlertView.h"
+
 #import "KSLiveStreamVideo.h"
 #import "SeatContentView.h"
 #import "LiveroomTimeManager.h"
@@ -31,6 +31,10 @@
 #import "KSLiveEndView.h"
 #import "LiveAnimationView.h"
 
+#import "LiveRoomAlertView.h"
+#import "LiveApplyView.h"
+#import "LiveApplyingView.h"
+
 #define AUTOHIDE_TIME (10.0f)
 
 #define PACKAGE_LOST (0.30f)
@@ -67,7 +71,7 @@ typedef NS_ENUM(NSInteger, MICSTATUS) {
 // 连麦状态
 @property (nonatomic, assign) MICSTATUS micStatus;
 /// 提示窗
-@property (nonatomic, strong) KSNormalAlertView *alertView;
+@property (nonatomic, strong) LiveRoomAlertView *alertView;
 /// 连麦的视图
 @property (nonatomic, strong) SeatContentView *seatContainer;
 // 聊天UI
@@ -141,6 +145,10 @@ typedef NS_ENUM(NSInteger, MICSTATUS) {
 
 @property (nonatomic, assign) BOOL isOtherLogin;  // 是否被顶掉
 
+@property (nonatomic, strong) LiveApplyView *applyView; // 未申请
+ 
+@property (nonatomic, strong) LiveApplyingView *applyingView; // 申请中
+
 @end
 
 //  用于记录点赞消息连续点击的次数
@@ -236,12 +244,13 @@ static int clickPraiseBtnTimes  = 0;
 }
 
 - (void)joinRTCRoom {
+    
+    // 如果当前加入了房间 只刷新或者退出
     if (self.room && self.liveRoleType == RCRTCLiveRoleTypeBroadcaster) {
         [self connectHostWithStatus:NO];
     }
     else {
         [self setRoleType];
-
     }
 }
 
@@ -438,7 +447,8 @@ static int clickPraiseBtnTimes  = 0;
     if (self.hasShowSuspendView) {
         KSLiveStreamVideo *mainVideo = nil;
         if (self.videoView.streamId) {
-            for (KSLiveStreamVideo *streamVideo in self.streamVideos) {
+            NSMutableArray *steamArray = [self.streamVideos mutableCopy];
+            for (KSLiveStreamVideo *streamVideo in steamArray) {
                 if ([streamVideo.streamId isEqualToString:self.videoView.streamId]) {
                     mainVideo = streamVideo;
                     break;
@@ -533,6 +543,8 @@ static int clickPraiseBtnTimes  = 0;
 }
 
 - (void)setRoleType {
+    self.micStatus = MICSTATUS_NOMAL;
+    [self hideApplyingView];
     // 1.设置切换听筒为扬声器
     [self.engine setDefaultAudioRouteToSpeaker:YES];
     // 2.加入RTC房间
@@ -541,6 +553,7 @@ static int clickPraiseBtnTimes  = 0;
 
 // 观众上下麦
 - (void)connectHostWithStatus:(BOOL)isConnect {
+
     //  转换中,不再处理转换身份
     if (self.isTransferRole) {
         return;
@@ -588,6 +601,7 @@ static int clickPraiseBtnTimes  = 0;
             });
             
         } onFailed:^(RCRTCCode code) {
+            
             NSLog(@"------- up error code %ld", code);
             weakSelf.isTransferRole = NO;
             dispatch_main_async_safe(^{
@@ -604,7 +618,6 @@ static int clickPraiseBtnTimes  = 0;
                     weakSelf.micStatus = MICSTATUS_NOMAL;
                     [weakSelf renderSeatView];
                 }
-                
             });
             
         } onKicked:^{
@@ -662,7 +675,6 @@ static int clickPraiseBtnTimes  = 0;
                 }
                 // 刷新麦位状态
                 [weakSelf renderSeatView];
-                
             });
             
         } onKicked:^{
@@ -713,7 +725,9 @@ static int clickPraiseBtnTimes  = 0;
 // 更新视图
 - (void)updateVideoViewContainer {
     NSMutableArray *steamArray = [self.streamVideos mutableCopy];
-    if (self.streamVideos.count > 0) {
+
+    if (steamArray.count > 0) {
+
         // 渲染主播的流 优先显示主播的共享流
         KSLiveStreamVideo *mainVideo = nil;
         for (KSLiveStreamVideo *videoSource in steamArray) {
@@ -973,7 +987,9 @@ static int clickPraiseBtnTimes  = 0;
 
 - (void)resetConnectionStatus {
     if (self.micStatus == MICSTATUS_CONNECTING) {
-        [self connectHostWithStatus:NO];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [self connectHostWithStatus:NO];
+        });
     }
     else {
         [self removeSeatContainer];
@@ -1046,6 +1062,8 @@ static int clickPraiseBtnTimes  = 0;
 
 #pragma mark ---- RTC
 - (void)joinLiveRoom {
+//    self.liveRoleType = RCRTCLiveRoleTypeAudience;
+//    self.micStatus = MICSTATUS_NOMAL;
     // 1.配置房间
     RCRTCRoomConfig *config = [[RCRTCRoomConfig alloc] init];
     config.roomType = RCRTCRoomTypeLive;
@@ -1143,7 +1161,7 @@ static int clickPraiseBtnTimes  = 0;
         self.alertView = nil;
     }
     MJWeakSelf;
-    self.alertView = [KSNormalAlertView ks_showAlertWithTitle:tipsMessage leftTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
+    self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:tipsMessage leftButtonTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
         weakSelf.micStatus = MICSTATUS_NOMAL;
         [weakSelf sendSeatResponseMessage:NO];
     } confirm:^{
@@ -1349,7 +1367,14 @@ static int clickPraiseBtnTimes  = 0;
                     RCChatroomSeatsControl *seatControlMessage = (RCChatroomSeatsControl *)rcMessage.content;
                     if (seatControlMessage.seatBan) { // 禁止连麦
                         __blockSelf.enableSeat = NO;
-                        __blockSelf.micStatus = MICSTATUS_NOMAL;
+                        
+                        // 未连麦情况下才重置
+                        if (__blockSelf.micStatus != MICSTATUS_CONNECTING) {
+                            __blockSelf.micStatus = MICSTATUS_NOMAL;
+                        }
+                        
+                        [__blockSelf hideApplyView];
+                        [__blockSelf hideApplyingView];
                     }
                     else { // 开启连麦
                         __blockSelf.enableSeat = YES;
@@ -1377,6 +1402,7 @@ static int clickPraiseBtnTimes  = 0;
                     else if (seatApplyMessage.type == SEATHANDLE_KICKSEAT) { // 主讲人将麦上观众抱下麦
                         [__blockSelf kickSeatWithMessage:@"您已被抱下麦"];
                     }
+                    [__blockSelf hideApplyingView];
                     [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                 }
                 // 连麦回复消息(暂不处理)
@@ -1392,6 +1418,8 @@ static int clickPraiseBtnTimes  = 0;
                         [__blockSelf MBPShow:@"主讲人拒绝了您的连麦申请"];
                         __blockSelf.micStatus = MICSTATUS_NOMAL;
                     }
+                    [__blockSelf hideApplyingView];
+                    [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomDownSeat class]]) { // 成员下麦消息
                     return;
@@ -1406,6 +1434,7 @@ static int clickPraiseBtnTimes  = 0;
                         // 显示直播间关闭状态
                         [__blockSelf closeAlertView];
                         [__blockSelf displayCloseView];
+                        [__blockSelf hideApplyingView];
                     });
                     return;
                 }
@@ -1414,9 +1443,11 @@ static int clickPraiseBtnTimes  = 0;
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSRCPauseLiveMessage class]]) { // 主讲人暂停直播
                     [__blockSelf MBPShow:@"主讲人已暂停直播"];
-                    [__blockSelf resetNetTips];
                     [__blockSelf resetConnectionStatus];
+                    [__blockSelf resetNetTips];
                     [__blockSelf closeAlertView];
+                    [__blockSelf hideApplyingView];
+                    return;
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSRCShopRushMessage class]]) { //
                     
@@ -1438,12 +1469,39 @@ static int clickPraiseBtnTimes  = 0;
                         __blockSelf.blacklistFlag = NO;
                     }
                 }
+                else if ([rcMessage.content isMemberOfClass:[KSDownSeatAllMessage class]]) { // 所有麦上用户下麦
+                    if (__blockSelf.micStatus == MICSTATUS_CONNECTING) {
+                        [__blockSelf kickSeatWithMessage:@"您已被抱下麦"];
+                        [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
+                    }
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSRejectAllSeatMessage class]]) { // 拒绝所有连麦申请
+                    if (__blockSelf.micStatus == MICSTATUS_WAITING) {
+                        [__blockSelf MBPShow:@"主讲人拒绝了您的连麦申请"];
+                        // 处理连麦状态
+                        __blockSelf.micStatus = MICSTATUS_NOMAL;
+                        [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
+                        [__blockSelf hideApplyingView];
+                    }
+                }
+                
             }
             
         }));
     }
 }
 
+- (void)hideApplyView {
+    if (self.applyView.isShow) {
+        [self.applyView hideView];
+    }
+}
+
+- (void)hideApplyingView {
+    if (self.applyingView.isShow) {
+        [self.applyingView hideView];
+    }
+}
 
 // 发送人数同步消息
 - (void)sendMemberCountMessage {
@@ -1623,7 +1681,7 @@ static int clickPraiseBtnTimes  = 0;
     if(!cell){
         cell = [[KSChatroomTextCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"KSChatroomTextCell"];
     }
-    if ([messageContent isMemberOfClass:[RCTextMessage class]] || [messageContent isMemberOfClass:[KSLiveChatroomWelcome class]] || [messageContent isMemberOfClass:[KSLiveChatroomLike class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatApply class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatResponse class]]){
+    if ([messageContent isMemberOfClass:[RCTextMessage class]] || [messageContent isMemberOfClass:[KSLiveChatroomWelcome class]] || [messageContent isMemberOfClass:[KSLiveChatroomLike class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatApply class]] || [messageContent isMemberOfClass:[KSLiveChatroomSeatResponse class]] || [messageContent isMemberOfClass:[KSDownSeatAllMessage class]] || [messageContent isMemberOfClass:[KSRejectAllSeatMessage class]] || [messageContent isMemberOfClass:[RCChatroomSeatsControl class]]){
         [cell setDataModel:model createrId:self.createrId];
     }
     return cell;
@@ -1641,6 +1699,8 @@ static int clickPraiseBtnTimes  = 0;
     applyMessage.audienceId = UserDefault(UIDKey);
     applyMessage.audienceName = UserDefault(NicknameKey);
     applyMessage.audienceAvatar = UserDefault(AvatarUrlKey);
+    applyMessage.teacherId = self.createrId;
+    applyMessage.teacherName = self.createrName;
     MJWeakSelf;
     [self sendMessage:applyMessage displayMessage:YES callback:^(BOOL success) {
         if (success) {
@@ -1706,6 +1766,10 @@ static int clickPraiseBtnTimes  = 0;
             }
                 break;
             case MICSTATUS_WAITING:
+            {
+                [self.bottomView.seatButton setImage:[UIImage imageNamed:@"seating_image"] forState:UIControlStateNormal];
+            }
+                break;
             case MICSTATUS_CONNECTING:
             {
                 [self.bottomView.seatButton setImage:[UIImage imageNamed:@"seat_image"] forState:UIControlStateNormal];
@@ -1836,7 +1900,7 @@ static int clickPraiseBtnTimes  = 0;
     }
     else {
         MJWeakSelf;
-        [KSNormalAlertView ks_showAlertWithTitle:@"是否退出直播间" leftTitle:@"取消" rightTitle:@"退出" cancel:^{
+        self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"是否退出直播间" leftButtonTitle:@"取消" rightTitle:@"退出" inView:self.view cancel:^{
             
         } confirm:^{
             [weakSelf quitAction];
@@ -1883,20 +1947,16 @@ static int clickPraiseBtnTimes  = 0;
             if (self.micStatus == MICSTATUS_CONNECTING) { // 连麦中
                 // 是否取消连麦
                 MJWeakSelf;
-                self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"连麦中,确认取消连麦吗?" leftTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
+                self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"连麦中,确认取消连麦吗?" leftButtonTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
                     
                 } confirm:^{
                     [weakSelf connectHostWithStatus:NO];
                 }];
+                
             }
             else if (self.micStatus == MICSTATUS_WAITING) { // 连麦申请中
                 // 弹窗取消申请
-                MJWeakSelf;
-                self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"连麦申请中,确认取消连麦申请吗?" leftTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
-                    
-                } confirm:^{
-                    [weakSelf sendSeatMessageApply:NO];
-                }];
+                [self displayApplyingView];
             }
             else {
                  if (self.blacklistFlag == YES) {
@@ -1908,13 +1968,13 @@ static int clickPraiseBtnTimes  = 0;
                     return;
                 }
                 
-//                if (self.enableSeat) {
-                    [self MBPShow:@"已发起连麦申请"];
-                    [self sendSeatMessageApply:YES];
-//                }
-//                else {
-//                    [self MBPShow:@"管理员关闭连麦申请"];
-//                }
+                if (self.enableSeat) {
+                    // 显示弹窗
+                    [self displaySeatApplyView];
+                }
+                else {
+                    [self MBPShow:@"管理员关闭连麦申请"];
+                }
             }
         }
             break;
@@ -1938,6 +1998,14 @@ static int clickPraiseBtnTimes  = 0;
     }
 }
 
+- (void)displaySeatApplyView {
+    [self.applyView showInView:self.view];
+}
+
+- (void)displayApplyingView {
+    [self.applyingView showInView:self.view];
+}
+
 - (void)showCartAlert {
     [self.cardView showViewInView:self.view];
 }
@@ -1945,7 +2013,7 @@ static int clickPraiseBtnTimes  = 0;
 - (void)quitAction {
     if (self.micStatus == MICSTATUS_CONNECTING) {
         MJWeakSelf;
-        self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"连麦中,是否退出房间?" leftTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
+        self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"连麦中,是否退出房间?" leftButtonTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
             
         } confirm:^{
             [weakSelf quitRoom];
@@ -2256,4 +2324,44 @@ static int clickPraiseBtnTimes  = 0;
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
 
+- (LiveApplyView *)applyView {
+    if (!_applyView) {
+        _applyView = [LiveApplyView shareInstance];
+        MJWeakSelf;
+        [_applyView applySeatCallback:^{
+            [weakSelf applySeatAction];
+        }];
+    }
+    return _applyView;
+}
+
+- (void)applySeatAction {
+    [self MBPShow:@"已发起连麦申请"];
+    [self sendSeatMessageApply:YES];
+}
+
+- (LiveApplyingView *)applyingView {
+    if (!_applyingView) {
+        _applyingView = [LiveApplyingView shareInstance];
+        NSString *avatar = UserDefaultObjectForKey(AvatarUrlKey);
+        [_applyingView.myAvatal sd_setImageWithURL:[NSURL URLWithString:[avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [_applyingView.teacherAvatal sd_setImageWithURL:[NSURL URLWithString:[self.createrAvatal getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        MJWeakSelf;
+        [_applyingView cancleApplyCallback:^{
+            [weakSelf cancleApplyAction];
+        }];
+    }
+    return _applyingView;
+}
+
+- (void)cancleApplyAction {
+    MJWeakSelf;
+    self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"连麦申请中,确认取消连麦申请吗?" leftButtonTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
+        
+    } confirm:^{
+        [weakSelf.applyingView hideView];
+        [weakSelf sendSeatMessageApply:NO];
+    }];
+}
+
 @end

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

@@ -26,6 +26,9 @@
 #import "KSRCPauseLiveMessage.h"
 #import "KSRCShopRushMessage.h"
 #import "RCChatroomSeatsControl.h"
+#import "KSDownSeatAllMessage.h"
+#import "KSRejectAllSeatMessage.h"
+
 typedef void(^RCChatroomMessageSuccess)(long messageId);
 typedef void(^RCChatroomMessageError)(RCErrorCode errorCode, long messageId);
 

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

@@ -44,6 +44,8 @@
     [[RCIM sharedRCIM] registerMessageType:[KSRCPauseLiveMessage class]];
     [[RCIM sharedRCIM] registerMessageType:[KSRCShopRushMessage class]];
     [[RCIM sharedRCIM] registerMessageType:[RCChatroomSeatsControl class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSDownSeatAllMessage class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSRejectAllSeatMessage class]];
     
 }
 

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.h

@@ -0,0 +1,17 @@
+//
+//  KSDownSeatAllMessage.h
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSDownSeatAllMessage : RCMessageContent
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 43 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.m

@@ -0,0 +1,43 @@
+//
+//  KSDownSeatAllMessage.m
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "KSDownSeatAllMessage.h"
+
+@implementation KSDownSeatAllMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    if (self.senderUserInfo) {
+        [multableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
+    }
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+    NSDictionary *userinfoDic = dictionary[@"user"];
+    [self decodeUserInfo:userinfoDic];
+}
+
+
++ (NSString *)getObjectName {
+  return @"RC:Chatroom:DownSeatAll";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end

+ 5 - 1
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.m

@@ -11,7 +11,9 @@
 @implementation KSRCPauseLiveMessage
 - (NSData *)encode {
     NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
-    
+    if (self.senderUserInfo) {
+        [multableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
+    }
     return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
 }
 
@@ -20,6 +22,8 @@
     NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
     NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
     if (json == nil) return;
+    NSDictionary *userinfoDic = dictionary[@"user"];
+    [self decodeUserInfo:userinfoDic];
 }
 
 

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRCShopRushMessage.m

@@ -22,6 +22,9 @@
     } else {
         [mutableDict setObject:@"" forKey:@"userName"];
     }
+    if (self.senderUserInfo) {
+        [mutableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
+    }
     return [NSJSONSerialization dataWithJSONObject:mutableDict options:kNilOptions error:nil];
 }
 
@@ -32,6 +35,8 @@
     if (json == nil) return;
     self.userId = [json stringValueForKey:@"userId"];
     self.userName = [json stringValueForKey:@"userName"];
+    NSDictionary *userinfoDic = dictionary[@"user"];
+    [self decodeUserInfo:userinfoDic];
 }
 
 + (NSString *)getObjectName {

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.h

@@ -0,0 +1,17 @@
+//
+//  KSRejectAllSeatMessage.h
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSRejectAllSeatMessage : RCMessageContent
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 43 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.m

@@ -0,0 +1,43 @@
+//
+//  KSRejectAllSeatMessage.m
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "KSRejectAllSeatMessage.h"
+
+@implementation KSRejectAllSeatMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    if (self.senderUserInfo) {
+        [multableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
+    }
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+    NSDictionary *userinfoDic = dictionary[@"user"];
+    [self decodeUserInfo:userinfoDic];
+}
+
+
++ (NSString *)getObjectName {
+  return @"RC:Chatroom:RejectSeatAll";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end

+ 5 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/RCChatroomSeatsControl.m

@@ -23,6 +23,9 @@
         [mutableDict setObject:@"" forKey:@"userName"];
     }
     [mutableDict setObject:@(self.seatBan) forKey:@"seatBan"];
+    if (self.senderUserInfo) {
+        [mutableDict setObject:[self encodeUserInfo:self.senderUserInfo] forKey:@"user"];
+    }
     return [NSJSONSerialization dataWithJSONObject:mutableDict options:kNilOptions error:nil];
 }
 
@@ -34,6 +37,8 @@
     self.userId = [json stringValueForKey:@"userId"];
     self.userName = [json stringValueForKey:@"userName"];
     self.seatBan = [[json stringValueForKey:@"seatBan"] boolValue];
+    NSDictionary *userinfoDic = dictionary[@"user"];
+    [self decodeUserInfo:userinfoDic];
 }
 
 + (NSString *)getObjectName {

+ 48 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSChatroomTextCell.m

@@ -167,6 +167,54 @@
         [self.contentLabel setAttributedText:attributedString.copy];
         return;
     }
+    else if ([model.content isMemberOfClass:[RCChatroomSeatsControl class]]) {
+        RCChatroomSeatsControl *seatControlMessage = (RCChatroomSeatsControl *)model.content;
+        NSString *userName = [seatControlMessage.userName stringByAppendingString:@""];
+        
+        NSString *localizedMessage = seatControlMessage.seatBan ? @"关闭连麦" : @"开启连麦";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        
+        if (isCreator) {
+            [self addAttachmentImg:attributedString imgName:creatorImg];
+        }
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
+    else if ([model.content isMemberOfClass:[KSDownSeatAllMessage class]]) { // 所有麦上用户下麦
+        RCUserInfo *userInfo = model.userInfo;
+        NSString *userName = userInfo.name;
+        NSString *localizedMessage = @"";
+        localizedMessage = @"将你抱下麦";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        [self addAttachmentImg:attributedString imgName:creatorImg];
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
+    else if ([model.content isMemberOfClass:[KSRejectAllSeatMessage class]]) { // 拒绝所有连麦申请
+        RCUserInfo *userInfo = model.userInfo;
+        NSString *userName = userInfo.name;
+        NSString *localizedMessage = @"";
+        localizedMessage = @"拒绝了连麦申请";
+        NSString *str =[NSString stringWithFormat:@"%@%@",headString,userName];
+        NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:str];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0x00FFF0)) range:[str rangeOfString:userName]];
+        
+        NSMutableAttributedString *descString = [[NSMutableAttributedString alloc] initWithString:localizedMessage];
+        [descString addAttribute:NSForegroundColorAttributeName value:(HexRGB(0xffffff)) range:[localizedMessage rangeOfString:localizedMessage]];
+        [attributedString appendAttributedString:descString];
+        [self addAttachmentImg:attributedString imgName:creatorImg];
+        [self.contentLabel setAttributedText:attributedString.copy];
+    }
     else if ([model.content isMemberOfClass:[RCTextMessage class]]) {
         
         RCTextMessage *textMessage = (RCTextMessage *)self.model.content;

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.h

@@ -0,0 +1,22 @@
+//
+//  KSLiveAlertView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import "BaseAlertView.h"
+
+typedef void(^LiveAlertCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSLiveAlertView : BaseAlertView
+
++ (instancetype)shareInstance;
+
+- (void)configDescMessage:(NSString *)descMessage leftButtonTitle:(NSString *)leftTitle rightButtonTitle:(NSString *)rightTitle cancel:(LiveAlertCallback)cancel confirm:(LiveAlertCallback)confirm;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 39 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.m

@@ -0,0 +1,39 @@
+//
+//  KSLiveAlertView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import "KSLiveAlertView.h"
+
+@interface KSLiveAlertView ()
+
+@property (weak, nonatomic) IBOutlet UILabel *headTitleLabel;
+
+@property (weak, nonatomic) IBOutlet UIButton *leftButton;
+
+@property (weak, nonatomic) IBOutlet UIButton *rightButton;
+
+@end
+
+@implementation KSLiveAlertView
+
++ (instancetype)shareInstance {
+    KSLiveAlertView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSLiveAlertView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configDescMessage:(NSString *)descMessage leftButtonTitle:(NSString *)leftTitle rightButtonTitle:(NSString *)rightTitle cancel:(LiveAlertCallback)cancel confirm:(LiveAlertCallback)confirm {
+    
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 115 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/KSLiveAlertView.xib

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSLiveAlertView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bKc-op-sSr">
+                    <rect key="frame" x="68.5" y="378" width="277" height="140"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MOL-hD-PTq">
+                            <rect key="frame" x="0.0" y="93" width="138" height="47"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="47" id="UdC-ov-MhK"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="取消">
+                                <color key="titleColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </state>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m3C-sG-XpO">
+                            <rect key="frame" x="139" y="93" width="138" height="47"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="确定">
+                                <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </state>
+                        </button>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2au-Wa-jmG">
+                            <rect key="frame" x="138" y="93" width="1" height="47"/>
+                            <color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="1" id="P3b-v7-TZz"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yCR-7e-I9F">
+                            <rect key="frame" x="0.0" y="92" width="277" height="1"/>
+                            <color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="3nn-Um-B3W"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wvY-Wh-Rz2">
+                            <rect key="frame" x="0.0" y="0.0" width="277" height="92"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="确认将正在申请连麦的学员清空?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i0a-YB-rCP">
+                                    <rect key="frame" x="35" y="29.5" width="207" height="33.5"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                    <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="i0a-YB-rCP" firstAttribute="leading" secondItem="wvY-Wh-Rz2" secondAttribute="leading" constant="35" id="fgM-sM-L9E"/>
+                                <constraint firstAttribute="trailing" secondItem="i0a-YB-rCP" secondAttribute="trailing" constant="35" id="nPe-VK-jJb"/>
+                                <constraint firstItem="i0a-YB-rCP" firstAttribute="centerY" secondItem="wvY-Wh-Rz2" secondAttribute="centerY" id="sO9-qn-fRt"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="wvY-Wh-Rz2" secondAttribute="trailing" id="1pS-TW-2XY"/>
+                        <constraint firstItem="MOL-hD-PTq" firstAttribute="top" secondItem="yCR-7e-I9F" secondAttribute="bottom" id="CuR-eZ-pcn"/>
+                        <constraint firstItem="2au-Wa-jmG" firstAttribute="height" secondItem="MOL-hD-PTq" secondAttribute="height" id="DDy-Uw-Qvm"/>
+                        <constraint firstItem="m3C-sG-XpO" firstAttribute="leading" secondItem="2au-Wa-jmG" secondAttribute="trailing" id="DNS-xI-SyY"/>
+                        <constraint firstItem="MOL-hD-PTq" firstAttribute="leading" secondItem="bKc-op-sSr" secondAttribute="leading" id="FGu-jt-urW"/>
+                        <constraint firstAttribute="width" constant="277" id="KHc-9s-6eN"/>
+                        <constraint firstItem="2au-Wa-jmG" firstAttribute="leading" secondItem="MOL-hD-PTq" secondAttribute="trailing" id="KtE-Ji-Oov"/>
+                        <constraint firstAttribute="bottom" secondItem="2au-Wa-jmG" secondAttribute="bottom" id="PRQ-Ty-qc5"/>
+                        <constraint firstItem="wvY-Wh-Rz2" firstAttribute="top" secondItem="bKc-op-sSr" secondAttribute="top" id="PT4-wM-Mae"/>
+                        <constraint firstItem="yCR-7e-I9F" firstAttribute="leading" secondItem="bKc-op-sSr" secondAttribute="leading" id="QDN-3y-VFW"/>
+                        <constraint firstItem="m3C-sG-XpO" firstAttribute="width" secondItem="MOL-hD-PTq" secondAttribute="width" id="QHC-xm-9Nd"/>
+                        <constraint firstAttribute="bottom" secondItem="m3C-sG-XpO" secondAttribute="bottom" id="TMX-WO-Xfa"/>
+                        <constraint firstAttribute="height" constant="140" id="ecH-VT-8cK"/>
+                        <constraint firstAttribute="bottom" secondItem="MOL-hD-PTq" secondAttribute="bottom" id="iUo-XU-vrV"/>
+                        <constraint firstItem="yCR-7e-I9F" firstAttribute="top" secondItem="wvY-Wh-Rz2" secondAttribute="bottom" id="kbU-M9-c8W"/>
+                        <constraint firstAttribute="trailing" secondItem="yCR-7e-I9F" secondAttribute="trailing" id="km6-Hm-npQ"/>
+                        <constraint firstAttribute="trailing" secondItem="m3C-sG-XpO" secondAttribute="trailing" id="rYi-wa-fXd"/>
+                        <constraint firstItem="wvY-Wh-Rz2" firstAttribute="leading" secondItem="bKc-op-sSr" secondAttribute="leading" id="s3T-Hs-Q7o"/>
+                        <constraint firstItem="m3C-sG-XpO" firstAttribute="height" secondItem="MOL-hD-PTq" secondAttribute="height" id="y7j-oy-SVC"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="8"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="sRGB"/>
+            <constraints>
+                <constraint firstItem="bKc-op-sSr" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Xrg-jb-hj8"/>
+                <constraint firstItem="bKc-op-sSr" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="xWx-rH-J8M"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="headTitleLabel" destination="i0a-YB-rCP" id="okS-l9-Jf7"/>
+                <outlet property="leftButton" destination="MOL-hD-PTq" id="52b-sR-heE"/>
+                <outlet property="rightButton" destination="m3C-sG-XpO" id="iN3-vN-jmD"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="69.642857142857139"/>
+        </view>
+    </objects>
+</document>

+ 28 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.h

@@ -0,0 +1,28 @@
+//
+//  LiveApplyView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^LiveApplyCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LiveApplyView : UIView
+
+@property (nonatomic, assign) BOOL isShow;
+
++ (instancetype)shareInstance;
+
+- (void)showInView:(UIView *)displayView;
+
+- (void)applySeatCallback:(LiveApplyCallback)callback;
+
+- (void)hideView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 95 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.m

@@ -0,0 +1,95 @@
+//
+//  LiveApplyView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import "LiveApplyView.h"
+
+@interface LiveApplyView ()<UIGestureRecognizerDelegate>
+
+@property (weak, nonatomic) IBOutlet UIView *containerView;
+
+@property (nonatomic, copy) LiveApplyCallback callback;
+
+@end
+
+@implementation LiveApplyView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self setUpUI];
+    [self addTapGesture];
+}
+
+- (void)setUpUI {
+    if (@available(iOS 11.0, *)) {
+        _containerView.layer.cornerRadius = 14;
+        _containerView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // 左上圆角
+    }
+    else {
+        UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:_containerView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(14, 14)];
+        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+        maskLayer.frame = _containerView.bounds;
+        maskLayer.path = path.CGPath;
+        _containerView.layer.mask = maskLayer;
+    }
+    _containerView.layer.masksToBounds = YES;
+}
+
+- (void)addTapGesture {
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideView)];
+    tap.delegate = self;
+    [self addGestureRecognizer:tap];
+}
+
++ (instancetype)shareInstance {
+    LiveApplyView *view = [[[NSBundle mainBundle] loadNibNamed:@"LiveApplyView" owner:nil options:nil] firstObject];
+    view.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
+    return view;
+}
+
+- (void)showInView:(UIView *)displayView {
+    self.isShow = YES;
+    [displayView addSubview:self];
+}
+
+- (void)applySeatCallback:(LiveApplyCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (void)hideView {
+    self.isShow = NO;
+    [self removeFromSuperview];
+}
+
+
+- (IBAction)applyAction:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+    [self hideView];
+}
+
+- (IBAction)cancleAction:(id)sender {
+    [self hideView];
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.containerView]) {
+        return NO;
+    }
+    return YES;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 90 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyView.xib

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LiveApplyView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aXt-Ef-uLt">
+                    <rect key="frame" x="0.0" y="755" width="414" height="141"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gy4-S5-S7T">
+                            <rect key="frame" x="0.0" y="0.0" width="414" height="60"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="60" id="0PC-ZQ-L87"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="申请连麦">
+                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </state>
+                            <connections>
+                                <action selector="applyAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="gDK-O0-ykv"/>
+                            </connections>
+                        </button>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bSH-gd-YJE">
+                            <rect key="frame" x="0.0" y="60" width="414" height="1"/>
+                            <color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="mQx-uS-ZDc"/>
+                            </constraints>
+                        </view>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ddN-vb-duW">
+                            <rect key="frame" x="0.0" y="61" width="414" height="60"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="60" id="b0Y-a8-qgr"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="18"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="取消">
+                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </state>
+                            <connections>
+                                <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="tsf-5c-wwY"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="ddN-vb-duW" firstAttribute="top" secondItem="bSH-gd-YJE" secondAttribute="bottom" id="2Zz-L7-eOQ"/>
+                        <constraint firstAttribute="height" constant="141" id="5Zh-gD-IsK"/>
+                        <constraint firstAttribute="trailing" secondItem="ddN-vb-duW" secondAttribute="trailing" id="C0k-af-CaY"/>
+                        <constraint firstItem="bSH-gd-YJE" firstAttribute="leading" secondItem="aXt-Ef-uLt" secondAttribute="leading" id="HQs-3G-5rE"/>
+                        <constraint firstAttribute="trailing" secondItem="Gy4-S5-S7T" secondAttribute="trailing" id="Idb-3M-XgU"/>
+                        <constraint firstItem="Gy4-S5-S7T" firstAttribute="top" secondItem="aXt-Ef-uLt" secondAttribute="top" id="Qnh-v6-4KM"/>
+                        <constraint firstItem="bSH-gd-YJE" firstAttribute="top" secondItem="Gy4-S5-S7T" secondAttribute="bottom" id="RRj-Gh-arv"/>
+                        <constraint firstItem="ddN-vb-duW" firstAttribute="leading" secondItem="aXt-Ef-uLt" secondAttribute="leading" id="RdP-hY-amA"/>
+                        <constraint firstAttribute="trailing" secondItem="bSH-gd-YJE" secondAttribute="trailing" id="pNA-67-dE1"/>
+                        <constraint firstItem="Gy4-S5-S7T" firstAttribute="leading" secondItem="aXt-Ef-uLt" secondAttribute="leading" id="yxy-Oq-cl7"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="aXt-Ef-uLt" secondAttribute="bottom" id="05x-K4-5ro"/>
+                <constraint firstAttribute="trailing" secondItem="aXt-Ef-uLt" secondAttribute="trailing" id="7wm-GA-5vt"/>
+                <constraint firstItem="aXt-Ef-uLt" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="sOS-84-44k"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="containerView" destination="aXt-Ef-uLt" id="bdK-dB-nKi"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="95.758928571428569"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 31 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.h

@@ -0,0 +1,31 @@
+//
+//  LiveApplyingView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^LiveCancleApplyBlcok)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LiveApplyingView : UIView
+
+@property (nonatomic, assign) BOOL isShow;
+
+@property (weak, nonatomic) IBOutlet UIImageView *myAvatal;
+
+@property (weak, nonatomic) IBOutlet UIImageView *teacherAvatal;
+
++ (instancetype)shareInstance;
+
+- (void)showInView:(UIView *)displayView;
+
+- (void)cancleApplyCallback:(LiveCancleApplyBlcok)callback;
+
+- (void)hideView;
+@end
+
+NS_ASSUME_NONNULL_END

+ 90 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.m

@@ -0,0 +1,90 @@
+//
+//  LiveApplyingView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2022/8/26.
+//
+
+#import "LiveApplyingView.h"
+
+@interface LiveApplyingView ()<UIGestureRecognizerDelegate>
+
+@property (weak, nonatomic) IBOutlet UIView *containerView;
+
+@property (nonatomic, copy) LiveCancleApplyBlcok callback;
+
+@end
+
+@implementation LiveApplyingView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self setUpUI];
+    [self addTapGesture];
+}
+
+- (void)setUpUI {
+    if (@available(iOS 11.0, *)) {
+        _containerView.layer.cornerRadius = 14;
+        _containerView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // 左上圆角
+    }
+    else {
+        UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:_containerView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(14, 14)];
+        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+        maskLayer.frame = _containerView.bounds;
+        maskLayer.path = path.CGPath;
+        _containerView.layer.mask = maskLayer;
+    }
+    _containerView.layer.masksToBounds = YES;
+}
+
+- (void)addTapGesture {
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideView)];
+    tap.delegate = self;
+    [self addGestureRecognizer:tap];
+}
+
+- (void)hideView {
+    self.isShow = NO;
+    [self removeFromSuperview];
+}
+
++ (instancetype)shareInstance {
+    LiveApplyingView *view = [[[NSBundle mainBundle] loadNibNamed:@"LiveApplyingView" owner:nil options:nil] firstObject];
+    view.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
+    return view;
+}
+
+- (void)showInView:(UIView *)displayView {
+    self.isShow = YES;
+    [displayView addSubview:self];
+}
+
+- (void)cancleApplyCallback:(LiveCancleApplyBlcok)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+
+- (IBAction)cancleApplyAction:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.containerView]) {
+        return NO;
+    }
+    return YES;
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 125 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveApplyingView.xib

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LiveApplyingView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jll-Qz-Jz1">
+                    <rect key="frame" x="0.0" y="608" width="414" height="288"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="取消申请" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0p0-3M-G5w">
+                            <rect key="frame" x="338" y="20" width="58" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jex-7n-2XW">
+                            <rect key="frame" x="338" y="8.5" width="58" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="v4D-iy-sVi"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="cancleApplyAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="x0L-0h-o81"/>
+                            </connections>
+                        </button>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="wTz-Qn-nGw">
+                            <rect key="frame" x="126.5" y="64" width="48" height="48"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="48" id="jmZ-n2-cyB"/>
+                                <constraint firstAttribute="width" constant="48" id="yUY-zO-oXE"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="24"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </imageView>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="0Ka-dD-OT2">
+                            <rect key="frame" x="239.5" y="64" width="48" height="48"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="48" id="2Oe-cF-PfY"/>
+                                <constraint firstAttribute="width" constant="48" id="uBr-dV-vKq"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="24"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </imageView>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mic_connting" translatesAutoresizingMaskIntoConstraints="NO" id="TNz-Yw-Dop">
+                            <rect key="frame" x="188.5" y="74" width="37" height="28"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="37" id="Cu5-1m-zFB"/>
+                                <constraint firstAttribute="height" constant="28" id="Z3x-hP-Erf"/>
+                            </constraints>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已申请连麦" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fcW-ky-NK2">
+                            <rect key="frame" x="161" y="150" width="92" height="22"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="等待老师通过" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rcd-yy-NiK">
+                            <rect key="frame" x="164" y="180" width="86" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="fcW-ky-NK2" firstAttribute="top" secondItem="wTz-Qn-nGw" secondAttribute="bottom" constant="38" id="CbU-Sz-A3h"/>
+                        <constraint firstItem="fcW-ky-NK2" firstAttribute="centerX" secondItem="Jll-Qz-Jz1" secondAttribute="centerX" id="Ckp-FP-dN3"/>
+                        <constraint firstItem="TNz-Yw-Dop" firstAttribute="top" secondItem="Jll-Qz-Jz1" secondAttribute="top" constant="74" id="DkR-b7-TtC"/>
+                        <constraint firstItem="Rcd-yy-NiK" firstAttribute="top" secondItem="fcW-ky-NK2" secondAttribute="bottom" constant="8" id="SYi-0N-rfn"/>
+                        <constraint firstItem="0Ka-dD-OT2" firstAttribute="centerY" secondItem="wTz-Qn-nGw" secondAttribute="centerY" id="VRS-Vo-bRb"/>
+                        <constraint firstItem="jex-7n-2XW" firstAttribute="centerY" secondItem="0p0-3M-G5w" secondAttribute="centerY" id="Yhb-gM-L5e"/>
+                        <constraint firstItem="0p0-3M-G5w" firstAttribute="top" secondItem="Jll-Qz-Jz1" secondAttribute="top" constant="20" id="Znf-ZO-KzW"/>
+                        <constraint firstItem="0Ka-dD-OT2" firstAttribute="leading" secondItem="TNz-Yw-Dop" secondAttribute="trailing" constant="14" id="bDK-oi-CqH"/>
+                        <constraint firstItem="jex-7n-2XW" firstAttribute="centerX" secondItem="0p0-3M-G5w" secondAttribute="centerX" id="btw-Sx-3O6"/>
+                        <constraint firstItem="TNz-Yw-Dop" firstAttribute="leading" secondItem="wTz-Qn-nGw" secondAttribute="trailing" constant="14" id="eCv-Hm-1b2"/>
+                        <constraint firstAttribute="height" constant="288" id="fVG-bS-LpJ"/>
+                        <constraint firstItem="jex-7n-2XW" firstAttribute="leading" secondItem="0p0-3M-G5w" secondAttribute="leading" id="l6c-GI-tkv"/>
+                        <constraint firstItem="Rcd-yy-NiK" firstAttribute="centerX" secondItem="fcW-ky-NK2" secondAttribute="centerX" id="oRq-PV-fjk"/>
+                        <constraint firstAttribute="trailing" secondItem="0p0-3M-G5w" secondAttribute="trailing" constant="18" id="ogL-J4-vM1"/>
+                        <constraint firstItem="TNz-Yw-Dop" firstAttribute="centerX" secondItem="Jll-Qz-Jz1" secondAttribute="centerX" id="q5p-R2-dcW"/>
+                        <constraint firstItem="TNz-Yw-Dop" firstAttribute="centerY" secondItem="wTz-Qn-nGw" secondAttribute="centerY" id="tWo-p8-BdQ"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="Jll-Qz-Jz1" secondAttribute="trailing" id="Gl5-8d-raH"/>
+                <constraint firstItem="Jll-Qz-Jz1" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="k0o-oO-Tc9"/>
+                <constraint firstAttribute="bottom" secondItem="Jll-Qz-Jz1" secondAttribute="bottom" id="lkx-EC-0ss"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="containerView" destination="Jll-Qz-Jz1" id="PP1-o4-Va2"/>
+                <outlet property="myAvatal" destination="wTz-Qn-nGw" id="7Ij-1V-ACK"/>
+                <outlet property="teacherAvatal" destination="0Ka-dD-OT2" id="aLu-st-eO0"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="95.758928571428569"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="mic_connting" width="37" height="28"/>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 25 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomAlertView.h

@@ -0,0 +1,25 @@
+//
+//  LiveRoomAlertView.h
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/6/16.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^LiveAlertCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LiveRoomAlertView : UIView
+
+@property (nonatomic, assign) BOOL isShow;
+
++ (LiveRoomAlertView *)liveroomAlertWithTitle:(NSString *)title leftButtonTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle inView:(UIView *)displayView cancel:(LiveAlertCallback)cancel confirm:(LiveAlertCallback)confirm;
+
+- (void)dismissAlertView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 198 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/View/LiveRoomAlertView.m

@@ -0,0 +1,198 @@
+//
+//  LiveRoomAlertView.m
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/6/16.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "LiveRoomAlertView.h"
+#import "UIView+Animation.h"
+
+typedef enum : NSUInteger {
+    LiveRoomAlertViewCancel,
+    LiveRoomAlertViewConfirm,
+} LiveRoomAlertViewActionTag;
+
+#define ContainerWidth 320
+#define ContainerHeight 180
+
+@interface LiveRoomAlertView ()
+
+@property (nonatomic, strong) UILabel *tipsLabel;
+
+@property (nonatomic, strong) UILabel *titleLable;
+
+@property (nonatomic, strong) UIButton *cancelButton;
+
+@property (nonatomic, strong) UIButton *sureButton;
+
+@property (nonatomic, strong) NSString *title;
+
+@property (nonatomic, strong) NSString *leftTitle;
+
+@property (nonatomic, strong) NSString *rightTitle;
+
+@property (nonatomic, copy) LiveAlertCallback cancel;
+
+@property (nonatomic, copy) LiveAlertCallback confirm;
+
+@end
+
+@implementation LiveRoomAlertView
+
+
+
++ (LiveRoomAlertView *)liveroomAlertWithTitle:(NSString *)title leftButtonTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle inView:(UIView *)displayView cancel:(LiveAlertCallback)cancel confirm:(LiveAlertCallback)confirm {
+    LiveRoomAlertView *alertView = [[LiveRoomAlertView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, KPortraitHeight)];
+    alertView.backgroundColor = HexRGBAlpha(0x000000, 0.5f);
+    alertView.title = title;
+    alertView.leftTitle = leftTitle;
+    alertView.rightTitle = rightTitle;
+    alertView.cancel = cancel;
+    alertView.confirm = confirm;
+    [alertView addSubviews];
+    [alertView showAlertInView:displayView];
+    return alertView;
+}
+
+
+- (void)addSubviews {
+    UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake((kScreenWidth - ContainerWidth) / 2, (CGRectGetHeight(self.bounds) - ContainerHeight) / 2, ContainerWidth, ContainerHeight)];
+    contentView.backgroundColor = [UIColor whiteColor];
+    contentView.layer.cornerRadius = 8.0f;
+    contentView.layer.masksToBounds = YES;
+    [self addSubview:contentView];
+    
+    [contentView addSubview:self.titleLable];
+    [contentView addSubview:self.cancelButton];
+    [contentView addSubview:self.sureButton];
+    
+    CGFloat width = (ContainerWidth - 1) / 2.0f;
+    
+    [self.cancelButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(contentView.mas_left);
+        make.bottom.equalTo(contentView.mas_bottom);
+        make.height.mas_equalTo(47);
+        make.width.mas_equalTo(width);
+    }];
+    
+    [self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.cancelButton.mas_right);
+        make.bottom.mas_equalTo(contentView.mas_bottom);
+        make.height.mas_equalTo(47);
+        make.width.mas_equalTo(width);
+    }];
+    
+    UIView *buttonSpaceLineView = [[UIView alloc] initWithFrame:CGRectZero];
+    buttonSpaceLineView.backgroundColor = HexRGB(0xDEDEDE);
+    [contentView addSubview:buttonSpaceLineView];
+    
+    [buttonSpaceLineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.cancelButton.mas_right);
+        make.top.bottom.mas_equalTo(self.cancelButton);
+        make.width.mas_equalTo(1);
+    }];
+    
+    UIView *headLine = [[UIView alloc] initWithFrame:CGRectZero];
+    headLine.backgroundColor = HexRGB(0xDEDEDE);
+    [contentView addSubview:headLine];
+    [headLine mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(contentView);
+        make.height.mas_equalTo(1);
+        make.bottom.mas_equalTo(self.cancelButton.mas_top);
+    }];
+    
+    [self.titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(contentView.mas_top).offset(30);
+        make.left.equalTo(contentView.mas_left).offset(36);
+        make.right.equalTo(contentView.mas_right).offset(-36);
+        make.bottom.mas_greaterThanOrEqualTo(self.sureButton.mas_top).offset(-15);
+    }];
+    
+}
+
+
+
+- (void)showAlertInView:(UIView *)displayView {
+    _isShow = YES;
+    [displayView addSubview:self];
+    [displayView bringSubviewToFront:self];
+    [self setPopAnimation];
+}
+
+
+- (void)dismissAlertView {
+    _isShow = NO;
+    [self removeFromSuperview];
+}
+
+
+- (void)buttonAction:(UIButton *)button {
+    if (button.tag == LiveRoomAlertViewCancel) {
+        if (self.cancel) {
+            self.cancel();
+        }
+    }else {
+        if (self.confirm) {
+            self.confirm();
+        }
+    }
+    [self dismissAlertView];
+}
+
+
+
+
+- (UILabel *)titleLable {
+    if (!_titleLable) {
+        _titleLable = [[UILabel alloc] init];
+        _titleLable.font = [UIFont systemFontOfSize:14.0f];
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        [paragraphStyle setLineSpacing:4];//调整行间距
+        [paragraphStyle setAlignment:NSTextAlignmentCenter];
+        NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:self.title attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+        _titleLable.attributedText = attrs;
+        _titleLable.numberOfLines = 0;
+        _titleLable.lineBreakMode = NSLineBreakByTruncatingMiddle;
+    }
+    return _titleLable;
+}
+
+- (UIButton *)cancelButton {
+    if(!_cancelButton) {
+        _cancelButton = [[UIButton alloc] init];
+        _cancelButton.backgroundColor =  [UIColor clearColor];
+        [_cancelButton.titleLabel setFont:[UIFont systemFontOfSize:16.0f]];
+        [_cancelButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
+        [_cancelButton setTitle:self.leftTitle forState:UIControlStateNormal];
+        _cancelButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
+        _cancelButton.tag = LiveRoomAlertViewCancel;
+        [_cancelButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    }
+    return _cancelButton;
+}
+
+- (UIButton *)sureButton {
+    if (!_sureButton) {
+        _sureButton = [[UIButton alloc] init];
+        _sureButton.backgroundColor =  [UIColor clearColor];
+        [_sureButton.titleLabel setFont:[UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium]];
+        [_sureButton setTitleColor:HexRGB(0x333333) forState:UIControlStateNormal];
+        [_sureButton setTitle:self.rightTitle forState:UIControlStateNormal];
+        _sureButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
+        _sureButton.tag = LiveRoomAlertViewConfirm;
+        [_sureButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
+    }
+    return _sureButton;
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyVideoCourseBodyView.m

@@ -201,8 +201,8 @@
     VideoCourseCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"VideoCourseCell" forIndexPath:indexPath];
     
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
-    BOOL isCheck = self.selectIndex != 0;
-    [cell configSourceModel:model isInCheck:isCheck];
+//    BOOL isCheck = self.selectIndex != 0;
+    [cell configSourceModel:model isInCheck:NO];
     return cell;
 }
 

+ 12 - 8
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/VideoCourseCell.m

@@ -42,17 +42,21 @@
     else {
         self.teacherName.text = model.username;
     }
-    if (model.lessonPrice > 0) {
-        self.courseMessage.text = [NSString  stringWithFormat:@"¥%.2f/%.0f课时",model.lessonPrice,model.lessonCount];
+    
+    if (isCheck) {
+        self.descView.hidden = YES;
+        self.descLabel.text = @"";
     }
     else {
-        self.courseMessage.text = [NSString  stringWithFormat:@"免费/%.0f课时",model.lessonCount];
+        self.descView.hidden = NO;
+        if (model.lessonPrice > 0) {
+            self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
+        }
+        else {
+            self.descLabel.text = [NSString stringWithFormat:@"%.0f人已领取",model.countStudent];
+
+        }
     }
-    
-    
-    
-    self.descView.hidden = NO;
-    self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
 }