Kaynağa Gözat

loading 修改

Steven 1 yıl önce
ebeveyn
işleme
823b5eef99
100 değiştirilmiş dosya ile 1974 ekleme ve 977 silme
  1. 79 6
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/Contents.json
  3. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/Contents.json
  4. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@2x.png
  5. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@3x.png
  6. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/Contents.json
  7. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@2x.png
  8. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@3x.png
  9. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/Contents.json
  10. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@2x.png
  11. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@3x.png
  12. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/delete_grey.imageset/Contents.json
  13. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/delete_grey.imageset/delete_grey@2x.png
  14. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/delete_grey.imageset/delete_grey@3x.png
  15. 0 8
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/BaseViewController.h
  16. 1 93
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/BaseViewController.m
  17. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m
  18. 0 6
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.h
  19. 3 145
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.m
  20. 23 21
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  21. 3 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  22. 15 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  23. 6 6
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSVideoRecordManager.m
  24. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/RCConnectionManager.m
  25. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h
  26. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch
  27. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.h
  28. 72 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.m
  29. 65 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.xib
  30. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.h
  31. 35 29
      KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.m
  32. 9 9
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSMediaManager.m
  33. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSChoosePicker.h
  34. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSChoosePicker.m
  35. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSFullDatePicker.h
  36. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSFullDatePicker.m
  37. 23 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSSmallChoosePicker.h
  38. 208 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSSmallChoosePicker.m
  39. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.h
  40. 46 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.m
  41. 61 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.xib
  42. 172 186
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m
  43. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/UMShare/KSUMShareManager.m
  44. 9 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m
  45. 13 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/CreateFansGroupViewController.m
  46. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  47. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatUserDetailViewController.m
  48. 12 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m
  49. 10 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantCreateGroupViewController.m
  50. 9 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupApplyViewController.m
  51. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupMemberViewController.m
  52. 12 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m
  53. 111 53
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m
  54. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.h
  55. 9 20
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.m
  56. 125 74
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.xib
  57. 23 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.h
  58. 57 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.m
  59. 49 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.xib
  60. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.h
  61. 51 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.m
  62. 79 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.xib
  63. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.h
  64. 45 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.m
  65. 67 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.xib
  66. 12 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m
  67. 15 16
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m
  68. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/View/NoticeEditBodyView.m
  69. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/ShareMusic/Controller/ShareMusicViewController.m
  70. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatAddressBodyView.m
  71. 12 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatNavView.xib
  72. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.h
  73. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.m
  74. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.xib
  75. 25 25
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  76. 16 17
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m
  77. 15 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m
  78. 17 18
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  79. 10 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateDetailViewController.m
  80. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/View/EvaluateCourseBodyView.m
  81. 15 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  82. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m
  83. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m
  84. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m
  85. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/IncomeCountViewController.m
  86. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m
  87. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/NoRecordViewController.m
  88. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m
  89. 10 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m
  90. 11 11
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m
  91. 4 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  92. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m
  93. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m
  94. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyMusicRoomBodyView.m
  95. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m
  96. 8 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  97. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m
  98. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ScanView/Controller/KSScanViewController.m
  99. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m
  100. 17 18
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

+ 79 - 6
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -909,6 +909,17 @@
 		BC9473FD282A5E71004B3B27 /* NoticeSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9473FB282A5E71004B3B27 /* NoticeSourceModel.m */; };
 		BC965AE82925D1D700AB90B0 /* ClassroomCoursewarePlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC965AE72925D1D700AB90B0 /* ClassroomCoursewarePlayView.m */; };
 		BC965AEA2926332D00AB90B0 /* ClassroomCoursewarePlayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC965AE92926332D00AB90B0 /* ClassroomCoursewarePlayView.xib */; };
+		BC9AA0C02ABC3C5800CD954D /* ChatComplainBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0BD2ABC3C5700CD954D /* ChatComplainBottomView.xib */; };
+		BC9AA0C12ABC3C5800CD954D /* ChatComplainBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0BE2ABC3C5800CD954D /* ChatComplainBottomView.m */; };
+		BC9AA0C82ABC3C7B00CD954D /* KSPhotoChooseView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0C32ABC3C7A00CD954D /* KSPhotoChooseView.m */; };
+		BC9AA0CA2ABC3C7B00CD954D /* KSPhotoChooseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0C52ABC3C7A00CD954D /* KSPhotoChooseView.xib */; };
+		BC9AA0CE2ABC3D3400CD954D /* KSComplainImageDisplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0CD2ABC3D3400CD954D /* KSComplainImageDisplayView.m */; };
+		BC9AA0D02ABC3D3A00CD954D /* KSComplainImageDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0CF2ABC3D3A00CD954D /* KSComplainImageDisplayView.xib */; };
+		BC9AA0D42ABC430B00CD954D /* KSCustomLoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0D12ABC430A00CD954D /* KSCustomLoadingView.xib */; };
+		BC9AA0D52ABC430B00CD954D /* KSCustomLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0D22ABC430A00CD954D /* KSCustomLoadingView.m */; };
+		BC9AA0EF2ABC697800CD954D /* SmallPickerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0EA2ABC697500CD954D /* SmallPickerCell.m */; };
+		BC9AA0F02ABC697800CD954D /* KSSmallChoosePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0ED2ABC697600CD954D /* KSSmallChoosePicker.m */; };
+		BC9AA0F12ABC697800CD954D /* SmallPickerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0EE2ABC697700CD954D /* SmallPickerCell.xib */; };
 		BCA1134828A22A66007FAFB9 /* HomeHotMusicCollectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA1134628A22A66007FAFB9 /* HomeHotMusicCollectionCell.m */; };
 		BCA1134928A22A66007FAFB9 /* HomeHotMusicCollectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA1134728A22A66007FAFB9 /* HomeHotMusicCollectionCell.xib */; };
 		BCA1134C28A23221007FAFB9 /* HomeHotMusicCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA1134B28A23221007FAFB9 /* HomeHotMusicCellView.m */; };
@@ -2751,6 +2762,23 @@
 		BC965AE62925D1D700AB90B0 /* ClassroomCoursewarePlayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassroomCoursewarePlayView.h; sourceTree = "<group>"; };
 		BC965AE72925D1D700AB90B0 /* ClassroomCoursewarePlayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClassroomCoursewarePlayView.m; sourceTree = "<group>"; };
 		BC965AE92926332D00AB90B0 /* ClassroomCoursewarePlayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ClassroomCoursewarePlayView.xib; sourceTree = "<group>"; };
+		BC9AA0BD2ABC3C5700CD954D /* ChatComplainBottomView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChatComplainBottomView.xib; sourceTree = "<group>"; };
+		BC9AA0BE2ABC3C5800CD954D /* ChatComplainBottomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatComplainBottomView.m; sourceTree = "<group>"; };
+		BC9AA0BF2ABC3C5800CD954D /* ChatComplainBottomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatComplainBottomView.h; sourceTree = "<group>"; };
+		BC9AA0C32ABC3C7A00CD954D /* KSPhotoChooseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSPhotoChooseView.m; sourceTree = "<group>"; };
+		BC9AA0C52ABC3C7A00CD954D /* KSPhotoChooseView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSPhotoChooseView.xib; sourceTree = "<group>"; };
+		BC9AA0C72ABC3C7B00CD954D /* KSPhotoChooseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSPhotoChooseView.h; sourceTree = "<group>"; };
+		BC9AA0CC2ABC3D3400CD954D /* KSComplainImageDisplayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSComplainImageDisplayView.h; sourceTree = "<group>"; };
+		BC9AA0CD2ABC3D3400CD954D /* KSComplainImageDisplayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSComplainImageDisplayView.m; sourceTree = "<group>"; };
+		BC9AA0CF2ABC3D3A00CD954D /* KSComplainImageDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSComplainImageDisplayView.xib; sourceTree = "<group>"; };
+		BC9AA0D12ABC430A00CD954D /* KSCustomLoadingView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSCustomLoadingView.xib; sourceTree = "<group>"; };
+		BC9AA0D22ABC430A00CD954D /* KSCustomLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSCustomLoadingView.m; sourceTree = "<group>"; };
+		BC9AA0D32ABC430B00CD954D /* KSCustomLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSCustomLoadingView.h; sourceTree = "<group>"; };
+		BC9AA0EA2ABC697500CD954D /* SmallPickerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SmallPickerCell.m; sourceTree = "<group>"; };
+		BC9AA0EB2ABC697600CD954D /* KSSmallChoosePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSSmallChoosePicker.h; sourceTree = "<group>"; };
+		BC9AA0EC2ABC697600CD954D /* SmallPickerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallPickerCell.h; sourceTree = "<group>"; };
+		BC9AA0ED2ABC697600CD954D /* KSSmallChoosePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSSmallChoosePicker.m; sourceTree = "<group>"; };
+		BC9AA0EE2ABC697700CD954D /* SmallPickerCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SmallPickerCell.xib; sourceTree = "<group>"; };
 		BCA1134528A22A66007FAFB9 /* HomeHotMusicCollectionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotMusicCollectionCell.h; sourceTree = "<group>"; };
 		BCA1134628A22A66007FAFB9 /* HomeHotMusicCollectionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotMusicCollectionCell.m; sourceTree = "<group>"; };
 		BCA1134728A22A66007FAFB9 /* HomeHotMusicCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotMusicCollectionCell.xib; sourceTree = "<group>"; };
@@ -3571,9 +3599,8 @@
 		2779309627E30F2D0010E277 /* Base */ = {
 			isa = PBXGroup;
 			children = (
+				BC9AA0D62ABC432400CD954D /* LoadingManager */,
 				BC28884B2A80DA530064B773 /* LoginManger */,
-				BC56C9682923736200AF301F /* KSHudLoagingManager.h */,
-				BC56C9692923736200AF301F /* KSHudLoagingManager.m */,
 				BCC583D328A9FA8100BAB4CF /* CloudLoadingSource */,
 				BC71D28A288811BF0010F14B /* TabbarAnimation */,
 				BC023801286594EA005560CA /* KSTipsAlert.h */,
@@ -3915,6 +3942,7 @@
 		2779312227E30FC00010E277 /* Custom */ = {
 			isa = PBXGroup;
 			children = (
+				BC9AA0E92ABC696400CD954D /* PickerView */,
 				2779316F27E30FC00010E277 /* GRCreateManager.h */,
 				2779312927E30FC00010E277 /* GRCreateManager.m */,
 				2779312A27E30FC00010E277 /* GRScanManager.h */,
@@ -3923,10 +3951,6 @@
 				2779314227E30FC00010E277 /* HomeButton.m */,
 				2779316727E30FC00010E277 /* KeyChainTools.h */,
 				2779318227E30FC00010E277 /* KeyChainTools.m */,
-				2779317827E30FC00010E277 /* KSChoosePicker.h */,
-				2779313427E30FC00010E277 /* KSChoosePicker.m */,
-				2779317527E30FC00010E277 /* KSFullDatePicker.h */,
-				2779314427E30FC00010E277 /* KSFullDatePicker.m */,
 				2779314327E30FC00010E277 /* KSImageButton.h */,
 				2779317627E30FC00010E277 /* KSImageButton.m */,
 				2779315827E30FC00010E277 /* KSInputView */,
@@ -4983,6 +5007,9 @@
 				2755C06E27EC7F20007D9070 /* ChatComplainBodyView.h */,
 				2755C06D27EC7F1F007D9070 /* ChatComplainBodyView.m */,
 				2755C06F27EC7F21007D9070 /* ChatComplainBodyView.xib */,
+				BC9AA0BF2ABC3C5800CD954D /* ChatComplainBottomView.h */,
+				BC9AA0BE2ABC3C5800CD954D /* ChatComplainBottomView.m */,
+				BC9AA0BD2ABC3C5700CD954D /* ChatComplainBottomView.xib */,
 				2755C08227ED5770007D9070 /* GroupApplyMemberCell.h */,
 				2755C08327ED5770007D9070 /* GroupApplyMemberCell.m */,
 				2755C08427ED5770007D9070 /* GroupApplyMemberCell.xib */,
@@ -4998,6 +5025,12 @@
 				2708565A27EDA83100EC8E72 /* GroupMemberListCell.h */,
 				2708565B27EDA83100EC8E72 /* GroupMemberListCell.m */,
 				2708565C27EDA83100EC8E72 /* GroupMemberListCell.xib */,
+				BC9AA0CC2ABC3D3400CD954D /* KSComplainImageDisplayView.h */,
+				BC9AA0CD2ABC3D3400CD954D /* KSComplainImageDisplayView.m */,
+				BC9AA0CF2ABC3D3A00CD954D /* KSComplainImageDisplayView.xib */,
+				BC9AA0C72ABC3C7B00CD954D /* KSPhotoChooseView.h */,
+				BC9AA0C32ABC3C7A00CD954D /* KSPhotoChooseView.m */,
+				BC9AA0C52ABC3C7A00CD954D /* KSPhotoChooseView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -6994,6 +7027,35 @@
 			path = CoursewarePlayView;
 			sourceTree = "<group>";
 		};
+		BC9AA0D62ABC432400CD954D /* LoadingManager */ = {
+			isa = PBXGroup;
+			children = (
+				BC56C9682923736200AF301F /* KSHudLoagingManager.h */,
+				BC56C9692923736200AF301F /* KSHudLoagingManager.m */,
+				BC9AA0D32ABC430B00CD954D /* KSCustomLoadingView.h */,
+				BC9AA0D22ABC430A00CD954D /* KSCustomLoadingView.m */,
+				BC9AA0D12ABC430A00CD954D /* KSCustomLoadingView.xib */,
+			);
+			name = LoadingManager;
+			path = KulexiuForTeacher/Common/LoadingManager;
+			sourceTree = SOURCE_ROOT;
+		};
+		BC9AA0E92ABC696400CD954D /* PickerView */ = {
+			isa = PBXGroup;
+			children = (
+				2779317827E30FC00010E277 /* KSChoosePicker.h */,
+				2779313427E30FC00010E277 /* KSChoosePicker.m */,
+				2779317527E30FC00010E277 /* KSFullDatePicker.h */,
+				2779314427E30FC00010E277 /* KSFullDatePicker.m */,
+				BC9AA0EB2ABC697600CD954D /* KSSmallChoosePicker.h */,
+				BC9AA0ED2ABC697600CD954D /* KSSmallChoosePicker.m */,
+				BC9AA0EC2ABC697600CD954D /* SmallPickerCell.h */,
+				BC9AA0EA2ABC697500CD954D /* SmallPickerCell.m */,
+				BC9AA0EE2ABC697700CD954D /* SmallPickerCell.xib */,
+			);
+			path = PickerView;
+			sourceTree = "<group>";
+		};
 		BCA1136928A4D6E6007FAFB9 /* AnimationSource */ = {
 			isa = PBXGroup;
 			children = (
@@ -7848,6 +7910,7 @@
 				BC221FA128C72B9500F99802 /* MyStyleVideoView.xib in Resources */,
 				BCC583FA28A9FA8100BAB4CF /* cloud_animation_26.png in Resources */,
 				2708565E27EDA83100EC8E72 /* GroupMemberListCell.xib in Resources */,
+				BC9AA0CA2ABC3C7B00CD954D /* KSPhotoChooseView.xib in Resources */,
 				BCDE359A289BC02200A9A560 /* HomeHotAlbumCell.xib in Resources */,
 				2780A06627E81E5E00447CFD /* MineNavView.xib in Resources */,
 				BC14A62628A212CC0086395C /* HomeHotMusicView.xib in Resources */,
@@ -7881,6 +7944,7 @@
 				BCA7C34428476533009D20EC /* KSBoardAddStaffView.xib in Resources */,
 				BCF425EA2AB96BE400BCD942 /* HomeTenantView.xib in Resources */,
 				BCA353E52859797500377661 /* MusicRoomStudentCell.xib in Resources */,
+				BC9AA0F12ABC697800CD954D /* SmallPickerCell.xib in Resources */,
 				BC58E7DF281B96A4004B0893 /* MinePageTopView.xib in Resources */,
 				BCEA75322819336A00886A86 /* WithdrawBodyView.xib in Resources */,
 				BC71D20A2887FDD40010F14B /* launchAni.json in Resources */,
@@ -7966,6 +8030,7 @@
 				27D83F5927F4225D00062476 /* LivePreviewBodyView.xib in Resources */,
 				BC41104A2806706800800BD9 /* HomeworkListCell.xib in Resources */,
 				BCD457A72863196F0010B493 /* CourseTimeSegView.xib in Resources */,
+				BC9AA0D42ABC430B00CD954D /* KSCustomLoadingView.xib in Resources */,
 				BC9070A428C7159F00237958 /* MyStyleNavView.xib in Resources */,
 				BC106BB62A8F6E94000759A9 /* ShareMusicCellContentView.xib in Resources */,
 				2779362E27E33C360010E277 /* LoginBodyView.xib in Resources */,
@@ -8035,6 +8100,7 @@
 				BC0A22B82847523E0065C1AB /* MemberListCell.xib in Resources */,
 				BCB9FA632872C8D2005D766B /* UnderwayLiveCell.xib in Resources */,
 				BC71D1ED2887FDD40010F14B /* img_11.png in Resources */,
+				BC9AA0C02ABC3C5800CD954D /* ChatComplainBottomView.xib in Resources */,
 				BC12638228FEB5B900509E90 /* RecentMusicView.xib in Resources */,
 				BCA9CE3A27FD93EB00D558C6 /* AccompanyStudentEvaCell.xib in Resources */,
 				BCE6A09627F823DC00C97704 /* MinePageMusicCell.xib in Resources */,
@@ -8097,6 +8163,7 @@
 				BC3673DD28A606A500059721 /* accomapny_animation_3.png in Resources */,
 				BC8C2C662824EB9800FBA5D5 /* NotiferHeadView.xib in Resources */,
 				BC3673D728A606A500059721 /* live_animation_3.png in Resources */,
+				BC9AA0D02ABC3D3A00CD954D /* KSComplainImageDisplayView.xib in Resources */,
 				BC1263AA28FF98C300509E90 /* HomeRecommendMusicView.xib in Resources */,
 				2779329A27E30FEB0010E277 /* mss_browseLoading@2x.png in Resources */,
 				BC71D2042887FDD40010F14B /* img_26.png in Resources */,
@@ -8255,6 +8322,7 @@
 				277932B627E30FFE0010E277 /* UIView+SDExtension.m in Sources */,
 				2779335C27E317CD0010E277 /* KSBaseModel.m in Sources */,
 				BC7CFFB72817E90700CAEB21 /* KSSegView.m in Sources */,
+				BC9AA0C12ABC3C5800CD954D /* ChatComplainBottomView.m in Sources */,
 				277935F127E32AE20010E277 /* KSWebNavView.m in Sources */,
 				BC71DF112A89F470003F165E /* TXMetronomeAlertView.m in Sources */,
 				2779322227E30FC30010E277 /* KSImageButton.m in Sources */,
@@ -8501,6 +8569,7 @@
 				BC71DE912A89C937003F165E /* TXClassroomMsgCenter.m in Sources */,
 				BC0167A627FC06D600AE66A1 /* MyCourseViewController.m in Sources */,
 				BCA9CE3427FD93C700D558C6 /* AccompanyEvaluateCell.m in Sources */,
+				BC9AA0CE2ABC3D3400CD954D /* KSComplainImageDisplayView.m in Sources */,
 				BCA353D62858B18100377661 /* Records.m in Sources */,
 				BC2456F3286BEFDA00D1F7C0 /* MineEmptyVideoCell.m in Sources */,
 				2779320127E30FC30010E277 /* KSStatusView.m in Sources */,
@@ -8515,6 +8584,7 @@
 				BC71DF182A89F470003F165E /* TXTeachToolView.m in Sources */,
 				27BC3B2F27F2FC7200D81E30 /* VideoCourseCell.m in Sources */,
 				275FA1A927E7327500CFEA2E /* KSAQRecordManager.m in Sources */,
+				BC9AA0F02ABC697800CD954D /* KSSmallChoosePicker.m in Sources */,
 				277931D227E30FC20010E277 /* UIButton+Property.m in Sources */,
 				2779309927E30F480010E277 /* BaseViewController.m in Sources */,
 				BC71DF1E2A89F470003F165E /* TXClassroomVideoListView.m in Sources */,
@@ -8528,6 +8598,7 @@
 				BCDF822C2A8A30AE005F8B82 /* KSTrackingSlider.m in Sources */,
 				BC48C3AE28292FB600EE65C5 /* ReceiveHeaderView.m in Sources */,
 				BCC9F42427F69BD200647449 /* VideoMaskView.m in Sources */,
+				BC9AA0EF2ABC697800CD954D /* SmallPickerCell.m in Sources */,
 				BCB399BC27F9831D00AFF376 /* CourseForLiveCell.m in Sources */,
 				BCC9F35527F5F4FD00647449 /* LiveSeatMember.m in Sources */,
 				277931DB27E30FC20010E277 /* UIButton+EnlargeEdge.m in Sources */,
@@ -8724,8 +8795,10 @@
 				BC5E4B2E291E5E26001BBCD2 /* WMGaugeView.m in Sources */,
 				2780A06427E81E4900447CFD /* MineNavView.m in Sources */,
 				2779326E27E30FD80010E277 /* FSCalendarCalculator.m in Sources */,
+				BC9AA0C82ABC3C7B00CD954D /* KSPhotoChooseView.m in Sources */,
 				BCDF821F2A8A2F36005F8B82 /* KSSliderView.m in Sources */,
 				BCB9FA6B2872D57E005D766B /* LiveListModel.m in Sources */,
+				BC9AA0D52ABC430B00CD954D /* KSCustomLoadingView.m in Sources */,
 				2779320027E30FC30010E277 /* QCCountdownButton.m in Sources */,
 				2779321427E30FC30010E277 /* MBProgressHUD+NJ.m in Sources */,
 				BC14E4762AB2E6C2000C4983 /* UnbindTenantViewController.m in Sources */,

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/Contents.json

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

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/Contents.json

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@3x.png


+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/Contents.json

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@3x.png


+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/Contents.json

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@3x.png


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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/delete_grey.imageset/delete_grey@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/delete_grey.imageset/delete_grey@3x.png


+ 0 - 8
KulexiuForTeacher/KulexiuForTeacher/Common/Base/BaseViewController.h

@@ -12,15 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface BaseViewController : UIViewController
 
-//加载状态显示
-@property (nonatomic, assign) BOOL isHiddenLoadingView;
-@property (nonatomic, copy) NSString* loadingHintsText;
 
-- (void)showhud;
-- (void)removehub;
-- (void)MBPShow:(NSString*)str;
-// 提示后续操作
-- (void)KSShowMsg:(NSString *)message promptCompletion:(void(^)(void))promptCompletion;
 @end
 
 

+ 1 - 93
KulexiuForTeacher/KulexiuForTeacher/Common/Base/BaseViewController.m

@@ -6,14 +6,10 @@
 //
 
 #import "BaseViewController.h"
-#import "UIView+Hints.h"
 
-#define PROMPT_TIME  1.5f
 
 @interface BaseViewController ()
-{
-    MBProgressHUD *t_MBProgressHUD;
-}
+
 @end
 
 @implementation BaseViewController
@@ -24,94 +20,6 @@
     self.view.backgroundColor = HexRGB(0xf6f8f9);
 }
 
-// 显示菊花
--(void)showhud {
-    
-    dispatch_async(dispatch_get_main_queue(), ^{
-        
-        if (!self.isHiddenLoadingView) {
-            if (!self.loadingHintsText) {
-                //self.loadingHintsText = @"正在加载...";
-                self.loadingHintsText = @"";
-            }
-            [self removeLoadingView];
-            UIWindow *window = [[UIApplication sharedApplication ] keyWindow];
-            if (!self->t_MBProgressHUD ) {
-                self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:@"加载中..."
-                                                                   Image:nil
-                                                          hideAfterDelay:200.0f
-                                                                 HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;//显示菊花
-                
-            }else{
-                self->t_MBProgressHUD.label.text = self.loadingHintsText;
-                
-                [self->t_MBProgressHUD hideAnimated:YES afterDelay:0.0];
-                self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:nil
-                                                                   Image:nil
-                                                          hideAfterDelay:200.0f
-                                                                 HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;//显示菊花
-                
-            }
-            [self.view bringSubviewToFront:self->t_MBProgressHUD];
-        }
-        
-    });
-    
-}
-
-// 关闭菊花
-- (void)removehub {
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self removeLoadingView];
-    });
-}
-
--(void)removeLoadingView
-{
-    if (t_MBProgressHUD) {
-        [t_MBProgressHUD removeFromSuperview];
-    }
-    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-}
-
-- (void)MBPShow:(NSString*)str{
-    dispatch_main_async_safe(^{
-        [MBProgressHUD hideHUD];
-        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-        hud.removeFromSuperViewOnHide =YES;
-        hud.mode = MBProgressHUDModeText;
-        hud.label.text = str;
-        hud.label.numberOfLines = 0;
-        hud.minSize = CGSizeMake(132.f, 60.0f);
-        hud.label.textColor = [UIColor whiteColor];
-        hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-        hud.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-        double hiddenTime = str.length > 15 ? 3.0f : 1.5f;
-        [hud hideAnimated:YES afterDelay:hiddenTime];
-    })
-}
-
-
-- (void)KSShowMsg:(NSString *)message promptCompletion:(void (^)(void))promptCompletion {
-    [MBProgressHUD hideHUD];
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
-    hud.removeFromSuperViewOnHide = YES;
-    hud.mode = MBProgressHUDModeText;
-    hud.label.text = message;
-    hud.label.numberOfLines = 0;
-    hud.label.textColor = [UIColor whiteColor];
-    hud.minSize = CGSizeMake(132.0f, 40.0f);
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8);
-    [hud hideAnimated:YES afterDelay:PROMPT_TIME];
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(PROMPT_TIME * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        promptCompletion();
-    });
-}
 /*
 #pragma mark - Navigation
 

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m

@@ -713,7 +713,7 @@
                     }
                 }
                 else {
-                    [self MBShowInWindow:@"当前曲目无mp3伴奏"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"当前曲目无mp3伴奏"];
                     [self configVideoRecord:nil];
                 }
             }
@@ -726,11 +726,11 @@
 }
 
 - (void)downloadUrl:(NSString *)url success:(void(^)(void))success faliure:(void(^)(void))faliure {
-//    [self showhud];
+//    [LOADING_MANAGER showHUD];
     [KSNetworkingManager downloadFileRequestWithFileUrl:url progress:^(int64_t bytesRead, int64_t totalBytes) {
         
     } success:^(NSURL * _Nonnull fileUrl) {
-//        [self removehub];
+//        [LOADING_MANAGER removeHUD];
         if ([self saveAccompanyFileWithUrl:fileUrl accompanyUrl:url]) {
             success();
         }
@@ -770,11 +770,11 @@
 }
 
 - (void)downloadMidiFile:(NSString *)midiUrl success:(void(^)(void))success faliure:(void(^)(void))faliure {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager downloadFileRequestWithFileUrl:midiUrl progress:^(int64_t bytesRead, int64_t totalBytes) {
         
     } success:^(NSURL * _Nonnull fileUrl) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([self saveMidiFileWithUrl:fileUrl midiUrl:midiUrl]) {
             success();
         }
@@ -1040,7 +1040,7 @@
             }
             else {
                 if (![NSString isEmptyString:message]) {
-                    [weakSelf MBPShow:message];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
                 }
                 
             }
@@ -1050,7 +1050,7 @@
 }
 
 - (void)showSuccessMessage:(NSString *)message {
-    [self MBPShow:message];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
     // 成功
     if (self.endRecordParm) {
         [self postMessage:self.endRecordParm];

+ 0 - 6
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.h

@@ -55,13 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
 -(UIImage *)imageCompressForSize:(UIImage *)sourceImage targetSize:(CGSize)size;
 -(BOOL) isConnectionAvailable;
 
--(void)MBPShow:(NSString*)str;
-- (void)MBShowInWindow:(NSString *)str;
-// 提示后续操作
-- (void)KSShowMsg:(NSString *)message promptCompletion:(void(^)(void))promptCompletion;
 
--(void)showhud;
--(void)showhudWithText:(NSString *)text;
 -(void)removehub;
 - (void)backAction; // 返回
 -(void)allocTitle:(NSString*)Ntitle withColor:(UIColor *)color;

+ 3 - 145
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.m

@@ -48,12 +48,8 @@
     _scrollView.showsHorizontalScrollIndicator = NO;
     _scrollView.showsVerticalScrollIndicator = NO;
     
-    if (@available(iOS 11.0, *)) {
-        self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
-    } else {
-        // Fallback on earlier versions
-        self.automaticallyAdjustsScrollViewInsets = NO;
-    }
+    self.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+
     
     if (self.navigationController && self != self.navigationController.viewControllers[0]) {
         
@@ -317,134 +313,6 @@
     return isExistenceNetwork;
 }
 
--(void)MBPShow:(NSString*)str {
-    [MBProgressHUD hideHUD];
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    hud.removeFromSuperViewOnHide =YES;
-    hud.mode = MBProgressHUDModeText;
-    hud.label.text = str;
-    hud.label.numberOfLines = 0;
-    hud.minSize = CGSizeMake(132.f, 60.0f);
-    hud.label.textColor = [UIColor whiteColor];
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-    double hiddenTime = str.length > 15 ? 3.0f : 1.5f;
-    [hud hideAnimated:YES afterDelay:hiddenTime];
-}
-
-- (void)MBShowInWindow:(NSString *)str {
-    
-    [MBProgressHUD hideHUD];
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
-    hud.removeFromSuperViewOnHide =YES;
-    hud.mode = MBProgressHUDModeText;
-    hud.label.text = str;
-    hud.label.numberOfLines = 0;
-    hud.minSize = CGSizeMake(132.f, 60.0f);
-    hud.label.textColor = [UIColor whiteColor];
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-    double hiddenTime = str.length > 15 ? 3.0f : 1.5f;
-    [hud hideAnimated:YES afterDelay:hiddenTime];
-}
-
-- (void)KSShowMsg:(NSString *)message promptCompletion:(void (^)(void))promptCompletion {
-    [MBProgressHUD hideHUD];
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
-    hud.removeFromSuperViewOnHide = YES;
-    hud.mode = MBProgressHUDModeText;
-    hud.label.text = message;
-    hud.label.numberOfLines = 0;
-    hud.label.textColor = [UIColor whiteColor];
-    hud.minSize = CGSizeMake(132.0f, 40.0f);
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8);
-    [hud hideAnimated:YES afterDelay:PROMPT_TIME];
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(PROMPT_TIME * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        promptCompletion();
-    });
-}
-- (void)showhudWithText:(NSString *)text{
-    dispatch_main_async_safe(^{
-        if (!self.isHiddenLoadingView) {
-            if (!self.loadingHintsText) {
-                //self.loadingHintsText = @"正在加载...";
-                self.loadingHintsText = text;
-            }
-            [self removeLoadingView];
-            
-            if (!self->t_MBProgressHUD ) {
-                self->t_MBProgressHUD = [self.view addHUDActivityViewToView:nil
-                                                            HintsText:text
-                                                                Image:nil
-                                                       hideAfterDelay:120.0f
-                                                              HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;
-                
-            }else{
-                self->t_MBProgressHUD.label.text = self.loadingHintsText;
-                
-                [self->t_MBProgressHUD hideAnimated:YES afterDelay:0.0];
-                self->t_MBProgressHUD = [self.view addHUDActivityViewToView:nil
-                                                            HintsText:text
-                                                                Image:nil
-                                                       hideAfterDelay:120.0f
-                                                              HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;
-            }
-        }
-    });
-}
-
-// 显示菊花
--(void)showhud {
-    dispatch_main_async_safe(^{
-        if (!self.isHiddenLoadingView) {
-            if (!self.loadingHintsText) {
-                //self.loadingHintsText = @"正在加载...";
-                self.loadingHintsText = @"";
-            }
-            [self removeLoadingView];
-            UIWindow *window = [[UIApplication sharedApplication ] keyWindow];
-            if (!self->t_MBProgressHUD ) {
-                self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:@"加载中..."
-                                                                   Image:nil
-                                                          hideAfterDelay:15.0f
-                                                                 HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;//显示菊花
-                
-            }else{
-                self->t_MBProgressHUD.label.text = self.loadingHintsText;
-                
-                [self->t_MBProgressHUD hideAnimated:YES afterDelay:0.0];
-                self->t_MBProgressHUD = [window addHUDActivityViewToView:nil
-                                                               HintsText:@"加载中..."
-                                                                   Image:nil
-                                                          hideAfterDelay:15.0f
-                                                                 HaveDim:NO];
-                self->t_MBProgressHUD.mode = MBProgressHUDModeIndeterminate;//显示菊花
-                
-            }
-            [self.view bringSubviewToFront:self->t_MBProgressHUD];
-        }
-    });
-}
-
-// 关闭菊花
--(void)removehub{
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self removeLoadingView];
-    });
-}
-
--(void)removeLoadingView {
-    if (t_MBProgressHUD) {
-        [t_MBProgressHUD removeFromSuperview];
-    }
-    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-}
-
 //打电话
 - (void)CallPhoneWith:(NSString*)phoneNumber {
     phoneNumber = [phoneNumber replaceAll:@" " WithString:@""];
@@ -509,17 +377,7 @@
     if (token.length == 0 || token == nil) { // 未登录
         _isLogin = NO;
         if (toLogin) { // 需要去登录页面
-            MJWeakSelf;
-            [self KSShowMsg:@"请登录后访问" promptCompletion:^{
-                
-                LoginViewController *logonVC = [[LoginViewController alloc] init];
-                CustomNavViewController *navCtrl = [[CustomNavViewController alloc] initWithRootViewController:logonVC];
-                if ([weakSelf isKindOfClass:[HomeViewController class]]) {
-                    logonVC.homeLogin = YES;
-                }
-                navCtrl.modalPresentationStyle = UIModalPresentationFullScreen;
-                [weakSelf presentViewController:navCtrl animated:YES completion:nil];
-            }];
+            
         }
     }
     else { // 登录状态

+ 23 - 21
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -358,9 +358,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [KSNetworkingManager downloadFileRequestWithFileUrl:url progress:^(int64_t bytesRead, int64_t totalBytes) {
 
             } success:^(NSURL * _Nonnull fileUrl) {
-                MJWeakSelf;
-                [self KSShowMsg:@"下载成功" promptCompletion:^{
-                    [weakSelf displaySource:fileUrl];
+                [LOADING_MANAGER KSShowMsg:@"下载成功" promptCompletion:^{
+                    [self displaySource:fileUrl];
                 }];
             } faliure:^(NSError * _Nonnull error) {
 
@@ -445,6 +444,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             backImage = @"back_button_white";
         }
         [self.webBackButton.backButton setImage:[UIImage imageNamed:backImage] forState:UIControlStateNormal];
+        // 是否隐藏按钮
+        BOOL hideButton = [valueDic ks_boolValueForKey:@"backIconHide"];
+        self.webBackButton.hidden = hideButton;
     }
     else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"setBarStatus"]) { // 顶部是否隐藏
         NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
@@ -542,7 +544,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }
         else if ([[valueDic ks_stringValueForKey:@"type"] isEqualToString:@"multi"]) { // 群聊
             if ([NSString isEmptyString:targetId]) {
-                [self MBPShow:@"报名未结束,暂无群组"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
                 return;
             }
             TUIChatConversationModel *model = [[TUIChatConversationModel alloc] init];
@@ -579,7 +581,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [sendParm setValue:content forKey:@"content"];
             [self postMessage:sendParm];
             if ([status isEqualToString:@"1"]) {
-                [self MBPShow:@"为了保证数据安全,请不要录屏"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"为了保证数据安全,请不要录屏"];
             }
         }
     }
@@ -1113,7 +1115,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 }
 
 - (void)uploadImageArray:(NSMutableArray *)imageArray bucket:(NSString *)bucket {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     NSMutableArray *imageDataArray = [NSMutableArray array];
     for (UIImage *image in imageArray) {
         NSData *imgData = [UIImage turnsImaegDataByImage:image];
@@ -1121,7 +1123,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     }
     [[KSUploadManager shareInstance] configBucketName:bucket];
     [[KSUploadManager shareInstance] mutilUploadImage:imageDataArray fileName:@"complainImg" successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         NSMutableArray *urlArray = [NSMutableArray array];
         for (NSString *url in fileUrlArray) {
             [urlArray addObject:url];
@@ -1133,9 +1135,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             self.chooseFileParm = nil;
         }
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if (![NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
         [self fileChooseErrorCallback];
     }];
@@ -1156,7 +1158,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             [self submitUrlWith:imageUrl videoUrl:videoUrl];
         } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
             if (![NSString isEmptyString:descMessaeg]) {
-                [self MBPShow:descMessaeg];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
             }
             [self fileChooseErrorCallback];
         }];
@@ -1186,7 +1188,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
         [self hudTipWillShow:NO];
         if (![NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
         [self videoUploadCallback:@"" firstFrameImg:@""];
     }];
@@ -1243,28 +1245,28 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     
     if (self.fileChooseType == CHOOSETYPE_XML) {
         if (![fileName hasSuffix:@".xml"]) {
-            [self MBPShow:@"请上传XML格式文件"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请上传XML格式文件"];
             [self fileChooseErrorCallback];
             return;
         }
     }
     else if (self.fileChooseType == CHOOSETYPE_MIDI) {
         if (![fileName hasSuffix:@".mid"] || [fileName hasSuffix:@".midi"]) {
-            [self MBPShow:@"请上传mid格式文件"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请上传mid格式文件"];
             [self fileChooseErrorCallback];
             return;
         }
     }
     else if (self.fileChooseType == CHOOSETYPE_MP3) {
         if (![fileName hasSuffix:@".mp3"]) {
-            [self MBPShow:@"请上传mp3格式文件"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请上传mp3格式文件"];
             [self fileChooseErrorCallback];
             return;
         }
     }
     else {
         if (![fileName hasSuffix:@".mp3"] && ![fileName hasSuffix:@".aac"]) {
-            [self MBPShow:@"暂不支持此格式!"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"暂不支持此格式!"];
             [self fileChooseErrorCallback];
             return;
         }
@@ -1285,7 +1287,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
                     fileUrl = pathStr;
                 }
                 else {
-                    [self MBPShow:@"写入文件错误!"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"写入文件错误!"];
                     [self fileChooseErrorCallback];
                 }
             }
@@ -1297,19 +1299,19 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         }];
     }
     else {
-        [self MBPShow:@"iCloud不可用!"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"iCloud不可用!"];
         [self fileChooseErrorCallback];
     }
 }
 
 - (void)uploadFile:(NSString *)fileName fileUrl:(NSString *)fileUrl {
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self showhud];
+        [LOADING_MANAGER showHUD];
         NSString *suffix = [NSString stringWithFormat:@".%@",[[fileName componentsSeparatedByString:@"."] lastObject]];
         NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:fileUrl]];
         [[KSUploadManager shareInstance] configBucketName:self.bucketName];
         [[KSUploadManager shareInstance] uploadFile:fileData fileName:@"file" fileSuffix:suffix successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
             NSString *fileUrl = [fileUrlArray lastObject];
             if (self.chooseFileParm) { // 回调
                 [self.chooseFileParm setValue:fileUrl forKey:@"fileUrl"];
@@ -1317,9 +1319,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
                 self.chooseFileParm = nil;
             }
         } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
             if (![NSString isEmptyString:descMessaeg]) {
-                [self MBPShow:descMessaeg];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
             }
             [self fileChooseErrorCallback];
         }];

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

@@ -39,6 +39,9 @@ NS_ASSUME_NONNULL_BEGIN
 // /api-teacher/getUploadSign
 + (void)getUploadSignRequest:(NSString *)post fileName:(NSString *)fileName keyName:(NSString *)keyName bucketName:(NSString *)bucketName success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// 获取上传签名
+// /open/getUploadSign
++ (void)getTXCosUploadSignRequest:(NSString *)post fileName:(NSString *)fileName keyName:(NSString *)keyName bucketName:(NSString *)bucketName success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 #pragma mark ---- 图片上传
 
 /**

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

@@ -324,6 +324,21 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// 获取上传签名
+// /api-student/getUploadSign
++ (void)getTXCosUploadSignRequest:(NSString *)post fileName:(NSString *)fileName keyName:(NSString *)keyName bucketName:(NSString *)bucketName success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@?pluginName=tencent", hostURL, @"/api-teacher/getUploadSign"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:bucketName forKey:@"bucketName"];
+    [parm setValue:fileName forKey:@"fileName"];
+    [parm setValue:@{@"acl":@"public-read",
+                    @"key" :keyName
+    } forKey:@"postData"];
+    [parm setValue:@[] forKey:@"unknowValueField"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 #pragma mark ---- 图片上传
 /**
  图片上传

+ 6 - 6
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSVideoRecordManager.m

@@ -335,12 +335,12 @@
 
 // 保存到相册
 - (void)saveVideoToAsset:(NSURL *)videoUrl {
-    [MBProgressHUD ksShowHUDWithText:@"视频处理中..."];
+    [LOADING_MANAGER MBShowInWindow:@"视频处理中..."];
     [[TZImageManager manager] saveVideoWithUrl:videoUrl completion:^(PHAsset *asset, NSError *error) {
         if (!error) {
             self.videoAsset = asset;
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
                 if (self.callback) {
                     self.callback(YES, @"保存成功");
                 }
@@ -355,7 +355,7 @@
         }
         else {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
                 if (self.callback) {
                     self.callback(NO, @"保存视频错误");
                 }
@@ -374,11 +374,11 @@
 - (void)uploadRecordVideoSuccess:(void (^)(NSString * _Nonnull))success failure:(void (^)(NSString * _Nonnull))faliure {
     if (self.videoAsset) {
         dispatch_main_async_safe(^{
-            [MBProgressHUD ksShowHUDWithText:@"视频导出中..."];
+            [LOADING_MANAGER MBShowInWindow:@"视频导出中..."];
         });
         [[TZImageManager manager] getVideoOutputPathWithAsset:self.videoAsset presetName:self.presentName success:^(NSString *outputPath) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
             });
             NSLog(@"视频导出到本地完成,沙盒路径为:%@",outputPath);
             NSData *outputData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:outputPath]]; //压缩后的视频
@@ -390,7 +390,7 @@
             
         } failure:^(NSString *errorMessage, NSError *error) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
                 faliure(@"视频导出失败");
             });
             NSLog(@"视频导出失败:%@,error:%@",errorMessage, error);

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/RCConnectionManager.m

@@ -36,7 +36,7 @@
     else if (isNeedJoin && !self.isConnected) {
         dispatch_main_async_safe(^{
 //            NSString *tipsMessage = [NSString isEmptyString:UserDefault(IM_TOKEN)] ? @"无IM token,请重新登录获取" : @"IM未能连接上,请检查您的网络";
-//            [MBProgressHUD ksShowMessage:tipsMessage];
+//            [LOADING_MANAGER MBShowAUTOHidingInWindow:tipsMessage];
             // 失败回调
 //            [[ClassroomService sharedService] joinRoomFailerNotify];
         });
@@ -70,7 +70,7 @@
     else if (status == ConnectionStatus_Unconnected) {
         if (_isNeedShowMessage) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksShowMessage:@"连接断开,请检查您的网络"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"连接断开,请检查您的网络"];
             });
         }
     }

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Define/KSDomain.h

@@ -8,6 +8,8 @@
 #ifndef KSDomain_h
 #define KSDomain_h
 
+#define FILE_DOMAIN (@"klx/")
+
 //#ifdef DEBUG
 // 测试环境
 #define hostURL (@"https://dev.colexiu.com")

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

@@ -23,7 +23,6 @@
 #import "IQKeyboardManager.h"
 #import "UserKeyHeader.h"
 #import "UIView+ShowProgress.h"
-#import "MBProgressHUD+KSShow.h"
 #import "UIControl+ButtonAction.h"
 #import "UIView+KSExtension.h"
 
@@ -37,6 +36,7 @@
 #import "KSUploadManager.h"
 #import "KSHudLoagingManager.h"
 #import "KSLoginManager.h"
+#import "KSHudLoagingManager.h"
 
 #define FIRST_LOGIN_KEY (@"FirstLoginKey")
 

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.h

@@ -0,0 +1,24 @@
+//
+//  KSCustomLoadingView.h
+//  GuanYueTeamTeacher
+//
+//  Created by 王智 on 2023/2/2.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSCustomLoadingView : UIView
+
++ (instancetype)shareInstance;
+
+@property (nonatomic, strong) NSString *displayText;
+
+- (void)showLoadingView;
+
+- (void)hideLoadingView;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 72 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.m

@@ -0,0 +1,72 @@
+//
+//  KSCustomLoadingView.m
+//  GuanYueTeamTeacher
+//
+//  Created by 王智 on 2023/2/2.
+//
+
+#import "KSCustomLoadingView.h"
+#import <Lottie/Lottie.h>
+
+@interface KSCustomLoadingView ()
+
+@property (weak, nonatomic) IBOutlet UIView *containerView;
+
+@property (weak, nonatomic) IBOutlet UILabel *text;
+
+@property (nonatomic, strong) LOTAnimationView *animationView;
+
+@end
+
+@implementation KSCustomLoadingView
+
++ (instancetype)shareInstance {
+    KSCustomLoadingView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSCustomLoadingView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)showLoadingView {
+    UIWindow *windows = [NSObject getKeyWindow];
+    [windows addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(windows);
+    }];
+    [self.containerView addSubview:self.animationView];
+    [self.animationView mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self.containerView);
+    }];
+    [self.animationView play];
+}
+
+- (void)hideLoadingView {
+    if (self.animationView.isAnimationPlaying) {
+        [self.animationView stop];
+    }
+    [self removeFromSuperview];
+}
+
+- (LOTAnimationView *)animationView {
+    if (!_animationView) {
+        _animationView = [LOTAnimationView animationNamed:@"student_refresh"];
+        _animationView.contentMode = UIViewContentModeScaleAspectFill;
+        _animationView.animationSpeed = 1.0;
+        _animationView.loopAnimation = YES;
+    }
+    return _animationView;
+}
+
+- (void)setDisplayText:(NSString *)displayText {
+    _displayText = displayText;
+    self.text.text = displayText;
+}
+
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 65 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSCustomLoadingView.xib

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSCustomLoadingView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ftd-2r-orp">
+                    <rect key="frame" x="146.66666666666666" y="376" width="100" height="100"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上传中..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jQZ-bq-s4l">
+                            <rect key="frame" x="26" y="70" width="48" height="15"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2VA-sp-63Q">
+                            <rect key="frame" x="22.333333333333343" y="5" width="55" height="55"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="55" id="OwV-lo-Zdb"/>
+                                <constraint firstAttribute="height" constant="55" id="zdG-5h-LwF"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="2VA-sp-63Q" firstAttribute="centerX" secondItem="Ftd-2r-orp" secondAttribute="centerX" id="2dh-Xz-2yj"/>
+                        <constraint firstAttribute="height" constant="100" id="7LV-ix-8dR"/>
+                        <constraint firstItem="jQZ-bq-s4l" firstAttribute="centerX" secondItem="Ftd-2r-orp" secondAttribute="centerX" id="BZp-te-gfI"/>
+                        <constraint firstAttribute="width" constant="100" id="E8b-Gp-LDR"/>
+                        <constraint firstItem="2VA-sp-63Q" firstAttribute="top" secondItem="Ftd-2r-orp" secondAttribute="top" constant="5" id="aS3-r0-aMu"/>
+                        <constraint firstItem="jQZ-bq-s4l" firstAttribute="top" secondItem="2VA-sp-63Q" secondAttribute="bottom" constant="10" id="lLr-cs-u9n"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstItem="Ftd-2r-orp" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="TgS-11-bcY"/>
+                <constraint firstItem="Ftd-2r-orp" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="al5-ls-aaQ"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="containerView" destination="2VA-sp-63Q" id="NBh-da-mnS"/>
+                <outlet property="text" destination="jQZ-bq-s4l" id="Dnm-NR-TwV"/>
+            </connections>
+            <point key="canvasLocation" x="100" y="-12.67605633802817"/>
+        </view>
+    </objects>
+</document>

+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSHudLoagingManager.h → KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.h


+ 35 - 29
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSHudLoagingManager.m → KulexiuForTeacher/KulexiuForTeacher/Common/LoadingManager/KSHudLoagingManager.m

@@ -44,12 +44,13 @@
 }
 
 - (void)removeHUD {
-    dispatch_delay_block(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC), ^{
+    dispatch_main_async_safe(^{
         [self removeLoadingView];
     });
 }
 
 - (void)removeLoadingView {
+    
     if (self.HUD) {
         [self.HUD removeFromSuperview];
     }
@@ -61,20 +62,22 @@
 }
 
 - (void)showHud:(NSString *)str inView:(UIView *)displayView autoHide:(BOOL)autoHide {
-    [self removeLoadingView];
-    self.HUD = [MBProgressHUD showHUDAddedTo:displayView animated:YES];
-    self.HUD.removeFromSuperViewOnHide =YES;
-    self.HUD.mode = MBProgressHUDModeText;
-    self.HUD.label.text = str;
-    self.HUD.label.numberOfLines = 0;
-    self.HUD.minSize = CGSizeMake(132.f, 60.0f);
-    self.HUD.label.textColor = [UIColor whiteColor];
-    self.HUD.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    self.HUD.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8f);
-    if (autoHide) {
-        double hiddenTime = str.length > 15 ? 3.0f : 1.5f;
-        [self.HUD hideAnimated:YES afterDelay:hiddenTime];
-    }
+    dispatch_main_async_safe(^{
+        [self removeLoadingView];
+        self.HUD = [MBProgressHUD showHUDAddedTo:displayView animated:YES];
+        self.HUD.removeFromSuperViewOnHide =YES;
+        self.HUD.mode = MBProgressHUDModeText;
+        self.HUD.label.text = str;
+        self.HUD.label.numberOfLines = 0;
+        self.HUD.minSize = CGSizeMake(132.f, 60.0f);
+        self.HUD.label.textColor = [UIColor whiteColor];
+        self.HUD.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
+        self.HUD.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8f);
+        if (autoHide) {
+            double hiddenTime = str.length > 15 ? 3.0f : 1.5f;
+            [self.HUD hideAnimated:YES afterDelay:hiddenTime];
+        }
+    });
 }
 
 
@@ -92,21 +95,24 @@
 }
 
 - (void)KSShowMsg:(NSString *)message inView:(UIView *)displayView promptCompletion:(void (^)(void))promptCompletion {
-    [self removeLoadingView];
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:displayView animated:YES];
-    hud.removeFromSuperViewOnHide = YES;
-    hud.mode = MBProgressHUDModeText;
-    hud.label.text = message;
-    hud.label.numberOfLines = 0;
-    hud.label.textColor = [UIColor whiteColor];
-    hud.minSize = CGSizeMake(132.0f, 40.0f);
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8);
-    [hud hideAnimated:YES afterDelay:PROMPT_TIME];
-    
-    dispatch_delay_block(DISPATCH_TIME_NOW, (int64_t)(PROMPT_TIME * NSEC_PER_SEC), ^{
-        promptCompletion();
+    dispatch_main_async_safe(^{
+        [self removeLoadingView];
+        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:displayView animated:YES];
+        hud.removeFromSuperViewOnHide = YES;
+        hud.mode = MBProgressHUDModeText;
+        hud.label.text = message;
+        hud.label.numberOfLines = 0;
+        hud.label.textColor = [UIColor whiteColor];
+        hud.minSize = CGSizeMake(132.0f, 40.0f);
+        hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
+        hud.bezelView.backgroundColor = HexRGBAlpha(0x000000, 0.8);
+        [hud hideAnimated:YES afterDelay:PROMPT_TIME];
+        
+        dispatch_delay_block(DISPATCH_TIME_NOW, (int64_t)(PROMPT_TIME * NSEC_PER_SEC), ^{
+            promptCompletion();
+        });
     });
+    
 }
 
 @end

+ 9 - 9
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSMediaManager.m

@@ -178,7 +178,7 @@
     [imagePickerVc setDidFinishPickingVideoHandle:^(UIImage *coverImage, PHAsset *asset) {
         if (asset.duration >= 481) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksShowMessage:@"视频长度不能超过8分钟"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频长度不能超过8分钟"];
             });
             return;
         }
@@ -188,13 +188,13 @@
 //
 //        NSLog(@"原视频大小:%@",[NSString stringWithFormat:@"%.2fM",(CGFloat)size/(1024*1024)]);
         dispatch_main_sync_safe(^{
-            [MBProgressHUD ksShowHUDWithText:@"视频导出中..."];
+            [LOADING_MANAGER MBShowInWindow:@"视频导出中..."];
         });
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             
             [[TZImageManager manager] getVideoOutputPathWithAsset:asset presetName:self.presentName success:^(NSString *outputPath) {
                 dispatch_main_sync_safe(^{
-                    [MBProgressHUD ksHideHUD];
+                    [LOADING_MANAGER removeHUD];
                 });
                 NSLog(@"视频导出到本地完成,沙盒路径为:%@",outputPath);
                 NSData *outputData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:outputPath]]; //压缩后的视频
@@ -209,8 +209,8 @@
                 
             } failure:^(NSString *errorMessage, NSError *error) {
                 dispatch_main_sync_safe(^{
-                    [MBProgressHUD ksHideHUD];
-                    [MBProgressHUD ksShowMessage:@"视频导出失败"];
+                    [LOADING_MANAGER removeHUD];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频导出失败"];
                 });
                 NSLog(@"视频导出失败:%@,error:%@",errorMessage, error);
             }];
@@ -355,12 +355,12 @@
                 [tzImagePickerVc hideProgressHUD];
                 if (!error) {
                     dispatch_main_async_safe(^{
-                        [MBProgressHUD ksShowHUDWithText:@"视频处理中..."];
+                        [LOADING_MANAGER MBShowInWindow:@"视频处理中..."];
                     });
                     [[TZImageManager manager] getVideoOutputPathWithAsset:asset presetName:self.presentName success:^(NSString *outputPath) {
                         // NSData *data = [NSData dataWithContentsOfFile:outputPath];
                         dispatch_main_async_safe(^{
-                            [MBProgressHUD ksHideHUD];
+                            [LOADING_MANAGER removeHUD];
                         });
                         NSLog(@"视频导出到本地完成,沙盒路径为:%@",outputPath);
                         // Export completed, send video here, send by outputPath or NSData
@@ -375,8 +375,8 @@
                         
                     } failure:^(NSString *errorMessage, NSError *error) {
                         dispatch_main_async_safe(^{
-                            [MBProgressHUD ksHideHUD];
-                            [MBProgressHUD ksShowMessage:@"视频导出失败"];
+                            [LOADING_MANAGER removeHUD];
+                            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频导出失败"];
                         });
                         
                         NSLog(@"视频导出失败:%@,error:%@",errorMessage, error);

+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSChoosePicker.h → KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSChoosePicker.h


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSChoosePicker.m → KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSChoosePicker.m


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSFullDatePicker.h → KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSFullDatePicker.h


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSFullDatePicker.m → KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSFullDatePicker.m


+ 23 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSSmallChoosePicker.h

@@ -0,0 +1,23 @@
+//
+//  KSSmallChoosePicker.h
+//  GuanYueTeamManager
+//
+//  Created by 王智 on 2023/2/16.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^SmallPickerChooseCallback)(NSString * _Nonnull returnValue, NSInteger chooseIndex);
+typedef void(^SmallPickerCancelCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSSmallChoosePicker : UIView
+
+- (instancetype)initWithTitle:(NSString * __nullable)title sourceData:(NSArray *)sourceData lastChoose:(NSInteger)chooseIndex chooseReturnWithBlock:(SmallPickerChooseCallback)callback cancel:(SmallPickerCancelCallback)cancelCallback;
+
+- (void)showPicker;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 208 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/KSSmallChoosePicker.m

@@ -0,0 +1,208 @@
+//
+//  KSSmallChoosePicker.m
+//  GuanYueTeamManager
+//
+//  Created by 王智 on 2023/2/16.
+//
+
+#import "KSSmallChoosePicker.h"
+#import "SmallPickerCell.h"
+
+#define ROW_HEIGHT (60.0f)
+
+@interface KSSmallChoosePicker ()<UITableViewDelegate, UITableViewDataSource,UIGestureRecognizerDelegate>
+
+@property (nonatomic, strong) UIView *backView; // 背景图
+@property (nonatomic, strong) UIView *displayView;
+@property (nonatomic, strong) UIView *contentView;
+@property (nonatomic, strong) NSArray *sourceData;
+
+@property (nonatomic, strong) UITableView *tableView;
+
+@property (nonatomic, copy) SmallPickerChooseCallback callback;
+@property (nonatomic, copy) SmallPickerCancelCallback cancelCallback;
+@property (nonatomic, assign) NSInteger chooseIndex;
+
+@property (nonatomic, strong) UIView *bottomView;
+
+@property (nonatomic, assign) CGFloat displayViewHeight;
+
+@property (nonatomic, assign) NSInteger lastChooseIndex;
+
+@end
+
+@implementation KSSmallChoosePicker
+
+- (instancetype)initWithTitle:(NSString * __nullable)title sourceData:(NSArray *)sourceData lastChoose:(NSInteger)chooseIndex chooseReturnWithBlock:(SmallPickerChooseCallback)callback cancel:(SmallPickerCancelCallback)cancelCallback {
+    if (self = [super init]) {
+        if (callback) {
+            self.callback = callback;
+        }
+        if (cancelCallback) {
+            self.cancelCallback = cancelCallback;
+        }
+        self.lastChooseIndex = chooseIndex;
+        self.sourceData = sourceData;
+        self.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight);
+        self.backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, KPortraitHeight)];
+        self.backView.backgroundColor = HexRGBAlpha(0x000000, 0.6f);
+        [self addSubview:_backView];
+        
+        UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
+        tapGesture.delegate = self;
+        [self.backView addGestureRecognizer:tapGesture];
+        
+        CGFloat headHeight = 50;
+        CGFloat bottomViewHeight = 44 + 10 + iPhoneXSafeBottomMargin;
+        CGFloat contentTableHeight = ROW_HEIGHT * sourceData.count;
+        self.displayViewHeight = bottomViewHeight + contentTableHeight + headHeight;
+        self.displayView = [[UIView alloc] initWithFrame:CGRectMake(0, KPortraitHeight, KPortraitWidth, self.displayViewHeight)];
+        self.displayView.backgroundColor = [UIColor whiteColor];
+        [self.backView addSubview:self.displayView];
+        
+        self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, self.displayViewHeight - bottomViewHeight, KPortraitWidth, bottomViewHeight)];
+        [self.displayView addSubview:self.bottomView];
+        UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(13, 0, KPortraitWidth - 13 * 2, 1)];
+        lineView.backgroundColor = HexRGB(0xf2f2f2);
+        [self.bottomView addSubview:lineView];
+        UIButton *cancleButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        cancleButton.frame = CGRectMake(0, 1, KPortraitWidth, 44);
+        cancleButton.backgroundColor = [UIColor clearColor];
+        [cancleButton.titleLabel setFont:[UIFont systemFontOfSize:16.0f]];
+        [cancleButton setTitle:@"取消" forState:UIControlStateNormal];
+        [cancleButton setTitleColor:HexRGB(0xAAAAAA) forState:UIControlStateNormal];
+        [cancleButton addTarget:self action:@selector(cancleAction) forControlEvents:UIControlEventTouchUpInside];
+        [self.bottomView addSubview:cancleButton];
+        
+        
+        
+        UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, headHeight)];
+        headView.backgroundColor = [UIColor clearColor];
+        [self.displayView addSubview:headView];
+        UIView *headLine = [[UIView alloc] initWithFrame:CGRectMake(13, headHeight - 1, KPortraitWidth - 13 * 2, 1)];
+        headLine.backgroundColor = HexRGB(0xf2f2f2);
+        [headView addSubview:headLine];
+        UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 14, KPortraitWidth, 22)];
+        titleLabel.textAlignment = NSTextAlignmentCenter;
+        titleLabel.text = [NSString returnNoNullStringWithString:title];
+        [titleLabel setFont:[UIFont systemFontOfSize:14.0f]];
+        [titleLabel setTextColor:HexRGB(0x777777)];
+        [headView addSubview:titleLabel];
+        
+        [self.displayView addSubview:self.tableView];
+        self.tableView.frame = CGRectMake(0, 50, KPortraitWidth, contentTableHeight);
+        self.displayView.layer.masksToBounds = YES;
+        
+        if (@available(iOS 11.0, *)) {
+            self.displayView.layer.cornerRadius = 10;
+            self.displayView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // 左上圆角
+        }
+        else {
+            UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:self.displayView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
+            CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
+            maskLayer.frame = self.displayView.bounds;
+            maskLayer.path = path.CGPath;
+            self.displayView.layer.mask = maskLayer;
+        }
+        
+        [UIView animateWithDuration:0.3f animations:^{
+            self.displayView.frame = CGRectMake(0, kScreenHeight - self.displayViewHeight, kScreenWidth, self.displayViewHeight);
+        } completion:^(BOOL finished) {
+            
+        }];
+    }
+    return self;
+}
+
+
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
+    if ([touch.view isDescendantOfView:self.displayView]) {
+        return NO;
+    }
+    return YES;
+}
+
+- (void)showPicker {
+    UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+    [window addSubview:self];
+}
+
+
+- (void)tapAction:(UITapGestureRecognizer *)gesture {
+    [self cancleAction];
+}
+
+- (void)cancleAction {
+    if (self.cancelCallback) {
+        self.cancelCallback();
+    }
+    [UIView animateWithDuration:0.3f animations:^{
+        self.displayView.frame = CGRectMake(0, kScreenHeight, kScreenWidth, 266);
+    } completion:^(BOOL finished) {
+        [self removeFromSuperview];
+    }];
+}
+
+#pragma mark ---- table data source
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.sourceData.count;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return ROW_HEIGHT;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    SmallPickerCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SmallPickerCell"];
+    NSString *titleMessage = self.sourceData[indexPath.row];
+    [cell configCellTitle:titleMessage];
+    if (indexPath.row == self.lastChooseIndex - 1) {
+        cell.chooseStatus = YES;
+    }
+    else {
+        cell.chooseStatus = NO;
+    }
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSString *titleMessage = self.sourceData[indexPath.row];
+    SmallPickerCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+    cell.chooseStatus = YES;
+    self.lastChooseIndex = indexPath.row+1;
+    [self.tableView reloadData];
+    
+    if (self.callback) {
+        self.callback(titleMessage, indexPath.row+1);
+    }
+    [UIView animateWithDuration:0.3f animations:^{
+        self.displayView.frame = CGRectMake(0, kScreenHeight, kScreenWidth, 266);
+    } completion:^(BOOL finished) {
+        [self removeFromSuperview];
+    }];
+}
+
+- (UITableView *)tableView {
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        _tableView.backgroundColor = [UIColor clearColor];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        _tableView.showsVerticalScrollIndicator = NO;
+        [_tableView registerNib:[UINib nibWithNibName:@"SmallPickerCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"SmallPickerCell"];
+    }
+    return _tableView;
+}
+
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.h

@@ -0,0 +1,20 @@
+//
+//  SmallPickerCell.h
+//  GuanYueTeamManager
+//
+//  Created by 王智 on 2023/2/16.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SmallPickerCell : UITableViewCell
+
+@property (nonatomic, assign) BOOL chooseStatus;
+
+- (void)configCellTitle:(NSString *)title;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 46 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.m

@@ -0,0 +1,46 @@
+//
+//  SmallPickerCell.m
+//  GuanYueTeamManager
+//
+//  Created by 王智 on 2023/2/16.
+//
+
+#import "SmallPickerCell.h"
+
+@interface SmallPickerCell ()
+@property (weak, nonatomic) IBOutlet UILabel *headTitle;
+@property (weak, nonatomic) IBOutlet UIView *bgColorView;
+
+@end
+
+@implementation SmallPickerCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+}
+
+- (void)configCellTitle:(NSString *)title {
+    self.headTitle.text = [NSString returnNoNullStringWithString:title];
+}
+
+- (void)setChooseStatus:(BOOL)chooseStatus {
+    _chooseStatus = chooseStatus;
+    if (chooseStatus) {
+        self.bgColorView.hidden = NO;
+        self.headTitle.textColor = THEMECOLOR;
+    }
+    else {
+        self.bgColorView.hidden = YES;
+        self.headTitle.textColor = HexRGB(0x131415);
+    }
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 61 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/PickerView/SmallPickerCell.xib

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="90" id="KGk-i7-Jjw" customClass="SmallPickerCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="52"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="52"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Zz-Ui-8LY">
+                        <rect key="frame" x="13" y="3" width="294" height="46"/>
+                        <color key="backgroundColor" red="0.96470588235294119" green="0.96470588235294119" blue="0.96470588235294119" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="46" id="sEz-KK-2WF"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="10"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="完成" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5JJ-cX-tgS">
+                        <rect key="frame" x="15" y="15" width="290" height="22"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="22" id="hV3-y3-PYO"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                        <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="5JJ-cX-tgS" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="GhA-JW-GFM"/>
+                    <constraint firstItem="3Zz-Ui-8LY" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Nd2-wi-59O"/>
+                    <constraint firstAttribute="trailing" secondItem="3Zz-Ui-8LY" secondAttribute="trailing" constant="13" id="OxX-ET-8sx"/>
+                    <constraint firstItem="5JJ-cX-tgS" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="PQ5-zZ-NYW"/>
+                    <constraint firstAttribute="trailing" secondItem="5JJ-cX-tgS" secondAttribute="trailing" constant="15" id="Xp0-Wb-hqq"/>
+                    <constraint firstItem="3Zz-Ui-8LY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="13" id="cJg-pr-JPM"/>
+                    <constraint firstItem="5JJ-cX-tgS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="gjX-nQ-btU"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <connections>
+                <outlet property="bgColorView" destination="3Zz-Ui-8LY" id="9G7-P1-XFG"/>
+                <outlet property="headTitle" destination="5JJ-cX-tgS" id="2xx-Fp-rlc"/>
+            </connections>
+            <point key="canvasLocation" x="71.755725190839698" y="3.5211267605633805"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 172 - 186
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m

@@ -8,8 +8,9 @@
 #import "KSUploadManager.h"
 #import <KS3YunSDK.h>
 #import "NSDate+Extension.h"
+#import <QCloudCOSXML/QCloudCOSXMLTransfer.h>
 
-@interface KSUploadManager ()<KingSoftServiceRequestDelegate>
+@interface KSUploadManager ()<KingSoftServiceRequestDelegate,QCloudSignatureProvider>
 
 @property (nonatomic, copy) KSUploadSuccess successCallback;
 
@@ -30,6 +31,13 @@
 // bucket
 @property (nonatomic, strong) NSString *bucketName;
 
+
+// 腾讯cos bucket name
+@property (nonatomic, strong) NSString *cosBucketName;
+
+
+@property (nonatomic, strong) NSString *cosFileName;
+
 @end
 
 @implementation KSUploadManager
@@ -39,16 +47,32 @@
     dispatch_once(&onceToken, ^{
         manager = [[KSUploadManager alloc] init];
         [manager configCilentBucket];
+        [manager configTXCloud];
     });
     return manager;
 }
 
+- (void)configTXCloud {
+    QCloudServiceConfiguration *configuration = [QCloudServiceConfiguration new];
+    QCloudCOSXMLEndPoint *endpoint = [[QCloudCOSXMLEndPoint alloc] init];
+    endpoint.regionName = @"ap-nanjing";
+    // 适使用HTTPS
+    endpoint.useHTTPS = YES;
+    configuration.endpoint = endpoint;
+    configuration.signatureProvider = self;
+    
+    // 初始化 cos 服务实例
+    [QCloudCOSXMLService registerDefaultCOSXMLWithConfiguration:configuration];
+    [QCloudCOSTransferMangerService registerDefaultCOSTransferMangerWithConfiguration:configuration];
+}
+
 // 默认配置
 - (void)configCilentBucket {
     self.bucketName = @"daya";
     self.uploadBucket = @"daya.ks3-cn-beijing.ksyuncs.com";
     self.receiveBucket = @"daya.ks3-cn-beijing.ksyuncs.com";
     [[KS3Client initialize] setBucketDomain:self.uploadBucket];
+    self.cosBucketName = @"daya-online-1303457149";
 }
 
 - (void)configBucketName:(NSString *)bucketName {
@@ -80,50 +104,19 @@
         self.faliureCallback = faliure;
     }
     NSString *folderString = [self getDayFolder];
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,[UIImage typeForImageData:imageData]];
-    NSString *keyValue = uploadFileName;
-    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
-            [acl setContronAccess:KingSoftYun_Permission_Public_Read];
-            
-            KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
-            // token
-            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
-            putObjRequest.filename = uploadFileName;
-            putObjRequest.data = imageData;
-            [putObjRequest setCompleteRequest];
-             
-            KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
-            if (response.httpStatusCode == 200) {
-                if (response.error == nil) {
-                    if (self.successCallback) {
-                        NSMutableArray *fileUrlArray = [NSMutableArray array];
-                        [fileUrlArray addObject:[NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName]];
-                        self.successCallback(fileUrlArray);
-                    }
-                }
-                else {
-                    if (self.faliureCallback) {
-                        self.faliureCallback(response.error, @"上传文件失败");
-                    }
-                }
-            }
-            else {
-                NSLog(@"Set object acl error: %@", response.error.description);
-                if (self.faliureCallback) {
-                    self.faliureCallback(response.error, @"上传文件失败");
-                }
-            }
-        }
-        else {
-            if (self.faliureCallback) {
-                self.faliureCallback(nil, MESSAGEKEY);
-            }
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@_%@%@%@",FILE_DOMAIN,folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,[UIImage typeForImageData:imageData]];
+    
+    [self uploadFileToOssWithSource:uploadFileName fileData:imageData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        
+    } successCallback:^(NSString *fileUrl) {
+        NSMutableArray *fileUrlArray = [NSMutableArray array];
+        [fileUrlArray addObject:fileUrl];
+        if (self.successCallback) {
+            self.successCallback(fileUrlArray);
         }
-    } faliure:^(NSError * _Nonnull error) {
+    } faliure:^{
         if (self.faliureCallback) {
-            self.faliureCallback(error, @"获取文件签名失败");
+            self.faliureCallback(nil, @"上传文件失败");
         }
     }];
 }
@@ -137,92 +130,71 @@
     }
     
     NSString *folderString = [self getDayFolder];
-    
     NSMutableArray *fileNameArray = [NSMutableArray array];
     if (fileDataArray.count > 1) {
         for (NSInteger i = 0 ; i < fileDataArray.count; i++) {
             NSData *fileData = fileDataArray[i];
-            NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%zd%@",folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,i,[UIImage typeForImageData:fileData]];
+            NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@_%@%@%zd%@",FILE_DOMAIN,folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,i,[UIImage typeForImageData:fileData]];
             [fileNameArray addObject:uploadFileName];
         }
     }
     else {
         NSData *fileData = fileDataArray[0];
-        NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,[UIImage typeForImageData:fileData]];
+        NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@_%@%@%@",FILE_DOMAIN,folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey), fileName,[UIImage typeForImageData:fileData]];
         [fileNameArray addObject:uploadFileName];
     }
+    [self MutilUploadFile:fileNameArray fileDataArray:fileDataArray successArray:[NSMutableArray array] failArray:[NSMutableArray array] fileIndex:0];
     
-    __block NSMutableArray *sessions = [NSMutableArray array];
-    __block NSMutableArray *responses = [NSMutableArray array];
-    __block NSMutableArray *failResponse = [NSMutableArray array];
-    
-    dispatch_group_t uploadGroup = dispatch_group_create();
-    NSInteger count = fileDataArray.count;
-    for (int i = 0; i < count; i++) {
-        
-        dispatch_group_enter(uploadGroup);
-        NSString *uploadFileName = fileNameArray[i];
-        NSString *keyName = fileNameArray[i];
-        NSData *fileData = fileDataArray[i];
-        [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyName bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
-                [acl setContronAccess:KingSoftYun_Permission_Public_Read];
-                
-                KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
-                if (putObjRequest) {
-                    [sessions addObject:putObjRequest];
-                }
-                // token
-                [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
-                putObjRequest.filename = uploadFileName;
-                putObjRequest.data = fileData;
-                [putObjRequest setCompleteRequest];
-                KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
-                if (response.httpStatusCode == 200) {
-                    if (response.error == nil) {
-                        [responses addObject:[NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName]];
-                    }
-                    else {
-                        NSString *desc = [NSString stringWithFormat:@"第%d次上传文件失败",i];
-                        [failResponse addObject:desc];
-                    }
-                    [sessions removeObject:putObjRequest];
-                }
-                else {
-                    NSLog(@"Set object acl error: %@", response.error.description);
-                    NSString *desc = [NSString stringWithFormat:@"第%d次上传文件失败",i];
-                    [failResponse addObject:desc];
-                    [sessions removeObject:putObjRequest];
-                }
-            }
-            else {
-                [failResponse addObject:MESSAGEKEY];
-            }
-            dispatch_group_leave(uploadGroup);
-        } faliure:^(NSError * _Nonnull error) {
-            NSError *Error = [NSError errorWithDomain:@"getUploadSign" code:-999 userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat:@"第%d次获取签名失败",i]}];
-            [failResponse addObject:Error];
-            dispatch_group_leave(uploadGroup);
-        }];
+}
+
+- (void)MutilUploadFile:(NSMutableArray *)fileNameArray fileDataArray:(NSMutableArray *)fileDataArray successArray:(NSMutableArray *)successArray failArray:(NSMutableArray *)failArray fileIndex:(NSInteger)fileIndex {
+    if (fileIndex >= fileNameArray.count) {
+        return;
     }
-    
-    dispatch_group_notify(uploadGroup, dispatch_get_main_queue(), ^{
-        if (responses.count > 0) {
-            if (self.successCallback) {
-                self.successCallback([responses copy]);
-            }
+    NSString *uploadFileName = fileNameArray[fileIndex];
+    NSData *fileData = fileDataArray[fileIndex];
+    [self uploadFileToOssWithSource:uploadFileName fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        
+    } successCallback:^(NSString *fileUrl) {
+        
+        NSMutableArray *success = [NSMutableArray arrayWithArray:successArray];
+        [success addObject:fileUrl];
+        if (fileIndex == fileNameArray.count - 1) {
+            [self finishMutilUpload:success failArray:failArray];
         }
-        if (failResponse.count > 0) {
-            if (self.faliureCallback) {
-                self.faliureCallback(nil,@"上传文件失败");
-            }
+        else {
+            [self MutilUploadFile:fileNameArray fileDataArray:fileDataArray successArray:success failArray:failArray fileIndex:fileIndex+1];
         }
         
-    });
-    
+    } faliure:^{
+        
+        NSString *desc = [NSString stringWithFormat:@"第%zd次上传文件失败",fileIndex];
+        NSMutableArray *failerArray = [NSMutableArray arrayWithArray:failArray];
+        [failerArray addObject:desc];
+        
+        if (fileIndex == fileNameArray.count - 1) {
+            [self finishMutilUpload:successArray failArray:failArray];
+        }
+        else {
+            [self MutilUploadFile:fileNameArray fileDataArray:fileDataArray successArray:successArray failArray:failerArray fileIndex:fileIndex+1];
+        }
+    }];
 }
 
+- (void)finishMutilUpload:(NSMutableArray *)successArray failArray:(NSMutableArray *)array {
+    if (successArray.count > 0) {
+        if (self.successCallback) {
+            self.successCallback([successArray copy]);
+        }
+    }
+    else {
+        if (self.faliureCallback) {
+            self.faliureCallback(nil,@"上传文件失败");
+        }
+    }
+}
+
+
 - (void)videoUpload:(NSData *)fileData fileName:(NSString *)fileName fileSuffix:(NSString *)fileSuffix progress:(KSUploadProgress)uploadProgress successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure {
     if (success) {
         self.successCallback = success;
@@ -234,43 +206,21 @@
         self.uploadProgress = uploadProgress;
     }
     NSString *folderString = [self getDayFolder];
-    
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey),fileName,fileSuffix];
-    NSString *keyValue = uploadFileName;
-    self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName];
-    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
-            [acl setContronAccess:KingSoftYun_Permission_Public_Read];
-            
-            KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
-            // token
-            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
-            putObjRequest.filename = uploadFileName;
-            putObjRequest.data = fileData;
-            self->_fileSize = putObjRequest.data.length;
-            putObjRequest.delegate = self;
-            [putObjRequest setCompleteRequest];
-            self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName];
-            KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
-            if (putObjRequest.delegate == nil) {
-                NSLog(@"%@",[[NSString alloc] initWithData:response.body encoding:NSUTF8StringEncoding]);
-                if (response.httpStatusCode == 200) {
-                    NSLog(@"Put object success");
-                }
-                else {
-                    NSLog(@"Put object failed");
-                }
-            }
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@_%@%@%@",FILE_DOMAIN,folderString,[NSDate getCurrentTimestampFor64], UserDefault(UIDKey),fileName,fileSuffix];
+
+    [self uploadFileToOssWithSource:uploadFileName fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        if (self.uploadProgress) {
+            self.uploadProgress(bytesWritten, totalBytes);
         }
-        else {
-            if (self.faliureCallback) {
-                self.faliureCallback(nil, MESSAGEKEY);
-            }
+    } successCallback:^(NSString *fileUrl) {
+        NSMutableArray *fileUrlArray = [NSMutableArray array];
+        [fileUrlArray addObject:fileUrl];
+        if (self.successCallback) {
+            self.successCallback(fileUrlArray);
         }
-    } faliure:^(NSError * _Nonnull error) {
+    } faliure:^{
         if (self.faliureCallback) {
-            self.faliureCallback(error, @"获取文件签名失败");
+            self.faliureCallback(nil, @"上传文件失败");
         }
     }];
 }
@@ -283,51 +233,21 @@
         self.faliureCallback = faliure;
     }
     NSString *folderString = [self getDayFolder];
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@_%@%@%@",FILE_DOMAIN,folderString,[NSDate getCurrentTimestampFor64],UserDefault(UIDKey), fileName,fileSuffix];
     
-    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@_%@%@%@",folderString,[NSDate getCurrentTimestampFor64],UserDefault(UIDKey), fileName,fileSuffix];
-    NSString *keyValue = uploadFileName;
-    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue bucketName:self.bucketName success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
-            [acl setContronAccess:KingSoftYun_Permission_Public_Read];
-            
-            KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
-            // token
-            [putObjRequest setStrKS3Token:[dic ks_stringValueForKey:@"signature"]];
-            putObjRequest.filename = uploadFileName;
-            putObjRequest.data = fileData;
-            [putObjRequest setCompleteRequest];
-            
-            KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
-            if (response.httpStatusCode == 200) {
-                if (response.error == nil) {
-                    if (self.successCallback) {
-                        NSMutableArray *fileUrlArray = [NSMutableArray array];
-                        [fileUrlArray addObject:[NSString stringWithFormat:@"https://%@/%@",self.receiveBucket,uploadFileName]];
-                        self.successCallback(fileUrlArray);
-                    }
-                }
-                else {
-                    if (self.faliureCallback) {
-                        self.faliureCallback(response.error, @"上传文件失败");
-                    }
-                }
-            }
-            else {
-                NSLog(@"Set object acl error: %@", response.error.description);
-                if (self.faliureCallback) {
-                    self.faliureCallback(response.error, @"上传文件失败");
-                }
-            }
+    [self uploadFileToOssWithSource:uploadFileName fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        if (self.uploadProgress) {
+            self.uploadProgress(bytesWritten, totalBytes);
         }
-        else {
-            if (self.faliureCallback) {
-                self.faliureCallback(nil, MESSAGEKEY);
-            }
+    } successCallback:^(NSString *fileUrl) {
+        NSMutableArray *fileUrlArray = [NSMutableArray array];
+        [fileUrlArray addObject:fileUrl];
+        if (self.successCallback) {
+            self.successCallback(fileUrlArray);
         }
-    } faliure:^(NSError * _Nonnull error) {
+    } faliure:^{
         if (self.faliureCallback) {
-            self.faliureCallback(error, @"获取文件签名失败");
+            self.faliureCallback(nil, @"上传文件失败");
         }
     }];
 }
@@ -366,4 +286,70 @@
     }
 }
 
+- (void)uploadFileToOssWithSource:(NSString *)fileName fileData:(NSData *)fileData progress:(KSUploadProgress)uploadProgress successCallback:(void(^)(NSString *fileUrl))success faliure:(void(^)(void))faliure {
+    self.cosFileName = fileName;
+    QCloudCOSXMLUploadObjectRequest *put = [QCloudCOSXMLUploadObjectRequest new];
+    put.bucket = self.cosBucketName;
+    put.object = fileName;
+    put.body = fileData;
+    
+    [put setSendProcessBlock:^(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend) {
+            // 进度
+        dispatch_main_async_safe(^{
+            if (uploadProgress) {
+                uploadProgress(totalBytesSent, totalBytesExpectedToSend);
+            }
+        });
+    }];
+    // 监听上传结果
+    [put setFinishBlock:^(QCloudUploadObjectResult * _Nullable result, NSError * _Nullable error) {
+        if (result) {
+            NSString * fileUrl = result.location;
+            if (success) {
+                dispatch_main_async_safe(^{
+                    success(fileUrl);
+                });
+                
+            }
+        }
+        else {
+            if (faliure) {
+                dispatch_main_async_safe(^{
+                    faliure();
+                });
+            }
+        }
+    }];
+    
+    [[QCloudCOSTransferMangerService defaultCOSTransferManager] UploadObject:put];
+}
+
+- (void)signatureWithFields:(QCloudSignatureFields *)fileds request:(QCloudBizHTTPRequest *)request urlRequest:(NSMutableURLRequest *)urlRequst compelete:(QCloudHTTPAuthentationContinueBlock)continueBlock {
+    [KSNetworkingManager getTXCosUploadSignRequest:KS_POST fileName:self.cosFileName keyName:self.cosFileName bucketName:self.cosBucketName success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200) {
+            NSString *signatureString = [[dic ks_dictionaryValueForKey:@"data"] ks_stringValueForKey:@"signature"];
+//            NSString *
+//            QCloudCredential* credential = [QCloudCredential new];
+//            credential.secretID = @"AKIDSo12YszsjQwKdkbFjBThokdO6HI7lFbq";
+//            credential.secretKey = @"5ykLhplZDhLo7E7rQnDSWQ9eyAAyhP0T";
+//            QCloudAuthentationV5Creator* creator = [[QCloudAuthentationV5Creator alloc]
+//                                                    initWithCredential:credential];
+            // 注意 这里不要对urlRequst 进行copy以及mutableCopy操作
+            
+//            NSTimeInterval endTime = [[[dic ks_dictionaryValueForKey:@"data"] ks_stringValueForKey:@"expiration"] longLongValue];
+//            NSDate *expiration = [NSDate dateWithTimeIntervalSince1970:endTime/1000.0];
+            QCloudSignature *signature = [[QCloudSignature alloc] initWithSignature:signatureString expiration:nil];
+//            QCloudSignature *signature = [creator signatureForData:urlRequst];
+            continueBlock(signature, nil);
+        }
+        else {
+            continueBlock(nil, nil);
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        continueBlock(nil, nil);
+        if (self.faliureCallback) {
+            self.faliureCallback(error, @"获取文件签名失败");
+        }
+    }];
+}
 @end

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/UMShare/KSUMShareManager.m

@@ -90,7 +90,7 @@
                     __strong typeof(weakSelf) strongSelf = weakSelf;
                     if (strongSelf.callback) {
                         strongSelf.callback(isSuccess,descMsg);
-                        [MBProgressHUD ksShowMessage:descMsg];
+                        [LOADING_MANAGER MBShowAUTOHidingInWindow:descMsg];
                     }
                 }];
                 [self.displayCtrl.navigationController pushViewController:shareGroupCtrl animated:YES];
@@ -98,7 +98,7 @@
             else {
                 if (self.callback) {
                     self.callback(NO,@"仅支持图片分享到群组");
-                    [MBProgressHUD ksShowMessage:@"仅支持图片分享到群组"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"仅支持图片分享到群组"];
                 }
             }
             
@@ -106,7 +106,7 @@
         else if (platformType == UMSocialPlatformType_UserDefine_Begin+2) { // 复制链接
             UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
             pasteboard.string = self.saveLinkUrl;
-            [MBProgressHUD ksShowMessage:@"复制成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"复制成功"];
         }
         else {
             //创建分享消息对象
@@ -139,7 +139,7 @@
                     NSLog(@"************分享失败 %@*********",error);
                     if (self.callback) {
                         self.callback(NO, @"分享失败");
-                        [MBProgressHUD ksShowMessage:@"分享失败"];
+                        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
                     }
                 }else{
                     if ([data isKindOfClass:[UMSocialShareResponse class]]) {
@@ -148,7 +148,7 @@
                         NSLog(@"************分享成功 %@*********",resp.message);
                         if (self.callback) {
                             self.callback(YES,@"分享成功");
-                            [MBProgressHUD ksShowMessage:@"分享成功"];
+                            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                         }
                     }else{
                         NSLog(@"response data is %@",data);

+ 9 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m

@@ -130,6 +130,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.selectedIndex = index;
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 #pragma mark - JXPagerMainTableViewGestureDelegate
@@ -172,11 +179,13 @@
         self.selectedIndex = 1;
         [self.categoryView selectItemAtIndex:1];
         [self.categoryView setDefaultSelectedIndex:1];
+        // 刷新
     }
     else {
         self.selectedIndex = 0;
         [self.categoryView selectItemAtIndex:0];
         [self.categoryView setDefaultSelectedIndex:0];
+        // 刷新
     }
 }
 /*

+ 13 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/CreateFansGroupViewController.m

@@ -45,25 +45,31 @@
     }];
 }
 
+- (void)configSubmitButtonEnable:(BOOL)enable {
+    self.bodyView.sureButton.userInteractionEnabled = enable;
+}
 
 - (void)submitAction:(NSString *)groupName desc:(NSString *)desc {
-    [self showhud];
+    [self configSubmitButtonEnable:NO];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager imGroupCreate:KS_POST name:groupName introduce:desc success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             if (self.callback) {
                 self.callback();
             }
-            MJWeakSelf;
-            [self KSShowMsg:@"创建成功" promptCompletion:^{
-                [weakSelf backAction];
+            
+            [LOADING_MANAGER KSShowMsg:@"创建成功" promptCompletion:^{
+                [self backAction];
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
+        [self configSubmitButtonEnable:YES];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
+        [self configSubmitButtonEnable:YES];
     }];
 }
 

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

@@ -69,11 +69,12 @@
 }
 
 - (void)updateTipsFrame {
+    UIImage *image = [UIImage imageNamed:@"wd_img_zwsj"];
     [self.listVC.tableViewForAll.tipsView mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.centerX.mas_equalTo(self.listVC.tableViewForAll);
         make.top.mas_equalTo(self.listVC.tableViewForAll.mas_top).offset(40);
-        make.width.mas_equalTo(240);
-        make.height.mas_equalTo(240);
+        make.width.mas_equalTo(image.size.width);
+        make.height.mas_equalTo(image.size.height);
     }];
     
     [self.listVC.tableViewForAll.tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatUserDetailViewController.m

@@ -92,7 +92,7 @@
 }
 
 - (void)requestUserMessage {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager queryUserById:KS_GET rongCloudUserId:self.rongCloudId success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.userInfo = [[ChatUserInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
@@ -103,14 +103,14 @@
         }
         
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
 - (void)requestRecentPractice {
     
     [KSNetworkingManager queryUserRecentRequest:KS_GET userId:[NSString stringWithFormat:@"%.0f",self.userInfo.userId] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         NSLog(@"%@", [dic mj_JSONString]);
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -120,7 +120,7 @@
             
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 12 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantChooseMemberViewController.m

@@ -187,15 +187,19 @@
 }
 
 - (void)sureChooseMember {
-    if (self.chooseArray.count) {
-        if (self.callback) {
-            self.callback(self.chooseArray);
-            [self backAction];
-        }
-    }
-    else {
-        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择群成员"];
+    if (self.callback) {
+        self.callback(self.chooseArray);
+        [self backAction];
     }
+//    if (self.chooseArray.count) {
+//        if (self.callback) {
+//            self.callback(self.chooseArray);
+//            [self backAction];
+//        }
+//    }
+//    else {
+//        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择群成员"];
+//    }
 }
 
 - (NSMutableArray *)chooseArray {

+ 10 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/TenantGroup/TenantCreateGroupViewController.m

@@ -28,7 +28,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"创建粉丝群"];
+    [self allocTitle:@"创建群"];
     self.isFansGroup = YES;
     [self configUI];
 }
@@ -66,12 +66,17 @@
     return _bottomView;
 }
 
+- (void)configSubmitButtonEnable:(BOOL)enable {
+    self.bottomView.sureButton.userInteractionEnabled = enable;
+}
+
+
 - (void)createGroupAction {
     if ([NSString isEmptyString:self.bodyView.nameField.text]) {
         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入群聊名称"];
         return;
     }
-    
+    [self configSubmitButtonEnable:NO];
     NSString *name = self.bodyView.nameField.text;
     NSString *desc = self.bodyView.inputView.text;
     NSString *type = self.isFansGroup ? @"FAN" : @"ORG";
@@ -90,8 +95,11 @@
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
+        [self configSubmitButtonEnable:YES];
     } faliure:^(NSError * _Nonnull error) {
         [LOADING_MANAGER removeHUD];
+        [self configSubmitButtonEnable:YES];
+
     }];
 }
 

+ 9 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupApplyViewController.m

@@ -65,26 +65,25 @@
     // 判断是否选择
     NSMutableArray *memberIdArray = [self getChooseMemberArray];
     if (memberIdArray.count == 0) {
-        [self MBPShow:@"请选择申请学员"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择申请学员"];
         return;
     }
     NSString *audioIds = [memberIdArray componentsJoinedByString:@","];
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager imGroupMemberAuditRequest:KS_POST groupId:self.groupId auditStatus:isApprove auditIds:audioIds success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"操作成功" promptCompletion:^{
-                if (weakSelf.isChooseAll) {
-                    [weakSelf backAction];
+            [LOADING_MANAGER KSShowMsg:@"操作成功" promptCompletion:^{
+                if (self.isChooseAll) {
+                    [self backAction];
                 }
                 else {
-                    [weakSelf resetParamenter];
-                    [weakSelf requestData];
+                    [self resetParamenter];
+                    [self requestData];
                 }
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -154,7 +153,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupMemberViewController.m

@@ -68,7 +68,7 @@
             [self evaluateMessge];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -77,7 +77,7 @@
 }
 
 - (void)evaluateMessge {
-    [MBProgressHUD ksShowHUDWithText:@"数据加载中......"];
+    [LOADING_MANAGER MBShowInWindow:@"数据加载中......"];
     // 异步线程处理数据
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         NSMutableArray *sortArr = [NSMutableArray array];
@@ -112,7 +112,7 @@
         self.sourceIndexArray = sortArr;
         // 主线程刷新
         dispatch_async(dispatch_get_main_queue(), ^{
-            [MBProgressHUD ksHideHUD];
+            [LOADING_MANAGER removeHUD];
             self.tableView.sc_indexViewDataSource = self.sourceIndexArray;
             [self.tableView reloadData];
             [self changePromptLabelState];

+ 12 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -72,7 +72,7 @@
             self.bodyView.applyMember = self.applyCount;
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -101,7 +101,7 @@
             [self refreshUI];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self getGroupStudent];
 
@@ -122,7 +122,7 @@
             [self evaluateMessge];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -238,6 +238,9 @@
 }
 
 - (void)addMember:(NSMutableArray *)array {
+    if (array.count == 0) {
+        return;
+    }
     NSMutableArray *stuIdArray = [NSMutableArray array];
     for (TenantStuModel *model in array) {
         [stuIdArray addObject:model.userId];
@@ -249,7 +252,7 @@
             [self requestData];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         [LOADING_MANAGER removeHUD];
@@ -269,14 +272,14 @@
     
     [KSNetworkingManager imGroupDismiss:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"群已解散" promptCompletion:^{
-                [weakSelf removeCurrentConversation];
-                [weakSelf.navigationController popToRootViewControllerAnimated:YES];
+            
+            [LOADING_MANAGER KSShowMsg:@"群已解散" promptCompletion:^{
+                [self removeCurrentConversation];
+                [self.navigationController popToRootViewControllerAnimated:YES];
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         

+ 111 - 53
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -9,17 +9,19 @@
 #import "KSChatComplainController.h"
 #import "ChatComplainBodyView.h"
 #import "LLPhotoBrowser.h"
-#import "KSImageButton.h"
+#import "KSComplainImageDisplayView.h"
+#import "KSPhotoChooseView.h"
 #import "KSMediaManager.h"
 
 #import "UIImage+ResizeImage.h"
 #import "MSSBrowseDefine.h"
+#import "ChatComplainBottomView.h"
 
 #define MAXBIGPHOTONUMBER (3)
 #define MAXPHOTONUMBER (3)
 #define COLUMNNUMBER (3)
-#define KBUTTON_LEFTSPACE (22)
-#define DELETEIMAGENAME @"fb_icon_tpsc"
+#define BUTTONWIDTH  (101)
+#define BUTTONHEIGHT (101)
 
 @interface KSChatComplainController ()<LLPhotoBrowserDelegate>
 
@@ -27,6 +29,8 @@
 
 @property (nonatomic, strong) ChatComplainBodyView *bodyView;
 
+@property (nonatomic, strong) ChatComplainBottomView *bottomView;
+
 @property (nonatomic, strong) NSMutableArray *imageArray;    // 图片数组
 @property (nonatomic, strong) NSMutableArray *imageAsset;    // 图片 asset
 
@@ -42,27 +46,47 @@
 }
 
 - (void)configUI {
-    _bodyView = [ChatComplainBodyView shareInstance];
+    CGFloat bottomHeight = [ChatComplainBottomView getViewHeight];
+
+    self.bodyView = [ChatComplainBodyView shareInstance];
+    [self.scrollView addSubview:self.bodyView];
+    CGFloat bodyHeight = [ChatComplainBodyView getViewHeight];
+    [self.bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.height.mas_equalTo(bodyHeight);
+        make.bottom.mas_equalTo(self.scrollView.mas_bottom).offset(-bottomHeight);
+    }];
+    
+    self.bottomView = [ChatComplainBottomView shareInstance];
+    [self.view addSubview:self.bottomView];
+    [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.bottom.mas_equalTo(self.view.mas_bottom);
+        make.height.mas_equalTo(bottomHeight);
+    }];
     
-    _bodyView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin);
     MJWeakSelf;
-    [_bodyView submitAction:^(NSString *content) {
-        [weakSelf complainAction:content];
+    [self.bottomView complainCallback:^{
+        [weakSelf complainAction];
     }];
-    [self.view addSubview:_bodyView];
     
     [self createImageButtonAndPhotosButton];
 }
 
 
-- (void)complainAction:(NSString *)content {
+- (void)complainAction {
+    if ([NSString isEmptyString:self.bodyView.inputText.text]) {
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入投诉理由"];
+        return;
+    }
     // 先判断
     if (self.imageArray.count == 0) {
-        [self MBPShow:@"请选择要上传的照片"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择要上传的照片"];
         return;
     }
-    
-    [self showhud];
+    NSString *content = self.bodyView.inputText.text;
+    [LOADING_MANAGER showHUD];
     NSMutableArray *imageDataArray = [NSMutableArray array];
     for (UIImage *image in self.imageArray) {
         NSData *imgData = [UIImage turnsImaegDataByImage:image];
@@ -77,9 +101,9 @@
         NSString *attachments = [urlArray componentsJoinedByString:@","];
         [self uplodMessage:attachments content:content];
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if (![NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
     }];
 }
@@ -88,18 +112,18 @@
     NSString *type = self.fromGroup ? @"GROUP" : @"PERSON";
     
     [KSNetworkingManager sysImComplaintRequest:KS_POST type:type fileUrl:attachments memo:content targetId:self.targetId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
-                [weakSelf.navigationController popViewControllerAnimated:YES];
+            
+            [LOADING_MANAGER KSShowMsg:@"已收到您的投诉,我们会认真审核并处理" promptCompletion:^{
+                [self.navigationController popViewControllerAnimated:YES];
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
     
 }
@@ -111,60 +135,63 @@
     for (UIView *subView in self.bodyView.imageContentView.subviews) {
         [subView removeFromSuperview];
     }
-    CGFloat space = 15;
-    CGFloat buttonWidth = (kScreenWidth - KBUTTON_LEFTSPACE * 2 - space * 2) / 3.0f;
-    CGFloat buttonHeight = 80;
+    CGFloat space = 12;
+
+    CGFloat midSpace = (KPortraitWidth - 26 - space * 2 - BUTTONWIDTH * 3) / 2.0f;
+    
     NSInteger section = self.imageArray.count/3 + 1;
     if (self.imageArray.count==MAXPHOTONUMBER) {
         section = MAXPHOTONUMBER / 3;
     }
+    CGFloat topSpace = 0.0f;
     CGFloat currentX = 0;
     CGFloat currentY = 0;
-    for (NSInteger i = 0; i < self.imageArray.count; i++) {
-        currentX = i % 3 * (buttonWidth + space);
-        currentY = i / 3 * (buttonHeight + space);
-        UIImage *image = self.imageArray [i];
+    for (NSInteger index = 0; index < self.imageArray.count; index++) {
+        currentX = (index) % 3 * (BUTTONWIDTH + midSpace) + space;
+        currentY = (index) / 3 * (BUTTONHEIGHT + topSpace);
+        UIImage *image = self.imageArray [index];
         
-        CGRect frame = CGRectMake(currentX + KBUTTON_LEFTSPACE, currentY, buttonWidth, buttonHeight);
+        CGRect frame = CGRectMake(currentX, currentY, BUTTONWIDTH, BUTTONHEIGHT);
+        KSComplainImageDisplayView *displayView = [KSComplainImageDisplayView shareInstance];
+        displayView.frame = frame;
+        displayView.tag = 1000 + index;
         MJWeakSelf;
-        KSImageButton *imgButton;
-        id asset = self.imageAsset[i];
-        imgButton = [KSImageButton createButtonWithFrame:frame displayImage:image imgAsset:asset tag:1000 + i clickReturnWithBlock:^(UIImage *image, id asset, BUTTON_CLICK_ACTION actionType, NSInteger index) {
-            // 展示大图
-            LLPhotoBrowser *photoBrowser = [[LLPhotoBrowser alloc] initWithImages:weakSelf.imageArray currentIndex:index-1000];
-            photoBrowser.delegate = weakSelf;
-            photoBrowser.modalPresentationStyle = UIModalPresentationFullScreen;
-            [self presentViewController:photoBrowser animated:YES completion:nil];
-            
+        [displayView displayImage:image callback:^(BOOL isShow, NSInteger viewIndex) {
+            if (isShow) {
+                [weakSelf displayImage:viewIndex];
+            }
+            else {
+                [weakSelf removeImage:viewIndex];
+            }
         }];
-        
-        [self.bodyView.imageContentView addSubview:imgButton];
-        imgButton = nil;
+        [self.bodyView.imageContentView addSubview:displayView];
     }
-    currentX = self.imageArray .count % 3 * (buttonWidth + space);
+    
     if (self.imageArray.count != MAXPHOTONUMBER) {
         //计算下一个添加按钮位置
-        if (self.imageArray.count % 3 == 0) {
-            currentY = (self.imageArray.count+1) / 3 * (buttonHeight + space);
-        }
-        UIButton *cameraButton = [UIButton buttonWithType:UIButtonTypeCustom];
-        cameraButton.frame = CGRectMake(currentX + KBUTTON_LEFTSPACE, currentY, buttonWidth, buttonHeight);
+        currentX = (self.imageArray.count) % 3 * (BUTTONWIDTH + midSpace) + space;
+        currentY = (self.imageArray.count) / 3 * (BUTTONHEIGHT + topSpace);
+
+        KSPhotoChooseView *button = [KSPhotoChooseView shareInstance];
+        button.frame = CGRectMake(currentX, currentY, BUTTONWIDTH, BUTTONHEIGHT);
         CAShapeLayer *border = [CAShapeLayer layer];
         border.strokeColor = HexRGB(0xCFCFCF).CGColor;
         border.fillColor = nil;
-        border.path = [UIBezierPath bezierPathWithRoundedRect:cameraButton.bounds cornerRadius:5.0f].CGPath;
-        border.frame = cameraButton.bounds;
+        border.path = [UIBezierPath bezierPathWithRoundedRect:button.bounds cornerRadius:10.0f].CGPath;
+        border.frame = button.bounds;
         border.lineWidth = 1.f;
         border.lineCap = @"square";
         border.lineDashPattern = @[@4, @4];
-        [cameraButton.layer addSublayer:border];
-        [cameraButton setImage:[UIImage imageNamed:@"image_add"] forState:UIControlStateNormal];
-        [cameraButton addTarget:self action:@selector(addImgAction:) forControlEvents:UIControlEventTouchUpInside];
-        [self.bodyView.imageContentView addSubview:cameraButton];
+        [button.imagePlace.layer addSublayer:border];
+        MJWeakSelf;
+        [button chooseCallback:^{
+            [weakSelf chooseImageAction];
+        }];
+        [self.bodyView.imageContentView addSubview:button];
     }
     
     // 刷新scroll contentsize
-    CGFloat imageContentHeight =  buttonHeight * section + (section-1) * space;
+    CGFloat imageContentHeight =  101;
     CGFloat height = kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin > 590 + imageContentHeight ? kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin : 590 + imageContentHeight;
     CGRect frame = self.bodyView.frame;
     frame.size.height = height;
@@ -172,6 +199,37 @@
     self.scrollView.contentSize = CGSizeMake(kScreenWidth, height);
 }
 
+- (void)displayImage:(NSInteger)fileIndex {
+    // 展示大图
+    LLPhotoBrowser *photoBrowser = [[LLPhotoBrowser alloc] initWithImages:self.imageArray currentIndex:fileIndex];
+    photoBrowser.delegate = self;
+    photoBrowser.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self presentViewController:photoBrowser animated:YES completion:nil];
+}
+
+- (void)chooseImageAction {
+    // 调用相册
+    self.mediaManager = [[KSMediaManager alloc] init];
+    self.mediaManager.mediaType = MEDIATYPE_PHOTO;
+    self.mediaManager.maxPhotoNumber = MAXPHOTONUMBER;
+    self.mediaManager.baseCtrl = self;
+    self.mediaManager.imageArray = [self.imageArray mutableCopy];
+    self.mediaManager.imageAsset = [self.imageAsset mutableCopy];
+    self.mediaManager.needCropImage = NO;
+    MJWeakSelf;
+    [self.mediaManager noAlertCallback:^(NSString * _Nullable videoUrl, NSMutableArray * _Nullable imageArray, NSMutableArray * _Nullable imageAsset) {
+        weakSelf.imageArray = [imageArray mutableCopy];
+        weakSelf.imageAsset = [imageAsset mutableCopy];
+        [weakSelf displayChooseImage:imageArray imageAsset:imageAsset];
+    }];
+    [self.mediaManager pushImagePickerController];
+}
+
+- (void)removeImage:(NSInteger)fileIndex {
+    [self.imageArray  removeObjectAtIndex:fileIndex];
+    [self.imageAsset removeObjectAtIndex:fileIndex];
+    [self displayChooseImage:self.imageArray imageAsset:self.imageAsset];
+}
 
 #pragma mark 点击+按钮
 - (void)addImgAction:(UIButton *)sender {

+ 3 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.h

@@ -9,17 +9,17 @@
 #import <UIKit/UIKit.h>
 
 
-typedef void(^ComplainSubmitAction)(NSString *content);
-
 NS_ASSUME_NONNULL_BEGIN
 
 @interface ChatComplainBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet UITextView *inputText;
+
 @property (weak, nonatomic) IBOutlet UIView *imageContentView;
 
 + (instancetype)shareInstance;
 
-- (void)submitAction:(ComplainSubmitAction)callback;
++ (CGFloat)getViewHeight;
 
 @end
 

+ 9 - 20
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.m

@@ -12,9 +12,11 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *tipsLabel;
 
-@property (weak, nonatomic) IBOutlet UITextView *inputText;
+@property (weak, nonatomic) IBOutlet UIImageView *titleIcon;
 
-@property (nonatomic, strong) ComplainSubmitAction callback;
+@property (weak, nonatomic) IBOutlet UIImageView *imageIcon;
+
+@property (weak, nonatomic) IBOutlet UILabel *countLabel;
 
 @end
 
@@ -30,23 +32,6 @@
     return view;
 }
 
-- (void)submitAction:(ComplainSubmitAction)callback {
-    if (callback) {
-        self.callback = callback;
-    }
-}
-
-
-- (IBAction)sureAction:(id)sender {
-    [self endEditing:YES];
-    if ([NSString isEmptyString:self.inputText.text]) {
-        [self MBPShow:@"请输入投诉内容"];
-        return;
-    }
-    if (self.callback) {
-        self.callback(self.inputText.text);
-    }
-}
 
 #pragma mark   ---- delegate
 
@@ -79,9 +64,13 @@
     if (newString.length > 200) {
         return NO;
     }
-
+    self.countLabel.text = [NSString stringWithFormat:@"%zd/200", newString.length];
     return YES;
 }
+
++ (CGFloat)getViewHeight {
+    return 480.0f;
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 125 - 74
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBodyView.xib

@@ -1,114 +1,165 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ChatComplainBodyView">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="507"/>
+            <rect key="frame" x="0.0" y="0.0" width="414" height="480"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入投诉的理由" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tN1-Iy-7ZO">
-                    <rect key="frame" x="16" y="15" width="115" height="20"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="20" id="98G-zQ-ZNH"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                    <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TmF-eq-d4r">
-                    <rect key="frame" x="16" y="55" width="382" height="200"/>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0eb-rT-x20">
+                    <rect key="frame" x="13" y="12" width="388" height="277"/>
                     <subviews>
-                        <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ANC-BC-e3J">
-                            <rect key="frame" x="10" y="0.0" width="362" height="200"/>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="complain_title_green" translatesAutoresizingMaskIntoConstraints="NO" id="6Ye-5V-vW1">
+                            <rect key="frame" x="12" y="16" width="22" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="ZRH-bs-l9S"/>
+                                <constraint firstAttribute="width" constant="22" id="yH9-nO-UV8"/>
+                            </constraints>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4V1-a5-eUe">
+                            <rect key="frame" x="337.5" y="16" width="38.5" height="17"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TmF-eq-d4r">
+                            <rect key="frame" x="0.0" y="38" width="388" height="229"/>
+                            <subviews>
+                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ANC-BC-e3J">
+                                    <rect key="frame" x="10" y="0.0" width="368" height="229"/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    <color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
+                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                </textView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入投诉理由" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="srl-cR-tfi">
+                                    <rect key="frame" x="10" y="9" width="107.5" height="18"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                    <color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
                             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                            <color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
-                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
-                            <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
-                        </textView>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入投诉理由,200字以内" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="srl-cR-tfi">
-                            <rect key="frame" x="10" y="9" width="183.5" height="17"/>
-                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
-                            <color key="textColor" red="0.46666666670000001" green="0.46666666670000001" blue="0.46666666670000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="ANC-BC-e3J" secondAttribute="trailing" constant="10" id="DjW-Xy-w3S"/>
+                                <constraint firstItem="ANC-BC-e3J" firstAttribute="leading" secondItem="TmF-eq-d4r" secondAttribute="leading" constant="10" id="VtB-Kf-PGQ"/>
+                                <constraint firstAttribute="bottom" secondItem="ANC-BC-e3J" secondAttribute="bottom" id="gTY-LA-9g9"/>
+                                <constraint firstItem="srl-cR-tfi" firstAttribute="leading" secondItem="TmF-eq-d4r" secondAttribute="leading" constant="10" id="jRj-dv-1Qz"/>
+                                <constraint firstItem="srl-cR-tfi" firstAttribute="top" secondItem="TmF-eq-d4r" secondAttribute="top" constant="9" id="lez-cf-Bmn"/>
+                                <constraint firstItem="ANC-BC-e3J" firstAttribute="top" secondItem="TmF-eq-d4r" secondAttribute="top" id="ubh-vk-3aT"/>
+                            </constraints>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="投诉理由" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tN1-Iy-7ZO">
+                            <rect key="frame" x="40" y="16" width="65.5" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="brX-IC-SC3"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
                     </subviews>
-                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstAttribute="trailing" secondItem="ANC-BC-e3J" secondAttribute="trailing" constant="10" id="DjW-Xy-w3S"/>
-                        <constraint firstItem="ANC-BC-e3J" firstAttribute="leading" secondItem="TmF-eq-d4r" secondAttribute="leading" constant="10" id="VtB-Kf-PGQ"/>
-                        <constraint firstAttribute="bottom" secondItem="ANC-BC-e3J" secondAttribute="bottom" id="gTY-LA-9g9"/>
-                        <constraint firstAttribute="height" constant="200" id="iPm-c3-xHY"/>
-                        <constraint firstItem="srl-cR-tfi" firstAttribute="leading" secondItem="TmF-eq-d4r" secondAttribute="leading" constant="10" id="jRj-dv-1Qz"/>
-                        <constraint firstItem="srl-cR-tfi" firstAttribute="top" secondItem="TmF-eq-d4r" secondAttribute="top" constant="9" id="lez-cf-Bmn"/>
-                        <constraint firstItem="ANC-BC-e3J" firstAttribute="top" secondItem="TmF-eq-d4r" secondAttribute="top" id="ubh-vk-3aT"/>
-                    </constraints>
-                </view>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrg-7V-2Sn">
-                    <rect key="frame" x="0.0" y="305" width="414" height="80"/>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="80" id="CP8-UI-leD"/>
+                        <constraint firstItem="6Ye-5V-vW1" firstAttribute="top" secondItem="0eb-rT-x20" secondAttribute="top" constant="16" id="9SJ-he-Iof"/>
+                        <constraint firstItem="6Ye-5V-vW1" firstAttribute="leading" secondItem="0eb-rT-x20" secondAttribute="leading" constant="12" id="CH6-1O-JCg"/>
+                        <constraint firstItem="4V1-a5-eUe" firstAttribute="top" secondItem="0eb-rT-x20" secondAttribute="top" constant="16" id="FTb-8Y-hnC"/>
+                        <constraint firstItem="tN1-Iy-7ZO" firstAttribute="centerY" secondItem="6Ye-5V-vW1" secondAttribute="centerY" id="LyF-Nx-Lzg"/>
+                        <constraint firstAttribute="bottom" secondItem="TmF-eq-d4r" secondAttribute="bottom" constant="10" id="Qtr-fh-HY1"/>
+                        <constraint firstItem="TmF-eq-d4r" firstAttribute="leading" secondItem="0eb-rT-x20" secondAttribute="leading" id="R4A-c1-XAi"/>
+                        <constraint firstItem="tN1-Iy-7ZO" firstAttribute="leading" secondItem="6Ye-5V-vW1" secondAttribute="trailing" constant="6" id="XzL-mA-Zgq"/>
+                        <constraint firstAttribute="trailing" secondItem="4V1-a5-eUe" secondAttribute="trailing" constant="12" id="a4T-ZL-UVU"/>
+                        <constraint firstAttribute="trailing" secondItem="TmF-eq-d4r" secondAttribute="trailing" id="c76-H0-Atd"/>
+                        <constraint firstItem="TmF-eq-d4r" firstAttribute="top" secondItem="tN1-Iy-7ZO" secondAttribute="bottom" id="g7a-sI-ak7"/>
+                        <constraint firstAttribute="height" constant="277" id="pdx-Vt-eIc"/>
                     </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
                 </view>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请上传聊天截图" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oi4-ac-uGd">
-                    <rect key="frame" x="16" y="275" width="100" height="20"/>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="20" id="4KB-xi-B4I"/>
-                    </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                    <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p75-wv-N7E">
-                    <rect key="frame" x="28" y="405" width="358" height="44"/>
-                    <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KDf-B7-emx">
+                    <rect key="frame" x="13" y="301" width="388" height="171"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="complain_photo_green" translatesAutoresizingMaskIntoConstraints="NO" id="jQb-YZ-Bxc">
+                            <rect key="frame" x="12" y="16" width="22" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="G0S-DU-lag"/>
+                                <constraint firstAttribute="width" constant="22" id="bLF-Wa-1SJ"/>
+                            </constraints>
+                        </imageView>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrg-7V-2Sn">
+                            <rect key="frame" x="0.0" y="50" width="388" height="101"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="101" id="CP8-UI-leD"/>
+                            </constraints>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上传聊天截图" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oi4-ac-uGd">
+                            <rect key="frame" x="40" y="16" width="98" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="4KB-xi-B4I"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="44" id="ffw-dc-USa"/>
+                        <constraint firstItem="Xrg-7V-2Sn" firstAttribute="leading" secondItem="KDf-B7-emx" secondAttribute="leading" id="7kS-7l-Yby"/>
+                        <constraint firstAttribute="bottom" secondItem="Xrg-7V-2Sn" secondAttribute="bottom" constant="20" id="SZb-Bg-QcY"/>
+                        <constraint firstAttribute="trailing" secondItem="Xrg-7V-2Sn" secondAttribute="trailing" id="ULU-7z-6TL"/>
+                        <constraint firstItem="oi4-ac-uGd" firstAttribute="centerY" secondItem="jQb-YZ-Bxc" secondAttribute="centerY" id="jGL-jc-yAb"/>
+                        <constraint firstItem="jQb-YZ-Bxc" firstAttribute="leading" secondItem="KDf-B7-emx" secondAttribute="leading" constant="12" id="lGC-0s-boz"/>
+                        <constraint firstItem="Xrg-7V-2Sn" firstAttribute="top" secondItem="jQb-YZ-Bxc" secondAttribute="bottom" constant="12" id="mtG-2e-17R"/>
+                        <constraint firstItem="jQb-YZ-Bxc" firstAttribute="top" secondItem="KDf-B7-emx" secondAttribute="top" constant="16" id="th0-ZP-Cc7"/>
+                        <constraint firstItem="oi4-ac-uGd" firstAttribute="leading" secondItem="jQb-YZ-Bxc" secondAttribute="trailing" constant="6" id="xGU-no-9C8"/>
                     </constraints>
-                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                    <state key="normal" title="提交"/>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                            <real key="value" value="22"/>
+                            <real key="value" value="10"/>
                         </userDefinedRuntimeAttribute>
                     </userDefinedRuntimeAttributes>
-                    <connections>
-                        <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="D7Y-aq-sJN"/>
-                    </connections>
-                </button>
+                </view>
             </subviews>
-            <color key="backgroundColor" red="0.95294117647058818" green="0.95686274509803915" blue="0.97254901960784312" alpha="0.84705882352941175" colorSpace="calibratedRGB"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
-                <constraint firstItem="tN1-Iy-7ZO" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="15" id="0YM-2L-TfS"/>
-                <constraint firstItem="TmF-eq-d4r" firstAttribute="top" secondItem="tN1-Iy-7ZO" secondAttribute="bottom" constant="20" id="2xv-oR-eTl"/>
-                <constraint firstAttribute="trailing" secondItem="Xrg-7V-2Sn" secondAttribute="trailing" id="MY1-iD-mfk"/>
-                <constraint firstItem="oi4-ac-uGd" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="MeH-Se-b08"/>
-                <constraint firstItem="Xrg-7V-2Sn" firstAttribute="top" secondItem="oi4-ac-uGd" secondAttribute="bottom" constant="10" id="St2-dR-wK9"/>
-                <constraint firstAttribute="trailing" secondItem="p75-wv-N7E" secondAttribute="trailing" constant="28" id="aHY-RK-Pl5"/>
-                <constraint firstItem="tN1-Iy-7ZO" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="ayi-VC-e1j"/>
-                <constraint firstItem="Xrg-7V-2Sn" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="eHh-EX-sSM"/>
-                <constraint firstItem="TmF-eq-d4r" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="f0u-dl-rKq"/>
-                <constraint firstItem="oi4-ac-uGd" firstAttribute="top" secondItem="TmF-eq-d4r" secondAttribute="bottom" constant="20" id="nme-ec-b6f"/>
-                <constraint firstItem="p75-wv-N7E" firstAttribute="top" secondItem="Xrg-7V-2Sn" secondAttribute="bottom" constant="20" id="rdB-m6-c3A"/>
-                <constraint firstAttribute="trailing" secondItem="TmF-eq-d4r" secondAttribute="trailing" constant="16" id="u2z-VK-7O9"/>
-                <constraint firstItem="p75-wv-N7E" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="28" id="vb2-Lq-mnP"/>
+                <constraint firstItem="KDf-B7-emx" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="9oc-Zf-ciW"/>
+                <constraint firstItem="0eb-rT-x20" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="13" id="Fpb-5k-A3V"/>
+                <constraint firstItem="KDf-B7-emx" firstAttribute="top" secondItem="0eb-rT-x20" secondAttribute="bottom" constant="12" id="d3S-qO-z9q"/>
+                <constraint firstAttribute="trailing" secondItem="KDf-B7-emx" secondAttribute="trailing" constant="13" id="l7V-Sg-ICs"/>
+                <constraint firstAttribute="trailing" secondItem="0eb-rT-x20" secondAttribute="trailing" constant="13" id="pJY-dL-khf"/>
+                <constraint firstItem="0eb-rT-x20" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="yMD-ui-Iqm"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="countLabel" destination="4V1-a5-eUe" id="n8K-Oq-Dzh"/>
                 <outlet property="imageContentView" destination="Xrg-7V-2Sn" id="lbn-Qq-aTP"/>
+                <outlet property="imageIcon" destination="jQb-YZ-Bxc" id="jnG-Q4-Suo"/>
                 <outlet property="inputText" destination="ANC-BC-e3J" id="cCy-c9-2tK"/>
                 <outlet property="tipsLabel" destination="srl-cR-tfi" id="FNb-fb-8Rv"/>
+                <outlet property="titleIcon" destination="6Ye-5V-vW1" id="7k5-a9-p6O"/>
             </connections>
-            <point key="canvasLocation" x="-59.420289855072468" y="103.45982142857143"/>
+            <point key="canvasLocation" x="-59.420289855072468" y="95.089285714285708"/>
         </view>
     </objects>
+    <resources>
+        <image name="complain_photo_green" width="22" height="22"/>
+        <image name="complain_title_green" width="22" height="22"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 23 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.h

@@ -0,0 +1,23 @@
+//
+//  ChatComplainBottomView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^ChatComplainCallback)(void);
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ChatComplainBottomView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)complainCallback:(ChatComplainCallback)callback;
+
++ (CGFloat)getViewHeight;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 57 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.m

@@ -0,0 +1,57 @@
+//
+//  ChatComplainBottomView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import "ChatComplainBottomView.h"
+
+@interface ChatComplainBottomView ()
+
+@property (nonatomic, copy) ChatComplainCallback callback;
+
+@property (weak, nonatomic) IBOutlet UIButton *sureButton;
+
+@end
+
+@implementation ChatComplainBottomView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+
+}
+
++ (instancetype)shareInstance {
+    ChatComplainBottomView *view = [[[NSBundle mainBundle] loadNibNamed:@"ChatComplainBottomView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)complainCallback:(ChatComplainCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+- (IBAction)sureAction:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+
++ (CGFloat)getViewHeight {
+    if (IS_iPhoneX) {
+        return 44 + iPhoneXSafeBottomMargin;
+    }
+    else {
+        return 44 + 20;
+    }
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 49 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/ChatComplainBottomView.xib

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ChatComplainBottomView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="86"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c84-nX-yP9">
+                    <rect key="frame" x="25" y="0.0" width="343" height="44"/>
+                    <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="44" id="E1p-z4-7d3"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                    <state key="normal" title="提交"/>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="22"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                    <connections>
+                        <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpOutside" id="oZy-Hm-8pM"/>
+                    </connections>
+                </button>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="c84-nX-yP9" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="25" id="hoP-8G-Uh7"/>
+                <constraint firstAttribute="trailing" secondItem="c84-nX-yP9" secondAttribute="trailing" constant="25" id="iUA-jd-7Yi"/>
+                <constraint firstItem="c84-nX-yP9" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="vjt-aV-unh"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="sureButton" destination="c84-nX-yP9" id="1mC-Tu-qzJ"/>
+            </connections>
+            <point key="canvasLocation" x="35.877862595419849" y="-2.8169014084507045"/>
+        </view>
+    </objects>
+</document>

+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.h

@@ -0,0 +1,22 @@
+//
+//  KSComplainImageDisplayView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^KSImageDisplayAction)(BOOL isShow, NSInteger viewIndex);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSComplainImageDisplayView : UIView
+
++ (instancetype)shareInstance;
+
+- (void)displayImage:(UIImage *)image callback:(KSImageDisplayAction)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 51 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.m

@@ -0,0 +1,51 @@
+//
+//  KSComplainImageDisplayView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import "KSComplainImageDisplayView.h"
+
+@interface KSComplainImageDisplayView ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *displayImage;
+
+@property (nonatomic, copy) KSImageDisplayAction callback;
+
+@end
+
+@implementation KSComplainImageDisplayView
+
++ (instancetype)shareInstance {
+    KSComplainImageDisplayView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSComplainImageDisplayView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)displayImage:(UIImage *)image callback:(KSImageDisplayAction)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+    [self.displayImage setImage:image];
+}
+
+- (IBAction)showImageAction:(id)sender {
+    if (self.callback) {
+        self.callback(YES, self.tag - 1000);
+    }
+}
+
+- (IBAction)deleteAction:(id)sender {
+    if (self.callback) {
+        self.callback(NO, self.tag - 1000);
+    }
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 79 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSComplainImageDisplayView.xib

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSComplainImageDisplayView">
+            <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qCG-Ce-xtl">
+                    <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZBz-0T-8JP">
+                            <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+                            <gestureRecognizers/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="10"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <outletCollection property="gestureRecognizers" destination="ssh-aV-bGR" appends="YES" id="WCx-Az-IZe"/>
+                            </connections>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g1O-se-vlm">
+                            <rect key="frame" x="75" y="2" width="24" height="24"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="24" id="lvT-Hx-cWI"/>
+                                <constraint firstAttribute="height" constant="24" id="vU3-Da-W8n"/>
+                            </constraints>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" image="delete_grey"/>
+                            <connections>
+                                <action selector="deleteAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="gPX-n4-Qrn"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="trailing" secondItem="ZBz-0T-8JP" secondAttribute="trailing" id="4z9-tz-zTz"/>
+                        <constraint firstAttribute="bottom" secondItem="ZBz-0T-8JP" secondAttribute="bottom" id="7cP-nc-OI7"/>
+                        <constraint firstItem="g1O-se-vlm" firstAttribute="top" secondItem="qCG-Ce-xtl" secondAttribute="top" constant="2" id="QgE-wJ-ky7"/>
+                        <constraint firstAttribute="trailing" secondItem="g1O-se-vlm" secondAttribute="trailing" constant="2" id="TaR-4I-rKQ"/>
+                        <constraint firstItem="ZBz-0T-8JP" firstAttribute="leading" secondItem="qCG-Ce-xtl" secondAttribute="leading" id="ebh-xk-fCF"/>
+                        <constraint firstItem="ZBz-0T-8JP" firstAttribute="top" secondItem="qCG-Ce-xtl" secondAttribute="top" id="gdi-eE-mzT"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="qCG-Ce-xtl" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="1Tb-1k-kkf"/>
+                <constraint firstItem="qCG-Ce-xtl" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="4id-3n-fK1"/>
+                <constraint firstAttribute="trailing" secondItem="qCG-Ce-xtl" secondAttribute="trailing" id="9g2-fx-4aL"/>
+                <constraint firstAttribute="bottom" secondItem="qCG-Ce-xtl" secondAttribute="bottom" id="P0s-Uk-Spf"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="displayImage" destination="ZBz-0T-8JP" id="sq1-WM-dDO"/>
+            </connections>
+            <point key="canvasLocation" x="55.725190839694655" y="66.197183098591552"/>
+        </view>
+        <tapGestureRecognizer id="ssh-aV-bGR">
+            <connections>
+                <action selector="showImageAction:" destination="iN0-l3-epB" id="WO8-ha-qXs"/>
+            </connections>
+        </tapGestureRecognizer>
+    </objects>
+    <resources>
+        <image name="delete_grey" width="18" height="18"/>
+    </resources>
+</document>

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.h

@@ -0,0 +1,24 @@
+//
+//  KSPhotoChooseView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^ChooseFileCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSPhotoChooseView : UIView
+
+@property (weak, nonatomic) IBOutlet UIImageView *imagePlace;
+
++ (instancetype)shareInstance;
+
+- (void)chooseCallback:(ChooseFileCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 45 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.m

@@ -0,0 +1,45 @@
+//
+//  KSPhotoChooseView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import "KSPhotoChooseView.h"
+
+@interface KSPhotoChooseView ()
+
+@property (nonatomic, strong) ChooseFileCallback callback;
+
+@end
+
+@implementation KSPhotoChooseView
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+}
++ (instancetype)shareInstance {
+    KSPhotoChooseView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSPhotoChooseView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)chooseCallback:(ChooseFileCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (IBAction)buttonAction:(id)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 67 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/KSPhotoChooseView.xib

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="KSPhotoChooseView">
+            <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CWr-mc-Kq1">
+                    <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="redraw" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="choose_photo_green" translatesAutoresizingMaskIntoConstraints="NO" id="Ppz-l3-sb2">
+                            <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RAb-Kf-kC3">
+                            <rect key="frame" x="0.0" y="0.0" width="101" height="101"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="buttonAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="2Sn-xw-vSx"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="Ppz-l3-sb2" secondAttribute="bottom" id="KP2-tj-Scd"/>
+                        <constraint firstAttribute="trailing" secondItem="Ppz-l3-sb2" secondAttribute="trailing" id="NZg-6o-ABf"/>
+                        <constraint firstItem="Ppz-l3-sb2" firstAttribute="top" secondItem="CWr-mc-Kq1" secondAttribute="top" id="Z48-p2-AWS"/>
+                        <constraint firstAttribute="trailing" secondItem="RAb-Kf-kC3" secondAttribute="trailing" id="ap7-B1-pS1"/>
+                        <constraint firstAttribute="bottom" secondItem="RAb-Kf-kC3" secondAttribute="bottom" id="eOm-8b-bXS"/>
+                        <constraint firstItem="RAb-Kf-kC3" firstAttribute="top" secondItem="CWr-mc-Kq1" secondAttribute="top" id="lOR-5E-dev"/>
+                        <constraint firstItem="Ppz-l3-sb2" firstAttribute="leading" secondItem="CWr-mc-Kq1" secondAttribute="leading" id="mj1-3T-nAs"/>
+                        <constraint firstItem="RAb-Kf-kC3" firstAttribute="leading" secondItem="CWr-mc-Kq1" secondAttribute="leading" id="wLp-gR-4qZ"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="CWr-mc-Kq1" secondAttribute="bottom" id="7Pu-w4-we5"/>
+                <constraint firstAttribute="trailing" secondItem="CWr-mc-Kq1" secondAttribute="trailing" id="9c1-vK-F7M"/>
+                <constraint firstItem="CWr-mc-Kq1" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="DbP-Bt-qTA"/>
+                <constraint firstItem="CWr-mc-Kq1" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="p36-53-KgO"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="imagePlace" destination="Ppz-l3-sb2" id="aBY-jX-PFI"/>
+            </connections>
+            <point key="canvasLocation" x="49.618320610687022" y="91.197183098591552"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="choose_photo_green" width="101" height="101"/>
+    </resources>
+</document>

+ 12 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m

@@ -52,39 +52,37 @@
     if (_isModify) {
         NSString *title = self.bodyView.titleView.text;
         NSString *content = self.bodyView.contentArea.text;
-        [self showhud];
+        [LOADING_MANAGER showHUD];
         [KSNetworkingManager imGroupNoticeUpdateRequest:KS_POST groupId:self.groupId title:title content:content isTop:[NSString stringWithFormat:@"%d",self.bodyView.isOn] noticeID:self.noticeID success:^(NSDictionary * _Nonnull dic) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
             if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                MJWeakSelf;
-                [self KSShowMsg:@"修改成功" promptCompletion:^{
-                    [weakSelf.navigationController popViewControllerAnimated:YES];
+                [LOADING_MANAGER KSShowMsg:@"修改成功" promptCompletion:^{
+                    [self.navigationController popViewControllerAnimated:YES];
                 }];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
             }
         } faliure:^(NSError * _Nonnull error) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
         }];
     }
     else {
         NSString *title = self.bodyView.titleView.text;
         NSString *content = self.bodyView.contentArea.text;
-        [self showhud];
+        [LOADING_MANAGER showHUD];
         [KSNetworkingManager imGroupNoticeCreateRequest:KS_POST groupId:self.groupId title:title content:content isTop:[NSString stringWithFormat:@"%d",self.bodyView.isOn] success:^(NSDictionary * _Nonnull dic) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
             if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                MJWeakSelf;
-                [self KSShowMsg:@"设置成功" promptCompletion:^{
-                    [weakSelf.navigationController popViewControllerAnimated:YES];
+                [LOADING_MANAGER KSShowMsg:@"设置成功" promptCompletion:^{
+                    [self.navigationController popViewControllerAnimated:YES];
                 }];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
             }
         } faliure:^(NSError * _Nonnull error) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
         }];
         
     }

+ 15 - 16
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m

@@ -84,9 +84,9 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager queryNoticeListRequest:KS_POST groupId:self.groupId page:[NSString stringWithFormat:@"%zd", self.pages] rows:[NSString stringWithFormat:@"%zd", self.rows] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 赋值
@@ -100,12 +100,12 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
@@ -161,21 +161,20 @@
 
 - (void)deleteNotice:(id)source {
     GroupNoticeModel *model = source;
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager imGroupNoticeDelRequest:KS_POST noticeID:[NSString stringWithFormat:@"%.0f",model.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"删除成功" promptCompletion:^{
-                [weakSelf resetParamenter];
-                [weakSelf requestData];
+            [LOADING_MANAGER KSShowMsg:@"删除成功" promptCompletion:^{
+                [self resetParamenter];
+                [self requestData];
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -216,18 +215,18 @@
     else {
         isTop = @"1";
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager imGroupNoticeUpdateRequest:KS_POST groupId:self.groupId title:model.title content:model.content isTop:isTop noticeID:[NSString stringWithFormat:@"%.0f",model.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self resetParamenter];
             [self requestData];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/GroupNotice/View/NoticeEditBodyView.m

@@ -46,11 +46,11 @@
     [self endEditing:YES];
     if (self.callback) {
         if ([NSString isEmptyString:self.titleView.text]) {
-            [self MBPShow:@"请输入标题"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入标题"];
             return;
         }
         if ([NSString isEmptyString:self.contentArea.text]) {
-            [self MBPShow:@"请填写群公告"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请填写群公告"];
             return;
         }
         self.callback();

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

@@ -109,7 +109,7 @@
 - (void)rightBtnClick {
     [self.view endEditing:YES];
     if (self.chooseModel == nil) {
-        [self MBPShow:@"请选择分享曲谱"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择分享曲谱"];
         return;
     }
     if (self.callback) {
@@ -126,9 +126,9 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager musicListRequest:KS_POST auditStatus:@"PASS" page:self.pages rows:self.rows search:self.searchKey subjectIds:@"" success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -141,12 +141,12 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

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

@@ -108,7 +108,7 @@
                 [self evaluateGroupMessage];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
                 [self changePromptLabelStateWithArray:self.classArray];
             }
         } faliure:^(NSError * _Nonnull error) {
@@ -138,7 +138,7 @@
                 [self evaluateMessge];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
                 [self changePromptLabelStateWithArray:self.studentArray];
                 
             }

+ 12 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/ChatNavView.xib

@@ -4,6 +4,7 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -57,30 +58,30 @@
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e7v-cD-P17">
-                                            <rect key="frame" x="55" y="11.666666666666664" width="8" height="8"/>
+                                            <rect key="frame" x="53" y="11.666666666666664" width="10" height="10"/>
                                             <subviews>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tlA-Ri-XTs">
-                                                    <rect key="frame" x="1" y="1" width="6" height="6"/>
-                                                    <color key="backgroundColor" red="0.97254901959999995" green="0.31372549020000001" blue="0.26274509800000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    <rect key="frame" x="1" y="1" width="8" height="8"/>
+                                                    <color key="backgroundColor" systemColor="systemRedColor"/>
                                                     <userDefinedRuntimeAttributes>
                                                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                            <real key="value" value="3"/>
+                                                            <real key="value" value="4"/>
                                                         </userDefinedRuntimeAttribute>
                                                     </userDefinedRuntimeAttributes>
                                                 </view>
                                             </subviews>
                                             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                             <constraints>
-                                                <constraint firstAttribute="height" constant="8" id="8cs-vj-8Dn"/>
+                                                <constraint firstAttribute="height" constant="10" id="8cs-vj-8Dn"/>
                                                 <constraint firstAttribute="bottom" secondItem="tlA-Ri-XTs" secondAttribute="bottom" constant="1" id="9hL-Zt-q8L"/>
-                                                <constraint firstAttribute="width" constant="8" id="Aef-wc-VqQ"/>
+                                                <constraint firstAttribute="width" constant="10" id="Aef-wc-VqQ"/>
                                                 <constraint firstItem="tlA-Ri-XTs" firstAttribute="top" secondItem="e7v-cD-P17" secondAttribute="top" constant="1" id="eZl-8T-fUG"/>
                                                 <constraint firstAttribute="trailing" secondItem="tlA-Ri-XTs" secondAttribute="trailing" constant="1" id="mQe-mr-Gng"/>
                                                 <constraint firstItem="tlA-Ri-XTs" firstAttribute="leading" secondItem="e7v-cD-P17" secondAttribute="leading" constant="1" id="noN-cx-QH6"/>
                                             </constraints>
                                             <userDefinedRuntimeAttributes>
                                                 <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                                    <real key="value" value="4"/>
+                                                    <real key="value" value="5"/>
                                                 </userDefinedRuntimeAttribute>
                                             </userDefinedRuntimeAttributes>
                                         </view>
@@ -89,7 +90,7 @@
                                     <gestureRecognizers/>
                                     <constraints>
                                         <constraint firstAttribute="trailing" secondItem="9iF-re-XDo" secondAttribute="trailing" constant="15" id="Fl6-bp-yhk"/>
-                                        <constraint firstItem="e7v-cD-P17" firstAttribute="leading" secondItem="9iF-re-XDo" secondAttribute="trailing" constant="2" id="G9I-NO-XP8"/>
+                                        <constraint firstItem="e7v-cD-P17" firstAttribute="leading" secondItem="9iF-re-XDo" secondAttribute="trailing" id="G9I-NO-XP8"/>
                                         <constraint firstItem="9iF-re-XDo" firstAttribute="centerX" secondItem="U5I-bi-mi0" secondAttribute="centerX" id="XaM-yT-3tz"/>
                                         <constraint firstAttribute="width" constant="68" id="eHA-34-qc6"/>
                                         <constraint firstItem="9iF-re-XDo" firstAttribute="leading" secondItem="U5I-bi-mi0" secondAttribute="leading" constant="15" id="eTg-u1-zWL"/>
@@ -213,5 +214,8 @@
     </objects>
     <resources>
         <image name="group_create" width="22" height="22"/>
+        <systemColor name="systemRedColor">
+            <color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+        </systemColor>
     </resources>
 </document>

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.h

@@ -7,12 +7,14 @@
 
 #import <UIKit/UIKit.h>
 
-typedef void(^CreateGroupCallback)(NSString *groupName, NSString *groupDesc);
+typedef void(^CreateGroupCallback)(NSString * _Nonnull groupName, NSString * _Nonnull groupDesc);
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface GroupCreateView : UIView
 
+@property (weak, nonatomic) IBOutlet UIButton *sureButton;
+
 + (instancetype)shareInstance;
 
 - (void)submitCallback:(CreateGroupCallback)callback;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.m

@@ -42,7 +42,7 @@
     [self endEditing:YES];
     if (self.callback) {
         if ([NSString isEmptyString:self.groupNameField.text]) {
-            [self MBPShow:@"请输入群聊名称"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入群聊名称"];
             return;
         }
         self.callback(self.groupNameField.text, self.inputText.text);

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupCreateView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -140,6 +140,7 @@
             <connections>
                 <outlet property="groupNameField" destination="Ydi-WF-MOd" id="Ivd-k2-OYg"/>
                 <outlet property="inputText" destination="8Wg-F3-b3t" id="veb-hJ-Vwu"/>
+                <outlet property="sureButton" destination="3wa-2h-3g3" id="UP3-xg-bQs"/>
                 <outlet property="tipsLabel" destination="6cC-ME-Lxn" id="ik9-DC-Vk8"/>
             </connections>
             <point key="canvasLocation" x="131.8840579710145" y="82.700892857142847"/>

+ 25 - 25
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -78,7 +78,7 @@
             self.quitRomeEndTime = [result ks_integerValueForKey:@"practiceEndTime"];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -102,7 +102,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
@@ -116,7 +116,7 @@
             self.evaluateModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
@@ -239,7 +239,7 @@
 
 - (void)evaluateCourse {
     if (![self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        [self MBPShow:@"课程结束之后才可以评价哦~"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"课程结束之后才可以评价哦~"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -255,27 +255,27 @@
 
 - (void)evaluateAction:(NSString *)content {
     if ([NSString isEmptyString:content]) {
-        [self MBPShow:@"请输入评价内容"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入评价内容"];
         return;
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager teacherCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentId:self.studentId teacherReplied:content success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"评价成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"评价成功"];
             [self requestCourseInfoMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
 - (void)arrangeHomework {
     if (![self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        [self MBPShow:@"课程结束之后才可以布置作业哦~"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"课程结束之后才可以布置作业哦~"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -290,29 +290,29 @@
 }
 
 - (void)arrangeAction:(NSString *)homeworkContent {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"布置成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"布置成功"];
             [self requestCourseInfoMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
 // 评价作业
 - (void)evaluateHomework {
     if (self.homeworkModel.decorateHomework == 0) {
-        [self MBPShow:@"您还未布置作业"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"您还未布置作业"];
         return;
     }
     else if (self.homeworkModel.submitHomework == 0) {
-        [self MBPShow:@"学生还未提交作业"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"学生还未提交作业"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -327,18 +327,18 @@
 }
 
 - (void)commentAction:(NSString *)commentMessage {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:commentMessage success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"点评成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"点评成功"];
             [self requestCourseInfoMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -470,11 +470,11 @@
         [self joinClassRoom];
     }
     else if (endTimeInterval > 0) {
-        [self MBPShow:@"该课程已结束"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"该课程已结束"];
     }
     else {
         NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
-        [self MBPShow:tipsString];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:tipsString];
     }
 }
 

+ 16 - 17
KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m

@@ -344,7 +344,7 @@
             [self.calendar reloadData];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         [self endRefresh];
@@ -353,9 +353,9 @@
 
 #pragma mark --- 获取当日课程
 - (void)getCourseByDate:(NSString *)date {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager queryCourseForDay:KS_POST classDate:date success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 配置信息
             NSDictionary *config = [[dic ks_dictionaryValueForKey:@"data"] ks_dictionaryValueForKey:@"sysConfig"];
@@ -375,12 +375,12 @@
             self.dataArray = [lessonArray mutableCopy];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -541,31 +541,30 @@
         NSTimeInterval beginDuration = [NSDate countTimesTampWithBeginTime:limitBegin endTime:chooseTime format:formatString];
         NSTimeInterval endDuration = [NSDate countTimesTampWithBeginTime:endTime endTime:limitEnd format:formatString];
         if (beginDuration < 0) {
-            [self MBPShow:[NSString stringWithFormat:@"课程开始时间不可早于%@",self.adjustBeginTime]];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:[NSString stringWithFormat:@"课程开始时间不可早于%@",self.adjustBeginTime]];
             return;
         }
         else if (endDuration < 0) {
-            [self MBPShow:[NSString stringWithFormat:@"课程结束时间不可晚于%@",self.adjustEndTime]];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:[NSString stringWithFormat:@"课程结束时间不可晚于%@",self.adjustEndTime]];
             return;
         }
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager courseAdjustRequst:KS_POST courseId:model.courseId classDate:classDate startTime:chooseTime endTime:endTime success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"调整成功" promptCompletion:^{
-                [weakSelf loadMonthCourse:weakSelf.chooseMonth];
-                if (![NSString isEmptyString:weakSelf.chooseDay]) {
-                    [weakSelf getCourseByDate:weakSelf.chooseDay];
+            [LOADING_MANAGER KSShowMsg:@"下架成功" promptCompletion:^{
+                [self loadMonthCourse:self.chooseMonth];
+                if (![NSString isEmptyString:self.chooseDay]) {
+                    [self getCourseByDate:self.chooseDay];
                 }
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -598,7 +597,7 @@
 
 - (void)chatAction:(NSString *)targetId groupName:(NSString *)targetName isGroup:(BOOL)isGroup {
     if ([NSString isEmptyString:targetId] && isGroup) {
-        [self MBPShow:@"报名未结束,暂无群组"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
         return;
     }
     if (isGroup) {

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

@@ -77,7 +77,7 @@
             self.quitRomeEndTime = [result ks_integerValueForKey:@"pianoEndTime"];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -85,20 +85,20 @@
 }
 
 - (void)requestStudentList {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager musicRoomDetailRequest:KS_POST courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             self.studentArray = [NSMutableArray arrayWithArray:self.detailModel.studentHomeworkList.records];
             [self evaluateBottomButtonStatus];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -160,7 +160,7 @@
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     if (indexPath.section == 2) { // 学生作业
         if ([self.detailModel.decorateHomework isEqualToString:@"0"]) {
-            [self MBPShow:@"您还未布置作业"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"您还未布置作业"];
             return;
         }
         Records *studentModel = self.studentArray[indexPath.row];
@@ -181,7 +181,7 @@
 
 - (void)chatAction:(NSString *)targetId {
     if ([NSString isEmptyString:targetId]) {
-        [self MBPShow:@"报名未结束,暂无群组"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
         return;
     }
     TUIChatConversationModel *model = [[TUIChatConversationModel alloc] init];
@@ -193,7 +193,7 @@
 
 - (void)arrangeHomework {
     if (![self.detailModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        [self MBPShow:@"课程结束之后才可以布置作业哦~"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"课程结束之后才可以布置作业哦~"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -208,18 +208,18 @@
 }
 
 - (void)arrangeAction:(NSString *)homeworkContent {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"布置成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"布置成功"];
             [self requestCourseInfoMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -275,11 +275,11 @@
         [self joinClassRoom];
     }
     else if (endTimeInterval > 0) {
-        [self MBPShow:@"该课程已结束"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"该课程已结束"];
     }
     else {
         NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
-        [self MBPShow:tipsString];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:tipsString];
     }
 }
 

+ 17 - 18
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -193,7 +193,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -214,7 +214,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -286,15 +286,14 @@
 }
 
 - (void)refreshTenantBanner {
-    
-    if (self.mineInfo.tenantAlbumStatus == 0) {
-        self.tenantAlbumHeight = CGFLOAT_MIN;
-        self.tenantAlbumView.hidden = YES;
-    }
-    else {
+    if (self.mineInfo.tenantAlbumStatus != 0  && [UserDefault(TENANT_ID) integerValue] > 0) {
         self.tenantAlbumHeight = [HomeTenantPageView getViewHeight];
         self.tenantAlbumView.hidden = NO;
     }
+    else {
+        self.tenantAlbumHeight = CGFLOAT_MIN;
+        self.tenantAlbumView.hidden = YES;
+    }
     
     [self.tenantAlbumView mas_updateConstraints:^(MASConstraintMaker *make) {
         make.height.mas_equalTo(self.tenantAlbumHeight);
@@ -468,7 +467,7 @@
             
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -555,7 +554,7 @@
             self.albumArray = [NSMutableArray arrayWithArray:albumArray];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -608,7 +607,7 @@
             self.recommendMusicArray = [NSMutableArray arrayWithArray:topMusicArray];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -785,7 +784,7 @@
 
 
 - (void)requestHomeMessage {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [self requestUserInfo];
 }
 
@@ -800,7 +799,7 @@
     [self requestAwardMessage];
     
     dispatch_group_notify(self.requestGroup, dispatch_get_main_queue(), ^{
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self.scrollView.mj_header endRefreshing];
         [self refreshView];
     });
@@ -852,7 +851,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -977,18 +976,18 @@
 }
 
 - (void)setDefaultSubject:(NSString *)subjectId {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager defaultSubjectRequest:KS_POST subjectId:subjectId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // 请求数据
             [self requestHomeMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
     
 }

+ 10 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateDetailViewController.m

@@ -43,20 +43,20 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager selectRepliedRequest:KS_POST courseGroupId:self.courseGroupId courseScheduleId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         NSLog(@"%@- " , [dic mj_JSONString]);
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.detailModel = [[EvaluateDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
             
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -99,21 +99,21 @@
 
 - (void)evaluateAction:(NSString *)content {
     if ([NSString isEmptyString:content]) {
-        [self MBPShow:@"请输入评价内容"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入评价内容"];
         return;
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager teacherCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentId:self.studentId teacherReplied:content success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"评价成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"评价成功"];
             [self requestData];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/View/EvaluateCourseBodyView.m

@@ -119,7 +119,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];

+ 15 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m

@@ -56,18 +56,18 @@
 }
 
 - (void)requestCourseMessage {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkDetailRequest:KS_GET courseId:self.courseId studentId:self.studentId  success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.detailModel = [[HomeworkDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             [self evaluateViewDisplay];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -159,7 +159,7 @@
 // 评价作业
 - (void)evaluateHomework {
     if (self.detailModel.submitHomework == 0) {
-        [self MBPShow:@"学生暂未提交作业"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"学生暂未提交作业"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -174,34 +174,34 @@
 }
 
 - (void)evaluateAction:(NSString *)evaluateContent {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:evaluateContent success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"点评成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"点评成功"];
             [self requestCourseMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
 - (void)arrangeAction:(NSString *)homeworkContent {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeworkDecorateRequest:KS_POST content:homeworkContent courseScheduleId:self.courseId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"布置成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"布置成功"];
             [self requestCourseMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/MusicRoomHomeworkStudentController.m

@@ -45,19 +45,19 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager musicRoomDetailRequest:KS_POST courseId:self.courseId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.detailModel = [[MusicRoomDetailModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
             self.studentArray = [NSMutableArray arrayWithArray:self.detailModel.studentHomeworkList.records];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 #pragma mark ----- tablb data source

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

@@ -122,7 +122,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/FreezeListViewController.m

@@ -118,7 +118,7 @@
             self.headView.moneyLabel.text = [NSString formatMoneyDoubleNum:freezeAmount];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
@@ -128,9 +128,9 @@
 
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"OUT" searchDate:self.searchDate bizType:self.bizType postStatus:@"FROZEN" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -144,13 +144,13 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

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

@@ -130,9 +130,9 @@
 
 - (void)requestData {
     NSString *timeType = self.isYear ? @"YEAR" : @"MONTH";
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager accountTotalRequest:KS_POST dateTime:self.chooseDate timeType:timeType success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSDictionary *returnValue = [dic ks_dictionaryValueForKey:@"data"];
             self.topView.totalSalary.text = [NSString formatMoneyDoubleNum:[returnValue ks_floatValueForKey:@"totalInAmount"]];
@@ -152,10 +152,10 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m

@@ -142,7 +142,7 @@
             self.headView.noRecordAmount.text = [NSString formatMoneyDoubleNum:noRecordAmount];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -151,9 +151,9 @@
 
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"IN" searchDate:self.searchDate bizType:self.bizType postStatus:@"RECORDED" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -167,13 +167,13 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/NoRecordViewController.m

@@ -119,7 +119,7 @@
             self.headView.moneyLabel.text = [NSString formatMoneyDoubleNum:noRecordAmount];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
     } faliure:^(NSError * _Nonnull error) {
@@ -129,9 +129,9 @@
 
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager userAccountPageRequest:KS_POST paymentStatus:@"IN" searchDate:self.searchDate bizType:self.bizType postStatus:@"WAIT" page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -145,13 +145,13 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m

@@ -109,9 +109,9 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager withdrawalPageRequest:KS_POST searchDate:self.searchDate status:self.statusType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         NSLog(@"%@",[dic mj_JSONString]);
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
@@ -126,12 +126,12 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

+ 10 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m

@@ -78,18 +78,18 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager getWithdrawalInfoRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             self.drawModel = [[WithdrawModel alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self evaluateSource];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -133,25 +133,25 @@
         return;
     }
     if ([NSString isEmptyString:amountString]) {
-        [self MBPShow:@"请输入结算金额"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入结算金额"];
         return;
     }
     if ([amountString doubleValue] <= self.drawModel.withdrawalServiceFee) {
-        [self MBPShow:@"结算金额需要大于手续费"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"结算金额需要大于手续费"];
         return;
     }
     
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager withdrawalRequest:KS_POST amountWithdrawal:[amountString doubleValue] bankCardId:[NSString stringWithFormat:@"%.0f",self.drawModel.userBankCard.userBankCardIdentifier] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             [self showSuccessView];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 11 - 11
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m

@@ -110,24 +110,24 @@
 }
 
 - (void)shareButtonClick { // 获取分享数据
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager queryMusicShareMessageRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSDictionary *resultDic = [dic ks_dictionaryValueForKey:@"data"];
             MusicShareModel *model = [[MusicShareModel alloc] initWithDictionary:resultDic];
             if (model.musicSheetCount == 0) {
-                [self MBPShow:@"您还没有上架曲谱"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"您还没有上架曲谱"];
             }
             else {
                 [self displayShareViewWithSource:model];
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -156,7 +156,7 @@
         else {
             
         }
-        [self MBPShow:descMessage];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessage];
     }];
 }
 
@@ -169,10 +169,10 @@
         [[TZImageManager manager] savePhotoWithImage:image completion:^(PHAsset *asset, NSError *error) {
             if (!error) {
                 [self .shareView hideView];
-                [self MBPShow:@"已保存到相册"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"已保存到相册"];
             }
             else {
-                [self MBPShow:@"保存图片失败"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"保存图片失败"];
             }
         }];
     }
@@ -221,7 +221,7 @@
             [self refreshHeadView];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -258,7 +258,7 @@
             self.subjectList = [subjectArray mutableCopy];
         }
         else{
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -415,7 +415,7 @@
         [picker showPicker];
     }
     else {
-        [self MBPShow:@"无声部信息"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无声部信息"];
     }
 }
 

+ 4 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -125,7 +125,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];
@@ -233,13 +233,12 @@
 - (void)musicOffAction:(MusicMessageModel *)songMessage {
     [KSNetworkingManager musicOffRequest:KS_POST musicId:[NSString stringWithFormat:@"%.0f",songMessage.internalBaseClassIdentifier] success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            MJWeakSelf;
-            [self KSShowMsg:@"下架成功" promptCompletion:^{
-                [weakSelf refreshAndRequestData];
+            [LOADING_MANAGER KSShowMsg:@"下架成功" promptCompletion:^{
+                [self refreshAndRequestData];
             }];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m

@@ -53,7 +53,7 @@
             [self refreshAuthStatus];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -155,7 +155,7 @@
             [self refreshSubjectMessage];
         }
         else{
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         

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

@@ -145,7 +145,7 @@
                 }
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
             }
             [self.tableView reloadData];
             [self changePromptLabelStateWithArray:self.dataArray];
@@ -174,7 +174,7 @@
                 }
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
             }
             [self.tableView reloadData];
             [self changePromptLabelStateWithArray:self.dataArray];
@@ -272,7 +272,7 @@
             [picker showPicker];
         }
         else {
-            [self MBPShow:@"无声部信息"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无声部信息"];
             self.sortView.thirdArrowUp = NO;
         }
 
@@ -468,7 +468,7 @@
 
 - (void)chatAction:(NSString *)targetId {
     if ([NSString isEmptyString:targetId]) {
-        [self MBPShow:@"报名未结束,暂无群组"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
         return;
     }
     TUIChatConversationModel *model = [[TUIChatConversationModel alloc] init];

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

@@ -138,7 +138,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];
@@ -235,7 +235,7 @@
             [picker showPicker];
         }
         else {
-            [self MBPShow:@"无声部信息"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无声部信息"];
             self.sortView.thirdArrowUp = NO;
         }
 
@@ -370,7 +370,7 @@
 
 - (void)chatAction:(NSString *)targetId {
     if ([NSString isEmptyString:targetId]) {
-        [self MBPShow:@"报名未结束,暂无群组"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
         return;
     }
     TUIChatConversationModel *model = [[TUIChatConversationModel alloc] init];

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

@@ -111,7 +111,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.collectionView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];
@@ -192,7 +192,7 @@
         [picker showPicker];
     }
     else {
-        [self MBPShow:@"无声部信息"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无声部信息"];
         self.sortView.arrowUp = NO;
     }
 }

+ 8 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -63,14 +63,14 @@
     }
     [KSNetworkingManager batchSetReadRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            [self MBPShow:@"清除成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"清除成功"];
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                 [self resetSourceAndRequest];
             });
             
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -140,7 +140,7 @@
             [self.headView configUnreadCountCourse:courseCount sysMessage:sysCount];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -163,9 +163,9 @@
     });
 }
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager sysMessageListRequest:KS_POST group:self.groupType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             // rows
@@ -179,13 +179,13 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self.tableView reloadData];
         [self changePromptLabelState];
 
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
@@ -231,7 +231,7 @@
             [self toDetailViewWithTypeString:model.memo];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m

@@ -94,9 +94,9 @@
 }
 
 - (void)requestData {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager myReceiveRepliedRequest:KS_POST classMonth:self.chooseDate search:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
@@ -110,13 +110,13 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         
         [self.tableView reloadData];
         [self changePromptLabelState];
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
             [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];

+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ScanView/Controller/KSScanViewController.m

@@ -107,9 +107,9 @@
 }
 
 - (void)backPreView {
-    MJWeakSelf;
-    [self KSShowMsg:@"请扫描酷乐秀二维码" promptCompletion:^{
-        [weakSelf.navigationController popViewControllerAnimated:YES];
+    [LOADING_MANAGER KSShowMsg:@"请扫描酷乐秀二维码" promptCompletion:^{
+
+        [self.navigationController popViewControllerAnimated:YES];
     }];
 }
 
@@ -198,7 +198,7 @@
         [self dealWithCheckSource:scannedResult];
     }
     else {
-        [self MBPShow:@"无法识别"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无法识别"];
     }
 
 }

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/CreateLiveViewController.m

@@ -107,10 +107,10 @@
 - (void)createLiveAction:(NSString *)title content:(NSString *)content {
     
     if (self.imageArray.count == 0) {
-        [self MBPShow:@"请上传直播封面图"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请上传直播封面图"];
         return;
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     UIImage *coverImage = [self.imageArray lastObject];
     NSData *imgData = [UIImage turnsImaegDataByImage:coverImage];
     NSString *fileName = @"image";
@@ -119,9 +119,9 @@
         NSString *avatarUrl = [fileUrlArray lastObject];
         [self uploadCoverImage:avatarUrl liveTilte:title content:content];
     } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if (![NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
     }];
     
@@ -131,16 +131,16 @@
 - (void)uploadCoverImage:(NSString *)coverImageUrl liveTilte:(NSString *)title content:(NSString *)content {
    
     [KSNetworkingManager liveRoomCreateTempLiveRoom:KS_POST coverPic:coverImageUrl liveRemark:content roomTitle:title liveTime:[self.chooseTime integerValue] success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSString *roomId = [dic ks_stringValueForKey:@"data"];
             [self previewViewWithRoomId:roomId liveDesc:content];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

+ 17 - 18
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -405,10 +405,10 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         [self startPublishStream];
     }
     else {
-        [self showhud];
+        [LOADING_MANAGER showHUD];
         MJWeakSelf;
         [KSEnterLiveroomManager queryLiveroomConfig:self.roomId callback:^(NSDictionary * _Nullable parm) {
-            [weakSelf removehub];
+            [LOADING_MANAGER removeHUD];
             if (parm != nil) {
                 [weakSelf setupLiveroomConfig:parm];
                 [weakSelf createLivePageViewDisplay];
@@ -627,7 +627,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     } 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:@"加入聊天室失败"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"加入聊天室失败"];
             });
         }
     }];
@@ -658,12 +658,12 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                     // 回调信息
                     MJWeakSelf;
                     [self notiferJoinSuccessToServiceCallback:^{
-                        [weakSelf MBPShow:@"IM连接成功"];
+                        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"IM连接成功"];
                         [weakSelf joinChatRoomAndLiveRoom];
                     }];
                 }
                 else {
-                    [self MBPShow:MESSAGEKEY];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
                     [self quitRoomBackPreView:NO];
                 }
             } faliure:^(NSError * _Nonnull error) {
@@ -706,7 +706,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
         return;
     }
     self.isOtherLogin = YES;
-    [self MBPShow:@"该账号在其他设备上登录"];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"该账号在其他设备上登录"];
     [self quitRoomBackPreView:NO];
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         
@@ -895,7 +895,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                               completion:^(BOOL isSuccess, RCRTCCode desc) {
         if (desc != RCRTCCodeSuccess) {
             NSString *errorStr = [NSString stringWithFormat:@"订阅远端流失败:%ld", (long) desc];
-            [weakSelf MBPShow:errorStr];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:errorStr];
             return;
         }
     }];
@@ -1021,7 +1021,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             __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:@"加入直播间失败"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"加入直播间失败"];
             }
             else {
                 [strongSelf notiferJoinSuccessToServiceCallback:^{
@@ -1292,8 +1292,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                     [__blockSelf insertMessage:rcMessage userInfo:notification.userInfo];
                 }
                 else if ([rcMessage.content isMemberOfClass:[KSLiveChatroomClose class]]) { // 直播间已关闭
-                    
-                    [__blockSelf MBPShow:@"直播已结束"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"直播已结束"];
                     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                         // 退出直播间
                         [__blockSelf quitRoomBackPreView:NO];
@@ -1412,7 +1411,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 }
 
 //- (void)quitClassroomNotifer {
-//    [self MBPShow:@"直播已结束!"];
+//    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"直播已结束!"];
 //    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
 //        [self quitRoomBackPreView:NO];
 //    });
@@ -1456,7 +1455,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     } error:^(RCErrorCode errorCode, long messageId) {
         if (errorCode == RC_CHATROOM_NOT_EXIST) {
             dispatch_async(dispatch_get_main_queue(), ^{
-                [self MBPShow:@"聊天已被解散,请退出后重进。"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"聊天已被解散,请退出后重进。"];
             });
         }
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -1658,7 +1657,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             else {
                 desc = @"你已关闭麦克风";
             }
-            [self MBPShow:desc];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:desc];
         }
             break;
         default:
@@ -1908,7 +1907,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
                 // 判断连麦人数超过4人 无法点击
                 NSInteger count = [self queryConnectingCount];
                 if (count >= 4) {
-                    [self MBPShow:@"最多支持4人上麦哦~"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"最多支持4人上麦哦~"];
                     return;
                 }
                 KSLiveChatroomSeatResponse *responseMessage = [[KSLiveChatroomSeatResponse alloc] init];
@@ -1971,9 +1970,9 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 
 // 是否允许连麦 0:是 1否
 - (void)sendMicStatusRequest:(NSInteger)whetherMic {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager liveRoomSetMicApplyEnable:KS_GET roomUid:self.roomId whetherMic:whetherMic success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             if (whetherMic == 0) {
                 self.seatActionView.isForbiddenApply = NO;
@@ -1985,10 +1984,10 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor