Explorar el Código

作业列表点评状态

Steven hace 3 años
padre
commit
fd58e7a453
Se han modificado 100 ficheros con 3378 adiciones y 294 borrados
  1. 104 14
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 271 102
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 9 0
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_down.imageset/Contents.json
  6. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_down.imageset/beat_down@2x.png
  7. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_down.imageset/beat_down@3x.png
  8. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_up.imageset/Contents.json
  9. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_up.imageset/beat_up@2x.png
  10. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_up.imageset/beat_up@3x.png
  11. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/metronome_bg.imageset/Contents.json
  12. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/metronome_bg.imageset/metronome_bg@2x.png
  13. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/metronome_bg.imageset/metronome_bg@3x.png
  14. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/speed_dot.imageset/Contents.json
  15. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/speed_dot.imageset/speed_dot@2x.png
  16. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/speed_dot.imageset/speed_dot@3x.png
  17. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/volume_img.imageset/Contents.json
  18. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/volume_img.imageset/volume_img@2x.png
  19. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/volume_img.imageset/volume_img@3x.png
  20. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/chatroom_speaker.imageset/chatroom_speaker@2x.png
  21. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/chatroom_speaker.imageset/chatroom_speaker@3x.png
  22. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_close.imageset/Contents.json
  23. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_close.imageset/live_close@2x.png
  24. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_close.imageset/live_close@3x.png
  25. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_more.imageset/Contents.json
  26. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_more.imageset/live_more@2x.png
  27. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_more.imageset/live_more@3x.png
  28. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_bad.imageset/Contents.json
  29. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_bad.imageset/live_networking_bad@2x.png
  30. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_bad.imageset/live_networking_bad@3x.png
  31. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_good.imageset/Contents.json
  32. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_good.imageset/live_networking@2x.png
  33. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_good.imageset/live_networking@3x.png
  34. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_nomal.imageset/Contents.json
  35. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_nomal.imageset/live_networking_nomal@2x.png
  36. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_nomal.imageset/live_networking_nomal@3x.png
  37. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_pause.imageset/Contents.json
  38. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_pause.imageset/live_pause@2x.png
  39. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_pause.imageset/live_pause@3x.png
  40. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_mine.imageset/seat_mine@2x.png
  41. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_mine.imageset/seat_mine@3x.png
  42. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_other.imageset/seat_other@2x.png
  43. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_other.imageset/seat_other@3x.png
  44. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/Style/choose_instrument.imageset/choose_instrument@2x.png
  45. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/Style/choose_instrument.imageset/choose_instrument@3x.png
  46. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/auth_detail.imageset/Contents.json
  47. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/auth_detail.imageset/auth_detail@2x.png
  48. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/auth_detail.imageset/auth_detail@3x.png
  49. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.xib
  50. 42 22
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  51. 33 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  52. 65 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  53. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSOrderManager.m
  54. 21 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.h
  55. 75 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.m
  56. 127 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.xib
  57. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.h
  58. 10 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.m
  59. 9 49
      KulexiuForTeacher/KulexiuForTeacher/Info.plist
  60. 6 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m
  61. 1 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  62. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/FullVideo/FullVideoCell.m
  63. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/TitleView/ClassTitleView.m
  64. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  65. 52 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m
  66. 18 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m
  67. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.xib
  68. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.h
  69. 20 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.m
  70. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.xib
  71. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m
  72. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkListModel.h
  73. 11 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkListModel.m
  74. 21 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkListCell.m
  75. 19 13
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/MusicRoomHomeworkCell.m
  76. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m
  77. 9 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  78. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m
  79. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m
  80. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m
  81. 34 21
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  82. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.h
  83. 48 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.m
  84. 96 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.xib
  85. 14 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.xib
  86. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m
  87. 8 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib
  88. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.xib
  89. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.h
  90. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/PublicNoticeView.xib
  91. 4 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m
  92. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.h
  93. 1802 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m
  94. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.m
  95. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h
  96. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m
  97. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.h
  98. 40 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m
  99. 17 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.h
  100. 38 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.m

+ 104 - 14
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -434,6 +434,12 @@
 		27FC2F6627F1BBFE00FCC239 /* MyMusicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FC2F6527F1BBFE00FCC239 /* MyMusicViewController.m */; };
 		27FC2F6D27F1BE4800FCC239 /* VideoCourseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FC2F6C27F1BE4800FCC239 /* VideoCourseViewController.m */; };
 		BC0167A627FC06D600AE66A1 /* MyCourseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0167A527FC06D600AE66A1 /* MyCourseViewController.m */; };
+		BC023802286594EA005560CA /* KSTipsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC0237FF286594EA005560CA /* KSTipsAlert.xib */; };
+		BC023803286594EA005560CA /* KSTipsAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BC023800286594EA005560CA /* KSTipsAlert.m */; };
+		BC0238062865C4F6005560CA /* KSLiveChatroomMemberUp.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0238052865C4F6005560CA /* KSLiveChatroomMemberUp.m */; };
+		BC0238092865C601005560CA /* KSRCShopRushMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0238082865C601005560CA /* KSRCShopRushMessage.m */; };
+		BC02380C2865C610005560CA /* RCChatroomClose.m in Sources */ = {isa = PBXBuildFile; fileRef = BC02380B2865C610005560CA /* RCChatroomClose.m */; };
+		BC02380F2865C6F9005560CA /* RCChatroomLikeCount.m in Sources */ = {isa = PBXBuildFile; fileRef = BC02380D2865C6F9005560CA /* RCChatroomLikeCount.m */; };
 		BC063D842823CEFE000EB350 /* AddressListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC063D822823CEFD000EB350 /* AddressListModel.m */; };
 		BC0A2282284751DF0065C1AB /* MetronomeAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0A2278284751DF0065C1AB /* MetronomeAlertView.m */; };
 		BC0A2283284751DF0065C1AB /* MetronomeControlView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC0A227B284751DF0065C1AB /* MetronomeControlView.m */; };
@@ -479,6 +485,8 @@
 		BC332DB3284866BE005AEF95 /* KSOrderManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC332DB1284866BE005AEF95 /* KSOrderManager.m */; };
 		BC3DE082280D88670027DC0E /* EvaluateListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3DE081280D88670027DC0E /* EvaluateListModel.m */; };
 		BC3DE088280D89E90027DC0E /* EvaluateDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3DE087280D89E90027DC0E /* EvaluateDetailViewController.m */; };
+		BC4058922863028200111BC5 /* NotiferNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC4058912863028200111BC5 /* NotiferNavView.m */; };
+		BC4058942863028C00111BC5 /* NotiferNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC4058932863028C00111BC5 /* NotiferNavView.xib */; };
 		BC41103828066C2F00800BD9 /* HomeworkListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC41103728066C2F00800BD9 /* HomeworkListViewController.m */; };
 		BC41103B28066D2E00800BD9 /* HomeworkBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC41103A28066D2E00800BD9 /* HomeworkBodyView.m */; };
 		BC41104228066E5500800BD9 /* EvaluateCourseListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC41104128066E5500800BD9 /* EvaluateCourseListViewController.m */; };
@@ -735,6 +743,13 @@
 		BCC9F44927F69BD200647449 /* ClassroomService.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9F40027F69BD200647449 /* ClassroomService.m */; };
 		BCC9F44A27F69BD200647449 /* RTCService.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9F40227F69BD200647449 /* RTCService.m */; };
 		BCC9F44B27F69BD200647449 /* KSIMService.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9F40627F69BD200647449 /* KSIMService.m */; };
+		BCD457A5286319660010B493 /* CourseTimeSegView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457A4286319660010B493 /* CourseTimeSegView.m */; };
+		BCD457A72863196F0010B493 /* CourseTimeSegView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCD457A62863196E0010B493 /* CourseTimeSegView.xib */; };
+		BCD457B2286564DB0010B493 /* LiveRoomAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457B1286564DB0010B493 /* LiveRoomAlertView.m */; };
+		BCD457B62865651A0010B493 /* LiveMoreDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCD457B42865651A0010B493 /* LiveMoreDisplayView.xib */; };
+		BCD457B72865651A0010B493 /* LiveMoreDisplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457B52865651A0010B493 /* LiveMoreDisplayView.m */; };
+		BCD457BB2865652C0010B493 /* LiveAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457B92865652C0010B493 /* LiveAnimationView.m */; };
+		BCD457BE2865694B0010B493 /* KSRCPauseLiveMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457BD2865694A0010B493 /* KSRCPauseLiveMessage.m */; };
 		BCD6D15C281950E9009A773E /* WithdrawModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD6D15B281950E9009A773E /* WithdrawModel.m */; };
 		BCD6D15F281950F2009A773E /* UserBankCard.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD6D15E281950F2009A773E /* UserBankCard.m */; };
 		BCD6D16228195A17009A773E /* WithdrawApplyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD6D16128195A17009A773E /* WithdrawApplyViewController.m */; };
@@ -1616,6 +1631,17 @@
 		AC7237F12804B8A0533DF9FE /* Pods-KulexiuForTeacher.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KulexiuForTeacher.debug.xcconfig"; path = "Target Support Files/Pods-KulexiuForTeacher/Pods-KulexiuForTeacher.debug.xcconfig"; sourceTree = "<group>"; };
 		BC0167A427FC06D600AE66A1 /* MyCourseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyCourseViewController.h; sourceTree = "<group>"; };
 		BC0167A527FC06D600AE66A1 /* MyCourseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyCourseViewController.m; sourceTree = "<group>"; };
+		BC0237FF286594EA005560CA /* KSTipsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSTipsAlert.xib; sourceTree = "<group>"; };
+		BC023800286594EA005560CA /* KSTipsAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSTipsAlert.m; sourceTree = "<group>"; };
+		BC023801286594EA005560CA /* KSTipsAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSTipsAlert.h; sourceTree = "<group>"; };
+		BC0238042865C4F6005560CA /* KSLiveChatroomMemberUp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLiveChatroomMemberUp.h; sourceTree = "<group>"; };
+		BC0238052865C4F6005560CA /* KSLiveChatroomMemberUp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLiveChatroomMemberUp.m; sourceTree = "<group>"; };
+		BC0238072865C600005560CA /* KSRCShopRushMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRCShopRushMessage.h; sourceTree = "<group>"; };
+		BC0238082865C601005560CA /* KSRCShopRushMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRCShopRushMessage.m; sourceTree = "<group>"; };
+		BC02380A2865C610005560CA /* RCChatroomClose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCChatroomClose.h; sourceTree = "<group>"; };
+		BC02380B2865C610005560CA /* RCChatroomClose.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCChatroomClose.m; sourceTree = "<group>"; };
+		BC02380D2865C6F9005560CA /* RCChatroomLikeCount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCChatroomLikeCount.m; sourceTree = "<group>"; };
+		BC02380E2865C6F9005560CA /* RCChatroomLikeCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCChatroomLikeCount.h; sourceTree = "<group>"; };
 		BC063D822823CEFD000EB350 /* AddressListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressListModel.m; sourceTree = "<group>"; };
 		BC063D832823CEFE000EB350 /* AddressListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressListModel.h; sourceTree = "<group>"; };
 		BC0A2278284751DF0065C1AB /* MetronomeAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MetronomeAlertView.m; sourceTree = "<group>"; };
@@ -1697,6 +1723,9 @@
 		BC3DE081280D88670027DC0E /* EvaluateListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EvaluateListModel.m; sourceTree = "<group>"; };
 		BC3DE086280D89E90027DC0E /* EvaluateDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EvaluateDetailViewController.h; sourceTree = "<group>"; };
 		BC3DE087280D89E90027DC0E /* EvaluateDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EvaluateDetailViewController.m; sourceTree = "<group>"; };
+		BC4058902863028200111BC5 /* NotiferNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotiferNavView.h; sourceTree = "<group>"; };
+		BC4058912863028200111BC5 /* NotiferNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotiferNavView.m; sourceTree = "<group>"; };
+		BC4058932863028C00111BC5 /* NotiferNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NotiferNavView.xib; sourceTree = "<group>"; };
 		BC41103628066C2F00800BD9 /* HomeworkListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkListViewController.h; sourceTree = "<group>"; };
 		BC41103728066C2F00800BD9 /* HomeworkListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeworkListViewController.m; sourceTree = "<group>"; };
 		BC41103928066D2E00800BD9 /* HomeworkBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkBodyView.h; sourceTree = "<group>"; };
@@ -2141,6 +2170,18 @@
 		BCC9F40327F69BD200647449 /* RTCService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCService.h; sourceTree = "<group>"; };
 		BCC9F40527F69BD200647449 /* KSIMService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSIMService.h; sourceTree = "<group>"; };
 		BCC9F40627F69BD200647449 /* KSIMService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSIMService.m; sourceTree = "<group>"; };
+		BCD457A3286319660010B493 /* CourseTimeSegView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CourseTimeSegView.h; sourceTree = "<group>"; };
+		BCD457A4286319660010B493 /* CourseTimeSegView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CourseTimeSegView.m; sourceTree = "<group>"; };
+		BCD457A62863196E0010B493 /* CourseTimeSegView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CourseTimeSegView.xib; sourceTree = "<group>"; };
+		BCD457B0286564DB0010B493 /* LiveRoomAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveRoomAlertView.h; sourceTree = "<group>"; };
+		BCD457B1286564DB0010B493 /* LiveRoomAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveRoomAlertView.m; sourceTree = "<group>"; };
+		BCD457B3286565190010B493 /* LiveMoreDisplayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveMoreDisplayView.h; sourceTree = "<group>"; };
+		BCD457B42865651A0010B493 /* LiveMoreDisplayView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LiveMoreDisplayView.xib; sourceTree = "<group>"; };
+		BCD457B52865651A0010B493 /* LiveMoreDisplayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveMoreDisplayView.m; sourceTree = "<group>"; };
+		BCD457B92865652C0010B493 /* LiveAnimationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveAnimationView.m; sourceTree = "<group>"; };
+		BCD457BA2865652C0010B493 /* LiveAnimationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveAnimationView.h; sourceTree = "<group>"; };
+		BCD457BC2865694A0010B493 /* KSRCPauseLiveMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRCPauseLiveMessage.h; sourceTree = "<group>"; };
+		BCD457BD2865694A0010B493 /* KSRCPauseLiveMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRCPauseLiveMessage.m; sourceTree = "<group>"; };
 		BCD6D15A281950E9009A773E /* WithdrawModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WithdrawModel.h; sourceTree = "<group>"; };
 		BCD6D15B281950E9009A773E /* WithdrawModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WithdrawModel.m; sourceTree = "<group>"; };
 		BCD6D15D281950F1009A773E /* UserBankCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserBankCard.h; sourceTree = "<group>"; };
@@ -2420,32 +2461,42 @@
 		275E3DAA27F45BBB0010EC30 /* LiveRoomMessage */ = {
 			isa = PBXGroup;
 			children = (
-				BC6C303827F586A60044BC0F /* KSRCMessageModel.h */,
-				BC6C303927F586A60044BC0F /* KSRCMessageModel.m */,
 				275E3DAB27F45BE90010EC30 /* KSChatroomMessageCenter.h */,
 				275E3DAC27F45BE90010EC30 /* KSChatroomMessageCenter.m */,
-				275E3DAE27F45CA60010EC30 /* KSLiveChatroomLike.h */,
-				275E3DAF27F45CA60010EC30 /* KSLiveChatroomLike.m */,
+				275E3DC327F460030010EC30 /* KSLiveChatroomClose.h */,
+				275E3DC427F460030010EC30 /* KSLiveChatroomClose.m */,
 				275E3DB127F45D380010EC30 /* KSLiveChatroomDownSeat.h */,
 				275E3DB227F45D380010EC30 /* KSLiveChatroomDownSeat.m */,
 				275E3DB427F45DA60010EC30 /* KSLiveChatroomEnter.h */,
 				275E3DB527F45DA60010EC30 /* KSLiveChatroomEnter.m */,
-				275E3DBA27F45E750010EC30 /* KSLiveChatroomLeave.h */,
-				275E3DBB27F45E750010EC30 /* KSLiveChatroomLeave.m */,
-				275E3DBD27F45EB90010EC30 /* KSLiveChatroomUserQuit.h */,
-				275E3DBE27F45EB90010EC30 /* KSLiveChatroomUserQuit.m */,
-				275E3DC027F45F3F0010EC30 /* KSLiveChatroomWelcome.h */,
-				275E3DC127F45F3F0010EC30 /* KSLiveChatroomWelcome.m */,
-				275E3DC327F460030010EC30 /* KSLiveChatroomClose.h */,
-				275E3DC427F460030010EC30 /* KSLiveChatroomClose.m */,
 				275E3DC627F460720010EC30 /* KSLiveChatroomKickOut.h */,
 				275E3DC727F460720010EC30 /* KSLiveChatroomKickOut.m */,
+				275E3DBA27F45E750010EC30 /* KSLiveChatroomLeave.h */,
+				275E3DBB27F45E750010EC30 /* KSLiveChatroomLeave.m */,
+				275E3DAE27F45CA60010EC30 /* KSLiveChatroomLike.h */,
+				275E3DAF27F45CA60010EC30 /* KSLiveChatroomLike.m */,
+				BCF1BA4F27F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.h */,
+				BCF1BA5027F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m */,
+				BC0238042865C4F6005560CA /* KSLiveChatroomMemberUp.h */,
+				BC0238052865C4F6005560CA /* KSLiveChatroomMemberUp.m */,
 				275E3DCF27F463140010EC30 /* KSLiveChatroomSeatApply.h */,
 				275E3DD027F463140010EC30 /* KSLiveChatroomSeatApply.m */,
 				275E3DD227F463580010EC30 /* KSLiveChatroomSeatResponse.h */,
 				275E3DD327F463580010EC30 /* KSLiveChatroomSeatResponse.m */,
-				BCF1BA4F27F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.h */,
-				BCF1BA5027F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m */,
+				275E3DBD27F45EB90010EC30 /* KSLiveChatroomUserQuit.h */,
+				275E3DBE27F45EB90010EC30 /* KSLiveChatroomUserQuit.m */,
+				275E3DC027F45F3F0010EC30 /* KSLiveChatroomWelcome.h */,
+				275E3DC127F45F3F0010EC30 /* KSLiveChatroomWelcome.m */,
+				BC6C303827F586A60044BC0F /* KSRCMessageModel.h */,
+				BC6C303927F586A60044BC0F /* KSRCMessageModel.m */,
+				BCD457BC2865694A0010B493 /* KSRCPauseLiveMessage.h */,
+				BCD457BD2865694A0010B493 /* KSRCPauseLiveMessage.m */,
+				BC0238072865C600005560CA /* KSRCShopRushMessage.h */,
+				BC0238082865C601005560CA /* KSRCShopRushMessage.m */,
+				BC02380A2865C610005560CA /* RCChatroomClose.h */,
+				BC02380B2865C610005560CA /* RCChatroomClose.m */,
+				BC02380E2865C6F9005560CA /* RCChatroomLikeCount.h */,
+				BC02380D2865C6F9005560CA /* RCChatroomLikeCount.m */,
 			);
 			path = LiveRoomMessage;
 			sourceTree = "<group>";
@@ -2580,6 +2631,9 @@
 				BCE6A08327F81B4200C97704 /* MinePageSubmitView.h */,
 				BCE6A08427F81B4200C97704 /* MinePageSubmitView.m */,
 				BCE6A08627F81B4D00C97704 /* MinePageSubmitView.xib */,
+				BCD457A3286319660010B493 /* CourseTimeSegView.h */,
+				BCD457A4286319660010B493 /* CourseTimeSegView.m */,
+				BCD457A62863196E0010B493 /* CourseTimeSegView.xib */,
 				BCE6A09C27F84E4500C97704 /* MineIntroduceCell.h */,
 				BCE6A09D27F84E4500C97704 /* MineIntroduceCell.m */,
 				BCE6A09E27F84E4500C97704 /* MineIntroduceCell.xib */,
@@ -2640,6 +2694,9 @@
 		2779309627E30F2D0010E277 /* Base */ = {
 			isa = PBXGroup;
 			children = (
+				BC023801286594EA005560CA /* KSTipsAlert.h */,
+				BC023800286594EA005560CA /* KSTipsAlert.m */,
+				BC0237FF286594EA005560CA /* KSTipsAlert.xib */,
 				BCB635BC27F7256B00ACFDCF /* KSDocument.h */,
 				BCB635BD27F7256B00ACFDCF /* KSDocument.m */,
 				BCB635BB27F7256B00ACFDCF /* KSICloudManager.h */,
@@ -3759,6 +3816,12 @@
 		27D83F4627F3EBAA00062476 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				BCD457B82865652C0010B493 /* AnimationView */,
+				BCD457B3286565190010B493 /* LiveMoreDisplayView.h */,
+				BCD457B52865651A0010B493 /* LiveMoreDisplayView.m */,
+				BCD457B42865651A0010B493 /* LiveMoreDisplayView.xib */,
+				BCD457B0286564DB0010B493 /* LiveRoomAlertView.h */,
+				BCD457B1286564DB0010B493 /* LiveRoomAlertView.m */,
 				275E3DD527F467410010EC30 /* InputBar */,
 				27D83F4A27F3EC1500062476 /* CreateLiveBodyView.h */,
 				27D83F4B27F3EC1500062476 /* CreateLiveBodyView.m */,
@@ -4337,6 +4400,9 @@
 				BC8C2C622824EB9000FBA5D5 /* NotiferHeadView.h */,
 				BC8C2C632824EB9000FBA5D5 /* NotiferHeadView.m */,
 				BC8C2C652824EB9800FBA5D5 /* NotiferHeadView.xib */,
+				BC4058902863028200111BC5 /* NotiferNavView.h */,
+				BC4058912863028200111BC5 /* NotiferNavView.m */,
+				BC4058932863028C00111BC5 /* NotiferNavView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -5563,6 +5629,15 @@
 			path = IM;
 			sourceTree = "<group>";
 		};
+		BCD457B82865652C0010B493 /* AnimationView */ = {
+			isa = PBXGroup;
+			children = (
+				BCD457B92865652C0010B493 /* LiveAnimationView.m */,
+				BCD457BA2865652C0010B493 /* LiveAnimationView.h */,
+			);
+			path = AnimationView;
+			sourceTree = "<group>";
+		};
 		BCDB09382805C0DD00D0BDAD /* PopView */ = {
 			isa = PBXGroup;
 			children = (
@@ -5794,6 +5869,7 @@
 				BCF61BE9280425DA0000ACFE /* InstrumentChooseCell.xib in Resources */,
 				BC76146F280D57220080FD1F /* HomeworkVideoView.xib in Resources */,
 				277931CE27E30FC20010E277 /* KSPremissionAlert.xib in Resources */,
+				BC4058942863028C00111BC5 /* NotiferNavView.xib in Resources */,
 				BCA353CF2858A86200377661 /* MusicRoomCourseCell.xib in Resources */,
 				275E3DFC27F46B440010EC30 /* KSBeautySettingView.xib in Resources */,
 				BC48C3B5282931C000EE65C5 /* ReceiveEvaluateCell.xib in Resources */,
@@ -5809,6 +5885,7 @@
 				2780A06B27E823D300447CFD /* MineBodyView.xib in Resources */,
 				27F9030127E864AE00C08A19 /* NetworkBodyView.xib in Resources */,
 				BC4BCE7F2823B66A00522C8B /* AddressDetailBodyView.xib in Resources */,
+				BCD457B62865651A0010B493 /* LiveMoreDisplayView.xib in Resources */,
 				BCB908FD2850C9CB00F5FF69 /* MusicChooseSearchView.xib in Resources */,
 				275E8A7227E18F2300DD3F6E /* Main.storyboard in Resources */,
 				2780C92927E490CA00A95A4F /* VefiBodyView.xib in Resources */,
@@ -5826,6 +5903,7 @@
 				BCB399B327F94B5A00AFF376 /* LTSCalendarBottomView.xib in Resources */,
 				2708565327ED8B8C00EC8E72 /* GroupApplyChooseAllCell.xib in Resources */,
 				275E3DEE27F467BF0010EC30 /* LiveRoomBottomView.xib in Resources */,
+				BC023802286594EA005560CA /* KSTipsAlert.xib in Resources */,
 				BC4BCE6D28239EEB00522C8B /* MyAddressListCell.xib in Resources */,
 				27BC3B2B27F2DB9600D81E30 /* MusicUploadView.xib in Resources */,
 				BCED5CC328508F28009A42DE /* ShareLiveCellContentView.xib in Resources */,
@@ -5866,6 +5944,7 @@
 				BCB908DD2850A71800F5FF69 /* ShareMusicCellContentView.xib in Resources */,
 				27D83F5927F4225D00062476 /* LivePreviewBodyView.xib in Resources */,
 				BC41104A2806706800800BD9 /* HomeworkListCell.xib in Resources */,
+				BCD457A72863196F0010B493 /* CourseTimeSegView.xib in Resources */,
 				2779362E27E33C360010E277 /* LoginBodyView.xib in Resources */,
 				BC8B6E6E285836B600866917 /* low_staff.png in Resources */,
 				BCB399BD27F9831D00AFF376 /* CourseForLiveCell.xib in Resources */,
@@ -6021,6 +6100,7 @@
 				2779326F27E30FD80010E277 /* FSCalendarHeaderView.m in Sources */,
 				275E3DF727F467ED0010EC30 /* LiveRoomLikeLayer.m in Sources */,
 				BCEBB8F62840D68400A76BE8 /* KSChatGroupListCell.m in Sources */,
+				BC0238062865C4F6005560CA /* KSLiveChatroomMemberUp.m in Sources */,
 				277931E827E30FC20010E277 /* KSUtilities.m in Sources */,
 				2779326327E30FD80010E277 /* FSCalendarCollectionView.m in Sources */,
 				BCED5CB128507E85009A42DE /* KSChatMusicMessage.m in Sources */,
@@ -6201,6 +6281,7 @@
 				2779361227E32BFE0010E277 /* CourseViewController.m in Sources */,
 				2755C07027EC7F21007D9070 /* ChatComplainBodyView.m in Sources */,
 				2755C06727EC71BB007D9070 /* GroupSettingBodyView.m in Sources */,
+				BC02380C2865C610005560CA /* RCChatroomClose.m in Sources */,
 				BCA353DF285976CF00377661 /* MusicRoomCourseInfoCell.m in Sources */,
 				BCA9CE2E27FD8A9200D558C6 /* AccompanyNavView.m in Sources */,
 				BCC9F44727F69BD200647449 /* ClassSongMessage.m in Sources */,
@@ -6211,7 +6292,9 @@
 				277931F727E30FC20010E277 /* UIScreen+Extend.m in Sources */,
 				2779322627E30FC30010E277 /* KSMessageInputView.m in Sources */,
 				BCDB09402805C0EF00D0BDAD /* NewClassPopView.m in Sources */,
+				BC4058922863028200111BC5 /* NotiferNavView.m in Sources */,
 				27F9CAF627EC1A16003E0FE4 /* SCIndexView.m in Sources */,
+				BCD457BB2865652C0010B493 /* LiveAnimationView.m in Sources */,
 				2779320E27E30FC30010E277 /* UIColor+Hex.m in Sources */,
 				2779331727E310AA0010E277 /* UIView+Animation.m in Sources */,
 				2779361527E32C0A0010E277 /* ChatViewController.m in Sources */,
@@ -6374,11 +6457,13 @@
 				BC1365CC280D478F00EB03E2 /* NotiferMessageModel.m in Sources */,
 				2755C07727EC945D007D9070 /* GroupMemberViewController.m in Sources */,
 				2773205227EDB75B008FAECA /* GroupNoticeCell.m in Sources */,
+				BC0238092865C601005560CA /* KSRCShopRushMessage.m in Sources */,
 				BC5EB5B6280402CB00B4A3B0 /* MyStyleInstrumentCell.m in Sources */,
 				277931C527E30FC20010E277 /* NSObject+KSSwizzling.m in Sources */,
 				27A54CF727E9BD7C007309A3 /* FeedbackBodyView.m in Sources */,
 				277932BD27E30FFE0010E277 /* SDQWMaskCustomView.m in Sources */,
 				277931E027E30FC20010E277 /* UIDevice+zhDeviceType.m in Sources */,
+				BCD457B72865651A0010B493 /* LiveMoreDisplayView.m in Sources */,
 				2779329227E30FEB0010E277 /* MSSBrowseActionSheet.m in Sources */,
 				27F9CB0027EC3D42003E0FE4 /* GroupListViewCell.m in Sources */,
 				BC6C303A27F586A60044BC0F /* KSRCMessageModel.m in Sources */,
@@ -6438,6 +6523,7 @@
 				2779320027E30FC30010E277 /* QCCountdownButton.m in Sources */,
 				277932EF27E310070010E277 /* UIView+TZLayout.m in Sources */,
 				2779321427E30FC30010E277 /* MBProgressHUD+NJ.m in Sources */,
+				BC02380F2865C6F9005560CA /* RCChatroomLikeCount.m in Sources */,
 				2779321727E30FC30010E277 /* UITextField_Toolbar.m in Sources */,
 				BCB633F927F6A18200ACFDCF /* ClassVideoListView.m in Sources */,
 				277D432F27E9A50800107DB7 /* PhoneChangeBodyView.m in Sources */,
@@ -6473,6 +6559,7 @@
 				2779322027E30FC30010E277 /* GRScanManager.m in Sources */,
 				BC8C2C642824EB9000FBA5D5 /* NotiferHeadView.m in Sources */,
 				27F902F427E863B600C08A19 /* NetworkingCheckController.m in Sources */,
+				BCD457A5286319660010B493 /* CourseTimeSegView.m in Sources */,
 				2779362327E334470010E277 /* KSUpdateAlert.m in Sources */,
 				BC5EB5C02804085500B4A3B0 /* MyStyleVideoCell.m in Sources */,
 				BCC9F44A27F69BD200647449 /* RTCService.m in Sources */,
@@ -6533,10 +6620,12 @@
 				27F9030B27E875C500C08A19 /* AudioRecordManager.m in Sources */,
 				27A2F62D27E70D0A009E2380 /* UserInfoManager.m in Sources */,
 				BC3DE088280D89E90027DC0E /* EvaluateDetailViewController.m in Sources */,
+				BC023803286594EA005560CA /* KSTipsAlert.m in Sources */,
 				BCF1BA5427F5CB5800FA36C4 /* LiveSeatApplyView.m in Sources */,
 				BCC9F41327F69BD200647449 /* MessageDataSource.m in Sources */,
 				BCE6A0A427F8517900C97704 /* MineVideoCell.m in Sources */,
 				BC0A22C0284752900065C1AB /* WhiteboardListCell.m in Sources */,
+				BCD457BE2865694B0010B493 /* KSRCPauseLiveMessage.m in Sources */,
 				277932F327E310070010E277 /* TZImageRequestOperation.m in Sources */,
 				BC0A22C1284752900065C1AB /* WhiteboardListView.m in Sources */,
 				BCC9F43B27F69BD200647449 /* AssistantTransferMessage.m in Sources */,
@@ -6552,6 +6641,7 @@
 				2779335827E316DD0010E277 /* FastForwardView.m in Sources */,
 				277935DC27E326650010E277 /* RecordCheckManager.m in Sources */,
 				275E3DB327F45D380010EC30 /* KSLiveChatroomDownSeat.m in Sources */,
+				BCD457B2286564DB0010B493 /* LiveRoomAlertView.m in Sources */,
 				BCB399AC27F946A200AFF376 /* CourseNavView.m in Sources */,
 				BCED5CBE28508831009A42DE /* KSChatMusicShareCell.m in Sources */,
 				BCC9F41E27F69BD200647449 /* UpgradeDidApplyView.m in Sources */,

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


+ 271 - 102
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -67,22 +67,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "0AC7083A-0E97-40A5-821A-015E63A3C9F8"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "145"
-            endingLineNumber = "145"
-            landmarkName = "-requestData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "75BE27A9-82AE-4CB6-9829-7AF974E93790"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -218,8 +202,8 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1185"
-            endingLineNumber = "1185"
+            startingLineNumber = "1205"
+            endingLineNumber = "1205"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
@@ -234,8 +218,8 @@
             filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1155"
-            endingLineNumber = "1155"
+            startingLineNumber = "1175"
+            endingLineNumber = "1175"
             landmarkName = "-documentPicker:didPickDocumentAtURL:"
             landmarkType = "7">
          </BreakpointContent>
@@ -243,22 +227,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "EEE41DB8-78CB-4CD7-804B-9D0C86EEF376"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "293"
-            endingLineNumber = "293"
-            landmarkName = "-configMessage:headSource:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "B51A7095-7E78-4224-9F20-BFF5B87D9602"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -323,22 +291,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "16E83CD7-6751-4594-8027-94FF33EE0BC4"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "220"
-            endingLineNumber = "220"
-            landmarkName = "-queryNoJoinRoomList:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "D77E1583-DFE0-4EBD-886F-F3862F734F2B"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -355,22 +307,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "91195494-D2E5-4C2C-989E-6313F611E5A4"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "116"
-            endingLineNumber = "116"
-            landmarkName = "-requestData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "6AE365BD-0D59-466E-A5D9-C8170887B609"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -387,22 +323,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "FECF9606-B5A4-464A-AF41-6F542C9A75D0"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSRCIMDataSource.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "72"
-            endingLineNumber = "72"
-            landmarkName = "-getUserInfoWithUserId:completion:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "2AEA3612-7AE7-4BEC-92D5-66F8021C9E5B"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -426,8 +346,8 @@
             filePath = "KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "679"
-            endingLineNumber = "679"
+            startingLineNumber = "682"
+            endingLineNumber = "682"
             landmarkName = "-submitFileWithMessage:uploadListener:"
             landmarkType = "7">
          </BreakpointContent>
@@ -435,22 +355,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "ED86E060-F116-4CBE-B5B7-8568FABE99A4"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "264"
-            endingLineNumber = "264"
-            landmarkName = "-enableDevice:type:songId:soundVolume:forUser:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "FF4ED55F-18BB-41A8-872F-E901507B6160"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -560,5 +464,270 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B7D82011-0199-48BA-957B-388AEA5242E3"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Classroom/Controller/NewClassRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "598"
+            endingLineNumber = "598"
+            landmarkName = "-memberDidJoin:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "471"
+            endingLineNumber = "471"
+            landmarkName = "-onReceiveCommandMessage:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - b239244a98a8b8be"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[ClassroomService onReceiveCommandMessage:]"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "44">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - e6e256fdd3150132"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "36">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - e6e256fdd3150132"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "148">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - e6e256fdd3150132"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "824">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - e6e256fdd3150132"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "1572">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - 7b88a94502f842fe"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke.277"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "36">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - 7b88a94502f842fe"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke.277"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "148">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - 7b88a94502f842fe"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke.277"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "824">
+               </Location>
+               <Location
+                  uuid = "C92536E5-F34F-48F5-9AFD-1501468D6CC2 - 7b88a94502f842fe"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "__44-[ClassroomService onReceiveCommandMessage:]_block_invoke.277"
+                  moduleName = "KulexiuForTeacher"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Services/Classroom/ClassroomService.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "471"
+                  endingLineNumber = "471"
+                  offsetFromSymbolStart = "1572">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C68DB6BB-00AA-47F5-8BFE-086AEC494C5F"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "31"
+            endingLineNumber = "31"
+            landmarkName = "-longValueForKey:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8C885F47-AACF-49FA-AA9E-27E0C5C4C6F2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/SealClass/Services/Classroom/Message/MemberChangeMessage.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "34"
+            endingLineNumber = "34"
+            landmarkName = "-decodeWithData:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4C7105CD-14E7-4AD1-83AC-D92E5AFA4148"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "96"
+            endingLineNumber = "96"
+            landmarkName = "-requestStudentList"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8272C212-EE21-41ED-B0BA-077F7D627D24"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Course/View/CourseForLiveCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "53"
+            endingLineNumber = "53"
+            landmarkName = "-configWithSource:beforeTime:callback:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "21EF9B34-7339-4858-A87A-FAE0DECB3FFF"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Course/Controller/CourseViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "355"
+            endingLineNumber = "355"
+            landmarkName = "-getCourseByDate:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "5B92F24C-589F-4C1C-A286-C93D3204DB38"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/Homework/View/HomeworkListCell.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "64"
+            endingLineNumber = "64"
+            landmarkName = "-configWithSource:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 9 - 0
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -410,6 +410,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     
     // 退到后台发送消息
     [[NSNotificationCenter defaultCenter] postNotificationName:@"appEnterBackground" object:nil];
+    
+    
 }
 - (void)quitClassRoom {
     [[NSNotificationCenter defaultCenter] postNotificationName:@"backgroundQuit" object:nil];
@@ -431,6 +433,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             [USER_MANAGER checkTokenEnableConnectRongCloud];
         }
     }
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"appBecomeActive" object:nil];
 }
 
 
@@ -543,13 +547,18 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             NSString *valueStr = [[memoStr componentsSeparatedByString:@"?"] lastObject];
             NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
             NSString *courseId = nil;
+            NSString *studentId = nil;
             for (NSString *subStr in parmArray) {
                 if ([subStr containsString:@"courseId"]) {
                     courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
                 }
+                if ([subStr containsString:@"studentId"]) {
+                    studentId = [[subStr componentsSeparatedByString:@"="] lastObject];
+                }
             }
             HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
             detailVC.courseId = courseId;
+            detailVC.studentId = studentId;
             CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
             [navCtrl pushViewController:detailVC animated:YES];
         }

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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_down.imageset/beat_down@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_down.imageset/beat_down@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_up.imageset/beat_up@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/beat_up.imageset/beat_up@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/metronome_bg.imageset/metronome_bg@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/metronome_bg.imageset/metronome_bg@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/speed_dot.imageset/speed_dot@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/speed_dot.imageset/speed_dot@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/volume_img.imageset/volume_img@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Classroom/volume_img.imageset/volume_img@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/chatroom_speaker.imageset/chatroom_speaker@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/chatroom_speaker.imageset/chatroom_speaker@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_close.imageset/live_close@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_close.imageset/live_close@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_more.imageset/live_more@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_more.imageset/live_more@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_bad.imageset/live_networking_bad@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_bad.imageset/live_networking_bad@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_good.imageset/live_networking@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_good.imageset/live_networking@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_nomal.imageset/live_networking_nomal@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_networking_nomal.imageset/live_networking_nomal@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_pause.imageset/live_pause@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/live_pause.imageset/live_pause@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_mine.imageset/seat_mine@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_mine.imageset/seat_mine@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_other.imageset/seat_other@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Live/seat_other.imageset/seat_other@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/Style/choose_instrument.imageset/choose_instrument@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/Style/choose_instrument.imageset/choose_instrument@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/auth_detail.imageset/auth_detail@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Mine/auth_detail.imageset/auth_detail@3x.png


+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.xib

@@ -27,7 +27,7 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xkE-FS-h0V">
-                    <rect key="frame" x="181" y="276" width="180" height="40"/>
+                    <rect key="frame" x="181" y="296" width="180" height="40"/>
                     <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="40" id="vcC-gf-AjX"/>
@@ -51,7 +51,7 @@
                 <constraint firstItem="ya2-qu-eeU" firstAttribute="top" secondItem="3R9-37-rfJ" secondAttribute="bottom" id="Aw2-xL-c14"/>
                 <constraint firstItem="3R9-37-rfJ" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ED5-Ur-ULb"/>
                 <constraint firstItem="3R9-37-rfJ" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Nr2-DO-sAE"/>
-                <constraint firstItem="xkE-FS-h0V" firstAttribute="top" secondItem="ya2-qu-eeU" secondAttribute="bottom" constant="10" id="TDs-N0-4c5"/>
+                <constraint firstItem="xkE-FS-h0V" firstAttribute="top" secondItem="ya2-qu-eeU" secondAttribute="bottom" constant="30" id="TDs-N0-4c5"/>
                 <constraint firstItem="ya2-qu-eeU" firstAttribute="leading" secondItem="3R9-37-rfJ" secondAttribute="leading" id="ggR-MX-LsB"/>
                 <constraint firstItem="ya2-qu-eeU" firstAttribute="trailing" secondItem="3R9-37-rfJ" secondAttribute="trailing" id="ltA-K4-jB1"/>
             </constraints>

+ 42 - 22
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -28,6 +28,7 @@
 #import "KSUMShareManager.h"
 #import "TZImageManager.h"
 #import "MusicRoomViewController.h"
+#import "LiveRoomViewController.h"
 
 typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     CHOOSETYPE_XML,
@@ -68,8 +69,18 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     // Do any additional setup after loading the view.
     self.ks_prefersNavigationBarHidden = YES; // 隐藏导航栏,其他事件额外处理
     [self initWebView];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(operationDealCallbackMessage:) name:DEALCALLBACKNOTICIFATION object:nil];
 }
 
+- (void)operationDealCallbackMessage:(NSNotification *)notification {
+    NSString *status = [notification object];
+    NSMutableDictionary *sendParm = [NSMutableDictionary dictionary];
+    [sendParm setValue:@"paymentOperation" forKey:@"api"];
+    [sendParm setValue:status forKey:@"status"];
+    [self postMessage:sendParm];
+}
+
+
 - (void)setParmDic:(NSDictionary *)parmDic {
     _parmDic = parmDic;
     _hasChangeSource = YES;
@@ -278,15 +289,6 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         // 回到登录页面
         [self backLoginView];
     }
-    // chat
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openConversationActivity"]) {
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *name = [valueDic stringValueForKey:@"name"];
-        NSString *userId = [NSString stringWithFormat:@"%.0f",[valueDic floatValueForKey:@"userId"]];
-        KSChatConversationViewController *conversationVC = [[KSChatConversationViewController alloc] initWithConversationType:ConversationType_PRIVATE targetId:[NSString returnNoNullStringWithString:userId]];
-        conversationVC.title = [NSString returnNoNullStringWithString:name];
-        [self.navigationController pushViewController:conversationVC animated:YES];
-    }
     else if ([[parm stringValueForKey:@"api"] isEqualToString:@"openWebView"]) { // 打开新页面
         NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
         
@@ -455,18 +457,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
         NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
         NSString *roomId = [valueDic stringValueForKey:@"roomId"];
-        [self showhud];
-        [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController callback:^{
-            [self removehub];
-        }];
-    }
-    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
-        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
-        NSString *roomId = [valueDic stringValueForKey:@"roomId"];
-        [self showhud];
-        [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController callback:^{
-            [self removehub];
-        }];
+        [self joinLiveRoomWithRoomId:roomId];
+        
     }
     else if ([[parm stringValueForKey:@"api"] isEqualToString:@"savePicture"]) { // 保存图片到相册
         // 判断相册权限
@@ -499,8 +491,36 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             ctrl.courseId = courseId;
             [self.navigationController pushViewController:ctrl animated:YES];
         }
-        
     }
+    else if ([[parm stringValueForKey:@"api"] isEqualToString:@"joinChatGroup"]) {
+        NSDictionary *valueDic = [parm dictionaryValueForKey:@"content"];
+        NSString *targetId = [valueDic stringValueForKey:@"id"];
+        if ([[valueDic stringValueForKey:@"type"] isEqualToString:@"single"]) { // 单聊
+            
+            KSChatConversationViewController *ctrl = [[KSChatConversationViewController alloc] init];
+            ctrl.targetId = targetId;
+            ctrl.conversationType = ConversationType_PRIVATE;
+            [self.navigationController pushViewController:ctrl animated:YES];
+            
+        }
+        else if ([[valueDic stringValueForKey:@"type"] isEqualToString:@"multi"]) { // 群聊
+            KSChatConversationViewController *ctrl = [[KSChatConversationViewController alloc] init];
+            ctrl.targetId = targetId;
+            ctrl.conversationType = ConversationType_GROUP;
+            [self.navigationController pushViewController:ctrl animated:YES];
+        }
+    }
+    
+}
+
+
+- (void)joinLiveRoomWithRoomId:(NSString *)roomId {
+    LiveRoomViewController *ctrl = [[LiveRoomViewController alloc] init];
+    ctrl.roomId = roomId;
+    ctrl.isTempRoom = NO;
+    CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:ctrl];
+    navCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self.navigationController presentViewController:navCtrl animated:YES completion:nil];
 }
 
 - (void)savePicCallback:(NSString *)uuid isSuccess:(BOOL)isSuccess {

+ 33 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -546,8 +546,17 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)liveRoomCreateTempLiveRoom:(NSString *)post coverPic:(NSString *)coverPic liveRemark:(NSString *)liveRemark roomTitle:(NSString *)roomTitle success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// /teacher-server/liveRoom/speakerCheckRoomInfo
+
+/// 校验房间信息
+/// @param get get
+/// @param roomUid 房间id
+/// @param success 成功
+/// @param faliure 失败
++ (void)speakerCheckRoomInfoRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 // 进入直播房间
-// /api-teacher/liveRoom/joinRoom
+// /api-teacher/liveRoom/speakerJoinRoom
 
 /// 进入房间
 /// @param get get
@@ -556,6 +565,14 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)liveRoomJoinRoomRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// /api-teacher/liveRoom/syncLike
+/// 同步点赞数量
+/// @param get get
+/// @param likeNum 点赞数量
+/// @param roomUid 房间号
+/// @param success 成功
+/// @param faliure 失败
++ (void)syncLikeRequest:(NSString *)get likeNum:(NSInteger)likeNum roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 // 退出直播间通知
 // /api-teacher/liveRoom/syncUserStatus
@@ -566,6 +583,15 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)LiveroomQuit:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// /api-teacher/liveRoom/destroyLiveRoom
+
+/// 销毁直播房间
+/// @param get get
+/// @param roomUid 房间号
+/// @param success 成功
+/// @param faliure 失败
++ (void)destroyLiveRoomRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 // 直播课程组查询
 // /api-teacher/courseGroup/queryPageCourseGroup
 
@@ -1083,6 +1109,12 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)getWhiteBoardRoomMessage:(NSString *)post url:(NSString *)url parm:(NSDictionary *)parm success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
+// /teacher-server/sysConfig/queryByParamName
 
+/// 查询课程调整时间配置参数
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryCourseAdjustTimeLimit:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 @end
 NS_ASSUME_NONNULL_END

+ 65 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -173,6 +173,13 @@
         [[NSNotificationCenter defaultCenter] postNotificationName:@"classroomLogout" object:nil];
     }
     else if ([vc isKindOfClass:[UITabBarController class]]) {
+        if ([vc.presentedViewController isKindOfClass:NSClassFromString(@"CustomNavViewController")]) {
+            CustomNavViewController *nav = (CustomNavViewController *)vc.presentedViewController;
+            if ([nav.visibleViewController isKindOfClass:NSClassFromString(@"LiveRoomViewController")]) {
+                [[NSNotificationCenter defaultCenter] postNotificationName:@"liveroomLogout" object:nil];
+                return;
+            }
+        }
         UITabBarController *tab = (UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController;
         CustomNavViewController *ctrl = (CustomNavViewController *)tab.selectedViewController;
         [ctrl popToRootViewControllerAnimated:NO];
@@ -1121,11 +1128,25 @@
     [parm setValue:coverPic forKey:@"coverPic"];
     [parm setValue:liveRemark forKey:@"liveRemark"];
     [parm setValue:roomTitle forKey:@"roomTitle"];
+    [parm setValue:@(400) forKey:@"liveTime"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// /api-teacher/liveRoom/speakerCheckRoomInfo
+
+/// 校验房间信息
+/// @param get get
+/// @param roomUid 房间id
+/// @param success 成功
+/// @param faliure 失败
++ (void)speakerCheckRoomInfoRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/liveRoom/speakerCheckRoomInfo"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomUid forKey:@"roomUid"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
 // 进入直播房间
-// /api-teacher/liveRoom/joinRoom
+// /api-teacher/liveRoom/speakerJoinRoom
 
 /// 进入房间
 /// @param get get
@@ -1133,13 +1154,28 @@
 /// @param success 成功
 /// @param faliure 失败
 + (void)liveRoomJoinRoomRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
-    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/liveRoom/joinRoom"];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/liveRoom/speakerJoinRoom"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:roomUid forKey:@"roomUid"];
     [parm setValue:UserDefault(UIDKey) forKey:@"userId"];
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// /api-teacher/liveRoom/syncLike
+/// 同步点赞数量
+/// @param get get
+/// @param likeNum 点赞数量
+/// @param roomUid 房间号
+/// @param success 成功
+/// @param faliure 失败
++ (void)syncLikeRequest:(NSString *)get likeNum:(NSInteger)likeNum roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/liveRoom/syncLike"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:@(likeNum) forKey:@"likeNum"];
+    [parm setValue:roomUid forKey:@"roomUid"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 // 退出直播间
 // /api-teacher/liveRoom/syncUserStatus
 
@@ -1158,6 +1194,20 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// /api-teacher/liveRoom/destroyLiveRoom
+
+/// 销毁直播房间
+/// @param get get
+/// @param roomUid 房间号
+/// @param success 成功
+/// @param faliure 失败
++ (void)destroyLiveRoomRequest:(NSString *)get roomUid:(NSString *)roomUid success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/liveRoom/destroyLiveRoom"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:roomUid forKey:@"roomUid"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 // 直播课程组查询
 // /api-teacher/courseGroup/queryPageCourseGroup
 
@@ -2013,4 +2063,17 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+
+// /api-teacher/sysConfig/queryByParamName
+
+/// 查询课程调整时间配置参数
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryCourseAdjustTimeLimit:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/sysConfig/queryByParamNameList"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:@"course_start_setting,course_end_setting" forKey:@"paramNames"];
+    [self request:get andWithUrl:url and:parm success:success faliure:faliure];
+}
 @end

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSOrderManager.m

@@ -40,7 +40,7 @@
     else {
         [[NSNotificationCenter defaultCenter] postNotificationName:DEALCALLBACKNOTICIFATION object:@"success"];
     }
-    NSString *appScheme = @"ColexiuStudent";
+    NSString *appScheme = @"ColexiuTeacher";
     [[AlipaySDK defaultService] payOrder:infoMessage fromScheme:appScheme callback:^(NSDictionary *resultDic) {
         NSLog(@"AlipaySDK result %@",resultDic);
     }];

+ 21 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.h

@@ -0,0 +1,21 @@
+//
+//  KSTipsAlert.h
+//  TeacherDaya
+//
+//  Created by Kyle on 2021/5/21.
+//  Copyright © 2021 DayaMusic. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^TipsAlertCallback)(BOOL isSure);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSTipsAlert : UIView
+
++ (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMessage leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle callback:(TipsAlertCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 75 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.m

@@ -0,0 +1,75 @@
+//
+//  KSTipsAlert.m
+//  TeacherDaya
+//
+//  Created by Kyle on 2021/5/21.
+//  Copyright © 2021 DayaMusic. All rights reserved.
+//
+
+#import "KSTipsAlert.h"
+#import "UIView+Animation.h"
+
+@interface KSTipsAlert ()
+
+@property (weak, nonatomic) IBOutlet UILabel *topTitle;
+
+@property (weak, nonatomic) IBOutlet UILabel *descLabel;
+
+@property (weak, nonatomic) IBOutlet UIButton *cancleButton;
+
+@property (weak, nonatomic) IBOutlet UIButton *sureButton;
+
+
+@property (nonatomic, copy) TipsAlertCallback callback;
+@end
+
+@implementation KSTipsAlert
+
+
++ (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMessage leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle callback:(TipsAlertCallback)callback {
+    KSTipsAlert *alertView = [[[NSBundle mainBundle] loadNibNamed:@"KSTipsAlert" owner:nil options:nil] firstObject];
+    alertView.topTitle.text = title;
+    alertView.descLabel.text = descMessage;
+    [alertView.cancleButton setTitle:leftTitle forState:UIControlStateNormal];
+    [alertView.sureButton setTitle:rightTitle forState:UIControlStateNormal];
+    if (callback) {
+        alertView.callback = callback;
+    }
+    [alertView showAlert];
+    return alertView;
+}
+
+- (void)showAlert {
+    [[NSObject getKeyWindow] addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.bottom.right.mas_equalTo([NSObject getKeyWindow]);
+    }];
+    [self setPopAnimation];
+}
+
+- (void)hiddenAction {
+    [self removeFromSuperview];
+}
+
+- (IBAction)cancleAction:(id)sender {
+    if (self.callback) {
+        self.callback(NO);
+    }
+    [self hiddenAction];
+}
+
+- (IBAction)sureAction:(id)sender {
+    if (self.callback) {
+        self.callback(YES);
+    }
+    [self hiddenAction];
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 127 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSTipsAlert.xib

@@ -0,0 +1,127 @@
+<?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="KSTipsAlert">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="517"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ypl-H9-e3L">
+                    <rect key="frame" x="47" y="176" width="320" height="165.5"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提示" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fjg-28-kfA">
+                            <rect key="frame" x="29" y="20" width="271" height="24"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="20"/>
+                            <color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x2J-5B-1Wq">
+                            <rect key="frame" x="235" y="120.5" width="60" height="40"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <state key="normal" title="确定">
+                                <color key="titleColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                            </state>
+                            <connections>
+                                <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="TIl-ub-i4Z"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Kd-Un-rMd">
+                            <rect key="frame" x="25" y="120.5" width="60" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="K0Z-aa-pVg"/>
+                                <constraint firstAttribute="width" constant="60" id="zKU-hs-uKq"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <state key="normal" title="取消">
+                                <color key="titleColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                            </state>
+                            <connections>
+                                <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="MQM-uv-Jkp"/>
+                            </connections>
+                        </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YM9-iV-JM6">
+                            <rect key="frame" x="16" y="67" width="288" height="38.5"/>
+                            <string key="text">聊天功能已断开,是否重新连接?
+</string>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I5d-vy-DYW">
+                            <rect key="frame" x="20" y="24" width="4" height="18"/>
+                            <color key="backgroundColor" red="0.0039215686274509803" green="0.75686274509803919" blue="0.70980392156862748" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="4" id="9KX-ZB-vT4"/>
+                                <constraint firstAttribute="height" constant="18" id="aa3-26-Svy"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="2"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="320" id="2I4-8N-ncb"/>
+                        <constraint firstItem="7Kd-Un-rMd" firstAttribute="leading" secondItem="ypl-H9-e3L" secondAttribute="leading" constant="25" id="2fu-SB-zQH"/>
+                        <constraint firstItem="fjg-28-kfA" firstAttribute="top" secondItem="ypl-H9-e3L" secondAttribute="top" constant="20" id="E7H-Vl-JqW"/>
+                        <constraint firstAttribute="trailing" secondItem="x2J-5B-1Wq" secondAttribute="trailing" constant="25" id="GJx-ee-74l"/>
+                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="140" id="GSF-uC-Gz2"/>
+                        <constraint firstItem="x2J-5B-1Wq" firstAttribute="top" secondItem="YM9-iV-JM6" secondAttribute="bottom" constant="15" id="IDC-5m-0Tm"/>
+                        <constraint firstItem="YM9-iV-JM6" firstAttribute="top" secondItem="fjg-28-kfA" secondAttribute="bottom" constant="23" id="Ios-2z-QHw"/>
+                        <constraint firstItem="x2J-5B-1Wq" firstAttribute="width" secondItem="7Kd-Un-rMd" secondAttribute="width" id="PTM-XO-HCz"/>
+                        <constraint firstAttribute="trailing" secondItem="YM9-iV-JM6" secondAttribute="trailing" constant="16" id="Psf-V1-FR5"/>
+                        <constraint firstItem="fjg-28-kfA" firstAttribute="leading" secondItem="I5d-vy-DYW" secondAttribute="trailing" constant="5" id="SDs-L9-pP2"/>
+                        <constraint firstItem="I5d-vy-DYW" firstAttribute="top" secondItem="ypl-H9-e3L" secondAttribute="top" constant="24" id="awt-qa-cOF"/>
+                        <constraint firstItem="I5d-vy-DYW" firstAttribute="leading" secondItem="ypl-H9-e3L" secondAttribute="leading" constant="20" id="fxs-c1-c0a"/>
+                        <constraint firstAttribute="trailing" secondItem="fjg-28-kfA" secondAttribute="trailing" constant="20" id="lSX-79-Ova"/>
+                        <constraint firstItem="YM9-iV-JM6" firstAttribute="leading" secondItem="ypl-H9-e3L" secondAttribute="leading" constant="16" id="pcs-sK-TWX"/>
+                        <constraint firstItem="x2J-5B-1Wq" firstAttribute="height" secondItem="7Kd-Un-rMd" secondAttribute="height" id="q3C-Y0-Xtu"/>
+                        <constraint firstItem="x2J-5B-1Wq" firstAttribute="bottom" secondItem="7Kd-Un-rMd" secondAttribute="bottom" id="tyq-wv-hWX"/>
+                        <constraint firstAttribute="bottom" secondItem="7Kd-Un-rMd" secondAttribute="bottom" constant="5" id="vgB-5h-vtD"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="size" keyPath="shadowOffset">
+                            <size key="value" width="0.0" height="24"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
+                            <color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.22" colorSpace="calibratedRGB"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
+                            <real key="value" value="1"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
+                            <real key="value" value="24"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="6"/>
+                        </userDefinedRuntimeAttribute>
+                        <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstItem="ypl-H9-e3L" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="A47-fr-Cer"/>
+                <constraint firstItem="ypl-H9-e3L" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="pNJ-u4-3eL"/>
+            </constraints>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="cancleButton" destination="7Kd-Un-rMd" id="qld-xO-Wyt"/>
+                <outlet property="descLabel" destination="YM9-iV-JM6" id="cNG-pv-wEx"/>
+                <outlet property="sureButton" destination="x2J-5B-1Wq" id="W7p-JL-Ic5"/>
+                <outlet property="topTitle" destination="fjg-28-kfA" id="lCJ-jh-xeg"/>
+            </connections>
+            <point key="canvasLocation" x="69.565217391304358" y="94.754464285714278"/>
+        </view>
+    </objects>
+</document>

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.h

@@ -27,6 +27,13 @@
 - (int)intValueForKey:(id)key;
 
 /**
+ 从字典里取int(内带判空)
+ 
+ @param key 字典Key值
+ @return long
+ */
+- (long)longValueForKey:(id)key;
+/**
  从字典里取long long(内带判空)
  
  @param key 字典Key值

+ 10 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDictionary+Extension.m

@@ -20,6 +20,16 @@
     return value == nil ? 0 : [value intValue];
 }
 
+/**
+ 从字典里取int(内带判空)
+ 
+ @param key 字典Key值
+ @return long
+ */
+- (long)longValueForKey:(id)key {
+    id value = [self notNullValueForKey:key];
+    return value == nil ? 0 : [value longLongValue];
+}
 
 - (long long)longlongValueForKey:(id)key {
     id value = [self notNullValueForKey:key];

+ 9 - 49
KulexiuForTeacher/KulexiuForTeacher/Info.plist

@@ -57,55 +57,15 @@
 	</array>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
-		<string>wechat</string>
-		<string>weixin</string>
-		<string>weixinULAPI</string>
-		<string>mqqopensdklaunchminiapp</string>
-		<string>mqqopensdkminiapp</string>
-		<string>mqqapi</string>
-		<string>mqq</string>
-		<string>mqqOpensdkSSoLogin</string>
-		<string>mqqconnect</string>
-		<string>mqqopensdkdataline</string>
-		<string>mqqopensdkgrouptribeshare</string>
-		<string>mqqopensdkfriend</string>
-		<string>mqqopensdkapi</string>
-		<string>mqqopensdkapiV2</string>
-		<string>mqqopensdkapiV3</string>
-		<string>mqqopensdkapiV4</string>
-		<string>mqzoneopensdk</string>
-		<string>wtloginmqq</string>
-		<string>wtloginmqq2</string>
-		<string>mqqwpa</string>
-		<string>mqzone</string>
-		<string>mqzonev2</string>
-		<string>mqzoneshare</string>
-		<string>wtloginqzone</string>
-		<string>mqzonewx</string>
-		<string>mqzoneopensdkapiV2</string>
-		<string>mqzoneopensdkapi19</string>
-		<string>mqzoneopensdkapi</string>
-		<string>mqqbrowser</string>
-		<string>mttbrowser</string>
-		<string>tim</string>
-		<string>timapi</string>
-		<string>timopensdkfriend</string>
-		<string>timwpa</string>
-		<string>timgamebindinggroup</string>
-		<string>timapiwallet</string>
-		<string>timOpensdkSSoLogin</string>
-		<string>wtlogintim</string>
-		<string>timopensdkgrouptribeshare</string>
-		<string>timopensdkapiV4</string>
-		<string>timgamebindinggroup</string>
-		<string>timopensdkdataline</string>
-		<string>wtlogintimV1</string>
-		<string>timapiV1</string>
-		<string>sinaweibohd</string>
-		<string>sinaweibo</string>
-		<string>sinaweibosso</string>
-		<string>weibosdk</string>
-		<string>weibosdk2.5</string>
+        <string>alipays</string>
+        <string>weixin</string>
+        <string>weixinULAPI</string>
+        <string>wechat</string>
+        <string>sinaweibohd</string>
+        <string>sinaweibo</string>
+        <string>sinaweibosso</string>
+        <string>weibosdk</string>
+        <string>weibosdk2.5</string>
 	</array>
 	<key>NSAppTransportSecurity</key>
 	<dict>

+ 6 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m

@@ -440,9 +440,12 @@
 }
 
 - (void)willDisplayMessageCell:(RCMessageBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath {
-    UIImageView *imageView = (UIImageView *)((RCMessageCell *)cell).portraitImageView;
-    imageView.contentMode = UIViewContentModeScaleAspectFill;
-    imageView.layer.masksToBounds = YES;
+    if ([cell isKindOfClass:[RCMessageCell class]]) {
+        UIImageView *imageView = (UIImageView *)((RCMessageCell *)cell).portraitImageView;
+        imageView.contentMode = UIViewContentModeScaleAspectFill;
+        imageView.layer.masksToBounds = YES;
+    }
+    
 }
 
 

+ 1 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -42,7 +42,6 @@
 }
 
 - (void)configUI {
-    [self rightButton:[UIImage imageNamed:@"nav_share_image"]];
     self.scrollView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin);
     self.bodyView = [GroupSettingBodyView shareInstance];
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 700 ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 700;
@@ -220,7 +219,7 @@
 
 - (void)showDismissAlert {
     MJWeakSelf;
-    self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"确认解散群聊吗" leftTitle:@"取消" rightTitle:@"确认" inView:self.view cancel:^{
+    self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"确认解散群聊吗" leftTitle:@"取消" rightTitle:@"确认" cancel:^{
         
     } confirm:^{
         [weakSelf dismissGroup];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/FullVideo/FullVideoCell.m

@@ -98,6 +98,7 @@
         }
         
         if ([[ClassroomService sharedService].currentRoom.shareUserId isEqualToString:member.userId]) {
+            member.handUpOn = NO;
             self.promptLable.text = @"演示中";
             self.promptLable.hidden = NO;
         }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Classroom/View/TitleView/ClassTitleView.m

@@ -52,7 +52,7 @@
     NSDictionary *dic = notification.object;
     RCMessage *message = dic[@"message"];
     Classroom *currentRoom = [ClassroomService sharedService].currentRoom;
-    if ([message.targetId isEqualToString:currentRoom.roomId]) {
+    if ([message.targetId isEqualToString:currentRoom.roomId] && [message.content isKindOfClass:[RCTextMessage class]]) {
         dispatch_main_async_safe(^{
             [self updateClassNewsButton];
         });

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -141,16 +141,19 @@
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
         statusLabel.text = @"已结束";
         statusLabel.textColor = HexRGB(0x999999);
+        [self.bottomView.sureButton setTitle:@"已结束" forState:UIControlStateNormal];
         [self.bottomView.sureButton setBackgroundColor:HexRGB(0xd5d5d5)];
     }
     else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
         statusLabel.text = @"进行中";
         statusLabel.textColor = THEMECOLOR;
+        [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
     }
     else {
         statusLabel.text = @"未开始";
         statusLabel.textColor = HexRGB(0xff802c);
+        [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
     }
 }
@@ -469,7 +472,6 @@
         NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
         [self MBPShow:tipsString];
     }
-//    [self joinClassRoom];
 }
 
 // 加入房间

+ 52 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m

@@ -57,6 +57,10 @@
 
 @property (nonatomic, assign) NSInteger liveEndTime;        // 直播课结束后退出时间配置(分钟)
 
+@property (nonatomic, strong) NSString *adjustBeginTime;  // 可调整开始时间
+
+@property (nonatomic, strong) NSString *adjustEndTime;    // 可调整结束时间
+
 @end
 
 @implementation CourseViewController
@@ -91,6 +95,34 @@
     if (![NSString isEmptyString:self.chooseDay]) {
         [self getCourseByDate:self.chooseDay];
     }
+    [self requestAdjustConfig];
+}
+
+- (void)requestAdjustConfig {
+    [KSNetworkingManager queryCourseAdjustTimeLimit:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *result = [dic arrayValueForKey:@"data"];
+            for (NSDictionary *parm in result) {
+                if ([[parm stringValueForKey:@"paramName"] isEqualToString:@"course_start_setting"]) { // 开始时间
+                    NSString *begTime = [parm stringValueForKey:@"paramValue"];
+                    if (![NSString isEmptyString:begTime]) {
+                        self.adjustBeginTime = [NSString stringWithFormat:@"%@",begTime];
+                    }
+                }
+                else if ([[parm stringValueForKey:@"paramName"] isEqualToString:@"course_end_setting"]) { // 结束时间
+                    NSString *endTime = [parm stringValueForKey:@"paramValue"];
+                    if (![NSString isEmptyString:endTime]) {
+                        self.adjustEndTime = [NSString stringWithFormat:@"%@",endTime];
+                    }
+                }
+            }
+        }
+        else {
+            
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
 }
 
 - (void)configEmptyView {
@@ -477,8 +509,27 @@
     NSTimeInterval courseDuration = [NSDate countTimesTampWithBeginTime:model.startTime endTime:model.endTime format:formatString];
     NSDate *endDate = [NSDate dateWithTimeInterval:courseDuration sinceDate:[NSDate dateFromString:chooseTime format:formatString]];
     NSString *endTime = [endDate stringDateWithFormat:formatString];
-    NSString *classDate = [NSString stringWithFormat:@"%@ 00:00:00", [[chooseTime componentsSeparatedByString:@" "] firstObject]];
     
+    NSString *classDay = [[chooseTime componentsSeparatedByString:@" "] firstObject];
+    
+    NSString *classDate = [NSString stringWithFormat:@"%@ 00:00:00", classDay];
+    
+    // 判断是否能在规定的时间内
+    if (![NSString isEmptyString:self.adjustBeginTime] && ![NSString isEmptyString:self.adjustEndTime]) {
+        
+        NSString *limitBegin = [NSString stringWithFormat:@"%@ %@:00",classDay,self.adjustBeginTime];
+        NSString *limitEnd = [NSString stringWithFormat:@"%@ %@:00",classDay,self.adjustEndTime];
+        NSTimeInterval beginDuration = [NSDate countTimesTampWithBeginTime:limitBegin endTime:chooseTime format:formatString];
+        NSTimeInterval endDuration = [NSDate countTimesTampWithBeginTime:endTime endTime:limitEnd format:formatString];
+        if (beginDuration < 0) {
+            [self MBPShow:[NSString stringWithFormat:@"课程开始时间不可早于%@",self.adjustBeginTime]];
+            return;
+        }
+        else if (endDuration < 0) {
+            [self MBPShow:[NSString stringWithFormat:@"课程结束时间不可晚于%@",self.adjustEndTime]];
+            return;
+        }
+    }
     [self showhud];
     [KSNetworkingManager courseAdjustRequst:KS_POST courseId:model.courseId classDate:classDate startTime:chooseTime endTime:endTime success:^(NSDictionary * _Nonnull dic) {
         [self removehub];

+ 18 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m

@@ -96,6 +96,7 @@
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
             self.studentArray = [NSMutableArray arrayWithArray:self.detailModel.studentHomeworkList.records];
+            [self evaluateBottomButtonStatus];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -106,6 +107,21 @@
     }];
 }
 
+- (void)evaluateBottomButtonStatus {
+    if ([self.detailModel.courseStatus isEqualToString:@"COMPLETE"]) {
+        [self.bottomView.sureButton setTitle:@"已结束" forState:UIControlStateNormal];
+        [self.bottomView.sureButton setBackgroundColor:HexRGB(0xd5d5d5)];
+    }
+    else if ([self.detailModel.courseStatus isEqualToString:@"ING"]) {
+        [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
+        [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
+    }
+    else {
+        [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
+        [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
+    }
+}
+
 #pragma mark ----- tablb data source
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
     return 3;
@@ -138,9 +154,10 @@
         return cell;
     }
     else {
+        BOOL hasArrange = [self.detailModel.decorateHomework isEqualToString:@"1"] ? YES : NO;
         Records *studentModel = self.studentArray[indexPath.row];
         MusicRoomStudentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomStudentCell"];
-        [cell configWithStudentInfo:studentModel];
+        [cell configWithStudentInfo:studentModel hasArrangeHomework:hasArrange];
         return cell;
     }
 }
@@ -278,7 +295,6 @@
         NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
         [self MBPShow:tipsString];
     }
-//    [self joinClassRoom];
 }
 
 // 加入房间

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.xib

@@ -164,6 +164,7 @@
                             <constraint firstItem="H2e-81-i3m" firstAttribute="centerY" secondItem="Nyk-iN-2CA" secondAttribute="centerY" id="Ttw-Vp-JJb"/>
                             <constraint firstAttribute="trailing" secondItem="H2e-81-i3m" secondAttribute="trailing" constant="10" id="Uao-Io-AU9"/>
                             <constraint firstItem="Nyk-iN-2CA" firstAttribute="leading" secondItem="beA-D7-Fro" secondAttribute="trailing" constant="1" id="V91-CH-Xvy"/>
+                            <constraint firstItem="ada-cD-ioh" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="QUb-lq-pUv" secondAttribute="trailing" constant="10" id="Xci-FU-blP"/>
                             <constraint firstItem="H2e-81-i3m" firstAttribute="leading" secondItem="Nyk-iN-2CA" secondAttribute="trailing" id="ZL9-PQ-mk8"/>
                             <constraint firstItem="ORG-gD-yMT" firstAttribute="leading" secondItem="QUb-lq-pUv" secondAttribute="leading" id="aJH-mK-uZA"/>
                             <constraint firstAttribute="bottom" secondItem="uZy-Ne-tig" secondAttribute="bottom" constant="19" id="cKu-g0-xI4"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.h

@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MusicRoomStudentCell : UITableViewCell
 
-- (void)configWithStudentInfo:(Records *)studentModel;
+- (void)configWithStudentInfo:(Records *)studentModel hasArrangeHomework:(BOOL)hasArrange;
 
 @end
 

+ 20 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.m

@@ -17,6 +17,8 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *statusLabel;
 
+@property (weak, nonatomic) IBOutlet UIView *subjectView;
+
 @end
 
 @implementation MusicRoomStudentCell
@@ -27,7 +29,7 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
-- (void)configWithStudentInfo:(Records *)studentModel {
+- (void)configWithStudentInfo:(Records *)studentModel hasArrangeHomework:(BOOL)hasArrange {
     [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[studentModel.studentAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     NSString *name;
     if ([NSString isEmptyString:studentModel.studentName]) {
@@ -37,12 +39,25 @@
         name = studentModel.studentName;
     }
     self.studentName.text = name;
-    self.subjectLabel.text = [NSString returnNoNullStringWithString:studentModel.studentSubject];
-    if ([studentModel.submitHomework isEqualToString:@"0"]) {
-        self.statusLabel.text = @"未提交";
+    if ([NSString isEmptyString:studentModel.studentSubject]) {
+        self.subjectView.hidden = YES;
+    }
+    else {
+        self.subjectView.hidden = NO;
+        self.subjectLabel.text = [NSString returnNoNullStringWithString:studentModel.studentSubject];
+    }
+    
+    if (hasArrange) {
+        self.statusLabel.hidden = NO;
+        if ([studentModel.submitHomework isEqualToString:@"0"]) {
+            self.statusLabel.text = @"未提交";
+        }
+        else {
+            self.statusLabel.text = @"已提交";
+        }
     }
     else {
-        self.statusLabel.text = @"已提交";
+        self.statusLabel.hidden = YES;
     }
 }
 

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.xib

@@ -107,6 +107,7 @@
                 <outlet property="studentAvatar" destination="rmJ-FQ-1KP" id="jFd-YZ-cAE"/>
                 <outlet property="studentName" destination="6av-dX-iJM" id="0Ca-oB-KtN"/>
                 <outlet property="subjectLabel" destination="Z9W-Cn-SVh" id="avg-Fw-k7Y"/>
+                <outlet property="subjectView" destination="92R-m4-gJp" id="Gb4-00-gaP"/>
             </connections>
             <point key="canvasLocation" x="128.2608695652174" y="88.392857142857139"/>
         </tableViewCell>

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m

@@ -70,7 +70,8 @@
     
     Records *studentModel = self.studentArray[indexPath.row];
     MusicRoomStudentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomStudentCell"];
-    [cell configWithStudentInfo:studentModel];
+    BOOL hasArrange = [self.detailModel.decorateHomework isEqualToString:@"1"] ? YES : NO;
+    [cell configWithStudentInfo:studentModel hasArrangeHomework:hasArrange];
     return cell;
 }
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkListModel.h

@@ -31,6 +31,7 @@
 @property (nonatomic, strong) NSString *classDate;
 @property (nonatomic, strong) NSString *startTime;
 @property (nonatomic, strong) NSString *teacherAvatar;
+@property (nonatomic, strong) NSString *homeworkStatus;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 11 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkListModel.m

@@ -28,7 +28,7 @@ NSString *const kHomeworkListModelStudentAvatar = @"studentAvatar";
 NSString *const kHomeworkListModelClassDate = @"classDate";
 NSString *const kHomeworkListModelStartTime = @"startTime";
 NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
-
+NSString *const kHomeworkListModelHomeworkStatus = @"homeworkStatus";
 
 @interface HomeworkListModel ()
 
@@ -58,7 +58,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
 @synthesize classDate = _classDate;
 @synthesize startTime = _startTime;
 @synthesize teacherAvatar = _teacherAvatar;
-
+@synthesize homeworkStatus = _homeworkStatus;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -92,6 +92,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
             self.classDate = [self objectOrNilForKey:kHomeworkListModelClassDate fromDictionary:dict];
             self.startTime = [self objectOrNilForKey:kHomeworkListModelStartTime fromDictionary:dict];
             self.teacherAvatar = [self objectOrNilForKey:kHomeworkListModelTeacherAvatar fromDictionary:dict];
+            self.homeworkStatus = [self objectOrNilForKey:kHomeworkListModelHomeworkStatus fromDictionary:dict];
 
     }
     
@@ -122,7 +123,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
     [mutableDict setValue:self.classDate forKey:kHomeworkListModelClassDate];
     [mutableDict setValue:self.startTime forKey:kHomeworkListModelStartTime];
     [mutableDict setValue:self.teacherAvatar forKey:kHomeworkListModelTeacherAvatar];
-
+    [mutableDict setValue:self.homeworkStatus forKey:kHomeworkListModelHomeworkStatus];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -135,6 +136,10 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
 - (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
 {
     id object = [dict objectForKey:aKey];
+    if ([object isKindOfClass:[NSNumber class]]) {
+        NSNumber *number = object;
+        object = [number stringValue];
+    }
     return [object isEqual:[NSNull null]] ? nil : object;
 }
 
@@ -165,6 +170,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
     self.classDate = [aDecoder decodeObjectForKey:kHomeworkListModelClassDate];
     self.startTime = [aDecoder decodeObjectForKey:kHomeworkListModelStartTime];
     self.teacherAvatar = [aDecoder decodeObjectForKey:kHomeworkListModelTeacherAvatar];
+    self.homeworkStatus = [aDecoder decodeObjectForKey:kHomeworkListModelHomeworkStatus];
     return self;
 }
 
@@ -191,6 +197,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
     [aCoder encodeObject:_classDate forKey:kHomeworkListModelClassDate];
     [aCoder encodeObject:_startTime forKey:kHomeworkListModelStartTime];
     [aCoder encodeObject:_teacherAvatar forKey:kHomeworkListModelTeacherAvatar];
+    [aCoder encodeObject:_homeworkStatus forKey:kHomeworkListModelHomeworkStatus];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -219,6 +226,7 @@ NSString *const kHomeworkListModelTeacherAvatar = @"teacherAvatar";
         copy.classDate = [self.classDate copyWithZone:zone];
         copy.startTime = [self.startTime copyWithZone:zone];
         copy.teacherAvatar = [self.teacherAvatar copyWithZone:zone];
+        copy.homeworkStatus = [self.homeworkStatus copyWithZone:zone];
     }
     
     return copy;

+ 21 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkListCell.m

@@ -58,23 +58,30 @@
 
     self.userId = sourceModel.studentId;
     self.userName = sourceModel.studentName;
-    // 课程状态
-    NSDate *date = [NSDate date];
-    NSTimeInterval beginTimeInteval = [startDate timeIntervalSince1970];
-    NSTimeInterval endTimeInterval = [endDate timeIntervalSince1970];
-    NSTimeInterval currentInterval = [date timeIntervalSince1970];
-    if (currentInterval < beginTimeInteval) { // 未开始
-        self.statusLabel.text = @"未开始";
-        self.statusLabel.textColor = HexRGB(0xff802c);
-    }
-    else if (currentInterval > beginTimeInteval && currentInterval < endTimeInterval) {
-        self.statusLabel.text = @"进行中";
-        self.statusLabel.textColor = THEMECOLOR;
+    
+    // 判断是否布置了作业
+    if ([NSString isEmptyString:sourceModel.decorateTime]) {
+        self.statusLabel.hidden = YES;
     }
     else {
-        self.statusLabel.text = @"已结束";
-        self.statusLabel.textColor = HexRGB(0x999999);
+        self.statusLabel.hidden = NO;
+        if ([sourceModel.homeworkStatus isEqualToString:@"NOTCOMMIT"]) { // 未提交
+            self.statusLabel.text = @"未提交";
+            self.statusLabel.textColor = HexRGB(0xff802c);
+        }
+        else if ([sourceModel.homeworkStatus isEqualToString:@"NOTREVIEW"]) { // 未点评
+            self.statusLabel.text = @"未点评";
+            self.statusLabel.textColor = HexRGB(0x2DC7AA);
+        }
+        else if ([sourceModel.homeworkStatus isEqualToString:@"REVIEWED"]) { // 已点评
+            self.statusLabel.text = @"已点评";
+            self.statusLabel.textColor = HexRGB(0x999999);
+        }
+        else {
+            self.statusLabel.hidden = YES;
+        }
     }
+
 }
 
 - (void)chatWithStudent:(HomeworkChatCallback)callback {

+ 19 - 13
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/MusicRoomHomeworkCell.m

@@ -51,21 +51,27 @@
     self.courseTimeLabel.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
     self.subjectName.text = [NSString returnNoNullStringWithString:sourceModel.subjectName];
     self.courseName.text = [NSString stringWithFormat:@"%@第%.0f课",sourceModel.courseGroupName, sourceModel.classNum];
-    NSDate *date = [NSDate date];
-    NSTimeInterval beginTimeInteval = [startDate timeIntervalSince1970];
-    NSTimeInterval endTimeInterval = [endDate timeIntervalSince1970];
-    NSTimeInterval currentInterval = [date timeIntervalSince1970];
-    if (currentInterval < beginTimeInteval) { // 未开始
-        self.statusLabel.text = @"未开始";
-        self.statusLabel.textColor = HexRGB(0xff802c);
-    }
-    else if (currentInterval > beginTimeInteval && currentInterval < endTimeInterval) {
-        self.statusLabel.text = @"进行中";
-        self.statusLabel.textColor = THEMECOLOR;
+    // 判断是否布置了作业
+    if ([NSString isEmptyString:sourceModel.decorateTime]) {
+        self.statusLabel.hidden = YES;
     }
     else {
-        self.statusLabel.text = @"已结束";
-        self.statusLabel.textColor = HexRGB(0x999999);
+        self.statusLabel.hidden = NO;
+        if ([sourceModel.homeworkStatus isEqualToString:@"NOTCOMMIT"]) { // 未提交
+            self.statusLabel.text = @"未提交";
+            self.statusLabel.textColor = HexRGB(0xff802c);
+        }
+        else if ([sourceModel.homeworkStatus isEqualToString:@"NOTREVIEW"]) { // 未点评
+            self.statusLabel.text = @"未点评";
+            self.statusLabel.textColor = HexRGB(0x2DC7AA);
+        }
+        else if ([sourceModel.homeworkStatus isEqualToString:@"REVIEWED"]) { // 已点评
+            self.statusLabel.text = @"已点评";
+            self.statusLabel.textColor = HexRGB(0x999999);
+        }
+        else {
+            self.statusLabel.hidden = YES;
+        }
     }
 }
 

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m

@@ -196,7 +196,7 @@
     float videoRate = [parmDic floatValueForKey:@"videoRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",videoRate]];
     
-    float musicRate = [parmDic floatValueForKey:@"practiceRate"];
+    float musicRate = [parmDic floatValueForKey:@"musicRate"];
     [rateArray addObject:[NSString stringWithFormat:@"%.2f",musicRate]];
     
     NSArray *colorArray = @[@"#5B8FF9",

+ 9 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -206,6 +206,15 @@
     return cell;
 }
 
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (self.selectIndex == 2) {
+        MusicMessageModel *model = self.dataArray[indexPath.row];
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@/music-upload/%.0f/edit", WEBHOST, model.internalBaseClassIdentifier];
+        [self.naviController pushViewController:webCtrl animated:YES];
+    }
+}
+
 /**
  设置没有数据时的显示
  

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m

@@ -255,7 +255,7 @@
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
                 if (chooseIndex == 0) {
                     [weakSelf.sortView.thirdButton setTitle:@"全部声部" forState:UIControlStateNormal];
-                    weakSelf.subjectId = @"";
+                    weakSelf.subjectId = nil;
                 }
                 else {
                     [weakSelf.sortView.thirdButton setTitle:returnValue forState:UIControlStateNormal];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m

@@ -208,7 +208,7 @@
             KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
                 if (chooseIndex == 0) {
                     [weakSelf.sortView.thirdButton setTitle:@"全部声部" forState:UIControlStateNormal];
-                    weakSelf.subjectId = @"";
+                    weakSelf.subjectId = nil;
                 }
                 else {
                     [weakSelf.sortView.thirdButton setTitle:returnValue forState:UIControlStateNormal];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m

@@ -180,7 +180,7 @@
         KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
             if (chooseIndex == 0) {
                 weakSelf.sortView.sortTitleLabel.text = @"全部声部";
-                weakSelf.searchKey = @"";
+                weakSelf.searchKey = nil;
             }
             else {
                 weakSelf.sortView.sortTitleLabel.text = returnValue;

+ 34 - 21
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -14,8 +14,12 @@
 #import "ReceiveEvaluateListController.h"
 #import "HomeworkDetailViewController.h"
 #import "UIButton+EnlargeEdge.h"
+#import "NotiferNavView.h"
+
 @interface NotiferMessageViewController ()<UITableViewDelegate, UITableViewDataSource>
 
+@property (nonatomic, strong) NotiferNavView *navView;
+
 @property (nonatomic, strong) NotiferHeadView *headView;
 
 @property (nonatomic, strong) UITableView *tableView;
@@ -31,8 +35,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"消息盒子"];
-    [self configRightButton];
+    self.ks_prefersNavigationBarHidden = YES;
     [self configUI];
     self.hasUnreadCount = NO;
 }
@@ -43,24 +46,8 @@
     [self resetSourceAndRequest];
 }
 
-- (void)configRightButton {
-    UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    [rightButton setTitle:@"全部已读" forState:UIControlStateNormal];
-    [rightButton setTitleColor:HexRGB(0x999999) forState:UIControlStateNormal];
-    [rightButton setImage:[UIImage imageNamed:@"clear_notifer"] forState:UIControlStateNormal];
-    rightButton.frame =CGRectMake(0, 0, 80, 40);
-    //使图片在右边,文字在左边(正常情况下是文字在右边,图片在左边)
-    [rightButton setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft];
-    //设置图片和文字之间的间隙
-    rightButton.imageEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
-    [rightButton.titleLabel setFont:[UIFont systemFontOfSize:11.0f]];
-    [rightButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
-    [rightButton addTarget:self action:@selector(rightBtnClick) forControlEvents:UIControlEventTouchUpInside];
-    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithCustomView:rightButton];
-    self.navigationItem.rightBarButtonItem = rightItem;
-}
 
-- (void)rightBtnClick {
+- (void)clearNotiferAction {
     if (self.hasUnreadCount == NO) {
         return;
     }
@@ -78,10 +65,15 @@
 }
 
 - (void)configUI {
-    [self.scrollView removeFromSuperview];
+    [self.view addSubview:self.navView];
+    [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(kNaviBarHeight);
+    }];
     [self.view addSubview:self.headView];
     [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.top.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.navView.mas_bottom);
+        make.left.right.mas_equalTo(self.view);
         make.height.mas_equalTo(100);
     }];
     [self.view addSubview:self.tableView];
@@ -251,13 +243,18 @@
             NSString *valueStr = [[memo componentsSeparatedByString:@"?"] lastObject];
             NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
             NSString *courseId = nil;
+            NSString *studentId = nil;
             for (NSString *subStr in parmArray) {
                 if ([subStr containsString:@"courseId"]) {
                     courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
                 }
+                if ([subStr containsString:@"studentId"]) {
+                    studentId = [[subStr componentsSeparatedByString:@"="] lastObject];
+                }
             }
             HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
             detailVC.courseId = courseId;
+            detailVC.studentId = studentId;
             [self.navigationController pushViewController:detailVC animated:YES];
         }
     }
@@ -269,6 +266,22 @@
 }
 
 #pragma mark ---- lazying
+- (NotiferNavView *)navView {
+    if (!_navView) {
+        _navView = [NotiferNavView shareInstance];
+        MJWeakSelf;
+        [_navView notiferNavAction:^(BOOL isBack) {
+            if (isBack) {
+                [weakSelf backAction];
+            }
+            else {
+                [weakSelf clearNotiferAction];
+            }
+        }];
+    }
+    return _navView;
+}
+
 - (NotiferHeadView *)headView {
     if (!_headView) {
         _headView = [NotiferHeadView shareIntance];

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.h

@@ -0,0 +1,22 @@
+//
+//  NotiferNavView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/22.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void(^NotiferCallback)(BOOL isBack);
+
+@interface NotiferNavView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)notiferNavAction:(NotiferCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 48 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.m

@@ -0,0 +1,48 @@
+//
+//  NotiferNavView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/22.
+//
+
+#import "NotiferNavView.h"
+
+@interface NotiferNavView ()
+
+@property (nonatomic, copy) NotiferCallback callback;
+
+@end
+
+@implementation NotiferNavView
+
++ (instancetype)shareInstance {
+    NotiferNavView *view = [[[NSBundle mainBundle] loadNibNamed:@"NotiferNavView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)notiferNavAction:(NotiferCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (IBAction)backAction:(id)sender {
+    if (self.callback) {
+        self.callback(YES);
+    }
+}
+- (IBAction)clearAction:(id)sender {
+    if (self.callback) {
+        self.callback(NO);
+    }
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 96 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferNavView.xib

@@ -0,0 +1,96 @@
+<?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="NotiferNavView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="88"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="84g-09-Gui">
+                    <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="back_black" translatesAutoresizingMaskIntoConstraints="NO" id="2jg-w8-pP8">
+                            <rect key="frame" x="14" y="12" width="12" height="20"/>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qaL-id-TnJ">
+                            <rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="44" id="2F3-Es-mVf"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="backAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="S1R-1a-MOy"/>
+                            </connections>
+                        </button>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="clear_notifer" translatesAutoresizingMaskIntoConstraints="NO" id="zOi-ek-4xE">
+                            <rect key="frame" x="374" y="12" width="20" height="20"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="20" id="8i8-9X-leR"/>
+                                <constraint firstAttribute="height" constant="20" id="jl1-9W-qX0"/>
+                            </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="Mgr-dN-gvv">
+                            <rect key="frame" x="325" y="15" width="45" height="14"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="byV-S5-B4F">
+                            <rect key="frame" x="325" y="0.0" width="69" height="44"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="clearAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="W2p-7R-Ipw"/>
+                            </connections>
+                        </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="消息盒子" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SoU-sN-Ahv">
+                            <rect key="frame" x="170" y="11" width="74" height="22"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="qaL-id-TnJ" secondAttribute="bottom" id="2gu-15-PF5"/>
+                        <constraint firstItem="2jg-w8-pP8" firstAttribute="leading" secondItem="84g-09-Gui" secondAttribute="leading" constant="14" id="3ni-rk-JrT"/>
+                        <constraint firstItem="zOi-ek-4xE" firstAttribute="centerY" secondItem="Mgr-dN-gvv" secondAttribute="centerY" id="58e-5h-9qk"/>
+                        <constraint firstItem="byV-S5-B4F" firstAttribute="leading" secondItem="Mgr-dN-gvv" secondAttribute="leading" id="8vS-uc-Kmu"/>
+                        <constraint firstItem="2jg-w8-pP8" firstAttribute="centerY" secondItem="84g-09-Gui" secondAttribute="centerY" id="9cF-UY-OJC"/>
+                        <constraint firstAttribute="bottom" secondItem="byV-S5-B4F" secondAttribute="bottom" id="F5N-ZW-lXP"/>
+                        <constraint firstItem="SoU-sN-Ahv" firstAttribute="centerX" secondItem="84g-09-Gui" secondAttribute="centerX" id="IGp-xd-jbK"/>
+                        <constraint firstItem="qaL-id-TnJ" firstAttribute="top" secondItem="84g-09-Gui" secondAttribute="top" id="Jqm-Ld-tLw"/>
+                        <constraint firstItem="zOi-ek-4xE" firstAttribute="trailing" secondItem="byV-S5-B4F" secondAttribute="trailing" id="KA3-Ss-9ft"/>
+                        <constraint firstItem="byV-S5-B4F" firstAttribute="top" secondItem="84g-09-Gui" secondAttribute="top" id="Mdr-qO-dLn"/>
+                        <constraint firstAttribute="height" constant="44" id="Nuj-AB-XNZ"/>
+                        <constraint firstItem="SoU-sN-Ahv" firstAttribute="centerY" secondItem="84g-09-Gui" secondAttribute="centerY" id="Q5B-2o-dFA"/>
+                        <constraint firstAttribute="trailing" secondItem="zOi-ek-4xE" secondAttribute="trailing" constant="20" id="WEG-ZZ-hEV"/>
+                        <constraint firstItem="zOi-ek-4xE" firstAttribute="leading" secondItem="Mgr-dN-gvv" secondAttribute="trailing" constant="4" id="miC-G4-rBh"/>
+                        <constraint firstItem="zOi-ek-4xE" firstAttribute="centerY" secondItem="84g-09-Gui" secondAttribute="centerY" id="oOd-1s-hwY"/>
+                        <constraint firstItem="qaL-id-TnJ" firstAttribute="leading" secondItem="84g-09-Gui" secondAttribute="leading" id="vOB-8J-Nw7"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.96470588235294119" green="0.97254901960784312" blue="0.97647058823529409" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="84g-09-Gui" secondAttribute="bottom" id="0Kf-tA-X67"/>
+                <constraint firstItem="84g-09-Gui" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="JPr-5J-Pr4"/>
+                <constraint firstAttribute="trailing" secondItem="84g-09-Gui" secondAttribute="trailing" id="glv-ar-EvT"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="131.8840579710145" y="60.9375"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="back_black" width="12" height="20"/>
+        <image name="clear_notifer" width="20" height="20"/>
+    </resources>
+</document>

+ 14 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.xib

@@ -21,7 +21,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="OFL-8b-jan"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -78,7 +78,7 @@
                             <real key="value" value="2"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450980395" green="0.61568627450980395" blue="0.61568627450980395" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
                     </userDefinedRuntimeAttributes>
@@ -94,7 +94,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="THZ-tR-a0k"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -150,7 +150,7 @@
                             <real key="value" value="2"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450980395" green="0.61568627450980395" blue="0.61568627450980395" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
                     </userDefinedRuntimeAttributes>
@@ -166,7 +166,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="zBV-gx-9h2"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -223,7 +223,7 @@
                             <real key="value" value="2"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450980395" green="0.61568627450980395" blue="0.61568627450980395" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
                     </userDefinedRuntimeAttributes>
@@ -239,7 +239,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="cby-IX-3oC"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -296,7 +296,7 @@
                             <real key="value" value="2"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="boolean" keyPath="maskToBounces" value="NO"/>
                     </userDefinedRuntimeAttributes>
@@ -312,7 +312,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="QGH-al-uvL"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -366,7 +366,7 @@
                             <real key="value" value="1"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
                             <real key="value" value="2"/>
@@ -385,7 +385,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="bHT-5U-8HQ"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -439,7 +439,7 @@
                             <real key="value" value="1"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
                             <real key="value" value="2"/>
@@ -458,7 +458,7 @@
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="1X6-fy-KEc"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
                             <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
@@ -512,7 +512,7 @@
                             <real key="value" value="1"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
                             <real key="value" value="2"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m

@@ -82,7 +82,7 @@
             self.tipsButton.hidden = NO;
         }
         if ([infoMessage.entryStatus isEqualToString:@"DOING"]) {
-            self.authLabel.text = @"审核中";
+            self.authLabel.text = @"认证审核中";
         }
         else {
             self.authLabel.text = @"认证老师";

+ 8 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_ikon" translatesAutoresizingMaskIntoConstraints="NO" id="Keh-u1-LE5">
-                    <rect key="frame" x="186" y="0.0" width="228" height="162"/>
+                    <rect key="frame" x="186" y="12" width="228" height="162"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="162" id="FOy-ad-3p4"/>
                         <constraint firstAttribute="width" constant="228" id="mGD-5s-cGh"/>
@@ -50,7 +50,7 @@
                         <constraint firstItem="lpX-9C-A9n" firstAttribute="leading" secondItem="Bxq-wl-TlW" secondAttribute="leading" id="jyz-0E-ZrB"/>
                     </constraints>
                 </view>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X9B-Hy-SDf">
+                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X9B-Hy-SDf">
                     <rect key="frame" x="76" y="37" width="90" height="19"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无评分" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kyY-aS-bXe">
@@ -205,10 +205,10 @@
                                     <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
                                     <nil key="highlightedColor"/>
                                 </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_next" translatesAutoresizingMaskIntoConstraints="NO" id="Ajd-Uj-8Uw">
-                                    <rect key="frame" x="94.5" y="15.5" width="6" height="11"/>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="auth_detail" translatesAutoresizingMaskIntoConstraints="NO" id="Ajd-Uj-8Uw">
+                                    <rect key="frame" x="94.5" y="16.5" width="6" height="9"/>
                                     <constraints>
-                                        <constraint firstAttribute="height" constant="11" id="1Qj-hG-j7i"/>
+                                        <constraint firstAttribute="height" constant="9" id="1Qj-hG-j7i"/>
                                         <constraint firstAttribute="width" constant="6" id="RLc-Ys-qb1"/>
                                     </constraints>
                                 </imageView>
@@ -239,7 +239,7 @@
                                     <size key="value" width="0.0" height="2"/>
                                 </userDefinedRuntimeAttribute>
                                 <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                                    <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="1" colorSpace="calibratedRGB"/>
+                                    <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                                 </userDefinedRuntimeAttribute>
                                 <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
                                     <real key="value" value="1"/>
@@ -299,7 +299,7 @@
                 <constraint firstItem="3fi-Mc-0oP" firstAttribute="leading" secondItem="BgO-43-Wsb" secondAttribute="trailing" constant="4" id="EfU-XF-s6S"/>
                 <constraint firstItem="xs8-aA-tdP" firstAttribute="leading" secondItem="Vp5-5Y-h2u" secondAttribute="trailing" constant="10" id="Hb2-ur-ijs"/>
                 <constraint firstItem="3fi-Mc-0oP" firstAttribute="centerY" secondItem="xs8-aA-tdP" secondAttribute="centerY" id="J3j-Ua-dvb"/>
-                <constraint firstAttribute="bottom" secondItem="Keh-u1-LE5" secondAttribute="bottom" id="Lww-yr-BS1"/>
+                <constraint firstAttribute="bottom" secondItem="Keh-u1-LE5" secondAttribute="bottom" constant="-12" id="Lww-yr-BS1"/>
                 <constraint firstItem="X9B-Hy-SDf" firstAttribute="bottom" secondItem="Bxq-wl-TlW" secondAttribute="bottom" id="MBt-8Q-OOg"/>
                 <constraint firstItem="BgO-43-Wsb" firstAttribute="centerY" secondItem="xs8-aA-tdP" secondAttribute="centerY" id="OpO-ZU-93H"/>
                 <constraint firstItem="xs8-aA-tdP" firstAttribute="top" secondItem="Vp5-5Y-h2u" secondAttribute="top" constant="6" id="fYJ-um-Z1x"/>
@@ -346,10 +346,10 @@
         </tapGestureRecognizer>
     </objects>
     <resources>
+        <image name="auth_detail" width="6" height="9"/>
         <image name="auth_logo" width="16" height="19"/>
         <image name="auth_tips" width="185" height="26"/>
         <image name="home_ikon" width="228" height="162"/>
-        <image name="mine_next" width="6" height="11"/>
         <image name="musicianAuth_logo" width="61" height="22"/>
         <image name="teacherAuth_logo" width="53" height="22"/>
         <image name="user_default_avatal" width="52" height="52"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.xib

@@ -78,7 +78,7 @@
                             <size key="value" width="0.0" height="2"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="number" keyPath="shadowOpacity">
                             <real key="value" value="1"/>

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.h

@@ -11,7 +11,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface HomeTopView : UIView
 
-- (CGFloat)getViewHeight;
 
 @end
 

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/PublicNoticeView.xib

@@ -57,7 +57,7 @@
                             <real key="value" value="1"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="color" keyPath="shadowUIColor">
-                            <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="value" red="0.61568627450000002" green="0.61568627450000002" blue="0.61568627450000002" alpha="0.11" colorSpace="custom" customColorSpace="calibratedRGB"/>
                         </userDefinedRuntimeAttribute>
                         <userDefinedRuntimeAttribute type="number" keyPath="shadowRadius">
                             <real key="value" value="2"/>

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

@@ -7,8 +7,9 @@
 
 #import "CreateLiveViewController.h"
 #import "CreateLiveBodyView.h"
-#import "LivePrepareViewController.h"
 #import "CustomNavViewController.h"
+#import "LiveRoomViewController.h"
+
 
 @interface CreateLiveViewController ()
 
@@ -59,8 +60,9 @@
 }
 
 - (void)previewViewWithRoomId:(NSString *)roomId liveDesc:(NSString *)liveDesc {
-    LivePrepareViewController *ctrl = [[LivePrepareViewController alloc] init];
+    LiveRoomViewController *ctrl = [[LiveRoomViewController alloc] init];
     ctrl.roomId = roomId;
+    ctrl.isTempRoom = YES;
     ctrl.liveContent = liveDesc;
     CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:ctrl];
     navCtrl.modalPresentationStyle = UIModalPresentationFullScreen;

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.h

@@ -13,6 +13,13 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) NSString *roomId; // 房间号
 
+@property (nonatomic, assign) BOOL isEnterBackground;
+
+/// 是否临时房间
+@property (nonatomic, assign) BOOL isTempRoom;
+
+@property (nonatomic, strong) NSString *liveContent; // 直播内容
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1802 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -12,18 +12,1819 @@
 #import <RongFaceBeautifier/RongFaceBeautifier.h>
 #import "KSBeautySettingView.h"
 #import "KSEnterLiveroomManager.h"
+#import "LiveroomTimeManager.h"
 
-@interface LiveRoomViewController ()
+#import "UserInfoManager.h"
+#import <RongIMKit/RongIMKit.h>
+#import "KSChatInputBarControl.h"
+#import "LiveRoomHeadView.h"
+#import "LiveRoomBottomView.h"
+#import "SeatContentView.h"
+#import "LiveSeatApplyView.h"
+#import "SeatTipsView.h"
+#import "KSLiveStreamVideo.h"
+#import "KSRCMessageModel.h"
+#import "KSChatroomMessageCenter.h"
+#import "KSChatroomTextCell.h"
+#import "LiveRoomAlertView.h"
+#import "LiveMoreDisplayView.h"
+#import "LiveAnimationView.h"
+#import "KSShareChooseViewController.h"
+#import "KSChatLiveMessage.h"
+typedef NS_ENUM(NSInteger, LIVEPAGE) {
+    LIVEPAGE_PREVIEW,
+    LIVEPAGE_LIVE,
+};
+
+@interface LiveRoomViewController ()<RCRTCEngineEventDelegate,RCRTCRoomEventDelegate,RCRTCStatusReportDelegate,UIGestureRecognizerDelegate,KSChatInputBarControlDelegate,UITableViewDataSource,UITableViewDelegate,LiveroomTimeManagerDelegate>
+
+@property (nonatomic, strong) LiveroomTimeManager *timeManager;
+
+@property (nonatomic, assign) LIVEPAGE pageType;
+
+@property (nonatomic, assign) BOOL isPauseLive; // 是否暂停直播
+
+@property (nonatomic, assign) BOOL isOtherLogin;  // 是否被顶掉
+
+@property (nonatomic, strong) LivePreviewBodyView *previewPageView;
+
+@property (nonatomic, strong) RCRTCVideoView *preVideoView;
+
+@property (nonatomic, strong) KSBeautySettingView *settingView;
+
+@property (nonatomic, assign) BOOL isBeautyOn;
+
+@property (nonatomic, assign) int filterLevel;
+
+#pragma mark ------- 直播房间信息
+/*!
+ 身份状态 主讲人/观众
+ */
+@property (nonatomic, assign) RCRTCLiveRoleType liveRoleType;
+/// 主讲人id
+@property (nonatomic, strong) NSString *createrId;
+/// 主讲人名称
+@property (nonatomic, strong) NSString *createrName;
+/// 主讲人头像
+@property (nonatomic, strong) NSString *createrAvatal;
+
+// 是否禁止连麦
+@property (nonatomic, assign) BOOL enableSeat;
+// 是否禁止聊天
+@property (nonatomic, assign) BOOL enableChat;
+// 是否允许点赞
+@property (nonatomic, assign) BOOL enableLike;
+
+@property (nonatomic, assign) NSInteger likeCount;
+/// 房间人数
+@property (nonatomic, assign) NSInteger totalCount;
+
+#pragma mark ---- Live page
+
+@property (nonatomic, strong) UIView *livePageView;
+
+@property (nonatomic, strong) RCRTCRoom *room;
+
+@property (nonatomic, assign) BOOL isImConnected;
+
+@property (nonatomic, assign) BOOL hasSendWelcomeMessage;
+
+@property (nonatomic, strong) KSLiveStreamVideo *localVideo;
+
+@property (nonatomic, strong) UIView *liveVideoView;
+
+@property (nonatomic, strong) LiveRoomHeadView *headView;
+
+@property (nonatomic, copy) LiveRoomBottomView *bottomView;
+
+/// 连麦的视图
+@property (nonatomic, strong) SeatContentView *seatContainer;
+// 聊天UI
+/*!
+ 消息列表CollectionView和输入框都在这个view里
+ */
+@property(nonatomic, strong) UIView *messageContentView;
+
+/*!
+ 会话页面的TableView
+ */
+@property (nonatomic, strong) UITableView *conversationMessageTableView;
+
+/*!
+ 聊天内容的消息Cell数据模型的数据源
+ 
+ @discussion 数据源中存放的元素为消息Cell的数据模型,即RCDLiveMessageModel对象。
+ */
+@property(nonatomic, strong) NSMutableArray<KSRCMessageModel *> *conversationDataRepository;
+/**
+ 输入工具栏
+ */
+@property(nonatomic,strong) KSChatInputBarControl *inputBar;
+/**
+ *  是否需要滚动到底部
+ */
+@property(nonatomic, assign) BOOL isNeedScrollToButtom;
+
+@property (nonatomic, strong) LiveSeatApplyView *seatApplyView;
+
+@property (nonatomic, strong) NSMutableArray *seatApplyArray;  // 申请连麦数组
+// 远端连麦用户
+@property (nonatomic, strong) NSMutableArray *remoteMemberArray;
+
+/// 连麦申请统计数据
+@property (nonatomic, strong) SeatTipsView *seatApplyTips;
+
+/// 提示窗
+@property (nonatomic, strong) LiveRoomAlertView *alertView;
+
+// 定时器
+@property (nonatomic, strong) dispatch_source_t timer;
+
+@property (nonatomic, strong) LiveMoreDisplayView *moreView;
+
+@property (nonatomic) LiveAnimationView *animationView;
+
+/// 直播课结束时间
+@property (nonatomic, strong) NSString *liveEndTime;
+
+/// 直播间自动关闭时间
+@property (nonatomic, assign) NSInteger expiredMinute;
 
 @end
 
+
+
 @implementation LiveRoomViewController
 
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    self.ks_prefersNavigationBarHidden = YES;
+    self.isOtherLogin = NO;
+    [self registerOtherLoginNotice];
+    [self configUI];
+    [self configEngine];
+    self.pageType = LIVEPAGE_PREVIEW;
+}
+
+- (void)registerOtherLoginNotice {
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(liveroomLogOut) name:@"liveroomLogout" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(liveroomQuit) name:@"liveroomQuit" object:nil];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [UIApplication sharedApplication].idleTimerDisabled = YES;
+    [IQKeyboardManager sharedManager].enableAutoToolbar = NO;
+    [IQKeyboardManager sharedManager].enable = NO;
+    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    [UIApplication sharedApplication].idleTimerDisabled = NO;
+    [IQKeyboardManager sharedManager].enableAutoToolbar = YES;
+    [IQKeyboardManager sharedManager].enable = YES;
+    if (@available(iOS 13.0, *)) {
+        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDarkContent;
+    } else {
+        // Fallback on earlier versions
+        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
+    }
+}
+
+- (void)configUI {
+    self.previewPageView = [LivePreviewBodyView shareInstance];
+    [self.view addSubview:self.previewPageView];
+    [self.previewPageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.bottom.top.mas_equalTo(self.view);
+    }];
+    MJWeakSelf;
+    [self.previewPageView previewOperationCallback:^(PREVIEWLIVEACTION action) {
+        [weakSelf previewOperationAction:action];
+    }];
+    [[RCRTCBeautyEngine sharedInstance] reset];
+}
+
+- (void)configEngine {
+    if (!self.preVideoView) {
+        self.preVideoView = [[RCRTCVideoView alloc] init];
+        self.preVideoView.fillMode = RCRTCVideoFillModeAspectFill;
+
+        self.preVideoView.frameAnimated = NO;
+        [self.previewPageView.videoView addSubview:self.preVideoView];
+        [self.preVideoView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.top.bottom.right.mas_equalTo(self.previewPageView.videoView);
+        }];
+    }
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoView:self.preVideoView];
+    RCRTCVideoStreamConfig *videoConfig = [RCRTCEngine sharedInstance].defaultVideoStream.videoConfig;
+    videoConfig.videoSizePreset = RCRTCVideoSizePreset1920x1080;
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoConfig:videoConfig];
+    [[RCRTCEngine sharedInstance].defaultVideoStream startCapture];
+    self.filterLevel = 50;
+}
+
+- (void)previewOperationAction:(PREVIEWLIVEACTION)action {
+    switch (action) {
+        case PREVIEWLIVEACTION_BACK: // 返回
+        {
+            if (self.isPauseLive) { // 退出RTC房间
+                [self quitRoomBackPreView:NO];
+            }
+            else {
+                self.room = nil;
+                self.preVideoView = nil;
+                [[RCRTCEngine sharedInstance].defaultVideoStream stopCapture];
+                [self.navigationController dismissViewControllerAnimated:YES completion:nil];
+            }
+        }
+            break;
+        case PREVIEWLIVEACTION_SWITCH: // 切换
+        {
+            [[RCRTCEngine sharedInstance].defaultVideoStream switchCamera];
+        }
+            break;
+        case PREVIEWLIVEACTION_BEAUTY: // 美颜
+        {
+            [self displayBeautyView];
+        }
+            break;
+        case PREVIEWLIVEACTION_SHARE: // 分享
+        {
+            [self shareLiveRoomMessage];
+        }
+            break;
+        case PREVIEWLIVEACTION_OPEN: // 进入直播间
+        {
+            [self showLiveView];
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)shareLiveRoomMessage {
+    // 选择群组分享
+    KSChatLiveMessage *liveShareMsg = [[KSChatLiveMessage alloc] init];
+    liveShareMsg.roomUID = self.roomId;
+    NSString *teacherName = UserDefaultObjectForKey(NicknameKey);
+    if ([NSString isEmptyString:teacherName]) {
+        teacherName = [NSString stringWithFormat:@"游客%@",UserDefaultObjectForKey(UIDKey)];
+    }
+    liveShareMsg.teacherName = teacherName;
+    liveShareMsg.teacherAvatar = UserDefaultObjectForKey(AvatarUrlKey);
+    liveShareMsg.liveDescMessage = self.liveContent;
+    
+    KSShareChooseViewController *chooseCtrl = [[KSShareChooseViewController alloc] init];
+    chooseCtrl.msgContent = liveShareMsg;
+    [self.navigationController pushViewController:chooseCtrl animated:YES];
+}
+
+- (void)displayBeautyView {
+    [self displayBottomView:YES];
+    if (_settingView == nil) {
+        
+        RCRTCBeautyOption *option = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyOption];
+        RCRTCBeautyFilter filter = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyFilter];
+        FILTER_TYPE type = [self getFilterType:filter];
+        MJWeakSelf;
+        [self.settingView evaluateMessageWithWhite:option.whitenessLevel smoothLevel:option.smoothLevel ruddyLevel:option.ruddyLevel brightLevel:option.brightLevel filter:type filterLevel:self.filterLevel callback:^(BOOL isOpenBeauty, NSInteger white, NSInteger smoothLevel, NSInteger ruddyLevel, NSInteger brightLevel, FILTER_TYPE type, int filterLevel) {
+            [weakSelf configSettingBeauty:YES white:white smoothLevel:smoothLevel ruddyLevel:ruddyLevel brightLevel:brightLevel filter:[self getRongBeautyWithType:type] filterLevel:filterLevel];
+        }];
+    }
+    
+    [self.view addSubview:self.settingView];
+    [self.settingView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.view);
+    }];
+}
+
+- (FILTER_TYPE)getFilterType:(RCRTCBeautyFilter)filter {
+    switch (filter) {
+        case RCRTCBeautyFilterNone:
+            return FILTER_TYPE_NONE;
+        case RCRTCBeautyFilterFresh:
+            return FILTER_TYPE_QINGXIN;
+        case RCRTCBeautyFilterEsthetic:
+            return FILTER_TYPE_WEIMEI;
+        case RCRTCBeautyFilterRomantic:
+            return FILTER_TYPE_LANGMAN;
+        default:
+            return FILTER_TYPE_NONE;
+            break;
+    }
+}
+
+- (RCRTCBeautyFilter)getRongBeautyWithType:(FILTER_TYPE)type {
+    switch (type) {
+        case FILTER_TYPE_NONE:
+            return RCRTCBeautyFilterNone;
+        case FILTER_TYPE_QINGXIN:
+            return RCRTCBeautyFilterFresh;
+        case FILTER_TYPE_WEIMEI:
+            return RCRTCBeautyFilterEsthetic;
+        case FILTER_TYPE_LANGMAN:
+            return RCRTCBeautyFilterRomantic;
+        default:
+            return RCRTCBeautyFilterNone;
+            break;
+    }
+}
+
+- (void)configSettingBeauty:(BOOL)isOn white:(NSInteger)whitenessLevel smoothLevel:(NSInteger)smoothLevel ruddyLevel:(NSInteger)ruddyLevel brightLevel:(NSInteger)brightLevel filter:(RCRTCBeautyFilter)filter filterLevel:(int)filterLevel {
+    self.isBeautyOn = isOn;
+    if (isOn) {
+        // 获取当前美颜参数
+        RCRTCBeautyOption *option = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyOption];
+        // 修改参数
+        option.whitenessLevel = whitenessLevel;
+        option.smoothLevel = smoothLevel;
+        option.ruddyLevel = ruddyLevel;
+        option.brightLevel = brightLevel;
+        // 设置美颜
+        [[RCRTCBeautyEngine sharedInstance] setBeautyOption:isOn option:option];
+        // 设置滤镜
+        [[RCRTCBeautyEngine sharedInstance] setBeautyFilter:filter];
+        // 设置滤镜强度
+        [[RCRTCBeautyEngine sharedInstance] setFilterIntensity:filterLevel];
+    }
+    else {
+        [[RCRTCBeautyEngine sharedInstance] reset];
+    }
+}
+
+- (void)showLiveView {
+    if (self.isPauseLive) { // 直接切换页面
+        self.pageType = LIVEPAGE_LIVE;
+        [self.view addSubview:self.livePageView];
+        [self.livePageView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.top.bottom.mas_equalTo(self.view);
+        }];
+        // 开启推流
+        [self startPublishStream];
+    }
+    else {
+        [self showhud];
+        MJWeakSelf;
+        [KSEnterLiveroomManager queryLiveroomConfig:self.roomId callback:^(NSDictionary * _Nullable parm) {
+            [weakSelf removehub];
+            if (parm != nil) {
+                [weakSelf setupLiveroomConfig:parm];
+                [weakSelf createLivePageViewDisplay];
+            }
+        }];
+    }
+}
+
+- (void)startPublishStream {
+    self.pageType = LIVEPAGE_LIVE;
+    self.isPauseLive = NO;
+    [self publishLocalStream];
+}
+
+- (void)setupLiveroomConfig:(NSDictionary *)source {
+    self.liveRoleType = RCRTCLiveRoleTypeBroadcaster;
+    self.createrId = [source stringValueForKey:@"speakerId"];
+    self.createrName = [source stringValueForKey:@"speakerName"];
+    self.createrAvatal = [source stringValueForKey:@"speakerPic"];
+    self.likeCount = [source integerValueForKey:@"likeNum"]; // 点赞数
+    NSInteger lookCount = [source integerValueForKey:@"lookNum"];
+    self.totalCount = lookCount; // 观看人数
+    NSString *roomConfig = [source stringValueForKey:@"roomConfig"];
+    NSData *jsonData = [roomConfig dataUsingEncoding:NSUTF8StringEncoding];
+    NSError *err;
+    NSDictionary *configDic = [NSJSONSerialization JSONObjectWithData:jsonData
+                                                              options:NSJSONReadingMutableContainers
+                                                                error:&err];
+    if (configDic) {
+        self.enableChat = ![configDic boolValueForKey:@"whether_chat"];
+        self.enableSeat = ![configDic boolValueForKey:@"whether_mic"];
+        self.enableLike = ![configDic boolValueForKey:@"whether_like"];
+    }
+}
+
+- (void)createLivePageViewDisplay {
+    self.pageType = LIVEPAGE_LIVE;
+    self.isImConnected = [USER_MANAGER checkIMConnected];
+    [self registerNotification];
+    [self setupUI];
+    [self configIMConnect];
+    [self startTimer];
+}
+
+#pragma mark --- settingView
+- (KSBeautySettingView *)settingView {
+    if (!_settingView) {
+        _settingView = [KSBeautySettingView shareInstance];
+        MJWeakSelf;
+        [_settingView hiddenViewCallback:^{
+            [weakSelf displayBottomView:NO];
+        }];
+        
+    }
+    return _settingView;
+}
+
+- (void)displayBottomView:(BOOL)isHidden {
+    if (isHidden) {
+        self.previewPageView.functionView.hidden = YES;
+    }
+    else {
+        self.previewPageView.functionView.hidden = NO;
+    }
+}
+
+
+#pragma mark ------- Live page
+- (void)startTimer {
+    if (self.timer) {
+        dispatch_resume(self.timer);
+    }
+}
+- (void)registerNotification {
+
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(IMConnetedCallback) name:@"RongIMConnected" object:nil];
+    [KSChatroomMessageCenter registerMessageTypes];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMessageNotification:) name:OnReceiveChatroomMessageNotification object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appEnterBackground) name:@"appEnterBackground" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appBecomeActive) name:@"appBecomeActive" object:nil];
+    [self judgeAutoClose];
+}
+
+- (void)judgeAutoClose {
+    if (self.isTempRoom == NO) {
+        self.timeManager.autoCloseNetworkRoomTime = [self getCloseTime];
+    }
+}
+
+#pragma mark ------ enter back ground
+- (void)appEnterBackground {
+    self.isEnterBackground = YES;
+    if (self.isPauseLive == NO) { // 暂停推流
+        [self pauseLiveActionBack:NO];
+    }
+}
+
+- (void)appBecomeActive {
+    if (self.isEnterBackground && self.pageType == LIVEPAGE_LIVE && self.isOtherLogin == NO) {
+        // 开启推流
+        [self startPublishStream];
+    }
+    self.isEnterBackground = NO;
+}
+
+- (void)setupUI {
+    CGSize size = self.view.bounds.size;
+    [self.view addSubview:self.livePageView];
+    [self.livePageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.view);
+    }];
+    
+    [self.livePageView addSubview:self.liveVideoView];
+    [self.liveVideoView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.bottom.right.mas_equalTo(self.livePageView);
+    }];
+    
+    [self.livePageView addSubview:self.headView];
+    
+    [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.livePageView);
+        make.height.mas_equalTo(90);
+        if (@available(iOS 11.0, *)) {
+            make.top.mas_equalTo(self.livePageView.mas_safeAreaLayoutGuideTop).offset(10);
+        } else {
+            // Fallback on earlier versions
+            make.top.mas_equalTo(self.livePageView.mas_top).offset(10);
+        }
+    }];
+    [self.livePageView addSubview:self.messageContentView];
+    [self.livePageView addSubview:self.bottomView];
+    
+    self.headView.boardcastName.text = [NSString returnNoNullStringWithString:self.createrName];
+    if (![NSString isEmptyString:self.createrAvatal]) {
+        [self.headView.boardcastAvatal sd_setImageWithURL:[NSURL URLWithString:self.createrAvatal] placeholderImage:[UIImage imageNamed:@"teacher_logo"]];
+    }
+    [self countLikeMessageCount];
+    
+    [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.livePageView);
+        make.height.mas_equalTo(90);
+        if (@available(iOS 11.0, *)) {
+            make.top.mas_equalTo(self.livePageView.mas_safeAreaLayoutGuideTop).offset(10);
+        } else {
+            // Fallback on earlier versions
+            make.top.mas_equalTo(self.livePageView.mas_top).offset(10);
+        }
+    }];
+    [self.livePageView addSubview:self.messageContentView];
+    [self.livePageView addSubview:self.bottomView];
+    
+    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.livePageView);
+        if (@available(iOS 11.0, *)) {
+            make.bottom.mas_equalTo(self.livePageView.mas_safeAreaLayoutGuideBottom).offset(-10);
+        } else {
+            // Fallback on earlier versions
+            make.bottom.mas_equalTo(self.livePageView.mas_bottom).offset(-10);
+        }
+        make.height.mas_equalTo(44);
+    }];
+    
+    [self.messageContentView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.livePageView.mas_left);
+        make.right.mas_equalTo(self.livePageView.mas_right);
+        make.bottom.mas_equalTo(self.bottomView.mas_top).offset(-10);
+        make.height.mas_equalTo(270);
+    }];
+    [self.livePageView addSubview:self.inputBar];
+    [_inputBar setBackgroundColor: [UIColor whiteColor]];
+    
+    [_inputBar setFrame:CGRectMake(0, kScreenHeight, size.width , 50)];
+    [_inputBar setHidden:YES];
+    
+    [self.messageContentView addSubview:self.conversationMessageTableView];
+    [self.conversationMessageTableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.top.mas_equalTo(self.messageContentView);
+        make.width.mas_equalTo(240);
+        make.bottom.mas_equalTo(self.messageContentView.mas_bottom);
+    }];
+    
+    [self.livePageView addSubview:self.seatApplyTips];
+    [self.seatApplyTips hideView];
+    [self.seatApplyTips mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.mas_equalTo(self.bottomView.mas_top).offset(2);
+        make.height.mas_equalTo(20);
+        make.left.mas_equalTo(self.bottomView.mas_right).offset(-72);
+    }];
+    
+    UITapGestureRecognizer *resetBottomTapGesture =[[UITapGestureRecognizer alloc]
+                                                    initWithTarget:self
+                                                    action:@selector(resetBottomGesture:)];
+    resetBottomTapGesture.delegate = self;
+    [self.livePageView addGestureRecognizer:resetBottomTapGesture];
+}
+
+- (void)joinChatRoom {
+    
+    [[RCIMClient sharedRCIMClient] joinChatRoom:self.roomId messageCount:-1 success:^{
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [self addConstMessage];
+        });
+        KSLiveChatroomWelcome *joinChatroomMessage = [[KSLiveChatroomWelcome alloc] init];
+        [joinChatroomMessage setMsgId:[RCIM sharedRCIM].currentUserInfo.userId];
+        MJWeakSelf;
+        [self sendMessage:joinChatroomMessage displayMessage:NO callback:^(BOOL success) {
+            weakSelf.hasSendWelcomeMessage = YES;
+        }];
+        // 加入成功发送消息
+        
+    } error:^(RCErrorCode status) {
+        if (status == RC_CHATROOM_NOT_EXIST || status == KICKED_FROM_CHATROOM || status == RC_PARAMETER_INVALID_CHATROOM) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [self MBPShow:@"加入聊天室失败"];
+            });
+        }
+    }];
+}
+
+- (void)configIMConnect {
+    if (self.isImConnected == YES) {
+        [self connectionService];
+    }
+    else {
+        MJWeakSelf;
+        [USER_MANAGER connectionIMCallback:^(BOOL isSuccess) {
+            dispatch_main_async_safe(^{
+                [weakSelf connectionService];
+            });
+        }];
+    }
+}
+
+- (void)IMConnetedCallback {
+    
+    dispatch_main_async_safe(^{
+        // IM 连接成功回调
+        if (self.hasSendWelcomeMessage) { // 如果已经发送了进入消息
+            // 查询是否直播间开启
+            [KSNetworkingManager speakerCheckRoomInfoRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
+                if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                    // 回调信息
+                    MJWeakSelf;
+                    [self notiferJoinSuccessToServiceCallback:^{
+                        [weakSelf MBPShow:@"IM连接成功"];
+                        [weakSelf sendWelcomeMessage];
+                    }];
+                }
+                else {
+                    [self MBPShow:MESSAGEKEY];
+                    [self quitRoomBackPreView:NO];
+                }
+            } faliure:^(NSError * _Nonnull error) {
+                
+            }];
+        }
+    });
+}
+
+- (void)sendWelcomeMessage {
+    MJWeakSelf;
+    [[RCIMClient sharedRCIMClient] joinExistChatRoom:self.roomId messageCount:-1 success:^{
+        KSLiveChatroomWelcome *joinChatroomMessage = [[KSLiveChatroomWelcome alloc] init];
+        [joinChatroomMessage setMsgId:[RCIM sharedRCIM].currentUserInfo.userId];
+        [self sendMessage:joinChatroomMessage displayMessage:NO callback:^(BOOL success) {
+            [weakSelf joinRTCRoom];
+        }];
+    } error:^(RCErrorCode status) {
+        NSLog(@"error code %zd" ,status);
+    }];
+}
+
+- (void)joinRTCRoom {
+    [self setRoleType];
+}
+
+- (void)liveroomLogOut {
+    self.isOtherLogin = YES;
+    [self MBPShow:@"该账号在其他设备上登录"];
+    [self quitRoomBackPreView:NO];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"backLoginView" object:nil];
+    });
+}
+
+- (void)liveroomQuit {
+    self.isOtherLogin = YES;
+    [self quitRoomBackPreView:NO];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"backLoginView" object:nil];
+    });
+}
+ 
+- (void)connectionService {
+    [self setRoleType];
+    [self joinChatRoom];
+}
+
+- (void)countLikeMessageCount {
+    NSInteger count = self.likeCount;
+    NSString *desc = @"";
+    if (count > 10000) {
+        count = count / 10000;
+        desc = [NSString stringWithFormat:@"本场点赞%zd万+",count];
+    }
+    else {
+        desc = [NSString stringWithFormat:@"本场点赞%zd",count];
+    }
+    self.headView.likeCount.text = desc;
+}
+- (void)countMemberCount {
+    NSInteger count = self.totalCount;
+    NSString *desc = @"";
+    if (count > 10000) {
+        count = count / 10000;
+        desc = [NSString stringWithFormat:@"%zd万+人",count];
+    }
+    else {
+        desc = [NSString stringWithFormat:@"%zd人",count];
+    }
+    self.headView.roomMemberCount.text = desc;
+}
+
+// 刷新seatView
+- (void)renderSeatView {
+    NSMutableArray *seatArray = [NSMutableArray array];
+    NSArray *remoteUserArray = [self.room.remoteUsers mutableCopy];
+    for (RCRTCRemoteUser *user in remoteUserArray) {
+        [seatArray addObject:user.userId];
+    }
+    if (seatArray.count) {
+        if (![self.livePageView.subviews containsObject:self.seatContainer]) {
+            [self.livePageView addSubview:self.seatContainer];
+        }
+        
+        [self.seatContainer mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.mas_equalTo(self.livePageView);
+            make.top.mas_equalTo(self.headView.mas_bottom).offset(10);
+            make.height.mas_equalTo(80);
+        }];
+        
+        self.seatContainer.seatMemberArray = [NSMutableArray arrayWithArray:seatArray];
+        [self.seatContainer refreshSeatUI];
+    }
+    else {
+        [self removeSeatContainer];
+    }
+}
+
+- (void)removeSeatContainer {
+    if ([self.livePageView.subviews containsObject:self.seatContainer]) {
+        [self.seatContainer removeFromSuperview];
+    }
 }
 
+- (void)setRoleType {
+    // 1.设置切换听筒为扬声器
+    [[RCRTCEngine sharedInstance] setDefaultAudioRouteToSpeaker:YES];
+    [RCRTCEngine sharedInstance].statusReportDelegate = self;
+    // 2.添加本地采集预览界面
+    [self setupLocalVideoView];
+    // 3.加入RTC房间
+    [self joinRTCLiveRoom];
+}
+
+// 添加本地采集预览页面
+- (void)setupLocalVideoView {
+    [self.liveVideoView addSubview:self.localVideo.canvesView];
+    [self.localVideo.canvesView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.liveVideoView);
+    }];
+}
+
+#pragma mark ----- RCRTCStatusReportDelegate
+- (void)didReportStatusForm:(RCRTCStatusForm *)form {
+    BOOL isConnectedFailed = NO;
+    for (RCRTCStreamStat* stat  in form.sendStats) {
+        if (stat.packetLoss == 1.0) {
+            isConnectedFailed = YES;
+            break;
+        }
+    }
+    
+    [self showNetStatus:form.rtt networkLost:isConnectedFailed];
+
+//    NSLog(@"%@",form.description);
+    // 网络状态差提示
+    
+}
+- (void)showNetStatus:(NSInteger)rttValue networkLost:(BOOL)isFailed {
+    dispatch_main_async_safe((^{
+        if (isFailed) {
+            [self.headView.rttImage setImage:[UIImage imageNamed:@"live_networking_bad"]];
+            self.headView.msLabel.text = @"网络已断开";
+        }
+        else {
+            self.headView.msLabel.text = [NSString stringWithFormat:@"%zdms",rttValue];
+            if (rttValue < 100) {
+                [self.headView.rttImage setImage:[UIImage imageNamed:@"live_networking_good"]];
+            }
+            else if (rttValue < 200) {
+                [self.headView.rttImage setImage:[UIImage imageNamed:@"live_networking_nomal"]];
+            }
+            else {
+                [self.headView.rttImage setImage:[UIImage imageNamed:@"live_networking_bad"]];
+            }
+        }
+       
+    }));
+}
+
+#pragma mark ---- RCRTCRoomEventDelegate
+// 远端发布流
+- (void)didPublishStreams:(NSArray<RCRTCInputStream *> *)streams {
+    [self subscribeRemoteResource:streams];
+    NSLog(@"didPublishStreams --------");
+}
+
+// 订阅远端流
+- (void)subscribeRemoteResource:(NSArray<RCRTCInputStream *> *)streams {
+    [self subscribeRemoteResource:streams isTiny:NO];
+}
+
+- (void)subscribeRemoteResource:(NSArray<RCRTCInputStream *> *)streams isTiny:(BOOL)isTiny {
+    // 订阅房间中远端用户音视频流资源
+    NSArray *tinyStream = isTiny ? streams : @[];
+    NSArray *ordinaryStream = isTiny ? @[] : streams;
+    MJWeakSelf;
+    [self.room.localUser subscribeStream:ordinaryStream
+                             tinyStreams:tinyStream
+                              completion:^(BOOL isSuccess, RCRTCCode desc) {
+        if (desc != RCRTCCodeSuccess) {
+            NSString *errorStr = [NSString stringWithFormat:@"订阅远端流失败:%ld", (long) desc];
+            [weakSelf MBPShow:errorStr];
+            return;
+        }
+    }];
+    [self renderSeatView];
+}
+
+- (void)didUnpublishStreams:(NSArray<RCRTCInputStream *> *)streams {
+    NSLog(@"didUnPublishStreams --------");
+    [self renderSeatView];
+}
+
+- (void)didOfflineUser:(RCRTCRemoteUser *)user {
+    [self renderSeatView];
+}
+- (void)didJoinUser:(RCRTCRemoteUser *)user {
+    NSLog(@"--didJoinUser-");
+//    [self renderSeatView];
+}
+
+// 如果有远端用户离开房间
+- (void)didLeaveUser:(RCRTCRemoteUser *)user {
+    NSLog(@"--didLeaveUser-");
+    // 如果有人离开房间
+    if ([self judgeContainMember:user.userId]) {
+        [self removeMember:user.userId];
+        [self refreshSeatApplyView];
+    }
+    [self renderSeatView];
+}
+
+// 远端用户切换身份
+- (void)didSwitchRoleWithUser:(RCRTCRemoteUser *)user roleType:(RCRTCLiveRoleType)roleType {
+    if (roleType == RCRTCLiveRoleTypeBroadcaster) {
+        if ([self judgeContainUser:user.userId] == NO) {
+            [self.remoteMemberArray addObject:user];
+            // 刷新连麦成员状态数据
+            if ([self judgeContainMember:user.userId]) {
+                // 更新状态
+                [self updateMemberStatusConnecting:user.userId];
+                [self refreshSeatApplyView];
+            }
+        }
+    }
+    else {
+        [self removeMemberUserId:user.userId];
+        // 刷新连麦成员数据
+        if ([self judgeContainMember:user.userId]) {
+            [self removeMember:user.userId];
+            [self refreshSeatApplyView];
+        }
+    }
+    [self renderSeatView];
+    
+    NSLog(@"didSwitchRoleWithUser --------");
+}
+
+- (BOOL)judgeContainUser:(NSString *)userId {
+    BOOL containUser = NO;
+    for (RCRTCRemoteUser *remoteUser in self.remoteMemberArray) {
+        if ([remoteUser.userId isEqualToString:userId]) {
+            containUser = YES;
+        }
+    }
+    return containUser;
+}
+
+- (void)removeMemberUserId:(NSString *)userId {
+    for (RCRTCRemoteUser *remoteUser in self.remoteMemberArray) {
+        if ([remoteUser.userId isEqualToString:userId]) {
+            [self.remoteMemberArray removeObject:remoteUser];
+            return;
+        }
+    }
+}
+
+#pragma mark - KSChatInputBarControlDelegate
+//  根据inputBar 回调来修改页面布局
+- (void)onInputBarControlContentSizeChanged:(CGRect)frame withAnimationDuration:(CGFloat)duration andAnimationCurve:(UIViewAnimationCurve)curve {
+    CGRect originFrame = _inputBar.frame;
+    __weak __typeof(&*self)weakSelf = self;
+    //  目前只使用y值即可 -- 只修改messageContentView高度,让展示消息view和输入框随之移动
+    [UIView animateWithDuration:duration animations:^{
+        [UIView setAnimationCurve:curve];
+        [weakSelf.inputBar setFrame:CGRectMake(0, frame.origin.y - originFrame.size.height, originFrame.size.width, originFrame.size.height)];
+        [UIView commitAnimations];
+    }];
+}
+
+//  发送消息
+- (void)onTouchSendButton:(NSString *)text {
+    [self touristSendMessage:text];
+}
+
+- (void)touristSendMessage:(NSString *)text {
+    
+    RCTextMessage *rcTextMessage = [RCTextMessage messageWithContent:text];
+    MJWeakSelf;
+    [self sendMessage:rcTextMessage displayMessage:YES callback:^(BOOL success) {
+        [weakSelf setDefaultBottomViewStatus];
+    }];
+}
+
+#pragma mark ---- RTC
+- (void)joinRTCLiveRoom {
+    // 1.配置房间
+    RCRTCRoomConfig *config = [[RCRTCRoomConfig alloc] init];
+    config.roomType = RCRTCRoomTypeLive;
+    config.liveType = RCRTCLiveTypeAudioVideo;
+    config.roleType = RCRTCLiveRoleTypeBroadcaster;
+    __weak typeof(self) weakSelf = self;
+    [[RCRTCEngine sharedInstance] joinRoom:self.roomId config:config completion:^(RCRTCRoom * _Nullable room, RCRTCCode code) {
+        dispatch_main_async_safe(^{
+            __strong typeof(weakSelf) strongSelf = weakSelf;
+            if (code == RCRTCCodeSignalServerNotConnect || code == RCRTCCodeParameterError || code == RCRTCCodeNotInRTCRoom || code == RCRTCCodeRTCTokenIsNull || code == RCRTCCodeHttpTimeoutError || code == RCRTCCodeHttpError || code == RCRTCCodeVoIPNotAvailable) {
+                NSLog(@"%@",[NSString stringWithFormat:@"加入失败 code %ld",code]);
+                [strongSelf MBPShow:@"加入直播间失败"];
+//                [strongSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
+            }
+            else {
+                [strongSelf notiferJoinSuccessToServiceCallback:^{
+                    
+                }];
+                if (room) {
+                    strongSelf.room = room;
+                    strongSelf.room.delegate = self;
+                }
+
+                [strongSelf countMemberCount];
+                // 发布本地视频流
+                if (strongSelf.isPauseLive == NO && strongSelf.isEnterBackground == NO) {
+                    [strongSelf publishLocalStream];
+                }
+            }
+            
+        });
+    }];
+}
+
+- (void)publishLocalStream {
+    // 1.设置渲染视图渲染视图
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoView:self.localVideo.canvesView];
+    // 2.设置视频流参数
+    RCRTCVideoStreamConfig *videoConfig = [RCRTCEngine sharedInstance].defaultVideoStream.videoConfig;
+    videoConfig.videoSizePreset = RCRTCVideoSizePreset1280x720;
+    videoConfig.videoFps = RCRTCVideoFPS30;
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoConfig:videoConfig];
+    // 3.开始视频采集
+    [[RCRTCEngine sharedInstance].defaultVideoStream startCapture];
+    [RCRTCEngine sharedInstance].defaultVideoStream.enableTinyStream = NO;
+    [[RCRTCEngine sharedInstance].defaultAudioStream setAudioQuality:RCRTCAudioQualityMusicHigh Scenario:RCRTCAudioScenarioMusicChatRoom];
+
+    // 发布本地视频流到房间
+    MJWeakSelf;
+    [self.room.localUser publishDefaultLiveStreams:^(BOOL isSuccess, RCRTCCode code, RCRTCLiveInfo * _Nullable liveInfo) {
+        if (code == RCRTCCodeSuccess) {
+            
+        }
+        else {
+            [weakSelf MBPShow:@"视频流发布失败"];
+        }
+    }];
+}
+
+
+- (void)exitRoomCallback:(void(^)(BOOL success))callback {
+    [[RCRTCEngine sharedInstance].defaultVideoStream stopCapture];
+    _localVideo = nil;
+    _preVideoView = nil;
+    _room = nil;
+    MJWeakSelf;
+    [[RCRTCEngine sharedInstance] leaveRoom:^(BOOL isSuccess, RCRTCCode code) {
+        dispatch_main_async_safe(^{
+            [weakSelf sendLeaveMessageCallback:^(BOOL success) {
+                callback(success);
+            }];
+        });
+    }];
+}
+
+// 销毁房间
+- (void)distoryRoomCallback:(void(^)(BOOL success))callback {
+    [[RCRTCEngine sharedInstance].defaultVideoStream stopCapture];
+    _localVideo = nil;
+    _preVideoView = nil;
+    _room = nil;
+    __weak typeof(self) weakSelf = self;
+    [[RCRTCEngine sharedInstance] leaveRoom:^(BOOL isSuccess, RCRTCCode code) {
+        dispatch_main_async_safe(^{
+            __strong typeof(weakSelf) strongSelf = weakSelf;
+            [strongSelf sendLeaveMessageCallback:^(BOOL success) {
+                callback(success);
+            }];
+        });
+    }];
+}
+
+
+#pragma mark -- 加入直播间和退出直播间回到服务
+- (void)notiferJoinSuccessToServiceCallback:(void(^)(void))callback {
+    [KSNetworkingManager liveRoomJoinRoomRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
+        callback();
+    } faliure:^(NSError * _Nonnull error) {
+        callback();
+    }];
+}
+
+
+#pragma mark -- 退出直播间回掉服务
+- (void)quitNotiferService {
+    [KSNetworkingManager LiveroomQuit:KS_POST success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"errCode"] == 0) {
+            NSLog(@"success");
+        }
+        else {
+            NSLog(@"----- error %@", [dic stringValueForKey:@"errMsg"]);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)closeRoomNotiferService {
+    [KSNetworkingManager destroyLiveRoomRequest:KS_GET roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"errCode"] == 0) {
+            NSLog(@"success");
+        }
+        else {
+            NSLog(@"----- error %@", [dic stringValueForKey:@"errMsg"]);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+    
+}
+
+- (void)sendLeaveMessageCallback:(void(^)(BOOL success))callback {
+    
+    RCUserInfo *currentUserInfo = [RCIM sharedRCIM].currentUserInfo;
+    KSLiveChatroomLeave *leaveMessage = [[KSLiveChatroomLeave alloc] init];
+    leaveMessage.userId = currentUserInfo.userId;
+    leaveMessage.userName = currentUserInfo.name;
+    [self sendMessage:leaveMessage displayMessage:NO callback:^(BOOL success) {
+        callback(success);
+    }];
+}
+
+- (void)quitChatRoom {
+    [[RCIMClient sharedRCIMClient] quitChatRoom:self.roomId success:^{
+        NSLog(@"sucess log out--");
+    } error:^(RCErrorCode status) {
+        NSLog(@"RCErrorCode------%ld ", (long)status);
+    }];
+}
+
+- (void)addConstMessage { // 固定欢迎词语
+    RCTextMessage *statement = [RCTextMessage messageWithContent:@"欢迎进入直播课堂,请遵守相关法规,禁止传播低俗、暴力等不良信息。为孩子创造健康绿色的学习环境。"];
+    statement.extra = @"statement";
+    RCMessage *constMessage = [[RCMessage alloc] initWithType:ConversationType_CHATROOM targetId:self.roomId direction:MessageDirection_SEND content:statement];
+    constMessage.content.senderUserInfo = [RCIM sharedRCIM].currentUserInfo;
+    [self appendAndDisplayMessage:constMessage];
+}
+
+#pragma mark - views init
+/**
+ *  接收到消息的回调
+ */
+- (void)didReceiveMessageNotification:(NSNotification *)notification {
+    NSDictionary *dic = notification.object;
+    __block RCMessage *rcMessage = dic[@"message"];
+    KSRCMessageModel *model = [[KSRCMessageModel alloc] initWithMessage:rcMessage];
+    model.userInfo = rcMessage.content.senderUserInfo;
+    if (model.conversationType == ConversationType_CHATROOM && [model.targetId isEqualToString:self.roomId]) {
+        __weak typeof(&*self) __blockSelf = self;
+        dispatch_main_async_safe((^{
+            // 对赞消息拦截 ,展示动画,不插入数据源 ,对于seat消息 和踢出消息,弹出alert
+            if (rcMessage) {
+                // 👍🏻消息
+                if ([rcMessage.content isMemberOfClass:[KSLiveChatroomLike class]]) {
+                    KSLiveChatroomLike *likeMessage = (KSLiveChatroomLike *)rcMessage.content;
+                    // 统计点赞数量
+                    __blockSelf.likeCount += likeMessage.counts;
+                    [__blockSelf countLikeMessageCount];
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomWelcome class]]) {
+                    //  过滤自己发送的欢迎消息
+                    if ([rcMessage.senderUserId isEqualToString:UserDefault(UIDKey)]) {
+                        return;
+                    }
+                    // 弹幕
+                    RCUserInfo *userInfo = rcMessage.content.senderUserInfo;
+                    NSString *userName = [userInfo.name stringByAppendingString:@""];
+                    NSString *contentMsg = [NSString stringWithFormat:@"%@ 进入直播间",userName];
+                    [__blockSelf showAnimationView:YES showMessag:contentMsg];
+                    
+                    if ([__blockSelf judgeContainMember:rcMessage.senderUserId]) {
+                        [__blockSelf removeMember:rcMessage.senderUserId];
+                        [__blockSelf refreshSeatApplyView];
+                        [__blockSelf renderSeatView];
+                    }
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomMemberUp class]]) {
+                    KSLiveChatroomMemberUp *member = (KSLiveChatroomMemberUp *)rcMessage.content;
+                    __blockSelf.totalCount = member.count;
+                    [__blockSelf countMemberCount];
+                }
+                // 用户退出消息
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomLeave class]]) {
+                    KSLiveChatroomLeave *memberLeaveMsg = (KSLiveChatroomLeave *)rcMessage.content;
+                    if ([__blockSelf judgeContainMember:memberLeaveMsg.userId]) {
+                        [__blockSelf removeMember:memberLeaveMsg.userId];
+                        [__blockSelf refreshSeatApplyView];
+                    }
+                    return;
+                }
+                // 连麦申请消息
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomSeatApply class]]) {
+                    KSLiveChatroomSeatApply *seatApplyMessage = (KSLiveChatroomSeatApply *)rcMessage.content;
+                    
+                    if (seatApplyMessage.type == SEATHANDLE_APPLY) { // 观众申请 加入申请中
+                        LiveSeatMember *member = [[LiveSeatMember alloc] init];
+                        member.avatar = seatApplyMessage.audienceAvatar;
+                        member.name = seatApplyMessage.audienceName;
+                        member.userId = seatApplyMessage.audienceId;
+                        member.isConnected = NO;
+                        if (![__blockSelf judgeContainMember:member.userId]) {
+                            [__blockSelf.seatApplyArray addObject:member];
+                            [__blockSelf refreshSeatApplyView];
+                        }
+                    }
+                    else if (seatApplyMessage.type == SEATHANDLE_CANCELAPPLY) { // 观众取消申请 从申请中剔除
+                        if ([__blockSelf judgeContainMember:seatApplyMessage.audienceId]) {
+                            [__blockSelf removeMember:seatApplyMessage.audienceId];
+                            [__blockSelf refreshSeatApplyView];
+                        }
+                    }
+                    return;
+                }
+                // 连麦回复消息(暂不处理)
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomSeatResponse class]]) {
+                    
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomDownSeat class]]) { // 观众下麦,从列表中移除
+                    KSLiveChatroomDownSeat *downSeatMessage = (KSLiveChatroomDownSeat *)rcMessage.content;
+                    if ([__blockSelf judgeContainMember:downSeatMessage.audienceId]) {
+                        [__blockSelf removeMember:downSeatMessage.audienceId];
+                        [__blockSelf refreshSeatApplyView];
+                    }
+                    return;
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSRCShopRushMessage class]]) {
+                    KSRCShopRushMessage *rushMsg = (KSRCShopRushMessage *)rcMessage.content;
+                    
+                    NSString *contentMsg = [NSString stringWithFormat:@"%@ 正在抢购",[NSString returnNoNullStringWithString:rushMsg.userName]];
+                    [__blockSelf showAnimationView:NO showMessag:contentMsg];
+                }
+                else if ([rcMessage.content isMemberOfClass:[RCTextMessage class]]) {
+                    [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
+                }
+                else if ([rcMessage.content isMemberOfClass:[RCChatroomClose class]]) { // 直播间已关闭
+                    [__blockSelf MBPShow:@"直播已结束"];
+                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                        // 退出直播间
+                        [__blockSelf quitRoomBackPreView:NO];
+                    });
+                    return;
+                }
+            }
+            
+        }));
+    }
+}
+
+- (void)insertMessage:(RCMessage *)rcMessage userInfo:(NSDictionary *)userInfo {
+    // left
+    NSDictionary *leftDic = userInfo;
+    if (leftDic && [leftDic[@"left"] isEqual:@(0)]) {
+        self.isNeedScrollToButtom = YES;
+    }
+    [self appendAndDisplayMessage:rcMessage];
+}
+
+- (BOOL)judgeContainMember:(NSString *)userId {
+    for (LiveSeatMember *obj in self.seatApplyArray) {
+        if ([obj.userId isEqualToString:userId]) {
+            return YES;
+        }
+    }
+    return NO;
+}
+
+- (void)removeMember:(NSString *)memberId {
+    for (LiveSeatMember *member in self.seatApplyArray) {
+        if ([member.userId isEqualToString:memberId]) {
+            [self.seatApplyArray removeObject:member];
+            return;
+        }
+    }
+}
+
+- (void)updateMemberStatusWaiting:(NSString *)userId {
+    for (LiveSeatMember *obj in self.seatApplyArray) {
+        if ([obj.userId isEqualToString:userId]) {
+            obj.isConnected = NO;
+            return;
+        }
+    }
+}
+
+- (void)updateMemberStatusConnecting:(NSString *)userId {
+    for (LiveSeatMember *obj in self.seatApplyArray) {
+        if ([obj.userId isEqualToString:userId]) {
+            obj.isConnected = YES;
+            return;
+        }
+    }
+}
+
+- (void)refreshSeatApplyView {
+    if (self.seatApplyArray.count) {
+        [self showSeatTips:self.seatApplyArray.count];
+    }
+    else {
+        [self hideSeatTips];
+    }
+    [self.seatApplyView refreshSeatApplyTable:self.seatApplyArray];
+}
+
+- (void)showSeatTips:(NSInteger)count {
+    NSString *countDesc = count >= 100 ? @"99+" : [NSString stringWithFormat:@"%zd",count];
+    [self.seatApplyTips configCountMessage:countDesc];
+    [self.seatApplyTips showTipsView];
+}
+
+- (void)hideSeatTips {
+    [self.seatApplyTips hideView];
+}
+// 发送人数同步消息
+- (void)sendMemberCountMessage {
+    KSLiveChatroomMemberCount *syncMessage = [[KSLiveChatroomMemberCount alloc] init];
+    syncMessage.count = self.totalCount;
+    
+    [self sendMessage:syncMessage displayMessage:NO callback:^(BOOL success) {
+            
+    }];
+}
+
+#pragma mark ----- time manager delegate
+- (void)quitClassroomNotifer {
+    [self MBPShow:@"直播课已结束!"];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self quitRoomBackPreView:NO];
+    });
+}
+
+#pragma mark - gesture and button action
+- (void)resetBottomGesture:(UIGestureRecognizer *)gestureRecognizer {
+    if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
+        [self setDefaultBottomViewStatus];
+    }
+}
+- (void)setDefaultBottomViewStatus {
+    [self.inputBar setInputBarStatus:KSBottomBarStatusDefault];
+    [self.inputBar setHidden:YES];
+}
+
+
+#pragma mark ---- sendMessage/showMessage
+- (void)sendMessage:(RCMessageContent *)messageContent displayMessage:(BOOL)displayMessage callback:(void(^)(BOOL success))callback {
+    if (_roomId == nil) {
+        return;
+    }
+    messageContent.senderUserInfo = [RCIM sharedRCIM].currentUserInfo;
+    if (messageContent == nil) {
+        return;
+    }
+    __weak typeof(&*self) __weakself = self;
+    [KSChatroomMessageCenter sendChatMessage:self.roomId content:messageContent success:^(long messageId) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            RCMessage *message = [[RCMessage alloc] initWithType:ConversationType_CHATROOM targetId:__weakself.roomId direction:MessageDirection_SEND content:messageContent];
+            message.content.senderUserInfo = [RCIM sharedRCIM].currentUserInfo;
+            
+            message.senderUserId = UserDefault(UIDKey);
+            if (displayMessage) {
+                [__weakself appendAndDisplayMessage:message];
+            }
+            [__weakself.inputBar clearInputView];
+            callback(YES);
+        });
+        
+    } error:^(RCErrorCode errorCode, long messageId) {
+        if (errorCode == RC_CHATROOM_NOT_EXIST) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [self MBPShow:@"聊天已被解散,请退出后重进。"];
+            });
+        }
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [__weakself.inputBar clearInputView];
+            NSLog(@"发送失败,errorcode is: %ld",(long)errorCode);
+            callback(NO);
+        });
+    }];
+}
+
+/**
+ *  将消息加入本地数组
+ */
+- (void)appendAndDisplayMessage:(RCMessage *)rcMessage {
+    if (!rcMessage) {
+        return;
+    }
+    
+    KSRCMessageModel *model = [[KSRCMessageModel alloc] initWithMessage:rcMessage];
+    model.userInfo = rcMessage.content.senderUserInfo;
+    if (!model.userInfo) {
+        model.userInfo = [RCIMClient sharedRCIMClient].currentUserInfo;
+    }
+    
+    if ([self appendMessageModel:model]) {
+        NSIndexPath *indexPath =
+        [NSIndexPath indexPathForItem:self.conversationDataRepository.count - 1
+                            inSection:0];
+        if ([self.conversationMessageTableView numberOfRowsInSection:0] !=
+            self.conversationDataRepository.count - 1) {
+            return;
+        }
+        //  view刷新
+        [self.conversationMessageTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
+        if ([self isAtTheBottomOfTableView] || self.isNeedScrollToButtom) {
+            [self scrollToBottomAnimated:YES];
+            self.isNeedScrollToButtom=NO;
+        }
+    }
+    return;
+}
+
+/**
+ *  如果当前会话没有这个消息id,把消息加入本地数组
+ */
+- (BOOL)appendMessageModel:(KSRCMessageModel *)model {
+    
+    if (!model.content) {
+        return NO;
+    }
+    //这里可以根据消息类型来决定是否显示,如果不希望显示直接return NO
+    
+    //数量不可能无限制的大,这里限制收到消息过多时,就对显示消息数量进行限制。
+    //用户可以手动下拉更多消息,查看更多历史消息。
+    if (self.conversationDataRepository.count>100) {
+        //                NSRange range = NSMakeRange(0, 1);
+        KSRCMessageModel *message = self.conversationDataRepository[0];
+        [[RCIMClient sharedRCIMClient]deleteMessages:@[@(message.messageId)]];
+        [self.conversationDataRepository removeObjectAtIndex:0];
+        [self.conversationMessageTableView reloadData];
+    }
+    
+    [self.conversationDataRepository addObject:model];
+    return YES;
+}
+
+/**
+ *  判断消息是否在collectionView的底部
+ *
+ *  @return 是否在底部
+ */
+- (BOOL)isAtTheBottomOfTableView {
+    if (self.conversationMessageTableView.contentSize.height <= self.conversationMessageTableView.frame.size.height) {
+        return YES;
+    }
+    if(self.conversationMessageTableView.contentOffset.y +200 >= (self.conversationMessageTableView.contentSize.height - self.conversationMessageTableView.frame.size.height)) {
+        return YES;
+    }else{
+        return NO;
+    }
+}
+
+/**
+ *  消息滚动到底部
+ *
+ *  @param animated 是否开启动画效果
+ */
+- (void)scrollToBottomAnimated:(BOOL)animated {
+    if ([self.conversationMessageTableView numberOfSections] == 0) {
+        return;
+    }
+    NSUInteger finalRow = MAX(0, [self.conversationMessageTableView numberOfRowsInSection:0] - 1);
+    if (0 == finalRow) {
+        return;
+    }
+    NSIndexPath *finalIndexPath =
+    [NSIndexPath indexPathForItem:finalRow inSection:0];
+    [self.conversationMessageTableView scrollToRowAtIndexPath:finalIndexPath atScrollPosition:UITableViewScrollPositionTop animated:animated];
+}
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+#pragma mark ----- table data source
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.conversationDataRepository.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    KSRCMessageModel *model = [self.conversationDataRepository objectAtIndex:indexPath.row];
+    RCMessageContent *messageContent = model.content;
+    KSChatroomTextCell *cell = [tableView dequeueReusableCellWithIdentifier:@"KSChatroomTextCell"];
+    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]]){
+        [cell setDataModel:model createrId:self.createrId];
+    }
+    return cell;
+}
+
+
+#pragma mark --- lazying
+- (UIView *)livePageView {
+    if (!_livePageView) {
+        _livePageView = [[UIView alloc] init];
+        _livePageView.backgroundColor = HexRGB(0x25292e);
+    }
+    return _livePageView;
+}
+
+- (UIView *)liveVideoView {
+    if (!_liveVideoView) {
+        _liveVideoView = [[UIView alloc] init];
+        _liveVideoView.backgroundColor = [UIColor clearColor];
+    }
+    return _liveVideoView;
+}
+
+
+- (LiveRoomHeadView *)headView {
+    if (!_headView) {
+        _headView = [LiveRoomHeadView shareInstance];
+    }
+    return _headView;
+}
+
+- (LiveRoomBottomView *)bottomView {
+    if (!_bottomView) {
+        _bottomView = [LiveRoomBottomView shareInstance];
+        MJWeakSelf;
+        [_bottomView bottomClickAction:^(LIVEROOMACTION action) {
+            [weakSelf bottomViewAction:action];
+        }];
+    }
+    return _bottomView;
+}
+
+- (void)bottomViewAction:(LIVEROOMACTION)action {
+    switch (action) {
+        case LIVEROOMACTION_CHAT: // 聊天
+        {
+            [_inputBar setHidden:NO];
+            [_inputBar setInputBarStatus:KSBottomBarStatusKeyboard];
+        }
+            break;
+        case LIVEROOMACTION_SEAT: // 呼出连麦页面
+        {
+            [self displaySeatView];
+        }
+            break;
+        case LIVEROOMACTION_QUIT: // 退出
+        {
+            [self showMoreView];
+        }
+        default:
+            break;
+    }
+}
+
+- (void)showMoreView {
+    [self.view addSubview:self.moreView];
+}
+
+
+- (SeatTipsView *)seatApplyTips {
+    if (!_seatApplyTips) {
+        _seatApplyTips = [[SeatTipsView alloc] init];
+    }
+    return _seatApplyTips;
+}
+- (void)displaySeatView {
+    [self.view addSubview:self.seatApplyView];
+    [self refreshSeatApplyView];
+}
+
+- (void)closeRoomAction {
+    MJWeakSelf;
+    self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"结束直播后,不可再次开启" leftButtonTitle:@"取消" rightTitle:@"结束直播" inView:self.view cancel:^{
+        
+    } confirm:^{
+        [weakSelf distoryRoomAction];
+    }];
+}
+
+
+- (void)pauseAction {
+    MJWeakSelf;
+    self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"暂停后观众将无法看到视频画面" leftButtonTitle:@"取消" rightTitle:@"暂停直播" inView:self.view cancel:^{
+        
+    } confirm:^{
+        [weakSelf quitRoomBackPreView:YES];
+    }];
+}
+
+- (void)distoryRoomAction {
+    MJWeakSelf;
+    [self distoryRoomCallback:^(BOOL success) {
+        [weakSelf closeRoomNotiferService];
+        [weakSelf quitChatRoom];
+        weakSelf.room = nil;
+        [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
+    }];
+}
+- (void)pauseLiveActionBack:(BOOL)backPreView {
+    KSRCPauseLiveMessage *pauseMsg = [[KSRCPauseLiveMessage alloc] init];
+    MJWeakSelf;
+    [self sendMessage:pauseMsg displayMessage:NO callback:^(BOOL success) {
+        if (backPreView) {
+            [weakSelf.moreView hideView];
+            weakSelf.isPauseLive = YES;
+            weakSelf.pageType = LIVEPAGE_PREVIEW;
+            [weakSelf.livePageView removeFromSuperview];
+            [weakSelf configEngine];
+        }
+    }];
+    
+    [self.room.localUser unpublishDefaultLiveStreams:^(BOOL isSuccess, RCRTCCode code) {
+        if (isSuccess) {
+            
+        }
+    }];
+}
+
+- (void)quitRoomBackPreView:(BOOL)backPreView {
+    if (backPreView) { // 暂停
+        [self pauseLiveActionBack:YES];
+    }
+    else {
+        if (self.pageType == LIVEPAGE_PREVIEW && self.isPauseLive == NO) {
+            self.room = nil;
+            self.preVideoView = nil;
+            [[RCRTCEngine sharedInstance].defaultVideoStream stopCapture];
+            [self.navigationController dismissViewControllerAnimated:YES completion:nil];
+        }
+        else {
+            MJWeakSelf;
+            [self exitRoomCallback:^(BOOL success) {
+                // quit 接口
+                [weakSelf quitNotiferService];
+                [weakSelf quitChatRoom];
+                [weakSelf.moreView hideView];
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                    [weakSelf.navigationController dismissViewControllerAnimated:YES completion:nil];
+                });
+            }];
+        }
+    }
+}
+
+- (KSLiveStreamVideo *)localVideo {
+    if (!_localVideo) {
+        _localVideo = [KSLiveStreamVideo LocalStreamVideo];
+    }
+    return _localVideo;
+}
+
+- (NSMutableArray *)remoteMemberArray {
+    if (!_remoteMemberArray) {
+        _remoteMemberArray = [NSMutableArray array];
+    }
+    return _remoteMemberArray;
+}
+
+- (UIView *)messageContentView {
+    if (!_messageContentView) {
+        _messageContentView = [[UIView alloc] init];
+        [_messageContentView setBackgroundColor: [UIColor clearColor]];
+    }
+    return _messageContentView;
+}
+
+- (NSMutableArray<KSRCMessageModel *> *)conversationDataRepository {
+    if (!_conversationDataRepository) {
+        _conversationDataRepository = [NSMutableArray array];
+    }
+    return _conversationDataRepository;
+}
+- (KSChatInputBarControl *)inputBar {
+    if (!_inputBar) {
+        _inputBar = [[KSChatInputBarControl alloc] initWithStatus:KSBottomBarStatusDefault];
+        [_inputBar setDelegate:self];
+    }
+    return _inputBar;
+}
+
+- (UITableView *)conversationMessageTableView {
+    if (!_conversationMessageTableView) {
+        _conversationMessageTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _conversationMessageTableView.backgroundColor = [UIColor clearColor];
+        _conversationMessageTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        _conversationMessageTableView.dataSource = self;
+        _conversationMessageTableView.delegate = self;
+        _conversationMessageTableView.rowHeight = UITableViewAutomaticDimension;
+        _conversationMessageTableView.estimatedRowHeight = 40.0f;
+        _conversationMessageTableView.showsVerticalScrollIndicator = NO;
+        [_conversationMessageTableView registerClass:[KSChatroomTextCell class] forCellReuseIdentifier:@"KSChatroomTextCell"];
+    }
+    return _conversationMessageTableView;
+}
+
+- (SeatContentView *)seatContainer {
+    if (!_seatContainer) {
+        _seatContainer = [[SeatContentView alloc] init];
+    }
+    return _seatContainer;
+}
+
+- (LiveSeatApplyView *)seatApplyView {
+    if (!_seatApplyView) {
+        _seatApplyView = [LiveSeatApplyView shareInstance];
+        _seatApplyView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
+        MJWeakSelf;
+        [_seatApplyView operationMemberAction:^(LIVESEATACTION action, LiveSeatMember * _Nonnull member) {
+            [weakSelf opreationSeatStudentAction:action member:member];
+        }];
+    }
+    return _seatApplyView;
+}
+
+- (void)opreationSeatStudentAction:(LIVESEATACTION)action member:(LiveSeatMember *)member {
+    switch (action) {
+        case LIVESEATACTION_APPROVE: // 同意
+        {
+            KSLiveChatroomSeatResponse *responseMessage = [[KSLiveChatroomSeatResponse alloc] init];
+            responseMessage.type = SEATRESPONSE_TEACHERAPPROVE;
+            responseMessage.teacherId = self.createrId;
+            responseMessage.teacherName = self.createrName;
+            responseMessage.audienceId = member.userId;
+            responseMessage.audienceName = member.name;
+            MJWeakSelf;
+            [self sendMessage:responseMessage displayMessage:NO callback:^(BOOL success) {
+                [weakSelf refreshSeatArrayRemoveMember:NO member:member];
+            }];
+        }
+            break;
+        case LIVESEATACTION_REJECT: // 拒绝
+        {
+            KSLiveChatroomSeatResponse *responseMessage = [[KSLiveChatroomSeatResponse alloc] init];
+            responseMessage.type = SEATRESPONSE_TEACHERREJECT;
+            responseMessage.teacherId = self.createrId;
+            responseMessage.teacherName = self.createrName;
+            responseMessage.audienceId = member.userId;
+            responseMessage.audienceName = member.name;
+            MJWeakSelf;
+            [self sendMessage:responseMessage displayMessage:NO callback:^(BOOL success) {
+                [weakSelf refreshSeatArrayRemoveMember:YES member:member];
+            }];
+        }
+            break;
+        case LIVESEATACTION_KICK: // 下麦
+        {
+            
+            KSLiveChatroomSeatApply *kickSeatMessage = [[KSLiveChatroomSeatApply alloc] init];
+            kickSeatMessage.type = SEATHANDLE_KICKSEAT;
+            kickSeatMessage.teacherId = self.createrId;
+            kickSeatMessage.teacherName = self.createrName;
+            kickSeatMessage.audienceId = member.userId;
+            kickSeatMessage.audienceName = member.name;
+            MJWeakSelf;
+            [self sendMessage:kickSeatMessage displayMessage:NO callback:^(BOOL success) {
+                [weakSelf refreshSeatArrayRemoveMember:YES member:member];
+            }];
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)refreshSeatArrayRemoveMember:(BOOL)isRemove member:(LiveSeatMember *)member {
+    if (isRemove) {
+        [self.seatApplyArray removeObject:member];
+    }
+    else {
+        member.isConnected = YES;
+    }
+    [self refreshSeatApplyView];
+}
+
+
+- (NSMutableArray *)seatApplyArray {
+    if (!_seatApplyArray) {
+        _seatApplyArray = [NSMutableArray array];
+    }
+    return _seatApplyArray;
+}
+
+
+- (LiveMoreDisplayView *)moreView {
+    if (!_moreView) {
+        _moreView = [LiveMoreDisplayView shareInstance];
+        _moreView.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
+        MJWeakSelf;
+        [_moreView operationQuitAction:^(BOOL isCloseRoom) {
+            [weakSelf leaveRoom:isCloseRoom];
+        }];
+    }
+    return _moreView;
+}
+
+- (void)leaveRoom:(BOOL)closeRoom {
+    if (closeRoom) {
+        [self closeRoomAction];
+    }
+    else {
+        [self pauseAction];
+    }
+}
+
+- (LiveroomTimeManager *)timeManager {
+    if (!_timeManager) {
+        _timeManager = [[LiveroomTimeManager alloc] initWithDelegate:self];
+    }
+    return _timeManager;
+}
+
+- (NSInteger)getCloseTime {
+    NSDateFormatter *formatter = [NSObject getDateformatter];
+    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *currentDate = [NSDate date];
+    NSDate *expireDate = [formatter dateFromString:self.liveEndTime];
+    NSTimeInterval timeInterval = [expireDate timeIntervalSinceDate:currentDate];
+    return self.expiredMinute * 60 + timeInterval;
+}
+
+- (void)dealloc {
+    if (_timeManager) {
+        [_timeManager stopDurationTimer];
+    }
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    if (_timer) {
+        dispatch_source_cancel(_timer);
+        _timer = nil;
+    }
+}
+
+- (dispatch_source_t)timer {
+    if (!_timer) {
+        _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
+        uint64_t interval = (uint64_t)(10 * NSEC_PER_SEC);
+        dispatch_source_set_timer(_timer, DISPATCH_TIME_NOW, interval, 0);
+        MJWeakSelf;
+        dispatch_source_set_event_handler(_timer, ^{
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [weakSelf syncLikeCount];
+            });
+        });
+    }
+    return _timer;
+}
+
+- (void)showAnimationView:(BOOL)isJoinRoom showMessag:(NSString *)message {
+    if (self.animationView && self.animationView.isShow) {
+        return;
+    }
+    else {
+        ANIMATIONTYPE type = isJoinRoom ? ANIMATIONTYPE_JOIN : ANIMATIONTYPE_RUSH;
+        self.animationView = [[LiveAnimationView alloc] initWithTitle:message animationType:type];
+        [self.view addSubview:self.animationView];
+        [self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.mas_equalTo(self.view);
+            make.width.mas_equalTo(KPortraitWidth);
+            make.height.mas_equalTo(24.0f);
+            make.bottom.mas_equalTo(self.messageContentView.mas_top).offset(-6);
+        }];
+        [self.view bringSubviewToFront:self.animationView];
+        NSLog(@"------- start animation ");
+        MJWeakSelf;
+        [self.animationView startAnimationEndCallback:^{
+            NSLog(@"----- hide ");
+            weakSelf.animationView.isShow = YES;
+            weakSelf.animationView = nil;
+        }];
+    }
+}
+
+#pragma mark ---- 同步点赞数据
+
+- (void)syncLikeCount {
+    if (self.isOtherLogin) {
+        return;
+    }
+    [KSNetworkingManager syncLikeRequest:KS_GET likeNum:self.likeCount roomUid:self.roomId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            [self notiferLikeStatusToAudience];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)notiferLikeStatusToAudience {
+    RCChatroomLikeCount *likeCountMsg = [[RCChatroomLikeCount alloc] init];
+    likeCountMsg.count = self.likeCount;
+    
+    [self sendMessage:likeCountMsg displayMessage:NO callback:^(BOOL success) {
+
+    }];
+}
 /*
 #pragma mark - Navigation
 

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -736,6 +736,7 @@
         return;
     }
     __weak typeof(&*self) __weakself = self;
+    
     [KSChatroomMessageCenter sendChatMessage:self.roomId content:messageContent success:^(long messageId) {
         dispatch_async(dispatch_get_main_queue(), ^{
             RCMessage *message = [[RCMessage alloc] initWithType:ConversationType_CHATROOM targetId:__weakself.roomId direction:MessageDirection_SEND content:messageContent];

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h

@@ -19,6 +19,12 @@
 
 #import "KSLiveChatroomClose.h"
 #import "KSLiveChatroomKickOut.h"
+#import "KSRCPauseLiveMessage.h"
+#import "KSLiveChatroomMemberUp.h"
+#import "RCChatroomClose.h"
+#import "KSRCShopRushMessage.h"
+#import "RCChatroomLikeCount.h"
+
 
 typedef void(^RCChatroomMessageSuccess)(long messageId);
 typedef void(^RCChatroomMessageError)(RCErrorCode errorCode, long messageId);

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m

@@ -37,6 +37,12 @@
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomClose class]];
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomKickOut class]];
     [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomMemberCount class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSRCPauseLiveMessage class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSLiveChatroomMemberUp class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSRCShopRushMessage class]];
+    [[RCIM sharedRCIM] registerMessageType:[RCChatroomClose class]];
+    [[RCIM sharedRCIM] registerMessageType:[RCChatroomLikeCount class]];
+    
 }
 
 + (void)sendChatMessage:(NSString *)roomId content:(RCMessageContent *)content

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

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

+ 40 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSLiveChatroomMemberUp.m

@@ -0,0 +1,40 @@
+//
+//  KSLiveChatroomMemberUp.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/24.
+//
+
+#import "KSLiveChatroomMemberUp.h"
+
+@implementation KSLiveChatroomMemberUp
+
+- (NSData *)encode {
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setObject:@(self.count) forKey:@"count"];
+    return [NSJSONSerialization dataWithJSONObject:mutableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+    
+    self.count = [[json dictionaryValueForKey:@"content"] integerValueForKey:@"count"];
+    NSLog(@"member count-----------%zd",_count);
+}
+
++ (NSString *)getObjectName {
+    return @"RC:Chatroom:MemberCountUp";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+    return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+    return MessagePersistent_NONE;
+}
+
+@end

+ 17 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.h

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

+ 38 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/LiveRoomMessage/KSRCPauseLiveMessage.m

@@ -0,0 +1,38 @@
+//
+//  KSRCPauseLiveMessage.m
+//  StudentDaya
+//
+//  Created by 王智 on 2022/5/23.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "KSRCPauseLiveMessage.h"
+
+@implementation KSRCPauseLiveMessage
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    
+    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;
+}
+
+
++ (NSString *)getObjectName {
+  return @"RC:Chatroom:PauseLive";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio