瀏覽代碼

极光SDK更新

Steven 2 年之前
父節點
當前提交
0312d34113
共有 55 個文件被更改,包括 413 次插入1762 次删除
  1. 0 12
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 二進制
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 61 138
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 112 57
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  5. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@2x.png
  6. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@3x.png
  7. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/Contents.json
  8. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x.png
  9. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x@2x.png
  10. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x@3x.png
  11. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@3x.png
  12. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/Contents.json
  13. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/image_add@2x.png
  14. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/image_add@3x.png
  15. 13 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  16. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  17. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/UserKeyHeader.h
  18. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  19. 8 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  20. 14 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m
  21. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.h
  22. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m
  23. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m
  24. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupListViewCell.m
  25. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatGroupListCell.m
  26. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  27. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.h
  28. 21 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.m
  29. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.xib
  30. 7 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m
  31. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m
  32. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Model/Records.h
  33. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Model/Records.m
  34. 9 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.m
  35. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  36. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkDetailModel.h
  37. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkDetailModel.m
  38. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m
  39. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  40. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.h
  41. 10 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m
  42. 3 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  43. 8 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m
  44. 0 20
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.h
  45. 0 246
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m
  46. 23 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m
  47. 0 50
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.h
  48. 0 1138
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.m
  49. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.h
  50. 1 34
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.m
  51. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/LiveSeatMember.h
  52. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.m
  53. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.xib
  54. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineFansGroupCell.m
  55. 9 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.m

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

@@ -58,7 +58,6 @@
 		275B172F27EB27860081FDEF /* GroupCreateView.m in Sources */ = {isa = PBXBuildFile; fileRef = 275B172E27EB27860081FDEF /* GroupCreateView.m */; };
 		275B173127EB27960081FDEF /* GroupCreateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 275B173027EB27960081FDEF /* GroupCreateView.xib */; };
 		275E3DA327F441EC0010EC30 /* KSEnterLiveroomManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 275E3DA227F441EC0010EC30 /* KSEnterLiveroomManager.m */; };
-		275E3DA627F442B70010EC30 /* LiveVideoRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 275E3DA527F442B70010EC30 /* LiveVideoRoomViewController.m */; };
 		275E3DA927F45A8A0010EC30 /* KSLiveStreamVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 275E3DA827F45A8A0010EC30 /* KSLiveStreamVideo.m */; };
 		275E3DAD27F45BE90010EC30 /* KSChatroomMessageCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 275E3DAC27F45BE90010EC30 /* KSChatroomMessageCenter.m */; };
 		275E3DB027F45CA60010EC30 /* KSLiveChatroomLike.m in Sources */ = {isa = PBXBuildFile; fileRef = 275E3DAF27F45CA60010EC30 /* KSLiveChatroomLike.m */; };
@@ -404,7 +403,6 @@
 		27D83F4C27F3EC1500062476 /* CreateLiveBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D83F4B27F3EC1500062476 /* CreateLiveBodyView.m */; };
 		27D83F4E27F3EC2100062476 /* CreateLiveBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27D83F4D27F3EC2100062476 /* CreateLiveBodyView.xib */; };
 		27D83F5127F4036E00062476 /* KSNormalAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D83F5027F4036E00062476 /* KSNormalAlertView.m */; };
-		27D83F5427F408E000062476 /* LivePrepareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D83F5327F408E000062476 /* LivePrepareViewController.m */; };
 		27D83F5727F4224F00062476 /* LivePreviewBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D83F5627F4224F00062476 /* LivePreviewBodyView.m */; };
 		27D83F5927F4225D00062476 /* LivePreviewBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27D83F5827F4225D00062476 /* LivePreviewBodyView.xib */; };
 		27F902F127E8614D00C08A19 /* SettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F902F027E8614D00C08A19 /* SettingViewController.m */; };
@@ -969,8 +967,6 @@
 		275B173027EB27960081FDEF /* GroupCreateView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupCreateView.xib; sourceTree = "<group>"; };
 		275E3DA127F441EC0010EC30 /* KSEnterLiveroomManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSEnterLiveroomManager.h; sourceTree = "<group>"; };
 		275E3DA227F441EC0010EC30 /* KSEnterLiveroomManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSEnterLiveroomManager.m; sourceTree = "<group>"; };
-		275E3DA427F442B70010EC30 /* LiveVideoRoomViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveVideoRoomViewController.h; sourceTree = "<group>"; };
-		275E3DA527F442B70010EC30 /* LiveVideoRoomViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LiveVideoRoomViewController.m; sourceTree = "<group>"; };
 		275E3DA727F45A8A0010EC30 /* KSLiveStreamVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSLiveStreamVideo.h; sourceTree = "<group>"; };
 		275E3DA827F45A8A0010EC30 /* KSLiveStreamVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSLiveStreamVideo.m; sourceTree = "<group>"; };
 		275E3DAB27F45BE90010EC30 /* KSChatroomMessageCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSChatroomMessageCenter.h; sourceTree = "<group>"; };
@@ -1615,8 +1611,6 @@
 		27D83F4D27F3EC2100062476 /* CreateLiveBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CreateLiveBodyView.xib; sourceTree = "<group>"; };
 		27D83F4F27F4036E00062476 /* KSNormalAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSNormalAlertView.h; sourceTree = "<group>"; };
 		27D83F5027F4036E00062476 /* KSNormalAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSNormalAlertView.m; sourceTree = "<group>"; };
-		27D83F5227F408E000062476 /* LivePrepareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LivePrepareViewController.h; sourceTree = "<group>"; };
-		27D83F5327F408E000062476 /* LivePrepareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LivePrepareViewController.m; sourceTree = "<group>"; };
 		27D83F5527F4224F00062476 /* LivePreviewBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LivePreviewBodyView.h; sourceTree = "<group>"; };
 		27D83F5627F4224F00062476 /* LivePreviewBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LivePreviewBodyView.m; sourceTree = "<group>"; };
 		27D83F5827F4225D00062476 /* LivePreviewBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LivePreviewBodyView.xib; sourceTree = "<group>"; };
@@ -3920,10 +3914,6 @@
 			children = (
 				27D83F4727F3EBC400062476 /* CreateLiveViewController.h */,
 				27D83F4827F3EBC400062476 /* CreateLiveViewController.m */,
-				27D83F5227F408E000062476 /* LivePrepareViewController.h */,
-				27D83F5327F408E000062476 /* LivePrepareViewController.m */,
-				275E3DA427F442B70010EC30 /* LiveVideoRoomViewController.h */,
-				275E3DA527F442B70010EC30 /* LiveVideoRoomViewController.m */,
 				BCDBC59B286156E700647197 /* LiveRoomViewController.h */,
 				BCDBC59C286156E700647197 /* LiveRoomViewController.m */,
 			);
@@ -6752,7 +6742,6 @@
 				BCF1BA5127F5C4DD00FA36C4 /* KSLiveChatroomMemberCount.m in Sources */,
 				277931CB27E30FC20010E277 /* KSGifRefreshHeader.m in Sources */,
 				2755C07E27EC95CC007D9070 /* GroupNoticeViewController.m in Sources */,
-				275E3DA627F442B70010EC30 /* LiveVideoRoomViewController.m in Sources */,
 				2779328F27E30FEB0010E277 /* MSSBrowseLocalViewController.m in Sources */,
 				BC1365C4280D44EB00EB03E2 /* NotiferMessageViewController.m in Sources */,
 				27A54CF127E9BD3B007309A3 /* FeedbackViewController.m in Sources */,
@@ -6830,7 +6819,6 @@
 				BC0A22A2284751F80065C1AB /* TeachToolView.m in Sources */,
 				277931E627E30FC20010E277 /* UITextView+ZWLimitCounter.m in Sources */,
 				275E3DEC27F467B20010EC30 /* LiveRoomBottomView.m in Sources */,
-				27D83F5427F408E000062476 /* LivePrepareViewController.m in Sources */,
 				2780A06427E81E4900447CFD /* MineNavView.m in Sources */,
 				2779326E27E30FD80010E277 /* FSCalendarCalculator.m in Sources */,
 				BCB9FA6B2872D57E005D766B /* LiveListModel.m in Sources */,

二進制
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 61 - 138
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -607,8 +607,8 @@
             filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1807"
-            endingLineNumber = "1807"
+            startingLineNumber = "1828"
+            endingLineNumber = "1828"
             landmarkName = "-showAnimationView:showMessag:"
             landmarkType = "7">
          </BreakpointContent>
@@ -616,22 +616,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "57E8E668-FAA7-46CA-B9E5-C3409F3E4E63"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "240"
-            endingLineNumber = "240"
-            landmarkName = "-toDetailViewWithTypeString:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "289E6237-EF1C-4ACF-8BFF-6855E14AF4C6"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -744,118 +728,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "F886B3BD-7F0F-4412-827B-D510C4C7E842"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1183"
-            endingLineNumber = "1183"
-            landmarkName = "-didReceiveMessageNotification:"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "F886B3BD-7F0F-4412-827B-D510C4C7E842 - ffb5e0723c52b853"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[LiveRoomViewController didReceiveMessageNotification:]"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1193"
-                  endingLineNumber = "1193"
-                  offsetFromSymbolStart = "1104">
-               </Location>
-               <Location
-                  uuid = "F886B3BD-7F0F-4412-827B-D510C4C7E842 - ffb5e0723c52b853"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[LiveRoomViewController didReceiveMessageNotification:]"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1193"
-                  endingLineNumber = "1193"
-                  offsetFromSymbolStart = "1108">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "2FB2461A-79DB-449D-B2BE-554278B1F157"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/AppDelegate.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "465"
-            endingLineNumber = "465"
-            landmarkName = "-onRCIMReceiveMessage:left:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "8710CDEB-C48B-4909-85CE-E9A80B3DECC8"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1098"
-            endingLineNumber = "1098"
-            landmarkName = "-didReceiveMessageNotification:"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "8710CDEB-C48B-4909-85CE-E9A80B3DECC8 - ffb5e0723c52b853"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[LiveRoomViewController didReceiveMessageNotification:]"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1193"
-                  endingLineNumber = "1193"
-                  offsetFromSymbolStart = "1104">
-               </Location>
-               <Location
-                  uuid = "8710CDEB-C48B-4909-85CE-E9A80B3DECC8 - ffb5e0723c52b853"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[LiveRoomViewController didReceiveMessageNotification:]"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "1193"
-                  endingLineNumber = "1193"
-                  offsetFromSymbolStart = "1108">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "85DE3513-44F0-43A5-8201-EA8E61969DCF"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -879,11 +751,14 @@
             symbolName = "*0x1dc7f5eb4">
             <Locations>
                <Location
+                  uuid = "856137FD-FD7E-4836-B7BA-53ECC0F6F050 - 383cc73525a6ee0a"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
+                  symbolName = "_os_unfair_lock_corruption_abort"
+                  moduleName = "libsystem_platform.dylib"
                   usesParentBreakpointCondition = "Yes"
-                  offsetFromSymbolStart = "0">
+                  offsetFromSymbolStart = "52">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -962,8 +837,8 @@
             filePath = "KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "110"
-            endingLineNumber = "110"
+            startingLineNumber = "111"
+            endingLineNumber = "111"
             landmarkName = "-requestData"
             landmarkType = "7">
          </BreakpointContent>
@@ -1003,16 +878,64 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "C10C032F-4633-4EB2-8E18-6484FE0B4419"
+            uuid = "4DFAF400-D712-455F-909E-F2148BC26510"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Common/Base/KSNetworkingManager.m"
+            filePath = "KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "154"
+            endingLineNumber = "154"
+            landmarkName = "-requestData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9022CD2A-1D2F-452B-A763-71F6310561C8"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "226"
+            endingLineNumber = "226"
+            landmarkName = "-toDetailViewWithTypeString:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "DA157C6E-1086-4E8C-A158-8DE61D47470C"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "114"
+            endingLineNumber = "114"
+            landmarkName = "-requestData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "E9236BDE-6CC1-4EC0-A183-45AA8D4266B0"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1173"
-            endingLineNumber = "1173"
-            landmarkName = "+liveRoomCreateTempLiveRoom:coverPic:liveRemark:roomTitle:liveTime:success:faliure:"
+            startingLineNumber = "1739"
+            endingLineNumber = "1739"
+            landmarkName = "-refreshSeatArrayRemoveMember:member:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 112 - 57
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -37,6 +37,7 @@
 #import "HomeworkDetailViewController.h"
 #import "WXApi.h"
 #import "GuideViewController.h"
+#import "MyCourseViewController.h"
 
 @interface RCNaviDataInfo : NSObject
 
@@ -255,7 +256,7 @@
     }
     [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
     //如不需要使用IDFA,advertisingIdentifier 可为nil
-    [JPUSHService setupWithOption:launchOptions appKey:@"7e0282ca92c12c8c45a93bb3"
+    [JPUSHService setupWithOption:launchOptions appKey:@"ea33d0a0a84d3b7b6dd70381"
                           channel:nil
                  apsForProduction:JSPUSH_ENVIRONMENT
             advertisingIdentifier:nil];
@@ -337,8 +338,11 @@
      当使用"开发/测试环境"的appkey测试推送时,必须用Development的证书打包,并且在后台上传"开发/测试环境"的推送证书,证书必须是development的。
      当使用"生产/线上环境"的appkey测试推送时,必须用Distribution的证书打包,并且在后台上传"生产/线上环境"的推送证书,证书必须是distribution的。
      */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
         //注册推送, 用于iOS8以及iOS8之后的系统
+
         UIUserNotificationSettings *settings = [UIUserNotificationSettings
                                                 settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)
                                                 categories:nil];
@@ -349,16 +353,21 @@
         UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound;
         [application registerForRemoteNotificationTypes:myTypes];
     }
+#pragma clang diagnostic pop
 }
 
 /**
  * 推送处理2
  */
 //注册用户通知设置
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
 - (void)application:(UIApplication *)application
 didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
     [application registerForRemoteNotifications];
 }
+#pragma clang diagnostic pop
 
 /**
  * 推送处理3
@@ -370,30 +379,42 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     [JPUSHService registerDeviceToken:deviceToken];
     
     // 融云
-    NSString *token = [self getHexStringForData:deviceToken];
-    [[RCIMClient sharedRCIMClient] setDeviceToken:token];
+    [[RCIMClient sharedRCIMClient] setDeviceTokenData:deviceToken];
 }
 
-// Data 转换成 NSString(NSData ——> NSString)
-- (NSString *)getHexStringForData:(NSData *)data {
-    NSUInteger len = [data length];
-    char *chars = (char *)[data bytes];
-    NSMutableString *hexString = [[NSMutableString alloc] init];
-    for (NSUInteger i = 0; i < len; i ++) {
-        [hexString appendString:[NSString stringWithFormat:@"%0.2hhx", chars[i]]];
+
+
+
+- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
+    /**
+     * 获取融云推送服务扩展字段2
+     */
+    NSDictionary *pushServiceData = [[RCIMClient sharedRCIMClient] getPushExtraFromRemoteNotification:userInfo];
+    if (pushServiceData) {
+        NSLog(@"该远程推送包含来自融云的推送服务");
+        /**
+         * 统计推送打开率2
+         */
+        [[RCIMClient sharedRCIMClient] recordRemoteNotificationEvent:userInfo];
+        
+        for (id key in [pushServiceData allKeys]) {
+            NSLog(@"key = %@, value = %@", key, pushServiceData[key]);
+        }
+    } else {
+        NSLog(@"该远程推送不包含来自融云的推送服务");
+        // 极光推送
+        [JPUSHService handleRemoteNotification:userInfo];
     }
-    return hexString;
 }
 
 /**
  * 推送处理4
  * userInfo内容请参考官网文档
  */
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
-    /**
-     * 统计推送打开率2
-     */
-    [[RCIMClient sharedRCIMClient] recordRemoteNotificationEvent:userInfo];
+    
     /**
      * 获取融云推送服务扩展字段2
      */
@@ -401,6 +422,10 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     if (pushServiceData) {
         NSLog(@"该远程推送包含来自融云的推送服务");
         for (id key in [pushServiceData allKeys]) {
+            /**
+             * 统计推送打开率2
+             */
+            [[RCIMClient sharedRCIMClient] recordRemoteNotificationEvent:userInfo];
             NSLog(@"key = %@, value = %@", key, pushServiceData[key]);
         }
     } else {
@@ -409,7 +434,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         [JPUSHService handleRemoteNotification:userInfo];
     }
 }
-
+#pragma clang diagnostic pop
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {
     // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
@@ -496,7 +521,21 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 
 #pragma mark- JPUSHRegisterDelegate
+- (void)jpushNotificationAuthorization:(JPAuthorizationStatus)status withInfo:(NSDictionary *)info {
+  NSLog(@"receive notification authorization status:%lu, info:%@", status, info);
+}
 
+#ifdef __IPHONE_12_0
+- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center openSettingsForNotification:(UNNotification *)notification {
+    NSString *title = nil;
+    if (notification) {
+        title = @"从通知界面直接进入应用";
+    }else{
+        title = @"从系统设置界面进入应用";
+    }
+    NSLog(@"%@", title);
+}
+#endif
 
 // iOS 10 Support
 - (void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler  API_AVAILABLE(ios(10.0)){
@@ -526,51 +565,52 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
     }
     completionHandler();  // 系统要求执行这个方法
     NSMutableDictionary *parm = [NSMutableDictionary dictionaryWithDictionary:userInfo];
-    
     [self getVCUserInfoDict:parm];
 }
 
 #pragma mark 根据不同消息跳转不同界面
 - (void)getVCUserInfoDict:(NSMutableDictionary *)infoDict {
     if (![NSString isEmptyString:[infoDict stringValueForKey:@"memo"]]) {
-        NSString *memoStr = [infoDict stringValueForKey:@"memo"];
-        NSString *headStr = [[memoStr componentsSeparatedByString:@"?"] firstObject];
-        if ([headStr isEqualToString:@"buyPractice"] || [headStr isEqualToString:@"courseRemind"]) { // 课表
-            [self.tabBarController tabBarSelectedWithIndex:1];
-            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-            [navCtrl popToRootViewControllerAnimated:YES];
-        }
-        else if ([headStr isEqualToString:@"evaluate"]) { // 评价页面
-            [self.tabBarController tabBarSelectedWithIndex:0];
-            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-            ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
-            [navCtrl pushViewController:ctrl animated:YES];
-        }
-        else if ([headStr isEqualToString:@"H5"]) { // web
-            NSString *valueStr = [[memoStr componentsSeparatedByString:@"H5?"] lastObject];
-            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-            webCtrl.url = valueStr;
-            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-            [navCtrl pushViewController:webCtrl animated:YES];
-        }
-        else if ([headStr isEqualToString:@"homework"]) { // 作业详情
-            NSString *valueStr = [[memoStr componentsSeparatedByString:@"homework?"] lastObject];
-            NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
-            NSString *courseId = nil;
-            NSString *studentId = nil;
-            for (NSString *subStr in parmArray) {
-                if ([subStr containsString:@"courseId"]) {
-                    courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
+        NSData *jsonData = [[infoDict stringValueForKey:@"memo"] mj_JSONData];
+        NSError *error;
+        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
+        if (!error) {
+            NSString *action = [dict stringValueForKey:@"action"];
+            if ([action isEqualToString:@"app"]) { // 跳原生
+                NSString *pageType = [dict stringValueForKey:@"pageTag"];
+                if ([pageType isEqualToString:@"buyPractice"] || [pageType isEqualToString:@"courseRemind"]) {
+                    [self.tabBarController tabBarSelectedWithIndex:1];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl popToRootViewControllerAnimated:YES];
+                }
+                else if ([pageType isEqualToString:@"evaluate"]) {
+                    [self.tabBarController tabBarSelectedWithIndex:0];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
+                    [navCtrl pushViewController:ctrl animated:YES];
                 }
-                if ([subStr containsString:@"studentId"]) {
-                    studentId = [[subStr componentsSeparatedByString:@"="] lastObject];
+                else if ([pageType isEqualToString:@"homework"]) {
+                    NSString *parmString = [dict stringValueForKey:@"params"];
+                    NSData *parmData = [parmString mj_JSONData];
+                    NSDictionary *parm = [NSJSONSerialization JSONObjectWithData:parmData options:NSJSONReadingMutableContainers error:&error];
+                    if (!error) {
+                        HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+                        detailVC.courseId = [parm stringValueForKey:@"courseId"];
+                        detailVC.studentId = [parm stringValueForKey:@"studentId"];
+                        CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                        [navCtrl pushViewController:detailVC animated:YES];
+                    }
+                }
+            }
+            else {
+                NSString *webUrl = [dict stringValueForKey:@"url"];
+                if (![NSString isEmptyString:webUrl]) {
+                    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+                    webCtrl.url = webUrl;
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:webCtrl animated:YES];
                 }
             }
-            HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
-            detailVC.courseId = courseId;
-            detailVC.studentId = studentId;
-            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
-            [navCtrl pushViewController:detailVC animated:YES];
         }
     }
     else { // 跳转到聊天
@@ -608,21 +648,24 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 
 - (void)showAlertWithMemo:(NSString *)memo descMessage:(NSString *)descMessage isforce:(BOOL)isforce openUrl:(NSString *)openUrl {
-
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [self.alertView configWithMemo:memo desc:descMessage isForce:isforce callback:^(BOOL isSure) {
         if (isSure) {
+
             if (@available(iOS 10.0, *)) {
                 if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
                     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:openUrl] options:@{} completionHandler:^(BOOL success) {
                         
                     }];
                 } else {
-                    
+
                     BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:openUrl]];
                     NSLog(@"Open  %d",success);
                 }
                 
             } else {
+                
                 // Fallback on earlier versions
                 bool can = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:openUrl]];
                 if(can){
@@ -634,6 +677,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             
         }
     }];
+#pragma clang diagnostic pop
+
     [self.alertView showAlert];
 }
 
@@ -732,10 +777,20 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
                 NSString *action = [dict stringValueForKey:@"action"];
                 if ([action isEqualToString:@"app"]) {
                     NSString *pageType = [dict stringValueForKey:@"pageTag"];
-                    if ([pageType isEqualToString:@""]) {
-                        NSDictionary *parm = [dict dictionaryValueForKey:@"params"];
-                        NSLog(@"%@",parm);
+                    DISPLAY_INDEX index = DISPLAY_INDEX_FIRST;
+                    if ([pageType isEqualToString:@"practiceClass"]) { // 我的课程 ->陪练课
+                        index = DISPLAY_INDEX_FIRST;
+                    }
+                    else if ([pageType isEqualToString:@"liveClass"]) { // 我的课程 ->直播课
+                        index = DISPLAY_INDEX_LIVE;
+                    }
+                    else if ([pageType isEqualToString:@"videoClass"]) { // 我的课程 ->视频课
+                        index = DISPLAY_INDEX_VIEO;
                     }
+                    MyCourseViewController *ctrl = [[MyCourseViewController alloc] init];
+                    [ctrl displayWithIndex:index];
+                    CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+                    [navCtrl pushViewController:ctrl animated:YES];
                 }
                 else {  // 空 或者 h5
                     NSString *webUrl = [dict stringValueForKey:@"url"];

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_fansGroup_logo.imageset/chat_fansGroup_logo@3x.png


+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "chat_group_Logo@2x.png",
+      "filename" : "chat_group_Logo@2x@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "chat_group_Logo@3x.png",
+      "filename" : "chat_group_Logo@2x@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@2x@3x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/chat_group_Logo.imageset/chat_group_Logo@3x.png


+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/Contents.json

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/image_add@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Chat/image_add-1.imageset/image_add@3x.png


+ 13 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -454,6 +454,19 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param success 成功
 /// @param faliure 失败
 + (void)queryTeacherGroupRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// 群组投诉
+// sysImComplaint/add
+
+/// 聊天投诉
+/// @param post post form
+/// @param type /** 投诉对象类型 GROUP,PERSON*/
+/// @param fileUrl 图片凭证
+/// @param memo 描述
+/// @param targetId 目标id
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysImComplaintRequest:(NSString *)post type:(NSString *)type fileUrl:(NSString *)fileUrl memo:(NSString *)memo targetId:(NSString *)targetId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 #pragma mark ---- 群公告
 // /api-teacher/imGroupNotice/queryPage
 

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -986,6 +986,30 @@
     [parm setValue:@"FAN" forKey:@"type"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
+// 群组投诉
+// sysImComplaint/add
+
+/// 聊天投诉
+/// @param post post form
+/// @param type /** 投诉对象类型 GROUP,PERSON*/
+/// @param fileUrl 图片凭证
+/// @param memo 描述
+/// @param targetId 目标id
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysImComplaintRequest:(NSString *)post type:(NSString *)type fileUrl:(NSString *)fileUrl memo:(NSString *)memo targetId:(NSString *)targetId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/sysImComplaint/add"];
+    targetId = [self returnNoContainGroupId:targetId];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:type forKey:@"type"];
+    [parm setValue:fileUrl forKey:@"url"];
+    [parm setValue:memo forKey:@"memo"];
+    [parm setValue:targetId forKey:@"targetId"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+
 #pragma mark ---- 群公告
 // /api-teacher/imGroupNotice/queryPage
 

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Define/UserKeyHeader.h

@@ -45,7 +45,8 @@
 #define CHAT_USER_DEFAULT_LOGO (@"chat_personLogo")
 
 
-#define GROUP_LOGO (@"chat_group_Logo")
+#define GROUP_FAN_LOGO (@"chat_fansGroup_logo")
+#define GROUP_COURSE_LOGO (@"chat_group_Logo")
 
 #define USERDEFAULT_LOGO (@"user_default_avatal")
 

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

@@ -202,14 +202,14 @@
     RCConversationModel *model = self.conversationListDataSource[indexPath.row];
     if (model.conversationType == ConversationType_GROUP) {
         if ([model.targetId containsString:@"FAN"]) { // 粉丝群
-            [imageView setImage:[UIImage imageNamed:@"chat_fansGroup_logo"]];
+            [imageView setImage:[UIImage imageNamed:GROUP_FAN_LOGO]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"groupType_fans"]];
             [tagView removeAllSubViews];
             [tagView addSubview:tagImage];
             tagImage.frame = CGRectMake(0, 2, 45, 17);
         }
         else if ([model.targetId containsString:@"COURSE"]) { // 课程群
-            [imageView setImage:[UIImage imageNamed:@"chat_group_Logo"]];
+            [imageView setImage:[UIImage imageNamed:GROUP_COURSE_LOGO]];
             UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"groupType_course"]];
             [tagView removeAllSubViews];
             [tagView addSubview:tagImage];

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

@@ -46,7 +46,14 @@
     self.bodyView = [GroupSettingBodyView shareInstance];
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 700 ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 700;
     self.bodyView.frame = CGRectMake(0, 0, kScreenWidth, height);
-
+    BOOL isCourseGroup = NO;
+    if ([self.groupId containsString:@"COURSE"]) {
+        isCourseGroup = YES;
+    }
+    else if ([self.groupId containsString:@"FAN"]) {
+        isCourseGroup = NO;
+    }
+    self.bodyView.isCourseGroup = isCourseGroup;
     [self.scrollView addSubview:self.bodyView];
     [self.scrollView setContentSize:CGSizeMake(kScreenWidth, height)];
 }

+ 14 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -85,20 +85,20 @@
 - (void)uplodMessage:(NSString *)attachments content:(NSString *)content {
     NSString *type = self.fromGroup ? @"GROUP" : @"PERSON";
     
-//    [KSRequestManager sysImComplaintRequest:KS_POST type:type fileUrl:attachments memo:content targetId:self.targetId success:^(NSDictionary * _Nonnull dic) {
-//        [self removehub];
-//        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-//            MJWeakSelf;
-//            [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
-//                [weakSelf.navigationController popViewControllerAnimated:YES];
-//            }];
-//        }
-//        else {
-//            [self MBPShow:MESSAGEKEY];
-//        }
-//    } faliure:^(NSError * _Nonnull error) {
-//        [self removehub];
-//    }];
+    [KSNetworkingManager sysImComplaintRequest:KS_POST type:type fileUrl:attachments memo:content targetId:self.targetId success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            MJWeakSelf;
+            [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
+                [weakSelf.navigationController popViewControllerAnimated:YES];
+            }];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+    }];
     
 }
 /**

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.h

@@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL isOn;
 
+@property (nonatomic, assign) BOOL isCourseGroup;
+
 + (instancetype)shareInstance;
 
 - (void)configWithSource:(id)source callback:(GroupSettingBlock)callback;

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m

@@ -113,11 +113,12 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
     
     if ([source isKindOfClass:[GroupListModel class]]) {
         GroupListModel *model = source;
+        NSString *groupPlaceHolder = self.isCourseGroup ? GROUP_COURSE_LOGO : GROUP_FAN_LOGO;
         if ([NSString isEmptyString:model.img]) {
-            [self.groupImage setImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+            [self.groupImage setImage:[UIImage imageNamed:groupPlaceHolder]];
         }
         else {
-            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
+            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:groupPlaceHolder]];
         }
         
         self.groupName.text = [NSString returnNoNullStringWithString:model.name];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m

@@ -127,7 +127,7 @@
 
 - (void)requestData {
     [self showhud];
-    [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey subjectIds:nil success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey subjectIds:@"" success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         [self endRefresh];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupListViewCell.m

@@ -34,11 +34,11 @@
         NSString *defaultLogo = @"";
         NSString *typeLogo = @"";
         if ([model.type isEqualToString:@"FAN"]) {
-            defaultLogo = @"chat_fansGroup_logo";
+            defaultLogo = GROUP_FAN_LOGO;
             typeLogo = @"group_fans";
         }
         else {
-            defaultLogo = @"chat_group_Logo";
+            defaultLogo = GROUP_COURSE_LOGO;
             typeLogo = @"group_course";
         }
         [self.typeLogo setImage:[UIImage imageNamed:typeLogo]];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/KSChatGroupListCell.m

@@ -36,12 +36,12 @@
     NSString *defaultLogo = @"";
     NSString *typeLogo = @"";
     if ([model.targetId containsString:@"COURSE"]) {
-        defaultLogo = @"chat_fansGroup_logo";
-        typeLogo = @"group_fans";
+        defaultLogo = GROUP_COURSE_LOGO;
+        typeLogo = @"group_course";
     }
     else {
-        defaultLogo = @"chat_group_Logo";
-        typeLogo = @"group_course";
+        defaultLogo = GROUP_FAN_LOGO;
+        typeLogo = @"group_fans";
     }
 //    RCGroup
     self.groupTitle.text = [NSString returnNoNullStringWithString:model.conversationTitle];

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

@@ -205,9 +205,10 @@
     }
     else if (indexPath.row == 4) {
         BOOL hasSubmitHomework = self.homeworkModel.submitHomework == 1 ? YES : NO;
+        BOOL isExpired = self.homeworkModel.homeworkExpire == 1 ? YES : NO;
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         MJWeakSelf;
-        [cell configWithAttachmentArray:self.fileArray hasSubmit:hasSubmitHomework callback:^(NSInteger viewIndex) {
+        [cell configWithAttachmentArray:self.fileArray hasSubmit:hasSubmitHomework isExpired:isExpired callback:^(NSInteger viewIndex) {
             [weakSelf playVideoIndex:viewIndex];
         }];
         return cell;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.h

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface AccompanyHomeworkCell : UITableViewCell
 
-- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit callback:(HomeworkPlayAction)callback;
+- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit isExpired:(BOOL)homeworkExpire callback:(HomeworkPlayAction)callback;
 
 @end
 

+ 21 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.m

@@ -11,6 +11,8 @@
 
 @property (weak, nonatomic) IBOutlet UIView *emptyView;
 
+@property (weak, nonatomic) IBOutlet UILabel *emptyDescLabel;
+
 @property (weak, nonatomic) IBOutlet UIView *videoContainer;
 
 @property (nonatomic, copy) HomeworkPlayAction callback;
@@ -25,18 +27,32 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
-- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit callback:(HomeworkPlayAction)callback {
+- (void)configWithAttachmentArray:(NSMutableArray *)fileArray hasSubmit:(BOOL)hasSubmit isExpired:(BOOL)homeworkExpire callback:(HomeworkPlayAction)callback {
     if (callback) {
         self.callback = callback;
     }
     [self.videoContainer removeAllSubViews];
-    if (hasSubmit) {
-        self.emptyView.hidden = YES;
-        [self configVideoViewWithSource:fileArray];
+    if (homeworkExpire) {
+        self.emptyView.hidden = NO;
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        [paragraphStyle setLineSpacing:4];//调整行间距
+        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:@"作业已过期无法查看!" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+        self.emptyDescLabel.attributedText = attr;
     }
     else {
-        self.emptyView.hidden = NO;
+        if (hasSubmit) {
+            self.emptyView.hidden = YES;
+            [self configVideoViewWithSource:fileArray];
+        }
+        else {
+            self.emptyView.hidden = NO;
+            NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+            [paragraphStyle setLineSpacing:4];//调整行间距
+            NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:@"学员尚未上传作业视频" attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+            self.emptyDescLabel.attributedText = attr;
+        }
     }
+    
 }
 
 - (void)configVideoViewWithSource:(NSMutableArray *)fileArray {

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyHomeworkCell.xib

@@ -121,6 +121,7 @@
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <connections>
+                <outlet property="emptyDescLabel" destination="xV1-w2-nqO" id="A9e-cY-VSi"/>
                 <outlet property="emptyView" destination="0zy-PX-mCI" id="3KA-n7-M42"/>
                 <outlet property="videoContainer" destination="EwC-zg-aiZ" id="5RL-eg-4SG"/>
             </connections>

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

@@ -57,6 +57,10 @@
 
 @property (nonatomic, assign) NSInteger liveEndTime;        // 直播课结束后退出时间配置(分钟)
 
+@property (nonatomic, assign) NSInteger pianoStartTime;      // 琴房课开课前可进入时间配置(分钟)
+
+@property (nonatomic, assign) NSInteger pianoEndTime;        // 琴房课结束后退出时间配置(分钟)
+
 @property (nonatomic, strong) NSString *adjustBeginTime;  // 可调整开始时间
 
 @property (nonatomic, strong) NSString *adjustEndTime;    // 可调整结束时间
@@ -359,6 +363,8 @@
             self.practiceEndTime = [config integerValueForKey:@"practiceEndTime"];
             self.liveStartTime = [config integerValueForKey:@"liveStartTime"];
             self.liveEndTime = [config integerValueForKey:@"liveEndTime"];
+            self.pianoStartTime = [config integerValueForKey:@"pianoStartTime"];
+            self.pianoEndTime = [config integerValueForKey:@"pianoEndTime"];
             
             NSArray *courseArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"studentList"];
             NSMutableArray *lessonArray = [NSMutableArray array];
@@ -450,7 +456,7 @@
         
         MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
         MJWeakSelf;
-        [cell configWithSource:model beforeTime:self.practiceStartTime callback:^(NSString * _Nonnull targetId) {
+        [cell configWithSource:model beforeTime:self.pianoStartTime callback:^(NSString * _Nonnull targetId) {
             [weakSelf chatAction:targetId groupName:@"" isGroup:YES];
         }];
         return cell;

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

@@ -69,8 +69,8 @@
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result integerValueForKey:@"practiceStartTime"];
-            self.quitRomeEndTime = [result integerValueForKey:@"practiceEndTime"];
+            self.joinRoomBeforeTime = [result integerValueForKey:@"pianoStartTime"];
+            self.quitRomeEndTime = [result integerValueForKey:@"pianoEndTime"];
         }
         else {
             [self MBPShow:MESSAGEKEY];

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Model/Records.h

@@ -16,6 +16,7 @@
 @property (nonatomic, strong) NSString *studentAvatar;
 @property (nonatomic, strong) NSString *submitHomework;
 @property (nonatomic, strong) NSString *studentSubject;
+@property (nonatomic, strong) NSString *homeworkStatus;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Model/Records.m

@@ -13,6 +13,7 @@ NSString *const kRecordsStudentName = @"studentName";
 NSString *const kRecordsStudentAvatar = @"studentAvatar";
 NSString *const kRecordsSubmitHomework = @"submitHomework";
 NSString *const kRecordsSubmitStudentSubject = @"subjectName";
+NSString *const kRecordsHomeworkStatus = @"homeworkStatus";
 
 @interface Records ()
 
@@ -27,6 +28,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
 @synthesize studentAvatar = _studentAvatar;
 @synthesize submitHomework = _submitHomework;
 @synthesize studentSubject = _studentSubject;
+@synthesize homeworkStatus = _homeworkStatus;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -45,6 +47,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
             self.studentAvatar = [self objectOrNilForKey:kRecordsStudentAvatar fromDictionary:dict];
             self.submitHomework = [self objectOrNilForKey:kRecordsSubmitHomework fromDictionary:dict];
             self.studentSubject = [self objectOrNilForKey:kRecordsSubmitStudentSubject fromDictionary:dict];
+            self.homeworkStatus = [self objectOrNilForKey:kRecordsHomeworkStatus fromDictionary:dict];
     }
     
     return self;
@@ -59,6 +62,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
     [mutableDict setValue:self.studentAvatar forKey:kRecordsStudentAvatar];
     [mutableDict setValue:self.submitHomework forKey:kRecordsSubmitHomework];
     [mutableDict setValue:self.studentSubject forKey:kRecordsSubmitStudentSubject];
+    [mutableDict setValue:self.homeworkStatus forKey:kRecordsHomeworkStatus];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -90,6 +94,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
     self.studentAvatar = [aDecoder decodeObjectForKey:kRecordsStudentAvatar];
     self.submitHomework = [aDecoder decodeObjectForKey:kRecordsSubmitHomework];
     self.studentSubject = [aDecoder decodeObjectForKey:kRecordsSubmitStudentSubject];
+    self.homeworkStatus = [aDecoder decodeObjectForKey:kRecordsHomeworkStatus];
     return self;
 }
 
@@ -101,6 +106,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
     [aCoder encodeObject:_studentAvatar forKey:kRecordsStudentAvatar];
     [aCoder encodeObject:_submitHomework forKey:kRecordsSubmitHomework];
     [aCoder encodeObject:_studentSubject forKey:kRecordsSubmitStudentSubject];
+    [aCoder encodeObject:_homeworkStatus forKey:kRecordsHomeworkStatus];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -114,6 +120,7 @@ NSString *const kRecordsSubmitStudentSubject = @"subjectName";
         copy.studentAvatar = [self.studentAvatar copyWithZone:zone];
         copy.submitHomework = [self.submitHomework copyWithZone:zone];
         copy.studentSubject = [self.studentSubject copyWithZone:zone];
+        copy.homeworkStatus = [self.homeworkStatus copyWithZone:zone];
     }
     
     return copy;

+ 9 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentCell.m

@@ -51,11 +51,18 @@
     
     if (hasArrange) {
         self.statusLabel.hidden = NO;
-        if ([studentModel.submitHomework isEqualToString:@"0"]) {
+
+        if ([studentModel.homeworkStatus isEqualToString:@"NOTCOMMIT"]) { // 未提交
             self.statusLabel.text = @"未提交";
         }
+        else if ([studentModel.homeworkStatus isEqualToString:@"NOTREVIEW"]) { // 未点评
+            self.statusLabel.text = @"未点评";
+        }
+        else if ([studentModel.homeworkStatus isEqualToString:@"REVIEWED"]) { // 已点评
+            self.statusLabel.text = @"已点评";
+        }
         else {
-            self.statusLabel.text = @"已提交";
+            self.statusLabel.hidden = YES;
         }
         self.arrowImage.hidden = NO;
     }

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m

@@ -107,6 +107,7 @@
     else if (indexPath.row == 1) { // 布置作业
         AccompanyArrangeCell *cell  = [tableView dequeueReusableCellWithIdentifier:@"AccompanyArrangeCell"];
         BOOL hasArrange = self.detailModel.decorateHomework == 1 ? YES : NO;
+        
         MJWeakSelf;
         [cell configWithHomeworkContent:self.detailModel.content hasArrangeHomework:hasArrange callback:^{
             [weakSelf arrangeHomework];
@@ -116,9 +117,10 @@
     else if (indexPath.row == 2) { // 作业视频
         // studentAttachments
         BOOL hasSubmitHomework = self.detailModel.submitHomework == 1 ? YES : NO;
+        BOOL isExpired = self.detailModel.homeworkExpire == 1 ? YES : NO;
         AccompanyHomeworkCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyHomeworkCell"];
         MJWeakSelf;
-        [cell configWithAttachmentArray:self.fileArray hasSubmit:hasSubmitHomework callback:^(NSInteger viewIndex) {
+        [cell configWithAttachmentArray:self.fileArray hasSubmit:hasSubmitHomework isExpired:isExpired callback:^(NSInteger viewIndex) {
             [weakSelf playVideoIndex:viewIndex];
         }];
         return cell;

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

@@ -36,6 +36,7 @@
 @property (nonatomic, strong) NSString *teacherAvatar;
 @property (nonatomic, assign) double reviewHomework;
 @property (nonatomic, strong) NSString *studentId;
+@property (nonatomic, assign) NSInteger homeworkExpire;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Model/HomeworkDetailModel.m

@@ -33,6 +33,7 @@ NSString *const kHomeworkDetailModelClassDate = @"classDate";
 NSString *const kHomeworkDetailModelTeacherAvatar = @"teacherAvatar";
 NSString *const kHomeworkDetailModelReviewHomework = @"reviewHomework";
 NSString *const kHomeworkDetailModelStudentId = @"studentId";
+NSString *const kHomeworkDetailModelHomeworkExpire = @"homeworkExpire";
 
 @interface HomeworkDetailModel ()
 
@@ -67,6 +68,8 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
 @synthesize teacherAvatar = _teacherAvatar;
 @synthesize reviewHomework = _reviewHomework;
 @synthesize studentId = _studentId;
+@synthesize homeworkExpire = _homeworkExpire;
+
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -105,6 +108,7 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
             self.teacherAvatar = [self objectOrNilForKey:kHomeworkDetailModelTeacherAvatar fromDictionary:dict];
             self.reviewHomework = [[self objectOrNilForKey:kHomeworkDetailModelReviewHomework fromDictionary:dict] doubleValue];
         self.studentId = [self objectOrNilForKey:kHomeworkDetailModelStudentId fromDictionary:dict];
+        self.homeworkExpire = [[self objectOrNilForKey:kHomeworkDetailModelHomeworkExpire fromDictionary:dict] integerValue];
     }
     
     return self;
@@ -139,6 +143,7 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
     [mutableDict setValue:self.teacherAvatar forKey:kHomeworkDetailModelTeacherAvatar];
     [mutableDict setValue:[NSNumber numberWithDouble:self.reviewHomework] forKey:kHomeworkDetailModelReviewHomework];
     [mutableDict setValue:self.studentId forKey:kHomeworkDetailModelStudentId];
+    [mutableDict setValue:[NSNumber numberWithInteger:self.homeworkExpire] forKey:kHomeworkDetailModelHomeworkExpire];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -190,6 +195,7 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
     self.teacherAvatar = [aDecoder decodeObjectForKey:kHomeworkDetailModelTeacherAvatar];
     self.reviewHomework = [aDecoder decodeDoubleForKey:kHomeworkDetailModelReviewHomework];
     self.studentId = [aDecoder decodeObjectForKey:kHomeworkDetailModelStudentId];
+    self.homeworkExpire = [aDecoder decodeIntegerForKey:kHomeworkDetailModelHomeworkExpire];
     return self;
 }
 
@@ -221,6 +227,7 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
     [aCoder encodeObject:_teacherAvatar forKey:kHomeworkDetailModelTeacherAvatar];
     [aCoder encodeDouble:_reviewHomework forKey:kHomeworkDetailModelReviewHomework];
     [aCoder encodeObject:_studentId forKey:kHomeworkDetailModelStudentId];
+    [aCoder encodeInteger:_homeworkExpire forKey:kHomeworkDetailModelHomeworkExpire];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -254,6 +261,7 @@ NSString *const kHomeworkDetailModelStudentId = @"studentId";
         copy.teacherAvatar = [self.teacherAvatar copyWithZone:zone];
         copy.reviewHomework = self.reviewHomework;
         copy.studentId = [self.studentId copyWithZone:zone];
+        copy.homeworkExpire = self.homeworkExpire;
     }
     
     return copy;

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m

@@ -14,6 +14,7 @@
 #import "HomeworkListModel.h"
 #import "MusicRoomHomeworkCell.h"
 #import "MusicRoomHomeworkStudentController.h"
+#import "MusicRoomViewController.h"
 
 @interface HomeworkBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -217,8 +218,9 @@
     // 进入作业详情
     HomeworkListModel *model = self.dataArray[indexPath.row];
     if ([model.type isEqualToString:@"PIANO_ROOM_CLASS"]) { // 琴房课详情
-        MusicRoomHomeworkStudentController *ctrl = [[MusicRoomHomeworkStudentController alloc] init];
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
         ctrl.courseId = model.courseId;
+        ctrl.courseGroupId = model.courseGroupId;
         [self.naviController pushViewController:ctrl animated:YES];
     }
     else {

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

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

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.h

@@ -8,6 +8,12 @@
 #import "KSBaseViewController.h"
 #import "JXCategoryView.h"
 #import "JXPagerView.h"
+typedef NS_ENUM(NSInteger, DISPLAY_INDEX) {
+    DISPLAY_INDEX_FIRST = 0,  // 陪练课
+    DISPLAY_INDEX_LIVE,       // 直播课
+    DISPLAY_INDEX_VIEO,       // 视频课
+    DISPLAY_INDEX_MUSIC,      // 琴房课
+};
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -17,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong, readonly) JXCategoryTitleView *categoryView;
 @property (nonatomic, strong) NSArray <NSString *> *titles;
 
+- (void)displayWithIndex:(DISPLAY_INDEX)displayIndex;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 10 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m

@@ -27,6 +27,8 @@
 
 @property (nonatomic, strong) NSMutableArray *subjectList;
 
+@property (nonatomic, assign) DISPLAY_INDEX displayIndex;
+
 @end
 
 @implementation MyCourseViewController
@@ -100,8 +102,16 @@
     self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
     self.pagerView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
     [self.view addSubview:self.pagerView];
+    if (self.displayIndex != 0) {
+        [self.categoryView setDefaultSelectedIndex:self.displayIndex];
+    }
 }
 
+- (void)displayWithIndex:(DISPLAY_INDEX)displayIndex {
+    self.displayIndex = displayIndex;
+}
+
+
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.interactivePopGestureRecognizer.enabled = YES;

+ 3 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -257,6 +257,9 @@
             detailVC.studentId = studentId;
             [self.navigationController pushViewController:detailVC animated:YES];
         }
+        else if ([headStr isEqualToString:@"homework"]) {
+            
+        }
     }
 }
 

+ 8 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m

@@ -59,15 +59,6 @@
         [self displayCount:infoMessage.expTime inView:self.finishCourse];
         [self displayCount:infoMessage.unExpTime inView:self.unfinishCourse];
         self.starView.allowMark = NO;
-        
-        if (infoMessage.starGrade > 0) {
-            self.starView.rate = infoMessage.starGrade / 5.0f;
-            self.emptyView.hidden = YES;
-        }
-        else {
-            self.starbgView.hidden = YES;
-            self.emptyView.hidden = NO;
-        }
         self.tipsButton.hidden = YES;
     }
     else {
@@ -87,7 +78,14 @@
         else {
             self.authLabel.text = @"认证老师";
         }
-        self.starView.hidden = YES;
+    }
+    if (infoMessage.starGrade > 0) {
+        self.starView.rate = infoMessage.starGrade / 5.0f;
+        self.emptyView.hidden = YES;
+    }
+    else {
+        self.starbgView.hidden = YES;
+        self.emptyView.hidden = NO;
     }
     
     if ([infoMessage.musicianAuthStatus isEqualToString:@"PASS"]) {

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

@@ -1,20 +0,0 @@
-//
-//  LivePrepareViewController.h
-//  KulexiuForTeacher
-//
-//  Created by Kyle on 2022/3/30.
-//
-
-#import "BaseViewController.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface LivePrepareViewController : BaseViewController
-
-@property (nonatomic, strong) NSString *roomId; // 房间号
-
-@property (nonatomic, strong) NSString *liveContent; // 直播内容
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 246
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m

@@ -1,246 +0,0 @@
-//
-//  LivePrepareViewController.m
-//  KulexiuForTeacher
-//
-//  Created by Kyle on 2022/3/30.
-//
-
-#import "LivePrepareViewController.h"
-#import "LivePreviewBodyView.h"
-#import <RongRTCLib/RongRTCLib.h>
-#import "KSEnterLiveroomManager.h"
-#import <RongFaceBeautifier/RongFaceBeautifier.h>
-#import "KSBeautySettingView.h"
-#import "KSShareChooseViewController.h"
-#import <RongIMKit/RongIMKit.h>
-#import "KSChatLiveMessage.h"
-
-@interface LivePrepareViewController ()
-
-@property (nonatomic, strong) LivePreviewBodyView *bodyView;
-
-@property (nonatomic, strong) RCRTCVideoView *videoView;
-
-// 音频配置
-@property(strong, nonatomic) RCRTCEngine *engine;
-
-@property (nonatomic, strong) KSBeautySettingView *settingView;
-
-@property (nonatomic, assign) BOOL isBeautyOn;
-
-@property (nonatomic, assign) int filterLevel;
-@end
-
-@implementation LivePrepareViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    self.ks_prefersNavigationBarHidden = YES;
-    [self configUI];
-}
-
-- (void)configUI {
-    self.bodyView = [LivePreviewBodyView shareInstance];
-    [self.view addSubview:self.bodyView];
-    [self.bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.bottom.top.mas_equalTo(self.view);
-    }];
-    MJWeakSelf;
-    [self.bodyView previewOperationCallback:^(PREVIEWLIVEACTION action) {
-        [weakSelf previewOperationAction:action];
-    }];
-    
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [self configEngine];
-}
-
-- (void)configEngine {
-    if (!self.videoView) {
-        self.videoView = [[RCRTCVideoView alloc] init];
-        self.videoView.fillMode = RCRTCVideoFillModeAspectFill;
-
-        self.videoView.frameAnimated = NO;
-        [self.bodyView.videoView addSubview:self.videoView];
-        [self.videoView mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.top.bottom.right.mas_equalTo(self.bodyView.videoView);
-        }];
-    }
-    
-    
-    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoView:self.videoView];
-    RCRTCVideoStreamConfig *videoConfig = [RCRTCEngine sharedInstance].defaultVideoStream.videoConfig;
-    videoConfig.videoSizePreset = RCRTCVideoSizePreset1280x720;
-    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoConfig:videoConfig];
-    [[RCRTCEngine sharedInstance].defaultVideoStream startCapture];
-    self.filterLevel = 50;
-}
-
-
-- (void)previewOperationAction:(PREVIEWLIVEACTION)action {
-    switch (action) {
-        case PREVIEWLIVEACTION_BACK: // 返回
-        {
-            [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 joinLiveRoom];
-        }
-            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)joinLiveRoom {
-    [self showhud];
-    MJWeakSelf;
-    [KSEnterLiveroomManager joinLiveWithRoomId:self.roomId inController:(CustomNavViewController *)self.navigationController callback:^{
-        [weakSelf removehub];
-    }];
-}
-
-
-#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.bodyView.functionView.hidden = YES;
-    }
-    else {
-        self.bodyView.functionView.hidden = NO;
-    }
-}
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
-
-@end

+ 23 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -886,6 +886,16 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     return containUser;
 }
 
+- (BOOL)getUserConnectStatus:(NSString *)userId {
+    BOOL isConnected = NO;
+    for (LiveSeatMember *member in self.seatApplyArray) {
+        if ([member.userId isEqualToString:userId]) {
+            return member.isConnected;
+        }
+    }
+    return isConnected;
+}
+
 - (void)removeMemberUserId:(NSString *)userId {
     for (RCRTCRemoteUser *remoteUser in self.remoteMemberArray) {
         if ([remoteUser.userId isEqualToString:userId]) {
@@ -1151,8 +1161,14 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                     }
                     else if (seatApplyMessage.type == SEATHANDLE_CANCELAPPLY) { // 观众取消申请 从申请中剔除
                         if ([__blockSelf judgeContainMember:seatApplyMessage.audienceId]) {
-                            [__blockSelf removeMember:seatApplyMessage.audienceId];
-                            [__blockSelf refreshSeatApplyView];
+                            // 如果在申请中的状态
+                            BOOL connectedStatus = [__blockSelf getUserConnectStatus:seatApplyMessage.audienceId];
+                            if (connectedStatus == NO) {
+                                NSLog(@"hahahhahah");
+                                [__blockSelf removeMember:seatApplyMessage.audienceId];
+                                [__blockSelf refreshSeatApplyView];
+                            }
+                            
                         }
                     }
                     return;
@@ -1700,6 +1716,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             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];
@@ -1717,6 +1734,10 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     }
     else {
         member.isConnected = YES;
+        if (![self judgeContainMember:member.userId]) {
+            [self.seatApplyArray addObject:member];
+            NSLog(@"hah--------");
+        }
     }
     [self refreshSeatApplyView];
 }

+ 0 - 50
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.h

@@ -1,50 +0,0 @@
-//
-//  LiveVideoRoomViewController.h
-//  KulexiuForTeacher
-//
-//  Created by Kyle on 2022/3/30.
-//
-
-#import "BaseViewController.h"
-#import <RongRTCLib/RongRTCLib.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface LiveVideoRoomViewController : BaseViewController
-
-/*!
- 加入的房间 ID
- */
-@property (nonatomic, strong) NSString *roomId;
-
-/*!
- 身份状态 主讲人/观众
- */
-@property (nonatomic, assign) RCRTCLiveRoleType liveRoleType;
-
-/// 主讲人id
-@property (nonatomic, strong) NSString *createrId;
-/// 主讲人名称
-@property (nonatomic, strong) NSString *createrName;
-/// 主讲人头像
-@property (nonatomic, strong) NSString *createrAvatal;
-
-@property (nonatomic, assign) NSInteger likeCount;
-
-/// 房间人数
-@property (nonatomic, assign) NSInteger totalCount;
-
-/// 是否临时房间
-@property (nonatomic, assign) BOOL isTempRoom;
-
-/// 直播课结束时间
-@property (nonatomic, strong) NSString *liveEndTime;
-
-/// 直播间自动关闭时间
-@property (nonatomic, assign) NSInteger expiredMinute;
-
-- (void)quitAction;
-
-@end
-
-NS_ASSUME_NONNULL_END

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

@@ -1,1138 +0,0 @@
-//
-//  LiveVideoRoomViewController.m
-//  KulexiuForTeacher
-//
-//  Created by Kyle on 2022/3/30.
-//
-
-#import "LiveVideoRoomViewController.h"
-#import "KSChatInputBarControl.h"
-#import "LiveRoomHeadView.h"
-#import "LiveRoomBottomView.h"
-#import "KSRCMessageModel.h"
-#import "UserInfoManager.h"
-#import "KSChatroomMessageCenter.h"
-#import <RongIMKit/RongIMKit.h>
-#import "KSChatroomTextCell.h"
-#import "KSNormalAlertView.h"
-#import "KSLiveStreamVideo.h"
-#import "SeatContentView.h"
-#import "LiveSeatApplyView.h"
-#import "LiveroomTimeManager.h"
-#import "SeatTipsView.h"
-//#import "KSPublicAlertView.h"
-
-@interface LiveVideoRoomViewController ()<RCRTCRoomEventDelegate,RCRTCStatusReportDelegate,UIGestureRecognizerDelegate,KSChatInputBarControlDelegate,UITableViewDataSource,UITableViewDelegate,LiveroomTimeManagerDelegate>
-
-@property (nonatomic, strong) LiveroomTimeManager *timeManager;
-// 音频配置
-@property(strong, nonatomic) RCRTCEngine *engine;
-
-@property (nonatomic, strong) RCRTCRoom *room;
-
-@property (nonatomic, strong) RCRTCLiveInfo *liveInfo;
-@property (nonatomic, strong) KSLiveStreamVideo *localVideo;
-
-@property (nonatomic, strong) UIView *videoView;
-
-@property (nonatomic, strong) LiveRoomHeadView *headView;
-
-@property (nonatomic, copy) LiveRoomBottomView *bottomView;
-
-/// 提示窗
-@property (nonatomic, strong) KSNormalAlertView *alertView;
-/// 连麦的视图
-@property (nonatomic, strong) SeatContentView *seatContainer;
-// 聊天UI
-/*!
- 消息列表CollectionView和输入框都在这个view里
- */
-@property(nonatomic, strong) UIView *messageContentView;
-
-/*!
- 会话页面的TableView
- */
-@property (nonatomic, strong) UITableView *conversationMessageTableView;
-
-/**
- 输入工具栏
- */
-@property(nonatomic,strong) KSChatInputBarControl *inputBar;
-/**
- *  是否需要滚动到底部
- */
-@property(nonatomic, assign) BOOL isNeedScrollToButtom;
-
-/*!
- 聊天内容的消息Cell数据模型的数据源
- 
- @discussion 数据源中存放的元素为消息Cell的数据模型,即RCDLiveMessageModel对象。
- */
-@property(nonatomic, strong) NSMutableArray<KSRCMessageModel *> *conversationDataRepository;
-
-@property (nonatomic, assign) BOOL isImConnected;
-
-@property (nonatomic, strong) LiveSeatApplyView *seatApplyView;
-
-@property (nonatomic, strong) NSMutableArray *seatApplyArray;  // 申请连麦数组
-
-// 远端连麦用户
-@property (nonatomic, strong) NSMutableArray *remoteMemberArray;
-
-/// 连麦申请统计数据
-@property (nonatomic, strong) SeatTipsView *seatApplyTips;
-
-@property (nonatomic, assign) BOOL isQuitRoom; // 是否正在退出房间
-
-@end
-
-@implementation LiveVideoRoomViewController
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        [self defaultConfig];
-    }
-    return self;
-}
-
-- (void)defaultConfig {
-    self.isImConnected = [USER_MANAGER checkIMConnected];
-}
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    self.ks_prefersNavigationBarHidden = YES;
-    [self registerNotification];
-    [self setupUI];
-    if (self.isImConnected) {
-        [self connectService];
-    }
-    else {
-        MJWeakSelf;
-        [USER_MANAGER connectionIMCallback:^(BOOL isSuccess) {
-            dispatch_main_async_safe(^{
-                [weakSelf connectService];
-            });
-        }];
-    }
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(liveroomLogOut) name:@"liveroomLogout" object:nil];
-    
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(liveroomQuit) name:@"liveroomQuit" object:nil];
-    
-    [self judgeAutoClose];
-}
-
-- (void)judgeAutoClose {
-    if (self.isTempRoom == NO) {
-        self.timeManager.autoCloseNetworkRoomTime = [self getCloseTime];
-    }
-}
-
-- (void)liveroomLogOut {
-    if (self.isQuitRoom) {
-        return;
-    }
-    [self MBPShow:@"该账号在其他设备上登录"];
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self quitAction];
-    });
-}
-
-- (void)liveroomQuit {
-    if (self.isQuitRoom) {
-        return;
-    }
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self quitAction];
-    });
-}
-
-- (void)registerNotification {
-    [KSChatroomMessageCenter registerMessageTypes];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMessageNotification:) name:OnReceiveChatroomMessageNotification object:nil];
-}
-
-- (void)setupUI {
-    CGSize size = self.view.bounds.size;
-    self.view.backgroundColor = HexRGB(0x25292e);
-    
-    [self.view addSubview:self.videoView];
-    [self.videoView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.top.bottom.right.mas_equalTo(self.view);
-    }];
-    
-    [self.view addSubview:self.headView];
-    self.headView.boardcastName.text = [NSString returnNoNullStringWithString:self.createrName];
-    if (![NSString isEmptyString:self.createrAvatal]) {
-        [self.headView.boardcastAvatal sd_setImageWithURL:[NSURL URLWithString:[self.createrAvatal getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"teacher_logo"]];
-    }
-    [self countLikeMessageCount];
-    
-    [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.mas_equalTo(self.view);
-        make.height.mas_equalTo(90);
-        if (@available(iOS 11.0, *)) {
-            make.top.mas_equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(10);
-        } else {
-            // Fallback on earlier versions
-            make.top.mas_equalTo(self.view.mas_top).offset(10);
-        }
-    }];
-    [self.view addSubview:self.messageContentView];
-    [self.view addSubview:self.bottomView];
-    
-    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.mas_equalTo(self.view);
-        if (@available(iOS 11.0, *)) {
-            make.bottom.mas_equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-10);
-        } else {
-            // Fallback on earlier versions
-            make.bottom.mas_equalTo(self.view.mas_bottom).offset(-10);
-        }
-        make.height.mas_equalTo(44);
-    }];
-    
-    [self.messageContentView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(self.view.mas_left);
-        make.right.mas_equalTo(self.view.mas_right);
-        make.bottom.mas_equalTo(self.bottomView.mas_top).offset(-10);
-        make.height.mas_equalTo(270);
-    }];
-    [self.view 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.view 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.view addGestureRecognizer:resetBottomTapGesture];
-}
-
-- (void)connectService {
-    [self setRoleType];
-    [self joinChatRoom];
-}
-
-- (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];
-        [self sendMessage:joinChatroomMessage displayMessage:YES callback:^(BOOL success) {
-            
-        }];
-        // 加入成功发送消息
-    } 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)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;
-    }
-    if (_timeManager) {
-        [_timeManager stopDurationTimer];
-    }
-}
-
-// 刷新seatView
-- (void)renderSeatView {
-    NSMutableArray *seatArray = [NSMutableArray array];
-    for (RCRTCRemoteUser *user in self.remoteMemberArray) {
-        [seatArray addObject:user.userId];
-    }
-    if (seatArray.count) {
-        [self.view addSubview:self.seatContainer];
-        [self.seatContainer mas_remakeConstraints:^(MASConstraintMaker *make) {
-            make.left.right.mas_equalTo(self.view);
-            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 {
-        if ([self.view.subviews containsObject:self.seatContainer]) {
-            [self.seatContainer removeFromSuperview];
-        }
-    }
-}
-
-- (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;
-    
-    if (count > 10000) {
-        count = count / 10000;
-        desc = [NSString stringWithFormat:@"%zd万+人",count];
-    }
-    else {
-        desc = [NSString stringWithFormat:@"%zd人",count];
-    }
-}
-
-- (void)setRoleType {
-    // 1.设置切换听筒为扬声器
-    [self.engine enableSpeaker:YES];
-    // 2.添加本地采集预览界面
-    [self setupLocalVideoView];
-    // 3.加入RTC房间
-    [self joinLiveRoom];
-}
-
-- (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;
-}
-
-// 添加本地采集预览页面
-- (void)setupLocalVideoView {
-    [self.videoView addSubview:self.localVideo.canvesView];
-    [self.localVideo.canvesView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.right.top.bottom.mas_equalTo(self.videoView);
-    }];
-}
-
-#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;
-    [self.room.localUser subscribeStream:ordinaryStream
-                             tinyStreams:tinyStream
-                              completion:^(BOOL isSuccess, RCRTCCode desc) {
-        if (desc != RCRTCCodeSuccess) {
-            NSString *errorStr = [NSString stringWithFormat:@"订阅远端流失败:%ld", (long) desc];
-            [self MBPShow:errorStr];
-            return;
-        }
-    }];
-}
-
-- (void)didUnpublishStreams:(NSArray<RCRTCInputStream *> *)streams {
-    
-}
-
-- (void)didOfflineUser:(RCRTCRemoteUser *)user {
-    
-}
-
-// 远端用户切换身份
-- (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 updateMemberStatus: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)joinLiveRoom {
-    // 1.配置房间
-    RCRTCRoomConfig *config = [[RCRTCRoomConfig alloc] init];
-    config.roomType = RCRTCRoomTypeLive;
-    config.liveType = RCRTCLiveTypeAudioVideo;
-    config.roleType = RCRTCLiveRoleTypeBroadcaster;
-    __weak typeof(self) weakSelf = self;
-    [self.engine 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.room = room;
-                strongSelf.room.delegate = self;
-                [strongSelf countMemberCount];
-                // 发布本地视频流
-                [self publishLocalStream];
-//            }
-        });
-    }];
-}
-
-- (void)publishLocalStream {
-    // 1.设置渲染视图渲染视图
-    [self.engine.defaultVideoStream setVideoView:self.localVideo.canvesView];
-    // 2.设置视频流参数
-    RCRTCVideoStreamConfig *videoConfig = self.engine.defaultVideoStream.videoConfig;
-    videoConfig.videoSizePreset = RCRTCVideoSizePreset1280x720;
-    [self.engine.defaultVideoStream setVideoConfig:videoConfig];
-    // 3.开始视频采集
-    [self.engine.defaultVideoStream startCapture];
-    // 发布本地视频流到放假
-    [self.room.localUser publishDefaultLiveStreams:^(BOOL isSuccess, RCRTCCode code, RCRTCLiveInfo * _Nullable liveInfo) {
-        if (code == RCRTCCodeSuccess) {
-            self.liveInfo = liveInfo;
-        }
-        else {
-            [self MBPShow:@"视频流发布失败"];
-        }
-    }];
-}
-
-- (void)exitRoom {
-    __weak typeof(self) weakSelf = self;
-    [self.engine leaveRoom:^(BOOL isSuccess, RCRTCCode code) {
-        dispatch_main_async_safe(^{
-            __strong typeof(weakSelf) strongSelf = weakSelf;
-            [strongSelf sendLeaveMessageCallback:^(BOOL success) {
-                // quit 接口
-                [weakSelf quitNotiferService];
-                [weakSelf quitChatRoom];
-            }];
-        });
-    }];
-}
-
-#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)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;
-                    }
-                    __blockSelf.totalCount++;
-                    [__blockSelf countMemberCount];
-                }
-                // 用户退出消息
-                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomLeave class]]) {
-                    KSLiveChatroomLeave *memberLeaveMsg = (KSLiveChatroomLeave *)rcMessage.content;
-                    __blockSelf.totalCount--;
-                    [__blockSelf countMemberCount];
-                    if ([__blockSelf judgeContainMember:memberLeaveMsg.userId]) {
-                        [__blockSelf removeMember:memberLeaveMsg.userId];
-                        [__blockSelf refreshSeatApplyView];
-                    }
-                    return;
-                }
-                // 用户退出消息
-                else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomUserQuit class]]) {
-                    KSLiveChatroomUserQuit *memberLeaveMsg = (KSLiveChatroomUserQuit *)rcMessage.content;
-                    __blockSelf.totalCount--;
-                    [__blockSelf countMemberCount];
-                    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;
-                }
-                
-                // left
-                NSDictionary *leftDic = notification.userInfo;
-                if (leftDic && [leftDic[@"left"] isEqual:@(0)]) {
-                    __blockSelf.isNeedScrollToButtom = YES;
-                }
-                [__blockSelf 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)updateMemberStatus:(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 quitAction];
-    });
-}
-
-#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 *)videoView {
-    if (!_videoView) {
-        _videoView = [[UIView alloc] initWithFrame:self.view.bounds];
-        _videoView.backgroundColor = [UIColor clearColor];
-    }
-    return _videoView;
-}
-
-- (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 quitAction];
-        }
-        default:
-            break;
-    }
-}
-
-- (SeatTipsView *)seatApplyTips {
-    if (!_seatApplyTips) {
-        _seatApplyTips = [[SeatTipsView alloc] init];
-    }
-    return _seatApplyTips;
-}
-- (void)displaySeatView {
-    [self.view addSubview:self.seatApplyView];
-    [self refreshSeatApplyView];
-}
-
-- (void)quitAction {
-    self.isQuitRoom = YES;
-    MJWeakSelf;
-    self.alertView = [KSNormalAlertView ks_showAlertWithTitle:@"确认退出直播间吗?" leftTitle:@"取消" rightTitle:@"确定" inView:self.view cancel:^{
-        
-    } confirm:^{
-        [weakSelf quitRoom];
-    }];
-}
-
-- (void)quitRoom {
-    // 退出房间
-    [self exitRoom];
-    [self.navigationController dismissViewControllerAnimated:YES completion:nil];
-}
-
-- (RCRTCEngine *)engine {
-    if (!_engine) {
-        _engine = [RCRTCEngine sharedInstance];
-        [_engine setStatusReportDelegate:self];
-    }
-    return _engine;
-}
-
-- (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:YES 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:YES 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:YES 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;
-}
-
-- (LiveroomTimeManager *)timeManager {
-    if (!_timeManager) {
-        _timeManager = [[LiveroomTimeManager alloc] initWithDelegate:self];
-        _timeManager.autoCloseNetworkRoomTime = self.expiredMinute;
-        _timeManager.endClassTime = self.liveEndTime;
-    }
-    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 {
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-@end

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.h

@@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface KSEnterLiveroomManager : NSObject
 
-+ (void)joinLiveWithRoomId:(NSString *)roomId inController:(CustomNavViewController *)navCtrl callback:(EnterCallback)callback;
 
 + (void)queryLiveroomConfig:(NSString *)roomId callback:(RoomConfigCallback)callback;
 

+ 1 - 34
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/KSEnterLiveroomManager.m

@@ -6,23 +6,10 @@
 //
 
 #import "KSEnterLiveroomManager.h"
-#import "LiveVideoRoomViewController.h"
+
 
 @implementation KSEnterLiveroomManager
 
-+ (void)joinLiveWithRoomId:(NSString *)roomId inController:(CustomNavViewController *)navCtrl callback:(EnterCallback)callback {
-    [KSNetworkingManager liveRoomJoinRoomRequest:KS_GET roomUid:roomId success:^(NSDictionary * _Nonnull dic) {
-        callback();
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            [self joinRoomWithMessage:[dic dictionaryValueForKey:@"data"] controller:navCtrl];
-        }
-        else {
-            [self MBShowInWindow:MESSAGEKEY];
-        }
-    } faliure:^(NSError * _Nonnull error) {
-        callback();
-    }];
-}
 
 + (void)queryLiveroomConfig:(NSString *)roomId callback:(RoomConfigCallback)callback {
     [KSNetworkingManager speakerCheckRoomInfoRequest:KS_GET roomUid:roomId success:^(NSDictionary * _Nonnull dic) {
@@ -38,26 +25,6 @@
     }];
 }
 
-+ (void)joinRoomWithMessage:(NSDictionary *)source controller:(CustomNavViewController *)navCtrl {
-    LiveVideoRoomViewController *liveVC = [[LiveVideoRoomViewController alloc] init];
-    liveVC.roomId = [source stringValueForKey:@"roomUid"];
-    liveVC.liveRoleType = RCRTCLiveRoleTypeBroadcaster;
-    liveVC.createrId = [source stringValueForKey:@"speakerId"];
-    liveVC.createrName = [source stringValueForKey:@"speakerName"];
-    liveVC.createrAvatal = [source stringValueForKey:@"speakerPic"];
-    liveVC.likeCount = [source integerValueForKey:@"likeNum"]; // 点赞数
-    NSInteger lookCount = [source integerValueForKey:@"lookNum"];
-    liveVC.totalCount = lookCount; // 观看人数
-    
-    BOOL isTemp = [[source stringValueForKey:@"roomType"] isEqualToString:@"TEMP"];
-    liveVC.isTempRoom = isTemp;
-    if (isTemp == NO) {
-        liveVC.liveEndTime = [source stringValueForKey:@"liveEndTime"];
-        liveVC.expiredMinute = [source integerValueForKey:@"expiredMinute"];
-    }
-    [navCtrl pushViewController:liveVC animated:YES];
-}
-
 + (void)MBShowInWindow:(NSString *)str {
     [MBProgressHUD hideHUD];
     MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Model/LiveSeatMember.h

@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL isConnected; // 是否连上麦
 
+//@property (nonatomic, assign) BOOL quitTag;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.m

@@ -9,6 +9,8 @@
 
 @interface GuideListView ()
 
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageTopConstraint;
+
 @property (weak, nonatomic) IBOutlet UIView *colorView;
 
 @property (weak, nonatomic) IBOutlet UIImageView *imageView;
@@ -42,6 +44,12 @@
     gradientLayer.locations = @[@(0),@(1)];
     gradientLayer.frame = CGRectMake(0, 0, KPortraitWidth, 360);
     [self.colorView.layer addSublayer:gradientLayer];
+    if (IS_iPhoneX) {
+        self.imageTopConstraint.constant = 174.0f;
+    }
+    else {
+        self.imageTopConstraint.constant = 104.0f;
+    }
 }
 
 - (void)configViewWithImageName:(NSString *)imageName topTitle:(NSString *)topTitle desc:(NSString *)descMsg showButton:(BOOL)showButton {

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Guide/View/GuideListView.xib

@@ -87,6 +87,7 @@
                 <outlet property="descLabel" destination="40p-7F-M6I" id="wCM-U9-TPH"/>
                 <outlet property="enterButton" destination="ykp-ax-0bg" id="zla-N1-sVW"/>
                 <outlet property="headTitle" destination="5BZ-aV-ZqC" id="83k-rz-XwT"/>
+                <outlet property="imageTopConstraint" destination="Op6-Wp-jtd" id="c46-jV-a1l"/>
                 <outlet property="imageView" destination="yUN-KZ-L1M" id="Mpv-wD-FBe"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="79.6875"/>

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

@@ -25,7 +25,7 @@
 }
 
 - (void)configWithSource:(MinePageGroupModel *)sourceModel chatAction:(ChatCallback)callback {
-    [self.groupAvatar sd_setImageWithURL:[NSURL URLWithString:[sourceModel.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
+    [self.groupAvatar sd_setImageWithURL:[NSURL URLWithString:[sourceModel.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_FAN_LOGO]];
     self.groupName.text = [NSString returnNoNullStringWithString:sourceModel.name];
     self.desc.text = [NSString returnNoNullStringWithString:sourceModel.introduce];
 }

+ 9 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.m

@@ -74,15 +74,6 @@
         [self displayCount:infoMessage.fansNum inView:self.fansCount descTitle:@"粉丝  "];
         [self displayCount:infoMessage.expTime inView:self.finishCourse descTitle:@"已上课时  "];
         [self displayCount:infoMessage.unExpTime inView:self.unfinishCourse descTitle:@"未上课时  "];
-        if (infoMessage.starGrade > 0) {
-            self.starView.rate = infoMessage.starGrade / 5.0f;
-            self.starView.hidden = NO;
-            self.emptyView.hidden = YES;
-        }
-        else {
-            self.starView.hidden = YES;
-            self.emptyView.hidden = NO;
-        }
         self.tipsButton.hidden = YES;
     }
     else {
@@ -104,7 +95,16 @@
         else {
             self.authLabel.text = @"认证老师";
         }
+    }
+    
+    if (infoMessage.starGrade > 0) {
+        self.starView.rate = infoMessage.starGrade / 5.0f;
+        self.starView.hidden = NO;
+        self.emptyView.hidden = YES;
+    }
+    else {
         self.starView.hidden = YES;
+        self.emptyView.hidden = NO;
     }
     
     if (![NSString isEmptyString:infoMessage.heardUrl]) {