Browse Source

loading 修改

Steven 1 year ago
parent
commit
a84347968a
100 changed files with 2298 additions and 1245 deletions
  1. 87 23
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 2 0
      KulexiuForStudent/KulexiuForStudent/AppDelegate.m
  3. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/videoMask_delete 1.imageset/videoMask_delete@2x.png
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/videoMask_delete 1.imageset/videoMask_delete@3x.png
  5. 6 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/Contents.json
  6. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_green.imageset/Contents.json
  7. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@2x.png
  8. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@3x.png
  9. 2 2
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/Contents.json
  10. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/choose_photo_red@2x.png
  11. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/choose_photo_red@3x.png
  12. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_green.imageset/Contents.json
  13. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@2x.png
  14. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@3x.png
  15. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/Contents.json
  16. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/complain_photo_red@2x.png
  17. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/complain_photo_red@3x.png
  18. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_green.imageset/Contents.json
  19. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@2x.png
  20. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@3x.png
  21. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/Contents.json
  22. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/complain_title_red@2x.png
  23. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/complain_title_red@3x.png
  24. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/delete_grey.imageset/Contents.json
  25. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/delete_grey.imageset/delete_grey@2x.png
  26. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/delete_grey.imageset/delete_grey@3x.png
  27. 0 11
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.h
  28. 1 90
      KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.m
  29. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/Boat_Loader.json
  30. 0 40
      KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSCustomLoadingManager.h
  31. 0 209
      KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSCustomLoadingManager.m
  32. 0 24
      KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSLoadingSuccessView.h
  33. 0 88
      KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSLoadingSuccessView.m
  34. 7 7
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m
  35. 0 8
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.h
  36. 8 157
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.m
  37. 26 24
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m
  38. 3 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h
  39. 16 1
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m
  40. 10 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.m
  41. 3 2
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.xib
  42. 173 185
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSUploadManager.m
  43. 6 6
      KulexiuForStudent/KulexiuForStudent/Common/Base/KSVideoRecordManager.m
  44. 24 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSCustomLoadingView.h
  45. 72 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSCustomLoadingView.m
  46. 65 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSCustomLoadingView.xib
  47. 35 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSHudLoagingManager.h
  48. 118 0
      KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSHudLoagingManager.m
  49. 3 0
      KulexiuForStudent/KulexiuForStudent/Common/Define/KSDomain.h
  50. 1 1
      KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch
  51. 9 9
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/KSMediaManager.m
  52. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSChoosePicker.h
  53. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSChoosePicker.m
  54. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSFullDatePicker.h
  55. 0 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSFullDatePicker.m
  56. 23 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSSmallChoosePicker.h
  57. 208 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSSmallChoosePicker.m
  58. 20 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/SmallPickerCell.h
  59. 46 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/SmallPickerCell.m
  60. 61 0
      KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/SmallPickerCell.xib
  61. 5 5
      KulexiuForStudent/KulexiuForStudent/Common/Tools/UMShare/KSUMShareManager.m
  62. 17 2
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantDarkViewController.m
  63. 5 5
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantMoreViewController.m
  64. 1 0
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantDarkEmptyView.m
  65. 4 6
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantDarkEmptyView.xib
  66. 2 0
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantHomeSubjectListCell.m
  67. 26 37
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/INSSettingViewController.m
  68. 4 3
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/InsititutionMineViewController.m
  69. 49 49
      KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/InstitutionMineBodyView.xib
  70. 8 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m
  71. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatUserDetailViewController.m
  72. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupApplyViewController.m
  73. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupMemberViewController.m
  74. 19 18
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m
  75. 110 55
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m
  76. 3 3
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBodyView.h
  77. 16 22
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBodyView.m
  78. 123 73
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBodyView.xib
  79. 24 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.h
  80. 59 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.m
  81. 49 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.xib
  82. 25 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.h
  83. 83 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.m
  84. 125 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.xib
  85. 22 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.h
  86. 51 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.m
  87. 79 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.xib
  88. 24 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSPhotoChooseView.h
  89. 50 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSPhotoChooseView.m
  90. 64 0
      KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSPhotoChooseView.xib
  91. 8 8
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m
  92. 4 4
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Controller/GroupNoticeViewController.m
  93. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/NoticeEditBodyView.m
  94. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatAddressBodyView.m
  95. 11 7
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/ChatNavView.xib
  96. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Chat/View/GroupCreateView.m
  97. 19 19
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/Controller/KSCloudViewController.m
  98. 2 2
      KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudFeedbackView.m
  99. 21 21
      KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  100. 6 6
      KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m

+ 87 - 23
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -562,7 +562,6 @@
 		BC60E3CE287D552800B05441 /* DeleteAccountBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC60E3CB287D552800B05441 /* DeleteAccountBodyView.xib */; };
 		BC60E3D2287D592800B05441 /* KSPublicAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */; };
 		BC60E3D3287D592800B05441 /* KSPublicAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC60E3D1287D592800B05441 /* KSPublicAlertView.m */; };
-		BC6744E32892795500BB8D03 /* Boat_Loader.json in Resources */ = {isa = PBXBuildFile; fileRef = BC6744E22892795500BB8D03 /* Boat_Loader.json */; };
 		BC71D0F32881A2420010F14B /* UMCommonLog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC71D0C82881A2420010F14B /* UMCommonLog.framework */; };
 		BC71D0F42881A2420010F14B /* UMCommonLog.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BC71D0C92881A2420010F14B /* UMCommonLog.bundle */; };
 		BC71D0F52881A2420010F14B /* UMAPM.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC71D0CC2881A2420010F14B /* UMAPM.framework */; };
@@ -764,7 +763,16 @@
 		BC8C2C612823F57100FBA5D5 /* MyAddressListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8C2C562823F57100FBA5D5 /* MyAddressListCell.xib */; };
 		BC8C2C7E28265D8E00FBA5D5 /* KSNewsAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C7C28265D8D00FBA5D5 /* KSNewsAlert.m */; };
 		BC8C2C7F28265D8E00FBA5D5 /* KSNewsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */; };
-		BC8EC02A28926D6E00D51094 /* KSCustomLoadingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */; };
+		BC9AA0B52ABC1C2400CD954D /* GroupQuitAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0B42ABC1C2400CD954D /* GroupQuitAlert.m */; };
+		BC9AA0B72ABC1C2A00CD954D /* GroupQuitAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0B62ABC1C2A00CD954D /* GroupQuitAlert.xib */; };
+		BC9AA0BA2ABC288000CD954D /* ChatComplainBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0B92ABC288000CD954D /* ChatComplainBottomView.m */; };
+		BC9AA0BC2ABC288600CD954D /* ChatComplainBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0BB2ABC288600CD954D /* ChatComplainBottomView.xib */; };
+		BC9AA0DD2ABC434900CD954D /* KSHudLoagingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0D92ABC434900CD954D /* KSHudLoagingManager.m */; };
+		BC9AA0DE2ABC434900CD954D /* KSCustomLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0DA2ABC434900CD954D /* KSCustomLoadingView.m */; };
+		BC9AA0DF2ABC434900CD954D /* KSCustomLoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0DB2ABC434900CD954D /* KSCustomLoadingView.xib */; };
+		BC9AA0E62ABC5F5200CD954D /* SmallPickerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0E12ABC5F5100CD954D /* SmallPickerCell.m */; };
+		BC9AA0E72ABC5F5200CD954D /* KSSmallChoosePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9AA0E42ABC5F5200CD954D /* KSSmallChoosePicker.m */; };
+		BC9AA0E82ABC5F5200CD954D /* SmallPickerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC9AA0E52ABC5F5200CD954D /* SmallPickerCell.xib */; };
 		BC9BA9A828B352B30031ECD2 /* KSRejectAllSeatMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */; };
 		BC9BA9A928B352B30031ECD2 /* KSDownSeatAllMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */; };
 		BCA1135D28A3A2BB007FAFB9 /* bass.txt in Resources */ = {isa = PBXBuildFile; fileRef = BCA1135A28A3A2BB007FAFB9 /* bass.txt */; };
@@ -782,6 +790,10 @@
 		BCB5B2D12ABAFE8E005BF25D /* HomeMusicSheetLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB5B2D02ABAFE8E005BF25D /* HomeMusicSheetLayout.m */; };
 		BCB5B2D52ABB1E13005BF25D /* KSEmptyStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB5B2D22ABB1E12005BF25D /* KSEmptyStatusView.m */; };
 		BCB5B2D62ABB1E13005BF25D /* KSEmptyStatusView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB5B2D32ABB1E12005BF25D /* KSEmptyStatusView.xib */; };
+		BCB5B3092ABC1341005BF25D /* KSImageDisplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB5B3082ABC1341005BF25D /* KSImageDisplayView.m */; };
+		BCB5B30B2ABC1347005BF25D /* KSImageDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB5B30A2ABC1347005BF25D /* KSImageDisplayView.xib */; };
+		BCB5B30E2ABC1711005BF25D /* KSPhotoChooseView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB5B30D2ABC1711005BF25D /* KSPhotoChooseView.m */; };
+		BCB5B3102ABC1717005BF25D /* KSPhotoChooseView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCB5B30F2ABC1717005BF25D /* KSPhotoChooseView.xib */; };
 		BCB6345D27F6D29600ACFDCF /* KSLiveChatroomWelcome.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB6340D27F6D29500ACFDCF /* KSLiveChatroomWelcome.m */; };
 		BCB6345E27F6D29600ACFDCF /* KSLiveChatroomLeave.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB6340E27F6D29500ACFDCF /* KSLiveChatroomLeave.m */; };
 		BCB6345F27F6D29600ACFDCF /* KSLiveChatroomEnter.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB6340F27F6D29500ACFDCF /* KSLiveChatroomEnter.m */; };
@@ -1007,7 +1019,6 @@
 		BCD9295F28F9447B006793E4 /* WMGaugeView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD9295B28F9447B006793E4 /* WMGaugeView.m */; };
 		BCD959C928DB071B00B70314 /* MusicTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD959C828DB071B00B70314 /* MusicTagView.m */; };
 		BCD959CC28DB0BAB00B70314 /* KSImageShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD959CB28DB0BAB00B70314 /* KSImageShareViewController.m */; };
-		BCDE35862893B0E200A9A560 /* KSLoadingSuccessView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDE35852893B0E200A9A560 /* KSLoadingSuccessView.m */; };
 		BCDE35882897B40000A9A560 /* shareImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BCDE35872897B40000A9A560 /* shareImage@2x.png */; };
 		BCDE358E289A7D8700A9A560 /* KSGroupTagImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDE358D289A7D8700A9A560 /* KSGroupTagImageView.m */; };
 		BCEBB8E82840B87100A76BE8 /* KSLiveChatroomMemberUp.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEBB8E72840B87100A76BE8 /* KSLiveChatroomMemberUp.m */; };
@@ -2130,7 +2141,6 @@
 		BC60E3CF287D592800B05441 /* KSPublicAlertView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSPublicAlertView.xib; sourceTree = "<group>"; };
 		BC60E3D0287D592800B05441 /* KSPublicAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSPublicAlertView.h; sourceTree = "<group>"; };
 		BC60E3D1287D592800B05441 /* KSPublicAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSPublicAlertView.m; sourceTree = "<group>"; };
-		BC6744E22892795500BB8D03 /* Boat_Loader.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Boat_Loader.json; sourceTree = "<group>"; };
 		BC71D0C82881A2420010F14B /* UMCommonLog.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UMCommonLog.framework; sourceTree = "<group>"; };
 		BC71D0C92881A2420010F14B /* UMCommonLog.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = UMCommonLog.bundle; sourceTree = "<group>"; };
 		BC71D0CC2881A2420010F14B /* UMAPM.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UMAPM.framework; sourceTree = "<group>"; };
@@ -2411,8 +2421,22 @@
 		BC8C2C7B28265D8D00FBA5D5 /* KSNewsAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSNewsAlert.h; sourceTree = "<group>"; };
 		BC8C2C7C28265D8D00FBA5D5 /* KSNewsAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSNewsAlert.m; sourceTree = "<group>"; };
 		BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSNewsAlert.xib; sourceTree = "<group>"; };
-		BC8EC02828926D6E00D51094 /* KSCustomLoadingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSCustomLoadingManager.h; sourceTree = "<group>"; };
-		BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSCustomLoadingManager.m; sourceTree = "<group>"; };
+		BC9AA0B32ABC1C2400CD954D /* GroupQuitAlert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GroupQuitAlert.h; sourceTree = "<group>"; };
+		BC9AA0B42ABC1C2400CD954D /* GroupQuitAlert.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GroupQuitAlert.m; sourceTree = "<group>"; };
+		BC9AA0B62ABC1C2A00CD954D /* GroupQuitAlert.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupQuitAlert.xib; sourceTree = "<group>"; };
+		BC9AA0B82ABC288000CD954D /* ChatComplainBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatComplainBottomView.h; sourceTree = "<group>"; };
+		BC9AA0B92ABC288000CD954D /* ChatComplainBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatComplainBottomView.m; sourceTree = "<group>"; };
+		BC9AA0BB2ABC288600CD954D /* ChatComplainBottomView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ChatComplainBottomView.xib; sourceTree = "<group>"; };
+		BC9AA0D82ABC434900CD954D /* KSCustomLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSCustomLoadingView.h; sourceTree = "<group>"; };
+		BC9AA0D92ABC434900CD954D /* KSHudLoagingManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSHudLoagingManager.m; sourceTree = "<group>"; };
+		BC9AA0DA2ABC434900CD954D /* KSCustomLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSCustomLoadingView.m; sourceTree = "<group>"; };
+		BC9AA0DB2ABC434900CD954D /* KSCustomLoadingView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSCustomLoadingView.xib; sourceTree = "<group>"; };
+		BC9AA0DC2ABC434900CD954D /* KSHudLoagingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSHudLoagingManager.h; sourceTree = "<group>"; };
+		BC9AA0E12ABC5F5100CD954D /* SmallPickerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SmallPickerCell.m; sourceTree = "<group>"; };
+		BC9AA0E22ABC5F5100CD954D /* SmallPickerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallPickerCell.h; sourceTree = "<group>"; };
+		BC9AA0E32ABC5F5100CD954D /* KSSmallChoosePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSSmallChoosePicker.h; sourceTree = "<group>"; };
+		BC9AA0E42ABC5F5200CD954D /* KSSmallChoosePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSSmallChoosePicker.m; sourceTree = "<group>"; };
+		BC9AA0E52ABC5F5200CD954D /* SmallPickerCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SmallPickerCell.xib; sourceTree = "<group>"; };
 		BC9BA9A428B352B30031ECD2 /* KSRejectAllSeatMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRejectAllSeatMessage.h; sourceTree = "<group>"; };
 		BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRejectAllSeatMessage.m; sourceTree = "<group>"; };
 		BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSDownSeatAllMessage.m; sourceTree = "<group>"; };
@@ -2440,6 +2464,12 @@
 		BCB5B2D22ABB1E12005BF25D /* KSEmptyStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSEmptyStatusView.m; sourceTree = "<group>"; };
 		BCB5B2D32ABB1E12005BF25D /* KSEmptyStatusView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSEmptyStatusView.xib; sourceTree = "<group>"; };
 		BCB5B2D42ABB1E12005BF25D /* KSEmptyStatusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSEmptyStatusView.h; sourceTree = "<group>"; };
+		BCB5B3072ABC1341005BF25D /* KSImageDisplayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSImageDisplayView.h; sourceTree = "<group>"; };
+		BCB5B3082ABC1341005BF25D /* KSImageDisplayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSImageDisplayView.m; sourceTree = "<group>"; };
+		BCB5B30A2ABC1347005BF25D /* KSImageDisplayView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSImageDisplayView.xib; sourceTree = "<group>"; };
+		BCB5B30C2ABC1711005BF25D /* KSPhotoChooseView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSPhotoChooseView.h; sourceTree = "<group>"; };
+		BCB5B30D2ABC1711005BF25D /* KSPhotoChooseView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSPhotoChooseView.m; sourceTree = "<group>"; };
+		BCB5B30F2ABC1717005BF25D /* KSPhotoChooseView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSPhotoChooseView.xib; sourceTree = "<group>"; };
 		BCB6340C27F6D29500ACFDCF /* KSRCMessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRCMessageModel.h; sourceTree = "<group>"; };
 		BCB6340D27F6D29500ACFDCF /* KSLiveChatroomWelcome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSLiveChatroomWelcome.m; sourceTree = "<group>"; };
 		BCB6340E27F6D29500ACFDCF /* KSLiveChatroomLeave.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSLiveChatroomLeave.m; sourceTree = "<group>"; };
@@ -2809,8 +2839,6 @@
 		BCD959C828DB071B00B70314 /* MusicTagView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MusicTagView.m; sourceTree = "<group>"; };
 		BCD959CA28DB0BAB00B70314 /* KSImageShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSImageShareViewController.h; sourceTree = "<group>"; };
 		BCD959CB28DB0BAB00B70314 /* KSImageShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSImageShareViewController.m; sourceTree = "<group>"; };
-		BCDE35842893B0E200A9A560 /* KSLoadingSuccessView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSLoadingSuccessView.h; sourceTree = "<group>"; };
-		BCDE35852893B0E200A9A560 /* KSLoadingSuccessView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSLoadingSuccessView.m; sourceTree = "<group>"; };
 		BCDE35872897B40000A9A560 /* shareImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shareImage@2x.png"; sourceTree = "<group>"; };
 		BCDE358C289A7D8700A9A560 /* KSGroupTagImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSGroupTagImageView.h; sourceTree = "<group>"; };
 		BCDE358D289A7D8700A9A560 /* KSGroupTagImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSGroupTagImageView.m; sourceTree = "<group>"; };
@@ -3110,6 +3138,9 @@
 				2723B60327F157D500E0B90B /* ChatComplainBodyView.h */,
 				2723B60F27F157D500E0B90B /* ChatComplainBodyView.m */,
 				2723B60827F157D500E0B90B /* ChatComplainBodyView.xib */,
+				BC9AA0B82ABC288000CD954D /* ChatComplainBottomView.h */,
+				BC9AA0B92ABC288000CD954D /* ChatComplainBottomView.m */,
+				BC9AA0BB2ABC288600CD954D /* ChatComplainBottomView.xib */,
 				2723B61127F157D500E0B90B /* GroupApplyChooseAllCell.h */,
 				2723B60927F157D500E0B90B /* GroupApplyChooseAllCell.m */,
 				2723B60727F157D500E0B90B /* GroupApplyChooseAllCell.xib */,
@@ -3125,6 +3156,15 @@
 				2723B61527F157D500E0B90B /* GroupSettingBodyView.h */,
 				2723B60B27F157D500E0B90B /* GroupSettingBodyView.m */,
 				2723B60C27F157D500E0B90B /* GroupSettingBodyView.xib */,
+				BCB5B3072ABC1341005BF25D /* KSImageDisplayView.h */,
+				BCB5B3082ABC1341005BF25D /* KSImageDisplayView.m */,
+				BCB5B30A2ABC1347005BF25D /* KSImageDisplayView.xib */,
+				BCB5B30C2ABC1711005BF25D /* KSPhotoChooseView.h */,
+				BCB5B30D2ABC1711005BF25D /* KSPhotoChooseView.m */,
+				BCB5B30F2ABC1717005BF25D /* KSPhotoChooseView.xib */,
+				BC9AA0B32ABC1C2400CD954D /* GroupQuitAlert.h */,
+				BC9AA0B42ABC1C2400CD954D /* GroupQuitAlert.m */,
+				BC9AA0B62ABC1C2A00CD954D /* GroupQuitAlert.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -3940,6 +3980,7 @@
 		277933FB27E3249F0010E277 /* Custom */ = {
 			isa = PBXGroup;
 			children = (
+				BC9AA0E02ABC5F3100CD954D /* PickerView */,
 				2779343F27E324A00010E277 /* GRCreateManager.h */,
 				277933FD27E3249F0010E277 /* GRCreateManager.m */,
 				277933FE27E3249F0010E277 /* GRScanManager.h */,
@@ -3948,10 +3989,6 @@
 				2779341527E3249F0010E277 /* HomeButton.m */,
 				2779343827E324A00010E277 /* KeyChainTools.h */,
 				2779345127E324A00010E277 /* KeyChainTools.m */,
-				2779344827E324A00010E277 /* KSChoosePicker.h */,
-				2779340727E3249F0010E277 /* KSChoosePicker.m */,
-				2779344527E324A00010E277 /* KSFullDatePicker.h */,
-				2779341727E3249F0010E277 /* KSFullDatePicker.m */,
 				2779341627E3249F0010E277 /* KSImageButton.h */,
 				2779344627E324A00010E277 /* KSImageButton.m */,
 				2779342927E324A00010E277 /* KSInputView */,
@@ -4344,13 +4381,13 @@
 		2779350B27E324A40010E277 /* Base */ = {
 			isa = PBXGroup;
 			children = (
+				BC9AA0D72ABC434900CD954D /* LoadingManager */,
 				BCB5B2D42ABB1E12005BF25D /* KSEmptyStatusView.h */,
 				BCB5B2D22ABB1E12005BF25D /* KSEmptyStatusView.m */,
 				BCB5B2D32ABB1E12005BF25D /* KSEmptyStatusView.xib */,
 				BC2888532A80F7BF0064B773 /* LoginManger */,
 				BCED1595293D941100266AEB /* banzou.mp3 */,
 				BCC5839328A9EC5C00BAB4CF /* CloudLoadingSource */,
-				BC8EC02428926B2C00D51094 /* CustomLoading */,
 				BC71D27C288807400010F14B /* TabbarAnimation */,
 				BC60E3D0287D592800B05441 /* KSPublicAlertView.h */,
 				BC60E3D1287D592800B05441 /* KSPublicAlertView.m */,
@@ -5981,16 +6018,32 @@
 			path = View;
 			sourceTree = "<group>";
 		};
-		BC8EC02428926B2C00D51094 /* CustomLoading */ = {
+		BC9AA0D72ABC434900CD954D /* LoadingManager */ = {
 			isa = PBXGroup;
 			children = (
-				BC8EC02828926D6E00D51094 /* KSCustomLoadingManager.h */,
-				BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */,
-				BCDE35842893B0E200A9A560 /* KSLoadingSuccessView.h */,
-				BCDE35852893B0E200A9A560 /* KSLoadingSuccessView.m */,
-				BC6744E22892795500BB8D03 /* Boat_Loader.json */,
+				BC9AA0D82ABC434900CD954D /* KSCustomLoadingView.h */,
+				BC9AA0DA2ABC434900CD954D /* KSCustomLoadingView.m */,
+				BC9AA0DB2ABC434900CD954D /* KSCustomLoadingView.xib */,
+				BC9AA0DC2ABC434900CD954D /* KSHudLoagingManager.h */,
+				BC9AA0D92ABC434900CD954D /* KSHudLoagingManager.m */,
+			);
+			path = LoadingManager;
+			sourceTree = "<group>";
+		};
+		BC9AA0E02ABC5F3100CD954D /* PickerView */ = {
+			isa = PBXGroup;
+			children = (
+				BC9AA0E32ABC5F5100CD954D /* KSSmallChoosePicker.h */,
+				BC9AA0E42ABC5F5200CD954D /* KSSmallChoosePicker.m */,
+				BC9AA0E22ABC5F5100CD954D /* SmallPickerCell.h */,
+				BC9AA0E12ABC5F5100CD954D /* SmallPickerCell.m */,
+				BC9AA0E52ABC5F5200CD954D /* SmallPickerCell.xib */,
+				2779344827E324A00010E277 /* KSChoosePicker.h */,
+				2779340727E3249F0010E277 /* KSChoosePicker.m */,
+				2779344527E324A00010E277 /* KSFullDatePicker.h */,
+				2779341727E3249F0010E277 /* KSFullDatePicker.m */,
 			);
-			path = CustomLoading;
+			path = PickerView;
 			sourceTree = "<group>";
 		};
 		BCA1135928A3A2B5007FAFB9 /* Source */ = {
@@ -7062,10 +7115,12 @@
 				BCC583B528A9EC6400BAB4CF /* cloud_animation_8.png in Resources */,
 				BCB9090D2852EEBE00F5FF69 /* LiveCard.bundle in Resources */,
 				BC71D24A288804CD0010F14B /* img_13.png in Resources */,
+				BC9AA0DF2ABC434900CD954D /* KSCustomLoadingView.xib in Resources */,
 				2723B63727F157D500E0B90B /* ApplyBottomView.xib in Resources */,
 				BC71D253288804CD0010F14B /* img_15.png in Resources */,
 				BC542E5928409EC900633781 /* InstrumentChooseCell.xib in Resources */,
 				2723B62F27F157D500E0B90B /* ChatComplainBodyView.xib in Resources */,
+				BC9AA0E82ABC5F5200CD954D /* SmallPickerCell.xib in Resources */,
 				BC71D254288804CD0010F14B /* img_4.png in Resources */,
 				2723B62127F157D500E0B90B /* NoticeEditBodyView.xib in Resources */,
 				BC802DB328BC70370079E350 /* HomeHotTalentCell.xib in Resources */,
@@ -7120,6 +7175,7 @@
 				BCC0F65E2A8CD8F500C4EFA4 /* TXTimeView.xib in Resources */,
 				BC71D268288804CD0010F14B /* img_25.png in Resources */,
 				BC7E77112900F39700EB37AF /* TuningForkSettingView.xib in Resources */,
+				BCB5B30B2ABC1347005BF25D /* KSImageDisplayView.xib in Resources */,
 				BCCE95D92AB0440400AB6385 /* singleMusic_Ani.json in Resources */,
 				BC36A50A2AB406AB002FEFB1 /* GroupOwnerTagView.xib in Resources */,
 				BCC583C928A9EC6400BAB4CF /* cloud_animation_11.png in Resources */,
@@ -7193,6 +7249,7 @@
 				BCFDA64B28BCA2000022B497 /* musicRoom_animation_2.png in Resources */,
 				BCC583C728A9EC6400BAB4CF /* cloud_animation_12.png in Resources */,
 				BC71D26D288804CD0010F14B /* img_18.png in Resources */,
+				BC9AA0B72ABC1C2A00CD954D /* GroupQuitAlert.xib in Resources */,
 				BCB6348127F6D29600ACFDCF /* LiveSeatApplyCell.xib in Resources */,
 				BC8A45A4283DC33400094BBB /* KSCloudSettingView.xib in Resources */,
 				2723B62D27F157D500E0B90B /* GroupApplyMemberCell.xib in Resources */,
@@ -7202,6 +7259,7 @@
 				BCFDA64F28BCA2000022B497 /* musicRoom_animation_1.png in Resources */,
 				BC40BA252812560100DEC0D1 /* HomeCourseTipsView.xib in Resources */,
 				BC71D270288804CD0010F14B /* img_32.png in Resources */,
+				BC9AA0BC2ABC288600CD954D /* ChatComplainBottomView.xib in Resources */,
 				BCC0F6B22A8CDD4000C4EFA4 /* tock.wav in Resources */,
 				27F9032E27E87C2E00C08A19 /* DeviceCheckView.xib in Resources */,
 				275FA23727E7356B00CFEA2E /* LoginBodyView.xib in Resources */,
@@ -7214,7 +7272,6 @@
 				BCA3DBC229015E2C00AE1C49 /* TunerSettingView.xib in Resources */,
 				BC71D259288804CD0010F14B /* img_48.png in Resources */,
 				BC71D274288804CD0010F14B /* img_37.png in Resources */,
-				BC6744E32892795500BB8D03 /* Boat_Loader.json in Resources */,
 				BCFE53E82812765600AD6786 /* HomeHotAlbumCell.xib in Resources */,
 				BC119239280ED98E00A716F7 /* AccompanyCourseCell.xib in Resources */,
 				BC27A076280FF61300F91E27 /* AccompanyDetailBottomView.xib in Resources */,
@@ -7229,6 +7286,7 @@
 				BC2932F02AAEC3AF0024D98E /* InstitutionNomalNavView.xib in Resources */,
 				BCFCE44F28DD5C000051FED8 /* High.wav in Resources */,
 				BCB9FA2C286D79A4005D766B /* ScanNavView.xib in Resources */,
+				BCB5B3102ABC1717005BF25D /* KSPhotoChooseView.xib in Resources */,
 				27F9032B27E87C2E00C08A19 /* NetworkBodyView.xib in Resources */,
 				2779358F27E324A80010E277 /* WMPlayer.bundle in Resources */,
 				BC71D248288804CD0010F14B /* img_39.png in Resources */,
@@ -7521,6 +7579,7 @@
 				2779357827E324A70010E277 /* NSString+phone.m in Sources */,
 				BC5367C7283F6D6B008428E8 /* HomeVideoCourseView.m in Sources */,
 				BC802D8528B872AB0079E350 /* KSLiveAlertView.m in Sources */,
+				BC9AA0B52ABC1C2400CD954D /* GroupQuitAlert.m in Sources */,
 				2779357D27E324A80010E277 /* KSMessageInputView.m in Sources */,
 				277935BE27E324A90010E277 /* FSCalendarCalculator.m in Sources */,
 				BCB6347727F6D29600ACFDCF /* LiveRoomLikeLayer.m in Sources */,
@@ -7712,6 +7771,7 @@
 				BC8A4599283DC33400094BBB /* TBXML.m in Sources */,
 				BC542E4B28409E9F00633781 /* InstrumentChooseViewController.m in Sources */,
 				BC3A4EB428DAE202001C4428 /* UIImage+KSScreenShot.m in Sources */,
+				BC9AA0DE2ABC434900CD954D /* KSCustomLoadingView.m in Sources */,
 				BC11927A280FB07F00A716F7 /* AccompanyArrangeCell.m in Sources */,
 				277935B827E324A90010E277 /* FSCalendar.m in Sources */,
 				BC106C4D2A933E75000759A9 /* LiveRoomHeadView.m in Sources */,
@@ -7870,7 +7930,6 @@
 				2779359F27E324A80010E277 /* TZPhotoPreviewCell.m in Sources */,
 				BC11928D280FB44300A716F7 /* HomeworkVideoView.m in Sources */,
 				277935A227E324A80010E277 /* TZLocationManager.m in Sources */,
-				BCDE35862893B0E200A9A560 /* KSLoadingSuccessView.m in Sources */,
 				2723B62827F157D500E0B90B /* KSSelectConversationViewController.m in Sources */,
 				BCD9295228F90202006793E4 /* ToneTuningBodyView.m in Sources */,
 				BC0A2265284471300065C1AB /* KSLiveBlockUser.m in Sources */,
@@ -7901,12 +7960,14 @@
 				BC106BFE2A933829000759A9 /* TXMicStatusSync.m in Sources */,
 				BC11925B280FA85300A716F7 /* HomeworkSortView.m in Sources */,
 				277935D327E324A90010E277 /* ALCalendarPicker.m in Sources */,
+				BCB5B30E2ABC1711005BF25D /* KSPhotoChooseView.m in Sources */,
 				BCC0F6572A8CD8F500C4EFA4 /* TxClassroomChatOtherCell.m in Sources */,
 				BCC0F6652A8CD8F500C4EFA4 /* TXDanChatCell.m in Sources */,
 				BC542E5828409EC900633781 /* InstrumentChooseCell.m in Sources */,
 				BCFDA62E28BC99410022B497 /* HomeBannerCell.m in Sources */,
 				2779354F27E324A70010E277 /* VoLRUManager.m in Sources */,
 				2779356727E324A70010E277 /* UIColor+Hex.m in Sources */,
+				BC9AA0E72ABC5F5200CD954D /* KSSmallChoosePicker.m in Sources */,
 				BC802DA728BC62390079E350 /* HomeHotMusicModel.m in Sources */,
 				BCB6345E27F6D29600ACFDCF /* KSLiveChatroomLeave.m in Sources */,
 				BC11929B280FD2E800A716F7 /* HomeworkBottomView.m in Sources */,
@@ -8023,6 +8084,7 @@
 				BC2888752A8101C80064B773 /* KSSearchResultListController.m in Sources */,
 				2723B66D27F15CFC00E0B90B /* ModifyNameBodyView.m in Sources */,
 				BC8A459D283DC33400094BBB /* KSParseMessageModel.m in Sources */,
+				BC9AA0BA2ABC288000CD954D /* ChatComplainBottomView.m in Sources */,
 				275FA23327E7356B00CFEA2E /* VefiCodeLoginController.m in Sources */,
 				BCD886E12907E7AE00BC4EE6 /* KSGaugeView.m in Sources */,
 				BC7E770F2900F38F00EB37AF /* TuningForkSettingView.m in Sources */,
@@ -8082,18 +8144,19 @@
 				277935D227E324A90010E277 /* ALCalendarHelper.m in Sources */,
 				2779353D27E324A60010E277 /* UIScrollView+KSTouch.m in Sources */,
 				275FA23927E7356B00CFEA2E /* FirstSettingBodyView.m in Sources */,
+				BCB5B3092ABC1341005BF25D /* KSImageDisplayView.m in Sources */,
 				BCC0F6712A8CD8F500C4EFA4 /* TXMainToolView.m in Sources */,
 				BC7663172827E49900C91A1D /* NotiferMessageCell.m in Sources */,
 				BC8A45A7283DC33400094BBB /* CloudControlButton.m in Sources */,
 				BCC0F6C32A8CDDEB00C4EFA4 /* RoomMember.m in Sources */,
 				BC60E3D3287D592800B05441 /* KSPublicAlertView.m in Sources */,
-				BC8EC02A28926D6E00D51094 /* KSCustomLoadingManager.m in Sources */,
 				BCB6346527F6D29600ACFDCF /* KSLiveChatroomLike.m in Sources */,
 				277935CA27E324A90010E277 /* TAAnimatedDotView.m in Sources */,
 				BC8A4598283DC33400094BBB /* KYSourceParseManager.m in Sources */,
 				2779353527E324A60010E277 /* NSObject+ReadDocument.m in Sources */,
 				277935C227E324A90010E277 /* QWdynamicModel.m in Sources */,
 				2779357E27E324A80010E277 /* KSInputView.m in Sources */,
+				BC9AA0DD2ABC434900CD954D /* KSHudLoagingManager.m in Sources */,
 				2723B63427F157D500E0B90B /* GroupApplyMemberCell.m in Sources */,
 				BC106C0F2A933829000759A9 /* TXLiveMessageSeatApply.m in Sources */,
 				BCC0F6082A8CD86C00C4EFA4 /* TXClassroomTextMsg.m in Sources */,
@@ -8104,6 +8167,7 @@
 				BC12636728FEA01F00509E90 /* RecentPracticeModel.m in Sources */,
 				BC2888772A8101C80064B773 /* KSSearchViewController.m in Sources */,
 				BC106C252A933869000759A9 /* TXLiveURLUtils.m in Sources */,
+				BC9AA0E62ABC5F5200CD954D /* SmallPickerCell.m in Sources */,
 				2779359527E324A80010E277 /* TZVideoEditedPreviewController.m in Sources */,
 				BCC0F6C42A8CDDEB00C4EFA4 /* ClassSongMessage.m in Sources */,
 				2723B63127F157D500E0B90B /* GroupSettingBodyView.m in Sources */,

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/AppDelegate.m

@@ -431,6 +431,8 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 - (void)applicationDidBecomeActive:(UIApplication *)application {
     // app启动或者app从后台进入前台都会调用这个方法
     [JPUSHService resetBadge]; // 清空 JPush 服务器中存储的 badge 值
+    // 退到后台发送消息
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"appDidBecomeActive" object:nil];
 }
 
 

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/videoMask_delete 1.imageset/videoMask_delete@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/videoMask_delete 1.imageset/videoMask_delete@3x.png


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

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

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_green.imageset/choose_photo_green@2x.png


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


+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Classroom/videoMask_delete 1.imageset/Contents.json → KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/choose_photo_red@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/choose_photo_red.imageset/choose_photo_red@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_green.imageset/complain_photo_green@2x.png


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


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/complain_photo_red@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_photo_red.imageset/complain_photo_red@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_green.imageset/complain_title_green@2x.png


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


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/complain_title_red@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Complain/complain_title_red.imageset/complain_title_red@3x.png


+ 22 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/delete_grey.imageset/delete_grey@2x.png


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


+ 0 - 11
KulexiuForStudent/KulexiuForStudent/Common/Base/BaseViewController.h

@@ -12,17 +12,6 @@ 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 - 90
KulexiuForStudent/KulexiuForStudent/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,91 +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:@"加载中..."
-                                                                   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{
-    [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

File diff suppressed because it is too large
+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/Boat_Loader.json


+ 0 - 40
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSCustomLoadingManager.h

@@ -1,40 +0,0 @@
-//
-//  KSCustomLoadingManager.h
-//  KulexiuForStudent
-//
-//  Created by 王智 on 2022/7/28.
-//
-
-#import <Foundation/Foundation.h>
-
-#define KSLoading_manager ([KSCustomLoadingManager shareInstance])
-
-typedef void(^LoadingFinishCallback)(void);
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface KSCustomLoadingManager : NSObject
-
-+ (instancetype)shareInstance;
-
-- (void)showCustomLoading;
-
-- (void)hideCustomLoading;
-
-- (void)showProgressCallback:(LoadingFinishCallback)callback;
-
-- (void)hideProgress;
-
-- (void)MBPShowText:(NSString *)tipsText inView:(UIView *_Nullable)displayView callback:(LoadingFinishCallback)callback;
-
-- (void)showSuccessMessage:(NSString *)successMsg inView:(UIView *_Nullable)displayView callback:(LoadingFinishCallback)callback;
-
-- (void)showErrorMessage:(NSString *)errorMsg inView:(UIView *_Nullable)displayView callback:(LoadingFinishCallback)callback;
-
-- (void)showSuccessMessage:(NSString *)successMsg callback:(LoadingFinishCallback)callback;
-
-- (void)showErrorMessage:(NSString *)errorMsg callback:(LoadingFinishCallback)callback;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 209
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSCustomLoadingManager.m

@@ -1,209 +0,0 @@
-//
-//  KSCustomLoadingManager.m
-//  KulexiuForStudent
-//
-//  Created by 王智 on 2022/7/28.
-//
-
-#import "KSCustomLoadingManager.h"
-#import <Lottie/Lottie.h>
-#import "KSLoadingSuccessView.h"
-
-@interface KSCustomLoadingManager ()
-
-@property (nonatomic, strong) MBProgressHUD *loadingHUD;
-
-@property (nonatomic, strong) MBProgressHUD *tipsHUD;
-
-@property (nonatomic, strong) MBProgressHUD *customHUD;
-
-@property (nonatomic, strong) LOTAnimationView *animationView;
-
-@end
-
-@implementation KSCustomLoadingManager
-
-+ (instancetype)shareInstance {
-    static KSCustomLoadingManager *manager = nil;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-        manager = [[KSCustomLoadingManager alloc] init];
-    });
-    return manager;
-}
-
-
-- (void)showCustomLoading {
-    dispatch_main_async_safe(^{
-        [MBProgressHUD hideHUD];
-        [self.customHUD showAnimated:YES];
-        [self.animationView play];
-        [self.customHUD hideAnimated:YES afterDelay:15.0f];
-        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
-    });
-}
-
-- (void)hideCustomLoading {
-    dispatch_main_async_safe(^{
-        if (self->_customHUD) {
-            [self->_customHUD removeFromSuperview];
-            self->_customHUD = nil;
-            [self.animationView stop];
-        }
-        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-    })
-}
-- (void)showProgressCallback:(LoadingFinishCallback)callback {
-    dispatch_main_async_safe(^{
-        [self hideAllHUDView];
-        self.loadingHUD = [MBProgressHUD showHUDAddedTo:[self getLastWindow] animated:YES];
-        self.loadingHUD.mode = MBProgressHUDModeIndeterminate;//如果没有文字,则显示菊花
-        self.loadingHUD.contentColor = [UIColor whiteColor];
-        self.loadingHUD.label.textColor = [UIColor whiteColor];
-        self.loadingHUD.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-        self.loadingHUD.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-        [self.loadingHUD hideAnimated:YES afterDelay:15.0f];
-        self.loadingHUD.completionBlock = ^{
-            callback();
-        };
-    });
-}
-
-- (void)hideProgress {
-    dispatch_main_async_safe(^{
-        [self hideAllHUDView];
-        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-    });
-    
-}
-
-- (void)MBPShowText:(NSString *)tipsText inView:(UIView *)displayView callback:(nonnull LoadingFinishCallback)callback {
-    __block UIView *view = displayView;
-    dispatch_main_async_safe(^{
-        [self hideAllHUDView];
-        if (view == nil) {
-            view = [self getLastWindow];
-        }
-        MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
-        hud.removeFromSuperViewOnHide =YES;
-        hud.mode = MBProgressHUDModeText;
-        hud.detailsLabel.text = tipsText;
-        hud.detailsLabel.numberOfLines = 0;
-        hud.minSize = CGSizeMake(132.f, 60.0f);
-        hud.detailsLabel.textColor = [UIColor whiteColor];
-        hud.detailsLabel.font = [UIFont systemFontOfSize:14.0f];
-        hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-        hud.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-        double hiddenTime = tipsText.length > 15 ? 3.0f : 1.5f;
-        [hud hideAnimated:YES afterDelay:hiddenTime];
-        hud.completionBlock = ^{
-            callback();
-        };
-    });
-}
-
-- (void)showSuccessMessage:(NSString *)successMsg callback:(LoadingFinishCallback)callback {
-    dispatch_main_async_safe(^{
-        [self show:successMsg animationType:KSANIMATIONTYPE_SUCCESS inView:nil callback:callback];
-    });
-}
-
-- (void)showErrorMessage:(NSString *)errorMsg callback:(LoadingFinishCallback)callback {
-    dispatch_main_async_safe(^{
-        [self show:errorMsg animationType:KSANIMATIONTYPE_SUCCESS inView:nil callback:callback];
-    });
-}
-
-
-- (void)showSuccessMessage:(NSString *)successMsg inView:(UIView *)displayView callback:(nonnull LoadingFinishCallback)callback {
-    dispatch_main_async_safe(^{
-        [self show:successMsg animationType:KSANIMATIONTYPE_SUCCESS inView:displayView callback:callback];
-    });
-    
-}
-
-- (void)showErrorMessage:(NSString *)errorMsg inView:(UIView *)displayView callback:(nonnull LoadingFinishCallback)callback {
-    dispatch_main_async_safe(^{
-        [self show:errorMsg animationType:KSANIMATIONTYPE_FAILED inView:displayView callback:callback];
-    });
-}
-
-- (void)show:(NSString *)text animationType:(KSANIMATIONTYPE)animationType inView:(UIView *)displayView callback:(LoadingFinishCallback)callback {
-    KSLoadingSuccessView *statusView = [[KSLoadingSuccessView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
-    statusView.animationType = animationType;
-    [self ks_showCustomView:statusView message:text inView:displayView callback:callback];
-}
-
-- (void)ks_showCustomView:(UIView *)customView message:(NSString *)message inView:(UIView *)view callback:(LoadingFinishCallback)callback {
-    [self hideAllHUDView];
-    if (view == nil) {
-        view = [self getLastWindow];
-    }
-    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
-    // 设置模式
-    hud.mode = MBProgressHUDModeCustomView;
-    // 设置自定义view
-    hud.customView = customView;
-
-    if (message) {
-        hud.detailsLabel.text = message;
-        hud.detailsLabel.numberOfLines = 0;
-        hud.detailsLabel.textColor = [UIColor whiteColor];
-        hud.detailsLabel.font = [UIFont systemFontOfSize:14.0f];
-    }
-    [hud setNeedsLayout];
-    [hud setNeedsDisplay];
-    // 隐藏时候从父控件中移除
-    hud.removeFromSuperViewOnHide = YES;
-    hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-    hud.bezelView.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.8];
-    double hiddenTime = message.length > 15 ? 3.0f : 1.5f;
-    hud.completionBlock = ^{
-        callback();
-    };
-    [hud hideAnimated:YES afterDelay:hiddenTime];
-}
-
-
-
-- (void)hideAllHUDView {
-    if (_loadingHUD) {
-        [_loadingHUD hideAnimated:YES];
-    }
-}
-
-- (UIWindow *)getLastWindow {
-    NSArray *windows = [UIApplication sharedApplication].windows;
-    for (UIWindow *window in [windows reverseObjectEnumerator]) {
-        if ([window isKindOfClass:[UIWindow class]] && CGRectEqualToRect(window.bounds, [UIScreen mainScreen].bounds)) {
-            return window;
-        }
-    }
-    return [UIApplication sharedApplication].keyWindow;
-}
-
-- (MBProgressHUD *)hud {
-    if (!_customHUD) {
-        _customHUD = [MBProgressHUD showHUDAddedTo:[self getLastWindow] animated:YES];
-        _customHUD.removeFromSuperViewOnHide = YES;
-        _customHUD.mode = MBProgressHUDModeCustomView;
-        _customHUD.animationType = MBProgressHUDAnimationZoomOut;
-        _customHUD.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
-        _customHUD.bezelView.backgroundColor = [UIColor clearColor];
-        _customHUD.customView = self.animationView;
-    }
-    return _customHUD;
-}
-
-
-- (LOTAnimationView *)animationView {
-    if (!_animationView) {
-        _animationView = [LOTAnimationView animationNamed:@"student_refresh"];
-        _animationView.contentMode = UIViewContentModeScaleAspectFill;
-        _animationView.animationSpeed = 2;
-        _animationView.loopAnimation = YES;
-    }
-    return _animationView;
-}
-
-@end

+ 0 - 24
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSLoadingSuccessView.h

@@ -1,24 +0,0 @@
-//
-//  KSLoadingSuccessView.h
-//  KulexiuForStudent
-//
-//  Created by 王智 on 2022/7/29.
-//
-
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef NS_ENUM(NSInteger, KSANIMATIONTYPE) {
-    KSANIMATIONTYPE_NONE,
-    KSANIMATIONTYPE_SUCCESS,   // 成功
-    KSANIMATIONTYPE_FAILED,    // 失败
-};
-
-@interface KSLoadingSuccessView : UIView<CAAnimationDelegate>
-
-@property (nonatomic, assign) KSANIMATIONTYPE animationType;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 88
KulexiuForStudent/KulexiuForStudent/Common/Base/CustomLoading/KSLoadingSuccessView.m

@@ -1,88 +0,0 @@
-//
-//  KSLoadingSuccessView.m
-//  KulexiuForStudent
-//
-//  Created by 王智 on 2022/7/29.
-//
-
-#import "KSLoadingSuccessView.h"
-
-@interface KSLoadingSuccessView ()
-
-@property (nonatomic, strong) CAShapeLayer *shapeLayer;
-
-@end
-
-@implementation KSLoadingSuccessView
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        self.backgroundColor = [UIColor clearColor];
-        self.translatesAutoresizingMaskIntoConstraints = NO;
-        self.layer.cornerRadius = 4;
-        self.layer.masksToBounds = YES;
-    }
-    return self;
-}
-
-- (void)setAnimationType:(KSANIMATIONTYPE)animationType {
-    _animationType = animationType;
-    [self drawStatusLine];
-}
-
-
-- (void)drawStatusLine {
-    CGFloat radius = CGRectGetWidth(self.bounds) / 2.0f;
-    
-    UIBezierPath *path = [UIBezierPath bezierPath];
-    if (_animationType == KSANIMATIONTYPE_SUCCESS) {
-        [path moveToPoint:CGPointMake(self.centerX - radius + 5, self.centerY)];
-        [path addLineToPoint:CGPointMake(self.centerX - 3, self.centerY + 10)];
-        [path addLineToPoint:CGPointMake(self.centerX + radius - 5, self.centerY - 10)];
-    }
-    else if (_animationType == KSANIMATIONTYPE_FAILED) {
-        [path moveToPoint:CGPointMake(radius / 2.0f, radius / 2.0f)];
-        [path addLineToPoint:CGPointMake(radius + radius / 2.0f, radius + radius / 2.0f)];
-        [path moveToPoint:CGPointMake(radius / 2.0f, radius + radius / 2.0f)];
-        [path addLineToPoint:CGPointMake(radius + radius / 2.0f, radius / 2.0f)];
-    }
-    _shapeLayer = [CAShapeLayer layer];
-    _shapeLayer.path = path.CGPath;
-    // 线条颜色
-    _shapeLayer.strokeColor = UIColor.whiteColor.CGColor;
-    // 填充颜色
-    _shapeLayer.fillColor = UIColor.clearColor.CGColor;
-    _shapeLayer.lineWidth = 5.0f;
-    // 设置线头为圆
-    _shapeLayer.lineCap = @"round";
-    _shapeLayer.strokeStart = 0.0f;
-    _shapeLayer.strokeEnd = 0.0f;
-    [self.layer addSublayer:_shapeLayer];
-    
-    CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
-    animation.fromValue = @0.0f;
-    animation.toValue = @1.0f;
-    [animation setDuration:0.45f];
-    // 动画结束之后不消失
-    animation.removedOnCompletion = NO;
-    animation.fillMode = kCAFillModeForwards;
-    [_shapeLayer addAnimation:animation forKey:@"strokeEnd"];
-}
-
-
-- (CGSize)intrinsicContentSize {
-    CGFloat contentViewH = 40;
-    CGFloat contentViewW = 40;
-    return CGSizeMake(contentViewW, contentViewH);
-}
-
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
-    // Drawing code
-}
-*/
-
-@end

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

@@ -714,7 +714,7 @@
                     }
                 }
                 else {
-                    [self MBShowInWindow:@"当前曲目无mp3伴奏"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"当前曲目无mp3伴奏"];
                     [self configVideoRecord:nil];
                 }
             }
@@ -728,11 +728,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();
         }
@@ -771,11 +771,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();
         }
@@ -1043,7 +1043,7 @@
             }
             else {
                 if (![NSString isEmptyString:message]) {
-                    [weakSelf MBPShow:message];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
                 }
                 
             }
@@ -1053,7 +1053,7 @@
 }
 
 - (void)showSuccessMessage:(NSString *)message {
-    [self MBPShow:message];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
     // 成功
     if (self.endRecordParm) {
         [self postMessage:self.endRecordParm];

+ 0 - 8
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.h

@@ -58,14 +58,6 @@ 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;
 

+ 8 - 157
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseViewController.m

@@ -13,7 +13,7 @@
 #import "CustomNavViewController.h"
 #import "DiskFreeSpaceManager.h"
 #import "KSTabBarViewController.h"
-#import "KSImageAlert.h"
+#import "KSPublicAlertView.h"
 
 
 #define PROMPT_TIME  1.5f
@@ -24,6 +24,8 @@
 }
 
 @property (nonatomic, strong) UIView *promptPlaceView;
+
+@property (nonatomic, strong) KSPublicAlertView *checkAlert;
 @end
 
 @implementation KSBaseViewController
@@ -83,17 +85,12 @@
 }
 
 - (void)showFreeSizeHardTips {
-    KSImageAlert *alertView = [KSImageAlert shareInstance];
     MJWeakSelf;
-    alertView.titleLabel.text = @"可用存储空间不足,可能会影响您的正常使用。您可以在设置-通用-储存空间中管理储存空间";
-    [alertView.cancleButton setTitle:@"取消" forState:UIControlStateNormal];
-    [alertView.sureButton setTitle:@"设置" forState:UIControlStateNormal];
-    [alertView sureCallback:^(BOOL isSure) {
-        if (isSure) {
-            [weakSelf openSettingView];
-        }
+    self.checkAlert = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"可用存储空间不足,可能会影响您的正常使用。您可以在设置-通用-储存空间中管理储存空间" leftTitle:@"取消" rightTitle:@"设置" cancelAction:^{
+        
+    } sureAction:^{
+        [weakSelf openSettingView];
     }];
-    [alertView showAlert];
 }
 
 - (void)addfeedBackGenertor {
@@ -106,11 +103,7 @@
 }
 
 - (void)openSettingView {
-    if (@available(iOS 10, *)) {
-        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
-    } else {
-        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
-    }
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
 }
 
 - (void)allocTitle:(NSString *)titleStr {
@@ -295,137 +288,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_main_async_safe(^{
-//        [self removeLoadingView];
-//    })
-    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)CallPhoneWith:(NSString*)phoneNumber {
     phoneNumber = [phoneNumber replaceAll:@" " WithString:@""];
@@ -528,17 +390,6 @@
     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 { // 登录状态

+ 26 - 24
KulexiuForStudent/KulexiuForStudent/Common/Base/KSBaseWKWebViewController.m

@@ -96,7 +96,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     [sendParm setValue:content forKey:@"content"];
     [self postMessage:sendParm];
     
-//    [self MBPShow:@"为了保证数据安全,请不要录屏"];
+//    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"为了保证数据安全,请不要录屏"];
 }
 
 
@@ -372,9 +372,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) {
 
@@ -459,6 +458,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"];
@@ -499,7 +501,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];
@@ -528,9 +530,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"joinLiveRoom"]) { // 进入直播间
         NSDictionary *valueDic = [parm ks_dictionaryValueForKey:@"content"];
         NSString *roomId = [valueDic ks_stringValueForKey:@"roomId"];
-        [self showhud];
+        [LOADING_MANAGER showHUD];
         [KSEnterLiveroomManager joinLiveWithRoomId:roomId inController:(CustomNavViewController *)self.navigationController callback:^{
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
         }];
     }
     else if ([[parm ks_stringValueForKey:@"api"] isEqualToString:@"savePicture"]) { // 保存图片到相册
@@ -580,7 +582,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,8 +1135,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
             self.chooseFileParm = nil;
         }
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-        [self removehub];
-        [self MBPShow:descMessaeg];
+        [LOADING_MANAGER removeHUD];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         [self fileChooseErrorCallback];
     }];
 }
@@ -1154,7 +1156,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];
         }];
@@ -1184,7 +1186,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:@""];
     }];
@@ -1241,28 +1243,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;
         }
@@ -1283,7 +1285,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
                     fileUrl = pathStr;
                 }
                 else {
-                    [self MBPShow:@"写入文件错误!"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"写入文件错误!"];
                     [self fileChooseErrorCallback];
                 }
             }
@@ -1295,19 +1297,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"];
@@ -1315,8 +1317,8 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
                 self.chooseFileParm = nil;
             }
         } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-            [self removehub];
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER removeHUD];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
             [self fileChooseErrorCallback];
         }];
     });

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

@@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
 // /api-student/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 ---- 图片上传
 /**
  图片上传

+ 16 - 1
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -326,7 +326,22 @@
 // /api-student/getUploadSign
 + (void)getUploadSignRequest:(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:@"%@%@", hostURL, @"/api-teacher/getUploadSign"];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-student/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];
+}
+
+// 获取上传签名
+// /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-student/getUploadSign"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:bucketName forKey:@"bucketName"];
     [parm setValue:fileName forKey:@"fileName"];

+ 10 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.m

@@ -23,11 +23,21 @@
 
 @property (nonatomic, copy) AlertCallback sureCallback;
 
+@property (weak, nonatomic) IBOutlet UIView *leftView;
+
 @end
 
 
 @implementation KSPublicAlertView
 
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self.leftView setBackgroundColor:CLIENT_THEMECOLOR];
+    [self.cancleButton setTitleColor:CLIENT_THEMECOLOR forState:UIControlStateNormal];
+    self.cancleButton.layer.borderColor = CLIENT_THEMECOLOR.CGColor;
+    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+}
+
 + (instancetype)shareInstanceWithTitle:(NSString *)title descMessage:(NSString *)descMsg leftTitle:(NSString *)leftTitle rightTitle:(NSString *)rightTitle cancelAction:(AlertCallback)cancelCallback sureAction:(AlertCallback)sureCallback {
     KSPublicAlertView *alertView = [[[NSBundle mainBundle] loadNibNamed:@"KSPublicAlertView" owner:nil options:nil] firstObject];
     alertView.topTitle.text = title;

+ 3 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/KSPublicAlertView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<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="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -139,6 +139,7 @@
             <connections>
                 <outlet property="cancleButton" destination="yAc-6f-XSy" id="gft-OU-gCQ"/>
                 <outlet property="descLabel" destination="75G-K8-Mgg" id="KFH-sk-nhd"/>
+                <outlet property="leftView" destination="hVM-RC-bSr" id="Xqw-TL-bou"/>
                 <outlet property="sureButton" destination="L4C-eG-exs" id="tY3-Sd-5cK"/>
                 <outlet property="topTitle" destination="dY9-ag-CwK" id="XN4-1j-Rmz"/>
             </connections>

+ 173 - 185
KulexiuForStudent/KulexiuForStudent/Common/Base/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,12 @@
 // bucket
 @property (nonatomic, strong) NSString *bucketName;
 
+// 腾讯cos bucket name
+@property (nonatomic, strong) NSString *cosBucketName;
+
+
+@property (nonatomic, strong) NSString *cosFileName;
+
 @end
 
 @implementation KSUploadManager
@@ -39,10 +46,25 @@
     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)configBucketName:(NSString *)bucketName {
     if ([NSString isEmptyString:bucketName]) {
         bucketName = @"daya";
@@ -58,6 +80,8 @@
     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";
 }
 
 // 上传改造 添加目录 /yyyyMM/dd/文件名
@@ -79,50 +103,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, @"上传文件失败");
         }
     }];
 }
@@ -139,86 +132,66 @@
     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];
     }
-    __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);
-        }];
+    [self MutilUploadFile:fileNameArray fileDataArray:fileDataArray successArray:[NSMutableArray array] failArray:[NSMutableArray array] fileIndex:0];
+}
+
+- (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;
@@ -230,43 +203,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, @"上传文件失败");
         }
     }];
 }
@@ -279,51 +230,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, @"上传文件失败");
         }
     }];
 }
@@ -362,4 +283,71 @@
     }
 }
 
+- (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

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

@@ -338,12 +338,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, @"保存成功");
                 }
@@ -358,7 +358,7 @@
         }
         else {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
                 if (self.callback) {
                     self.callback(NO, @"保存视频错误");
                 }
@@ -377,11 +377,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]]; //压缩后的视频
@@ -393,7 +393,7 @@
             
         } failure:^(NSString *errorMessage, NSError *error) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksHideHUD];
+                [LOADING_MANAGER removeHUD];
                 faliure(@"视频导出失败");
             });
             NSLog(@"视频导出失败:%@,error:%@",errorMessage, error);

+ 24 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/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
KulexiuForStudent/KulexiuForStudent/Common/Base/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
KulexiuForStudent/KulexiuForStudent/Common/Base/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>

+ 35 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSHudLoagingManager.h

@@ -0,0 +1,35 @@
+//
+//  KSHudLoagingManager.h
+//  GuanYueTeam
+//
+//  Created by 王智 on 2022/11/14.
+//
+
+#import <Foundation/Foundation.h>
+
+#define LOADING_MANAGER ([KSHudLoagingManager shareInstance])
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSHudLoagingManager : NSObject
+
++ (instancetype)shareInstance;
+
+- (void)showHUD;
+
+- (void)removeHUD;
+
+- (void)MBPShow:(NSString*)str inView:(UIView *)displayView;
+
+- (void)MBShowAUTOHidingInWindow:(NSString *)str;
+
+- (void)MBShowInWindow:(NSString *)str;
+
+// 提示后续操作
+- (void)KSShowMsg:(NSString *)message inView:(UIView *)displayView promptCompletion:(void(^)(void))promptCompletion;
+// 提示后续操作
+- (void)KSShowMsg:(NSString *)message promptCompletion:(void(^)(void))promptCompletion;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 118 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/LoadingManager/KSHudLoagingManager.m

@@ -0,0 +1,118 @@
+//
+//  KSHudLoagingManager.m
+//  GuanYueTeam
+//
+//  Created by 王智 on 2022/11/14.
+//
+
+#import "KSHudLoagingManager.h"
+#import <MBProgressHUD/MBProgressHUD.h>
+#import "UIView+Hints.h"
+#define PROMPT_TIME  1.5f
+
+@interface KSHudLoagingManager ()
+
+@property (nonatomic, strong) MBProgressHUD *HUD;
+
+@end
+
+@implementation KSHudLoagingManager
+
++ (instancetype)shareInstance {
+    
+    static KSHudLoagingManager *manager = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        manager = [[KSHudLoagingManager alloc] init];
+    });
+    return manager;
+}
+
+- (void)showHUD {
+    dispatch_main_async_safe(^{
+        [self removeLoadingView];
+        UIWindow *window = [[UIApplication sharedApplication ] keyWindow];
+        self.HUD = [window addHUDActivityViewToView:nil
+                                                       HintsText:@"加载中..."
+                                                           Image:nil
+                                                  hideAfterDelay:15.0f
+                                                         HaveDim:NO];
+        self.HUD.mode = MBProgressHUDModeIndeterminate;//显示菊花
+        
+        [window bringSubviewToFront:self.HUD];
+    });
+}
+
+- (void)removeHUD {
+    dispatch_main_async_safe(^{
+        [self removeLoadingView];
+    });
+}
+
+- (void)removeLoadingView {
+    
+    if (self.HUD) {
+        [self.HUD removeFromSuperview];
+    }
+    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
+}
+
+- (void)MBPShow:(NSString *)str inView:(UIView *)displayView {
+    [self showHud:str inView:displayView autoHide:YES];
+}
+
+- (void)showHud:(NSString *)str inView:(UIView *)displayView autoHide:(BOOL)autoHide {
+    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];
+        }
+    });
+}
+
+
+- (void)MBShowInWindow:(NSString *)str {
+    [self showHud:str inView:[NSObject getKeyWindow] autoHide:NO];
+}
+
+- (void)MBShowAUTOHidingInWindow:(NSString *)str {
+    [self showHud:str inView:[NSObject getKeyWindow] autoHide:YES];
+}
+
+- (void)KSShowMsg:(NSString *)message promptCompletion:(void (^)(void))promptCompletion {
+    [self KSShowMsg:message inView:[NSObject getKeyWindow] promptCompletion:promptCompletion];
+    
+}
+
+- (void)KSShowMsg:(NSString *)message inView:(UIView *)displayView promptCompletion:(void (^)(void))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

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Common/Define/KSDomain.h

@@ -8,6 +8,9 @@
 #ifndef KSDomain_h
 #define KSDomain_h
 
+#define FILE_DOMAIN (@"klx/")
+
+
 #define CONFIG_TXLiveLicenceURL (@"https://license.vod2.myqcloud.com/license/v2/1303457149_1/v_cube.license")
 #define CONFIG_TXLiveLicenceKey (@"874d35d907c1d92a7557a4216d59c233")
 

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

@@ -24,7 +24,6 @@
 #import "IQKeyboardManager.h"
 #import "UserKeyHeader.h"
 #import "UIView+ShowProgress.h"
-#import "MBProgressHUD+KSShow.h"
 #import "UIControl+ButtonAction.h"
 #import "UIView+KSExtension.h"
 #import "Macro.h"
@@ -36,6 +35,7 @@
 #import "UIView+SubViewExtension.h"
 #import "NSObject+KSDateFormatter.h"
 #import "KSLoginManager.h"
+#import "KSHudLoagingManager.h"
 
 #define FIRST_LOGIN_KEY (@"FirstLoginKey")
 

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

@@ -179,7 +179,7 @@
     [imagePickerVc setDidFinishPickingVideoHandle:^(UIImage *coverImage, PHAsset *asset) {
         if (asset.duration >= 481) {
             dispatch_main_async_safe(^{
-                [MBProgressHUD ksShowMessage:@"视频长度不能超过8分钟"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频长度不能超过8分钟"];
             });
             return;
         }
@@ -189,13 +189,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]]; //压缩后的视频
@@ -210,8 +210,8 @@
                 
             } failure:^(NSString *errorMessage, NSError *error) {
                 dispatch_main_sync_safe(^{
-                    [MBProgressHUD ksHideHUD];
-                    [MBProgressHUD ksShowMessage:@"视频导出失败"];
+                    [LOADING_MANAGER removeHUD];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频导出失败"];
                 });
                 NSLog(@"视频导出失败:%@,error:%@",errorMessage, error);
             }];
@@ -356,12 +356,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
@@ -376,8 +376,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
KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/KSChoosePicker.h → KulexiuForStudent/KulexiuForStudent/Common/Tools/Custom/PickerView/KSChoosePicker.h


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


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


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


+ 23 - 0
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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
KulexiuForStudent/KulexiuForStudent/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 = CLIENT_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
KulexiuForStudent/KulexiuForStudent/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>

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

@@ -88,7 +88,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];
@@ -96,7 +96,7 @@
             else {
                 if (self.callback) {
                     self.callback(NO,@"仅支持图片分享到群组");
-                    [MBProgressHUD ksShowMessage:@"仅支持图片分享到群组"];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"仅支持图片分享到群组"];
                 }
             }
             
@@ -104,7 +104,7 @@
         else if (platformType == UMSocialPlatformType_UserDefine_Begin+2) { // 图片保存到相册
             UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
             pasteboard.string = self.saveLinkUrl;
-            [MBProgressHUD ksShowMessage:@"复制成功"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"复制成功"];
         }
         else {
             //创建分享消息对象
@@ -137,7 +137,7 @@
                     NSLog(@"************分享失败 %@*********",error);
                     if (self.callback) {
                         self.callback(NO, @"分享失败");
-                        [MBProgressHUD ksShowMessage:@"分享失败"];
+                        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
                     }
                 }else{
                     if ([data isKindOfClass:[UMSocialShareResponse class]]) {
@@ -146,7 +146,7 @@
                         NSLog(@"************分享成功 %@*********",resp.message);
                         if (self.callback) {
                             self.callback(YES,@"分享成功");
-                            [MBProgressHUD ksShowMessage:@"分享成功"];
+                            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                         }
                     }else{
                         NSLog(@"response data is %@",data);

+ 17 - 2
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantDarkViewController.m

@@ -64,6 +64,17 @@
     // Do any additional setup after loading the view.
     [self configUI];
     self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didBecomeActive) name:@"appDidBecomeActive" object:nil];
+}
+
+- (void)didBecomeActive {
+    if (self.tenantAlbumStatus == 0) {
+        [self.emptyAniView startPlay];
+    }
+    else {
+        TenantHomeSubjectListCell *cell = (TenantHomeSubjectListCell *)[self.pagerView curIndexCell];
+        [cell startAnimation];
+    }
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -73,6 +84,10 @@
         self.isFirstLoad = NO;
         [self requestTrackAuth];
     }
+    else {
+        NSLog(@"view app");
+        [self didBecomeActive];
+    }
 }
 
 
@@ -184,7 +199,7 @@
         }
         else {
             
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -291,7 +306,7 @@
     CGFloat height = (KPortraitHeight - navHeight - searchHeight - kTabBarHeight - 16);
     TYCyclePagerViewLayout *layout = [[TYCyclePagerViewLayout alloc] init];
     CGFloat width = height / 571 * 296;
-    layout.itemSize = CGSizeMake(height/571*296, height);
+    layout.itemSize = CGSizeMake(width, height);
     layout.itemSpacing = 16.0f;
     layout.layoutType = TYCyclePagerTransformLayoutLinear;
     layout.sectionInset = UIEdgeInsetsMake(0, (KPortraitWidth - width) / 2.0f, 0, (KPortraitWidth - width) / 2.0f);

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/Controller/TenantMoreViewController.m

@@ -200,7 +200,7 @@
     [self requestHomeMusicMessage];
     [self requestUserInfo];
     dispatch_group_notify(self.requestGroup, dispatch_get_main_queue(), ^{
-//        [self removehub];
+//        [LOADING_MANAGER removeHUD];
         [self.scrollView.mj_header endRefreshing];
         [self refreshView];
     });
@@ -212,7 +212,7 @@
             self.mineInfo = [[UserInfo alloc] initWithDictionary:[dic ks_dictionaryValueForKey:@"data"]];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self refreshHeader];
     } faliure:^(NSError * _Nonnull error) {
@@ -241,7 +241,7 @@
             self.bannerArray = [NSMutableArray arrayWithArray:bannerInfoArray];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);
@@ -261,7 +261,7 @@
             self.albumArray = [NSMutableArray arrayWithArray:albumArray];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         
     } faliure:^(NSError * _Nonnull error) {
@@ -300,7 +300,7 @@
             self.recommendMusicArray = [NSMutableArray arrayWithArray:topMusicArray];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         dispatch_group_leave(self.requestGroup);

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantDarkEmptyView.m

@@ -34,6 +34,7 @@
 
 - (void)startPlay {
     if ([self.animationView isAnimationPlaying] == NO) {
+        self.animationView.loopAnimation = YES;
         [self.animationView play];
     }
 }

+ 4 - 6
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantDarkEmptyView.xib

@@ -14,20 +14,18 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c6Z-fx-wAS">
-                    <rect key="frame" x="48.666666666666657" y="0.0" width="296" height="571"/>
+                    <rect key="frame" x="46.333333333333343" y="0.0" width="300.33333333333326" height="579"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="571" id="WTN-Ws-izv"/>
-                        <constraint firstAttribute="width" constant="296" id="Z9J-KQ-Te5"/>
-                        <constraint firstAttribute="width" secondItem="c6Z-fx-wAS" secondAttribute="height" multiplier="296:571" id="tmv-6M-dhc"/>
+                        <constraint firstAttribute="width" secondItem="c6Z-fx-wAS" secondAttribute="height" multiplier="296:571" id="Ipf-6X-NGV"/>
                     </constraints>
                 </view>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
-                <constraint firstItem="c6Z-fx-wAS" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="E0X-cv-KxZ"/>
                 <constraint firstItem="c6Z-fx-wAS" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="k3C-oU-TS4"/>
-                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="c6Z-fx-wAS" secondAttribute="bottom" id="zyG-R2-PhN"/>
+                <constraint firstItem="c6Z-fx-wAS" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="kjg-jD-5pj"/>
+                <constraint firstItem="c6Z-fx-wAS" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="tq9-FZ-BXX"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Home/View/TenantHomeSubjectListCell.m

@@ -43,6 +43,7 @@
 
 - (void)startAnimation {
     if ([self.animationView isAnimationPlaying] == NO) {
+        self.animationView.loopAnimation = YES;
         [self.animationView play];
     }
 }
@@ -61,4 +62,5 @@
     return _animationView;
 }
 
+
 @end

+ 26 - 37
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/INSSettingViewController.m

@@ -19,6 +19,7 @@
 #import "UserAuthViewController.h"
 #import "UserInfoManager.h"
 #import "AccountDeleteViewController.h"
+#import "KSSmallChoosePicker.h"
 
 
 @interface INSSettingViewController ()<RSKImageCropViewControllerDelegate>
@@ -35,6 +36,8 @@
 
 @property (nonatomic, strong) UserInfo *mineInfo;
 
+@property (nonatomic, assign) NSInteger lastChooseIndex;
+
 @end
 
 @implementation INSSettingViewController
@@ -74,6 +77,12 @@
 
 
 - (void)refreshView:(UserInfo *)info {
+    if (info.gender == 1) {
+        self.lastChooseIndex = 1;
+    }
+    else {
+        self.lastChooseIndex = 2;
+    }
     [self.bodyView configUserWithUserInfo:info];
 }
 
@@ -192,65 +201,45 @@
         [self modifyUserMessage:avatarUrl gender:nil birthday:nil];
     } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
         if ([NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
     }];
 }
 
 - (void)modifyUserMessage:(NSString *)imgUrl gender:(NSString *)gender birthday:(NSString *)birthday {
     NSString *userName = nil;
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager modifyUserMessage:KS_POST avatal:imgUrl gender:gender username:userName birthdate:birthday 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 requestUserMessage];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
 
 
 - (void)showModifySexAlert {
-    NSString *titleString = @"选择性别";
-    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"" message:titleString preferredStyle:IS_IPAD ? UIAlertControllerStyleAlert : UIAlertControllerStyleActionSheet];
-    NSMutableAttributedString *titleAtt = [[NSMutableAttributedString alloc] initWithString:titleString];
-    [titleAtt addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16.0f] range:NSMakeRange(0, titleString.length)];
-    [titleAtt addAttribute:NSForegroundColorAttributeName value:HexRGB(0x777777) range:NSMakeRange(0, titleString.length)];
-    [alertVC setValue:titleAtt forKey:@"attributedMessage"];
-    
-    UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"男" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-        
-        self.bodyView.userSex.text = @"男";
-        self.userSex = @"1";
-        [self modifyUserSex];
-    }];
-    [actionOne setValue:HexRGB(0x333333) forKey:@"_titleTextColor"];
-    [alertVC addAction:actionOne];
-    
-    UIAlertAction *actionTwo = [UIAlertAction actionWithTitle:@"女" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-        
-        self.bodyView.userSex.text = @"女";
-        self.userSex = @"0";
+    KSSmallChoosePicker *picker = [[KSSmallChoosePicker alloc] initWithTitle:@"修改性别" sourceData:@[@"男",@"女"] lastChoose:self.lastChooseIndex chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
+        self.bodyView.userSex.text = returnValue;
+        self.lastChooseIndex = chooseIndex;
+        if (chooseIndex == 1) {
+            self.userSex = @"1";
+        }
+        else {
+            self.userSex = @"0";
+        }
         [self modifyUserSex];
-    }];
-    [actionTwo setValue:HexRGB(0x333333) forKey:@"_titleTextColor"];
-    [alertVC addAction:actionTwo];
-    
-    
-    
-    UIAlertAction *cancleAlert = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+    } cancel:^{
         
     }];
-    [alertVC addAction:cancleAlert];
-    [cancleAlert setValue:HexRGB(0xAAAAAA) forKey:@"_titleTextColor"];
-    alertVC.modalPresentationStyle = UIModalPresentationFullScreen;
-    [self presentViewController:alertVC animated:true completion:nil];
+    [picker showPicker];
 }
 
 - (void)modifyUserSex {

+ 4 - 3
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/Controller/InsititutionMineViewController.m

@@ -57,9 +57,10 @@
     CGFloat contentHeight = KPortraitHeight - kTabBarHeight;
     CGFloat viewHeight = contentMinHeight > contentHeight ? contentMinHeight : contentHeight;
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.left.right.mas_equalTo(self.view);
+        make.left.right.mas_equalTo(self.view);
         make.height.mas_equalTo(viewHeight);
-        make.bottom.mas_equalTo(self.scrollView.mas_bottom);
+        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.bottom.mas_equalTo(self.scrollView.mas_bottom).offset(-10);
     }];
     MJWeakSelf;
     [_bodyView operationCallback:^(INSMINETYPE type) {
@@ -83,7 +84,7 @@
             [self refreshView];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         

+ 49 - 49
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/InstitutionMineBodyView.xib

@@ -291,10 +291,10 @@
                     <rect key="frame" x="13" y="287" width="367" height="130"/>
                     <subviews>
                         <view tag="1003" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sny-pb-TWZ">
-                            <rect key="frame" x="0.0" y="51" width="73.333333333333329" height="74"/>
+                            <rect key="frame" x="0.0" y="51" width="91.666666666666671" height="74"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_music" translatesAutoresizingMaskIntoConstraints="NO" id="z6K-YU-QmJ">
-                                    <rect key="frame" x="20.666666666666664" y="2" width="32" height="32"/>
+                                    <rect key="frame" x="30" y="2" width="32" height="32"/>
                                     <gestureRecognizers/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="32" id="3nQ-Bb-ccy"/>
@@ -302,7 +302,7 @@
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="我的曲库" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="llV-N6-iUM">
-                                    <rect key="frame" x="12.000000000000004" y="38" width="49.333333333333343" height="16"/>
+                                    <rect key="frame" x="21.333333333333332" y="38" width="49.333333333333343" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="EhM-4l-Q4H"/>
                                     </constraints>
@@ -323,50 +323,18 @@
                                 <outletCollection property="gestureRecognizers" destination="xCJ-Tc-iEY" appends="YES" id="5zR-pu-xql"/>
                             </connections>
                         </view>
-                        <view tag="1004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XWh-l9-hOS">
-                            <rect key="frame" x="73.333333333333343" y="51" width="73.333333333333343" height="74"/>
-                            <subviews>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_eveluate" translatesAutoresizingMaskIntoConstraints="NO" id="EEW-IB-hg7">
-                                    <rect key="frame" x="20.666666666666671" y="2" width="32" height="32"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="32" id="mbZ-LU-MyN"/>
-                                        <constraint firstAttribute="width" constant="32" id="rgr-gt-DRv"/>
-                                    </constraints>
-                                </imageView>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="练习统计" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tKv-6K-2Lh">
-                                    <rect key="frame" x="12.000000000000004" y="38" width="49.333333333333343" height="16"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="16" id="4PT-bu-Tbp"/>
-                                    </constraints>
-                                    <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>
-                            </subviews>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                            <gestureRecognizers/>
-                            <constraints>
-                                <constraint firstItem="EEW-IB-hg7" firstAttribute="top" secondItem="XWh-l9-hOS" secondAttribute="top" constant="2" id="M4E-fM-bQj"/>
-                                <constraint firstItem="tKv-6K-2Lh" firstAttribute="top" secondItem="EEW-IB-hg7" secondAttribute="bottom" constant="4" id="P9I-8f-mp0"/>
-                                <constraint firstItem="EEW-IB-hg7" firstAttribute="centerX" secondItem="XWh-l9-hOS" secondAttribute="centerX" id="fJS-9g-8tg"/>
-                                <constraint firstItem="tKv-6K-2Lh" firstAttribute="centerX" secondItem="EEW-IB-hg7" secondAttribute="centerX" id="lsU-HV-gVb"/>
-                            </constraints>
-                            <connections>
-                                <outletCollection property="gestureRecognizers" destination="BYm-19-2ah" appends="YES" id="htz-UT-oWn"/>
-                            </connections>
-                        </view>
                         <view tag="1005" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9n9-51-GnM">
-                            <rect key="frame" x="146.66666666666666" y="51" width="73.666666666666657" height="74"/>
+                            <rect key="frame" x="183.66666666666666" y="51" width="91.666666666666657" height="74"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_order" translatesAutoresizingMaskIntoConstraints="NO" id="Dd1-kz-ACR">
-                                    <rect key="frame" x="21" y="2" width="32" height="32"/>
+                                    <rect key="frame" x="29.666666666666686" y="2" width="32" height="32"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="32" id="QGk-JB-c5l"/>
                                         <constraint firstAttribute="width" constant="32" id="uVK-ef-irC"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单信息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CCv-8F-puO">
-                                    <rect key="frame" x="12.333333333333346" y="38" width="49.333333333333343" height="16"/>
+                                    <rect key="frame" x="21.000000000000004" y="38" width="49.333333333333343" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="teG-Pd-LeH"/>
                                     </constraints>
@@ -387,18 +355,18 @@
                                 <outletCollection property="gestureRecognizers" destination="vKx-8d-UTl" appends="YES" id="cu6-d5-Rgx"/>
                             </connections>
                         </view>
-                        <view tag="1006" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iBV-4n-9tN">
-                            <rect key="frame" x="220.33333333333334" y="51" width="73.333333333333343" height="74"/>
+                        <view hidden="YES" tag="1006" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iBV-4n-9tN">
+                            <rect key="frame" x="275.33333333333331" y="51" width="0.0" height="74"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_rank" translatesAutoresizingMaskIntoConstraints="NO" id="6o5-QV-pgd">
-                                    <rect key="frame" x="20.666666666666657" y="2" width="32" height="32"/>
+                                    <rect key="frame" x="-16" y="2" width="32" height="32"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="32" id="Jek-gw-t3C"/>
                                         <constraint firstAttribute="height" constant="32" id="cg2-2G-gFg"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="排行榜" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dva-Em-ug7">
-                                    <rect key="frame" x="18" y="38" width="37" height="16"/>
+                                    <rect key="frame" x="-18.666666666666629" y="38" width="37" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="JKR-Wd-nWu"/>
                                     </constraints>
@@ -411,6 +379,7 @@
                             <gestureRecognizers/>
                             <constraints>
                                 <constraint firstItem="Dva-Em-ug7" firstAttribute="centerX" secondItem="6o5-QV-pgd" secondAttribute="centerX" id="1sj-du-pWJ"/>
+                                <constraint firstAttribute="width" id="GrA-mY-P3S"/>
                                 <constraint firstItem="Dva-Em-ug7" firstAttribute="top" secondItem="6o5-QV-pgd" secondAttribute="bottom" constant="4" id="r2Y-yN-XbS"/>
                                 <constraint firstItem="6o5-QV-pgd" firstAttribute="top" secondItem="iBV-4n-9tN" secondAttribute="top" constant="2" id="x34-0c-dua"/>
                                 <constraint firstItem="6o5-QV-pgd" firstAttribute="centerX" secondItem="iBV-4n-9tN" secondAttribute="centerX" id="zwM-Ns-v9R"/>
@@ -429,17 +398,17 @@
                             <nil key="highlightedColor"/>
                         </label>
                         <view tag="1007" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JPB-oG-7OI">
-                            <rect key="frame" x="293.66666666666669" y="51" width="73.333333333333314" height="74"/>
+                            <rect key="frame" x="275.33333333333331" y="51" width="91.666666666666686" height="74"/>
                             <subviews>
                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_code" translatesAutoresizingMaskIntoConstraints="NO" id="fq9-6v-NL0">
-                                    <rect key="frame" x="20.666666666666629" y="2" width="32" height="32"/>
+                                    <rect key="frame" x="29.666666666666686" y="2" width="32" height="32"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="32" id="WSx-ZO-tIf"/>
                                         <constraint firstAttribute="height" constant="32" id="e4d-3b-Gdb"/>
                                     </constraints>
                                 </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="激活码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XRm-Fc-bnp">
-                                    <rect key="frame" x="18" y="38" width="37" height="16"/>
+                                    <rect key="frame" x="27.333333333333371" y="38" width="37" height="16"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="16" id="mj3-pq-ivj"/>
                                     </constraints>
@@ -460,6 +429,38 @@
                                 <outletCollection property="gestureRecognizers" destination="f2V-Zn-5hZ" appends="YES" id="Ubv-3d-jzI"/>
                             </connections>
                         </view>
+                        <view tag="1004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XWh-l9-hOS">
+                            <rect key="frame" x="91.666666666666686" y="51" width="92" height="74"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="insititution_mine_eveluate" translatesAutoresizingMaskIntoConstraints="NO" id="EEW-IB-hg7">
+                                    <rect key="frame" x="29.999999999999986" y="2" width="32" height="32"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="32" id="mbZ-LU-MyN"/>
+                                        <constraint firstAttribute="width" constant="32" id="rgr-gt-DRv"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="练习统计" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tKv-6K-2Lh">
+                                    <rect key="frame" x="21.333333333333332" y="38" width="49.333333333333343" height="16"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="16" id="4PT-bu-Tbp"/>
+                                    </constraints>
+                                    <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>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <gestureRecognizers/>
+                            <constraints>
+                                <constraint firstItem="EEW-IB-hg7" firstAttribute="top" secondItem="XWh-l9-hOS" secondAttribute="top" constant="2" id="M4E-fM-bQj"/>
+                                <constraint firstItem="tKv-6K-2Lh" firstAttribute="top" secondItem="EEW-IB-hg7" secondAttribute="bottom" constant="4" id="P9I-8f-mp0"/>
+                                <constraint firstItem="EEW-IB-hg7" firstAttribute="centerX" secondItem="XWh-l9-hOS" secondAttribute="centerX" id="fJS-9g-8tg"/>
+                                <constraint firstItem="tKv-6K-2Lh" firstAttribute="centerX" secondItem="EEW-IB-hg7" secondAttribute="centerX" id="lsU-HV-gVb"/>
+                            </constraints>
+                            <connections>
+                                <outletCollection property="gestureRecognizers" destination="BYm-19-2ah" appends="YES" id="htz-UT-oWn"/>
+                            </connections>
+                        </view>
                     </subviews>
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
@@ -469,22 +470,21 @@
                         <constraint firstItem="QIe-vg-wc9" firstAttribute="leading" secondItem="iE8-e2-07v" secondAttribute="leading" constant="15" id="43f-iw-ckE"/>
                         <constraint firstItem="Sny-pb-TWZ" firstAttribute="top" secondItem="QIe-vg-wc9" secondAttribute="bottom" constant="15" id="52f-wH-uDC"/>
                         <constraint firstItem="9n9-51-GnM" firstAttribute="bottom" secondItem="Sny-pb-TWZ" secondAttribute="bottom" id="ABN-Ze-8fa"/>
-                        <constraint firstItem="XWh-l9-hOS" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="Dim-41-sfB"/>
                         <constraint firstItem="9n9-51-GnM" firstAttribute="leading" secondItem="XWh-l9-hOS" secondAttribute="trailing" id="FRi-q4-0DZ"/>
                         <constraint firstItem="XWh-l9-hOS" firstAttribute="bottom" secondItem="Sny-pb-TWZ" secondAttribute="bottom" id="Fuw-8r-pjH"/>
                         <constraint firstItem="QIe-vg-wc9" firstAttribute="top" secondItem="iE8-e2-07v" secondAttribute="top" constant="15" id="M4I-eo-HK7"/>
+                        <constraint firstItem="9n9-51-GnM" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="NSC-3b-BJN"/>
                         <constraint firstItem="JPB-oG-7OI" firstAttribute="bottom" secondItem="iBV-4n-9tN" secondAttribute="bottom" id="OKn-6P-loW"/>
                         <constraint firstItem="XWh-l9-hOS" firstAttribute="leading" secondItem="Sny-pb-TWZ" secondAttribute="trailing" id="SnR-aA-EIQ"/>
-                        <constraint firstItem="JPB-oG-7OI" firstAttribute="width" secondItem="iBV-4n-9tN" secondAttribute="width" id="Tt7-AI-6E0"/>
                         <constraint firstItem="iBV-4n-9tN" firstAttribute="top" secondItem="Sny-pb-TWZ" secondAttribute="top" id="Xl2-uN-x4K"/>
                         <constraint firstItem="JPB-oG-7OI" firstAttribute="top" secondItem="iBV-4n-9tN" secondAttribute="top" id="YJA-mr-LYM"/>
-                        <constraint firstItem="9n9-51-GnM" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="Yrc-gQ-mgX"/>
                         <constraint firstAttribute="height" constant="130" id="ZcP-FC-3Pg"/>
-                        <constraint firstItem="iBV-4n-9tN" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="cVH-1m-HzC"/>
                         <constraint firstItem="JPB-oG-7OI" firstAttribute="leading" secondItem="iBV-4n-9tN" secondAttribute="trailing" id="fsd-xj-RxC"/>
                         <constraint firstItem="XWh-l9-hOS" firstAttribute="top" secondItem="Sny-pb-TWZ" secondAttribute="top" id="kX2-B8-NZw"/>
+                        <constraint firstItem="JPB-oG-7OI" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="q9G-2G-fdk"/>
                         <constraint firstItem="Sny-pb-TWZ" firstAttribute="leading" secondItem="iE8-e2-07v" secondAttribute="leading" id="ve1-IS-9Ga"/>
                         <constraint firstItem="iBV-4n-9tN" firstAttribute="leading" secondItem="9n9-51-GnM" secondAttribute="trailing" id="yhW-tY-WkR"/>
+                        <constraint firstItem="XWh-l9-hOS" firstAttribute="width" secondItem="Sny-pb-TWZ" secondAttribute="width" id="yiZ-Lc-Rrh"/>
                         <constraint firstAttribute="trailing" secondItem="JPB-oG-7OI" secondAttribute="trailing" id="yp3-a3-L5A"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/ChatAddressViewController.m

@@ -129,6 +129,14 @@
 #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

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/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];
     }];
 }
 

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupApplyViewController.m

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

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/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];

+ 19 - 18
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/GroupSettingViewController.m

@@ -17,6 +17,7 @@
 #import "KSPublicAlertView.h"
 #import <ImSDK_Plus/V2TIMManager+Group.h>
 #import "CustomNavViewController.h"
+#import "GroupQuitAlert.h"
 
 @interface GroupSettingViewController ()
 
@@ -28,7 +29,7 @@
 
 @property (nonatomic, assign) NSInteger applyCount;
 
-@property (nonatomic, strong) KSPublicAlertView *alertView;
+@property (nonatomic, strong) GroupQuitAlert *alertView;
 
 @end
 
@@ -92,7 +93,7 @@
             self.sourceModel = [[GroupListModel alloc] initWithDictionary:subDic];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self refreshUI];
         
@@ -113,7 +114,7 @@
             [self evaluateMessge];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -204,7 +205,7 @@
                 [self dismissGroup];
             }
             else {
-                [self MBPShow:@"您已不在当前群聊"];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:@"您已不在当前群聊"];
             }
 //            [self backAction];
         }
@@ -216,26 +217,27 @@
 
 - (void)dismissGroup {
     MJWeakSelf;
-    self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"确认退出群聊吗" leftTitle:@"取消" rightTitle:@"确定" cancelAction:^{
-        
-    } sureAction:^{
-        [weakSelf quitGroup];
+    self.alertView = [GroupQuitAlert shareInstance];
+    [self.alertView configTitle:@"退出群聊" desc:@"请确认是否要退出群聊?" callback:^(BOOL isSure) {
+        if (isSure) {
+            [weakSelf quitGroup];
+        }
     }];
+    [self.alertView showAlert];
 }
 
 - (void)quitGroup {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager quitImGroupRequest:KS_POST groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
         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) {
         
@@ -259,9 +261,8 @@
         NSLog(@"success");
     } fail:^(int code, NSString *desc) {
         dispatch_main_async_safe(^{
-            MJWeakSelf;
-            [self KSShowMsg:@"设置失败" promptCompletion:^{
-                weakSelf.bodyView.isOn = !weakSelf.bodyView.isOn;
+            [LOADING_MANAGER KSShowMsg:@"设置失败" promptCompletion:^{
+                self.bodyView.isOn = !self.bodyView.isOn;
             }];
         });
     }];

+ 110 - 55
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -9,17 +9,19 @@
 #import "KSChatComplainController.h"
 #import "ChatComplainBodyView.h"
 #import "LLPhotoBrowser.h"
-#import "KSImageButton.h"
+#import "KSImageDisplayView.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,46 @@
 }
 
 - (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);
+    }];
     
-    _bodyView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin);
-    MJWeakSelf;
-    [_bodyView submitAction:^(NSString *content) {
-        [weakSelf complainAction:content];
+    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);
     }];
-    [self.view addSubview:_bodyView];
     
+    MJWeakSelf;
+    [self.bottomView complainCallback:^{
+        [weakSelf complainAction];
+    }];
     [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,8 +100,8 @@
         NSString *attachments = [urlArray componentsJoinedByString:@","];
         [self uplodMessage:attachments content:content];
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
-        [self removehub];
-        [self MBPShow:descMessaeg];
+        [LOADING_MANAGER removeHUD];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
     }];
 }
 
@@ -86,18 +109,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];
     }];
     
 }
@@ -109,61 +132,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);
+        KSImageDisplayView *displayView = [KSImageDisplayView 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;
@@ -171,7 +196,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 {
     [self.view endEditing:YES];

+ 3 - 3
KulexiuForStudent/KulexiuForStudent/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
 

+ 16 - 22
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBodyView.m

@@ -12,11 +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 UIButton *sureButton;
+@property (weak, nonatomic) IBOutlet UILabel *countLabel;
 
 @end
 
@@ -25,7 +25,14 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     self.inputText.delegate = self;
-    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+    NSString *titleIcon = @"complain_title_green";
+    NSString *imageIcon = @"complain_photo_green";
+    if ([UserDefault(TENANT_ID) integerValue] > 0) {
+        titleIcon = @"complain_title_red";
+        imageIcon = @"complain_photo_red";
+    }
+    [self.titleIcon setImage:[UIImage imageNamed:titleIcon]];
+    [self.imageIcon setImage:[UIImage imageNamed:imageIcon]];
 }
 
 + (instancetype)shareInstance {
@@ -33,23 +40,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
 
@@ -82,9 +72,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.

+ 123 - 73
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBodyView.xib

@@ -4,112 +4,162 @@
     <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>
         <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="sureButton" destination="p75-wv-N7E" id="GZ0-vM-Yn2"/>
                 <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>

+ 24 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.h

@@ -0,0 +1,24 @@
+//
+//  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

+ 59 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/ChatComplainBottomView.m

@@ -0,0 +1,59 @@
+//
+//  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];
+    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+
+}
+
++ (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
KulexiuForStudent/KulexiuForStudent/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" adjustsImageWhenHighlighted="NO" 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="touchUpInside" id="NCs-NK-JSP"/>
+                    </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>

+ 25 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.h

@@ -0,0 +1,25 @@
+//
+//  GroupQuitAlert.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^KSQuitAlertCallback)(BOOL isSure);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GroupQuitAlert : UIView
+
++ (instancetype)shareInstance;
+
+- (void)configTitle:(NSString *)title desc:(NSString *)desc callback:(KSQuitAlertCallback)callback;
+
+- (void)showAlert;
+
+- (void)hiddenAction;
+@end
+
+NS_ASSUME_NONNULL_END

+ 83 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.m

@@ -0,0 +1,83 @@
+//
+//  GroupQuitAlert.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import "GroupQuitAlert.h"
+#import "UIView+Animation.h"
+
+@interface GroupQuitAlert ()
+
+@property (nonatomic, copy) KSQuitAlertCallback callback;
+
+@property (weak, nonatomic) IBOutlet UILabel *headTitle;
+
+@property (weak, nonatomic) IBOutlet UILabel *descLabel;
+
+@property (weak, nonatomic) IBOutlet UIButton *sureButton;
+
+
+@end
+
+@implementation GroupQuitAlert
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self.sureButton setBackgroundColor:CLIENT_THEMECOLOR];
+}
+
++ (instancetype)shareInstance {
+    GroupQuitAlert *view = [[[NSBundle mainBundle] loadNibNamed:@"GroupQuitAlert" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configTitle:(NSString *)title desc:(NSString *)desc callback:(KSQuitAlertCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+    [self.headTitle setText:title];
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    [paragraphStyle setLineSpacing:4];//调整行间距
+    [paragraphStyle setAlignment:NSTextAlignmentCenter];
+    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:[NSString returnNoNullStringWithString:desc] attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:16.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+    self.descLabel.attributedText = attrStr;
+}
+
+- (void)showAlert {
+    UIWindow *window = [NSObject getKeyWindow];
+    [window addSubview:self];
+    [self mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(window);
+    }];
+    
+    [self setPopAnimation];
+}
+
+- (void)hiddenAction {
+    [self removeFromSuperview];
+}
+
+- (IBAction)sureAction:(id)sender {
+    if (self.callback) {
+        self.callback(YES);
+    }
+    [self hiddenAction];
+}
+- (IBAction)cancleAction:(id)sender {
+    if (self.callback) {
+        self.callback(NO);
+    }
+    [self hiddenAction];
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 125 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/GroupQuitAlert.xib

@@ -0,0 +1,125 @@
+<?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="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="GroupQuitAlert">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="628"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Puf-OQ-f9W">
+                    <rect key="frame" x="44" y="227" width="305" height="174"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="退出群聊" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jga-Ay-Tm2">
+                            <rect key="frame" x="115.66666666666666" y="20" width="73.666666666666657" height="25"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="25" id="QCr-HP-Cd0"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8ow-2T-lUr">
+                            <rect key="frame" x="15" y="114" width="130" height="40"/>
+                            <color key="backgroundColor" red="0.99607843137254903" green="0.14117647058823529" blue="0.31764705882352939" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="E71-aT-Ykl"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="确认"/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="20"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Sf4-jm-z6m"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Sr-xY-YxJ">
+                            <rect key="frame" x="160" y="114" width="130" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="rZt-LY-GOn"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="取消">
+                                <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            </state>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="20"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                    <real key="value" value="1"/>
+                                </userDefinedRuntimeAttribute>
+                                <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                    <color key="value" red="0.85882352941176465" green="0.85882352941176465" blue="0.85882352941176465" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="cancleAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="X70-w8-RRw"/>
+                            </connections>
+                        </button>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请确认是否要退出群聊?" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vlp-Cw-bmi">
+                            <rect key="frame" x="20" y="65" width="265" height="24"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                            <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="3Sr-xY-YxJ" firstAttribute="top" secondItem="Vlp-Cw-bmi" secondAttribute="bottom" constant="25" id="4FW-HR-0Vb"/>
+                        <constraint firstItem="Jga-Ay-Tm2" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Puf-OQ-f9W" secondAttribute="leading" constant="20" id="9gg-Ye-SQa"/>
+                        <constraint firstAttribute="bottom" secondItem="8ow-2T-lUr" secondAttribute="bottom" constant="20" id="KPp-ZW-5wi"/>
+                        <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="174" id="LtO-HL-ekv"/>
+                        <constraint firstAttribute="trailing" secondItem="3Sr-xY-YxJ" secondAttribute="trailing" constant="15" id="RDb-co-bsq"/>
+                        <constraint firstAttribute="width" constant="305" id="Rbm-DN-KD0"/>
+                        <constraint firstItem="8ow-2T-lUr" firstAttribute="leading" secondItem="Puf-OQ-f9W" secondAttribute="leading" constant="15" id="YIs-wZ-4u3"/>
+                        <constraint firstAttribute="trailing" secondItem="Vlp-Cw-bmi" secondAttribute="trailing" constant="20" id="bXV-AZ-qWT"/>
+                        <constraint firstItem="Jga-Ay-Tm2" firstAttribute="centerX" secondItem="Puf-OQ-f9W" secondAttribute="centerX" id="fvf-xq-VYy"/>
+                        <constraint firstItem="3Sr-xY-YxJ" firstAttribute="width" secondItem="8ow-2T-lUr" secondAttribute="width" id="kSQ-24-nz8"/>
+                        <constraint firstItem="3Sr-xY-YxJ" firstAttribute="leading" secondItem="8ow-2T-lUr" secondAttribute="trailing" constant="15" id="kaz-OW-ITL"/>
+                        <constraint firstItem="Jga-Ay-Tm2" firstAttribute="top" secondItem="Puf-OQ-f9W" secondAttribute="top" constant="20" id="liI-Z5-xls"/>
+                        <constraint firstAttribute="bottom" secondItem="3Sr-xY-YxJ" secondAttribute="bottom" constant="20" id="nH4-Cq-2Ri"/>
+                        <constraint firstItem="Vlp-Cw-bmi" firstAttribute="top" secondItem="Jga-Ay-Tm2" secondAttribute="bottom" constant="20" id="uW5-Sc-cgb"/>
+                        <constraint firstItem="Vlp-Cw-bmi" firstAttribute="leading" secondItem="Puf-OQ-f9W" secondAttribute="leading" constant="20" id="ua3-5u-N1g"/>
+                    </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="sRGB"/>
+            <constraints>
+                <constraint firstItem="Puf-OQ-f9W" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Cne-hJ-jcW"/>
+                <constraint firstItem="Puf-OQ-f9W" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="DNH-o0-354"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="descLabel" destination="Vlp-Cw-bmi" id="STi-Bx-H1I"/>
+                <outlet property="headTitle" destination="Jga-Ay-Tm2" id="YT2-hr-Prm"/>
+                <outlet property="sureButton" destination="8ow-2T-lUr" id="jp7-U0-X4b"/>
+            </connections>
+            <point key="canvasLocation" x="67.938931297709928" y="1.4084507042253522"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.h

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

+ 51 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.m

@@ -0,0 +1,51 @@
+//
+//  KSImageDisplayView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2023/9/21.
+//
+
+#import "KSImageDisplayView.h"
+
+@interface KSImageDisplayView ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *displayImage;
+
+@property (nonatomic, copy) KSImageDisplayAction callback;
+
+@end
+
+@implementation KSImageDisplayView
+
++ (instancetype)shareInstance {
+    KSImageDisplayView *view = [[[NSBundle mainBundle] loadNibNamed:@"KSImageDisplayView" 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
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSImageDisplayView.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="KSImageDisplayView">
+            <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O5C-Vh-EoQ">
+                    <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cDT-1W-YWa">
+                            <rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
+                            <gestureRecognizers/>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="10"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <outletCollection property="gestureRecognizers" destination="trZ-uZ-I2r" appends="YES" id="2ze-PI-nDO"/>
+                            </connections>
+                        </imageView>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l91-bO-wQS">
+                            <rect key="frame" x="74" y="2" width="24" height="24"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="24" id="Bwb-i8-k2X"/>
+                                <constraint firstAttribute="width" constant="24" id="gfI-UC-9qX"/>
+                            </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="f90-7m-0yj"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="cDT-1W-YWa" firstAttribute="leading" secondItem="O5C-Vh-EoQ" secondAttribute="leading" id="0Fh-0N-Il5"/>
+                        <constraint firstItem="l91-bO-wQS" firstAttribute="top" secondItem="O5C-Vh-EoQ" secondAttribute="top" constant="2" id="6D1-f9-9Ir"/>
+                        <constraint firstItem="cDT-1W-YWa" firstAttribute="top" secondItem="O5C-Vh-EoQ" secondAttribute="top" id="7tE-QB-4bf"/>
+                        <constraint firstAttribute="trailing" secondItem="l91-bO-wQS" secondAttribute="trailing" constant="2" id="Bhz-sH-QDC"/>
+                        <constraint firstAttribute="trailing" secondItem="cDT-1W-YWa" secondAttribute="trailing" id="GRM-1w-qlm"/>
+                        <constraint firstAttribute="bottom" secondItem="cDT-1W-YWa" secondAttribute="bottom" id="hTF-RH-Rz0"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="O5C-Vh-EoQ" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="2nb-Vn-cEj"/>
+                <constraint firstAttribute="trailing" secondItem="O5C-Vh-EoQ" secondAttribute="trailing" id="Cd7-Vm-9YK"/>
+                <constraint firstItem="O5C-Vh-EoQ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="MDa-Rk-IPA"/>
+                <constraint firstAttribute="bottom" secondItem="O5C-Vh-EoQ" secondAttribute="bottom" id="Pkg-jl-REW"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="displayImage" destination="cDT-1W-YWa" id="9Rs-DP-b0g"/>
+            </connections>
+            <point key="canvasLocation" x="-98.473282442748086" y="-34.859154929577464"/>
+        </view>
+        <tapGestureRecognizer id="trZ-uZ-I2r">
+            <connections>
+                <action selector="showImageAction:" destination="iN0-l3-epB" id="Pg1-Hc-wWf"/>
+            </connections>
+        </tapGestureRecognizer>
+    </objects>
+    <resources>
+        <image name="delete_grey" width="18" height="18"/>
+    </resources>
+</document>

+ 24 - 0
KulexiuForStudent/KulexiuForStudent/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

+ 50 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSPhotoChooseView.m

@@ -0,0 +1,50 @@
+//
+//  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];
+    NSString *imgName = @"choose_photo_green";
+    if ([UserDefault(TENANT_ID) integerValue] > 0) {
+        imgName = @"choose_photo_red";
+    }
+    [self.imagePlace setImage:[UIImage imageNamed:imgName]];
+}
++ (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

+ 64 - 0
KulexiuForStudent/KulexiuForStudent/Module/Chat/Group/View/KSPhotoChooseView.xib

@@ -0,0 +1,64 @@
+<?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" 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>
+</document>

+ 8 - 8
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/Controller/GroupNoticeEditController.m

@@ -52,9 +52,9 @@
 //    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:^{
@@ -62,18 +62,18 @@
 //                }];
 //            }
 //            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:^{
@@ -81,10 +81,10 @@
 //                }];
 //            }
 //            else {
-//                [self MBPShow:MESSAGEKEY];
+//                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
 //            }
 //        } faliure:^(NSError * _Nonnull error) {
-//            [self removehub];
+//            [LOADING_MANAGER removeHUD];
 //        }];
 //        
 //    }

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/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:CLIENT_NONETWORKING_IMG inView:self.tableView];

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/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();

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

@@ -106,7 +106,7 @@
                 [self evaluateGroupMessage];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
                 [self changePromptLabelStateWithArray:self.classArray];
             }
             
@@ -136,7 +136,7 @@
                 [self evaluateMessge];
             }
             else {
-                [self MBPShow:MESSAGEKEY];
+                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
                 [self changePromptLabelStateWithArray:self.studentArray];
                 
             }

+ 11 - 7
KulexiuForStudent/KulexiuForStudent/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>
@@ -59,30 +60,30 @@
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e7v-cD-P17">
-                                            <rect key="frame" x="53" 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="1" green="0.062745098039215685" blue="0.21176470588235294" 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>
@@ -216,5 +217,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>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/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);

+ 19 - 19
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/Controller/KSCloudViewController.m

@@ -306,7 +306,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 
 - (void)downloadZipFileWithFloderName:(NSString *)name {
     
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager downloadFileRequestWithFileUrl:self.songMessageSource.zipUrl progress:^(int64_t bytesRead, int64_t totalBytes) {
         
     } success:^(NSURL * _Nonnull fileUrl) {
@@ -316,16 +316,16 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
         BOOL success = [SSZipArchive unzipFileAtPath:fileUrl.path toDestination:filePath];
         NSLog(@"%d", success);
         if (success) {
-            [self removehub];
+            [LOADING_MANAGER removeHUD];
             [self configUnZipFilePathWithFloderName:name];
         }
         else {
-            [self removehub];
-            [self MBPShow:@"资源解压失败"];
+            [LOADING_MANAGER removeHUD];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"资源解压失败"];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
-        [self MBPShow:@"下载配置资源失败"];
+        [LOADING_MANAGER removeHUD];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"下载配置资源失败"];
     }];
 }
 
@@ -964,7 +964,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 #pragma mark ---  player 播放引擎 播放和停止播放UI
 // 初始化播放引擎
 - (void)configPlayerEngineWithSong:(NSString *)songPath {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     self.playerEngine = [[MidiPlayerEngine alloc] init];
     self.playerEngine.accompanyVolume = 0.3f;
     self.playerEngine.reportTime = 10;
@@ -982,8 +982,8 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
         self.currentSpeed = self.playerEngine.baseRate;
     }
     dispatch_async(dispatch_get_main_queue(), ^{
-        [self MBPShow:@"加载完成"];
-        [self removehub];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"加载完成"];
+        [LOADING_MANAGER removeHUD];
         CloudControlButton *speedButton = [self.headView viewWithTag:BUTTON_TAG_SPEED];
         [speedButton showSpeed:self.currentSpeed];
     });
@@ -1087,7 +1087,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 
 
 - (void)showErrorMessage:(NSString *)message {
-    [self MBPShow:message];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
 }
 
 
@@ -1149,18 +1149,18 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 }
 
 - (void)submitFeedbackAction:(NSString *)content type:(NSString *)type {
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager cloudFeedbackRequest:KS_POST content:content type:type 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.feedbackView removeFromSuperview];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -1765,7 +1765,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
             }
             else {
                 if (![NSString isEmptyString:message]) {
-                    [weakSelf MBPShow:message];
+                    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
                 }
             }
         }];
@@ -1798,7 +1798,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
 }
 
 - (void)showSuccessMessage:(NSString *)message {
-    [self MBPShow:message];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:message];
 }
 
 #pragma mark ----- KSSliderView delegate
@@ -2156,7 +2156,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
                 [weakSelf sendUploadMessage:videoUrl];
             }
         } failure:^(NSString * _Nonnull desc) {
-            [weakSelf MBPShow:@"视频上传失败"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"视频上传失败"];
         }];
     }
 }
@@ -2179,7 +2179,7 @@ typedef NS_ENUM(NSInteger,COLOR_DISPLAYTYPE) {
     
     NSString *sendData = [content mj_JSONString];
     [self sendDataToSocketService:sendData];
-    [self MBPShow:@"上传成功"];
+    [LOADING_MANAGER MBShowAUTOHidingInWindow:@"上传成功"];
 }
 
 - (void)dealloc {

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/View/Help/CloudFeedbackView.m

@@ -65,11 +65,11 @@
     [self endEditing:YES];
     if (self.callback) {
         if ([NSString isEmptyString:self.typeString]) {
-            [self MBPShow:@"请选择问题类型"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择问题类型"];
             return;
         }
         else if ([NSString isEmptyString:self.textView.text]) {
-            [self MBPShow:@"请描述您遇到的问题"];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请描述您遇到的问题"];
             return;
         }
         self.callback(self.textView.text, self.typeString);

+ 21 - 21
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -82,7 +82,7 @@
             self.quitRomeEndTime = [result ks_integerValueForKey:@"practiceEndTime"];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         
@@ -106,7 +106,7 @@
             }
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         [self evaluateViewDisplay];
         [self.tableView reloadData];
@@ -138,7 +138,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) {
@@ -274,7 +274,7 @@
 - (void)evaluateCourse {
     
     if (![self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
-        [self MBPShow:@"课程结束之后才可以评价哦~"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"课程结束之后才可以评价哦~"];
         return;
     }
     self.alertView = [AccompanyAlertView shareInstance];
@@ -290,21 +290,21 @@
 
 - (void)evaluateAction:(NSString *)content starNum:(NSInteger)starNum {
     if ([NSString isEmptyString:content]) {
-        [self MBPShow:@"请输入评价内容"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请输入评价内容"];
         return;
     }
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager accompanyCourseRepliedRequest:KS_POST courseScheduleId:self.courseId courseGroupId:self.courseGroupId studentReplied:content score:starNum 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];
     }];
 }
 
@@ -377,7 +377,7 @@
     } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
         [self hudTipWillShow:NO];
         if ([NSString isEmptyString:descMessaeg]) {
-            [self MBPShow:descMessaeg];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:descMessaeg];
         }
     }];
 }
@@ -475,31 +475,31 @@
 
 - (void)submitHomeworkAction {
     if (self.homeworkModel.homeworkExpire == 1) {
-        [self MBPShow:@"作业已过期无法提交和查看!"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"作业已过期无法提交和查看!"];
         return;
     }
     if (self.isModify == NO) {
-        [self MBPShow:@"请先选择视频文件"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请先选择视频文件"];
         return;
     }
     if (self.fileArray.count == 0) {
-        [self MBPShow:@"请选择作业视频"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"请选择作业视频"];
         return;
     }
     NSString *attachment = [self.fileArray componentsJoinedByString:@","];
-    [self showhud];
+    [LOADING_MANAGER showHUD];
     [KSNetworkingManager homeSubmitAction:KS_POST courseScheduleId:self.courseId attachment:attachment 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];
             self.isModify = NO;
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
-        [self removehub];
+        [LOADING_MANAGER removeHUD];
     }];
 }
 
@@ -582,11 +582,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];
     }
 }
 

+ 6 - 6
KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m

@@ -329,7 +329,7 @@
             [self.calendar reloadData];
         }
         else {
-            [self MBPShow:MESSAGEKEY];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
     } faliure:^(NSError * _Nonnull error) {
         [self endRefresh];
@@ -338,9 +338,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"];
@@ -360,12 +360,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];
     }];
 }
 
@@ -506,7 +506,7 @@
 
 - (void)chatAction:(NSString *)targetId groupName:(NSString *)targetName isGroup:(BOOL)isGroup {
     if ([NSString isEmptyString:targetId] && isGroup) {
-        [self MBPShow:@"报名未结束,暂无群组"];
+        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
         return;
     }
     if (isGroup) {

Some files were not shown because too many files changed in this diff