Steven пре 3 година
родитељ
комит
bc2c2cbc2a
39 измењених фајлова са 1606 додато и 218 уклоњено
  1. 26 4
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 76 12
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. BIN
      KulexiuForTeacher/KulexiuForTeacher/7.6M.mov
  5. 79 65
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m
  6. 14 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  7. 21 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  8. 4 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Define/PrefixHeader.pch
  9. 3 3
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSMediaManager.m
  10. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m
  11. 14 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.h
  12. 282 15
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m
  13. 2 0
      KulexiuForTeacher/KulexiuForTeacher/KulexiuForTeacher.entitlements
  14. 11 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m
  15. 8 16
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m
  16. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  17. 10 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.m
  18. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.xib
  19. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m
  20. 44 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m
  21. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.h
  22. 96 22
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m
  23. 205 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m
  24. 32 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Model/ReceiveListModel.h
  25. 179 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Model/ReceiveListModel.m
  26. 19 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.h
  27. 74 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.m
  28. 155 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.xib
  29. 33 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.h
  30. 59 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.m
  31. 117 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.xib
  32. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressListViewController.m
  33. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/View/MyAddressListCell.m
  34. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/UnbindCardViewController.m
  35. 13 14
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/MyStyleViewController.m
  36. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m
  37. 0 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m
  38. 7 15
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m
  39. 6 12
      KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Sections/NewWhiteboard/KSWhiteboardView.m

+ 26 - 4
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -461,6 +461,10 @@
 		BC41104A2806706800800BD9 /* HomeworkListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC4110482806706800800BD9 /* HomeworkListCell.xib */; };
 		BC41104D280678E600800BD9 /* HomeworkSortView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC41104C280678E600800BD9 /* HomeworkSortView.m */; };
 		BC41104F280678ED00800BD9 /* HomeworkSortView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC41104E280678ED00800BD9 /* HomeworkSortView.xib */; };
+		BC48C3AE28292FB600EE65C5 /* ReceiveHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC48C3AD28292FB600EE65C5 /* ReceiveHeaderView.m */; };
+		BC48C3B028292FBE00EE65C5 /* ReceiveHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC48C3AF28292FBE00EE65C5 /* ReceiveHeaderView.xib */; };
+		BC48C3B4282931C000EE65C5 /* ReceiveEvaluateCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC48C3B2282931C000EE65C5 /* ReceiveEvaluateCell.m */; };
+		BC48C3B5282931C000EE65C5 /* ReceiveEvaluateCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC48C3B3282931C000EE65C5 /* ReceiveEvaluateCell.xib */; };
 		BC4BCE682823991400522C8B /* AddressListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC4BCE672823991400522C8B /* AddressListViewController.m */; };
 		BC4BCE6C28239EEB00522C8B /* MyAddressListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC4BCE6A28239EEB00522C8B /* MyAddressListCell.m */; };
 		BC4BCE6D28239EEB00522C8B /* MyAddressListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC4BCE6B28239EEB00522C8B /* MyAddressListCell.xib */; };
@@ -488,13 +492,13 @@
 		BC5EB5C12804085500B4A3B0 /* MyStyleVideoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC5EB5BF2804085500B4A3B0 /* MyStyleVideoCell.xib */; };
 		BC5EB5C42804087000B4A3B0 /* MyStyleBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5EB5C32804087000B4A3B0 /* MyStyleBottomView.m */; };
 		BC5EB5C62804087700B4A3B0 /* MyStyleBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC5EB5C52804087700B4A3B0 /* MyStyleBottomView.xib */; };
+		BC5FF91728293C5600854D37 /* ReceiveListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5FF91628293C5600854D37 /* ReceiveListModel.m */; };
 		BC6C303A27F586A60044BC0F /* KSRCMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6C303927F586A60044BC0F /* KSRCMessageModel.m */; };
 		BC73A1F42809693F00FA8F6F /* EvaluateSortView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC73A1F32809693F00FA8F6F /* EvaluateSortView.xib */; };
 		BC76146A280D4F670080FD1F /* HomeworkDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC761468280D4F660080FD1F /* HomeworkDetailModel.m */; };
 		BC76146D280D571B0080FD1F /* HomeworkVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC76146C280D571B0080FD1F /* HomeworkVideoView.m */; };
 		BC76146F280D57220080FD1F /* HomeworkVideoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC76146E280D57220080FD1F /* HomeworkVideoView.xib */; };
 		BC7663092827C95200C91A1D /* KSUploadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7663082827C95200C91A1D /* KSUploadManager.m */; };
-		BC76630B2827D0DD00C91A1D /* 7.6M.mov in Resources */ = {isa = PBXBuildFile; fileRef = BC76630A2827D0DD00C91A1D /* 7.6M.mov */; };
 		BC7CFF9F2817CBD400CAEB21 /* WithdrawViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7CFF9E2817CBD400CAEB21 /* WithdrawViewController.m */; };
 		BC7CFFA22817D72200CAEB21 /* IncomeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7CFFA02817D72100CAEB21 /* IncomeListModel.m */; };
 		BC7CFFA52817E37300CAEB21 /* IncomeCountViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7CFFA42817E37300CAEB21 /* IncomeCountViewController.m */; };
@@ -1558,6 +1562,12 @@
 		BC41104B280678E600800BD9 /* HomeworkSortView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkSortView.h; sourceTree = "<group>"; };
 		BC41104C280678E600800BD9 /* HomeworkSortView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeworkSortView.m; sourceTree = "<group>"; };
 		BC41104E280678ED00800BD9 /* HomeworkSortView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeworkSortView.xib; sourceTree = "<group>"; };
+		BC48C3AC28292FB600EE65C5 /* ReceiveHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReceiveHeaderView.h; sourceTree = "<group>"; };
+		BC48C3AD28292FB600EE65C5 /* ReceiveHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReceiveHeaderView.m; sourceTree = "<group>"; };
+		BC48C3AF28292FBE00EE65C5 /* ReceiveHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReceiveHeaderView.xib; sourceTree = "<group>"; };
+		BC48C3B1282931C000EE65C5 /* ReceiveEvaluateCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReceiveEvaluateCell.h; sourceTree = "<group>"; };
+		BC48C3B2282931C000EE65C5 /* ReceiveEvaluateCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReceiveEvaluateCell.m; sourceTree = "<group>"; };
+		BC48C3B3282931C000EE65C5 /* ReceiveEvaluateCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReceiveEvaluateCell.xib; sourceTree = "<group>"; };
 		BC4BCE662823991400522C8B /* AddressListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AddressListViewController.h; sourceTree = "<group>"; };
 		BC4BCE672823991400522C8B /* AddressListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AddressListViewController.m; sourceTree = "<group>"; };
 		BC4BCE6928239EEB00522C8B /* MyAddressListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyAddressListCell.h; sourceTree = "<group>"; };
@@ -1600,6 +1610,8 @@
 		BC5EB5C22804087000B4A3B0 /* MyStyleBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyStyleBottomView.h; sourceTree = "<group>"; };
 		BC5EB5C32804087000B4A3B0 /* MyStyleBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyStyleBottomView.m; sourceTree = "<group>"; };
 		BC5EB5C52804087700B4A3B0 /* MyStyleBottomView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyStyleBottomView.xib; sourceTree = "<group>"; };
+		BC5FF91528293C5600854D37 /* ReceiveListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReceiveListModel.h; sourceTree = "<group>"; };
+		BC5FF91628293C5600854D37 /* ReceiveListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReceiveListModel.m; sourceTree = "<group>"; };
 		BC6C303827F586A60044BC0F /* KSRCMessageModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRCMessageModel.h; sourceTree = "<group>"; };
 		BC6C303927F586A60044BC0F /* KSRCMessageModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRCMessageModel.m; sourceTree = "<group>"; };
 		BC73A1F32809693F00FA8F6F /* EvaluateSortView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EvaluateSortView.xib; sourceTree = "<group>"; };
@@ -1610,7 +1622,6 @@
 		BC76146E280D57220080FD1F /* HomeworkVideoView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeworkVideoView.xib; sourceTree = "<group>"; };
 		BC7663072827C95200C91A1D /* KSUploadManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSUploadManager.h; sourceTree = "<group>"; };
 		BC7663082827C95200C91A1D /* KSUploadManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSUploadManager.m; sourceTree = "<group>"; };
-		BC76630A2827D0DD00C91A1D /* 7.6M.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = 7.6M.mov; sourceTree = "<group>"; };
 		BC7CFF9D2817CBD400CAEB21 /* WithdrawViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WithdrawViewController.h; sourceTree = "<group>"; };
 		BC7CFF9E2817CBD400CAEB21 /* WithdrawViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WithdrawViewController.m; sourceTree = "<group>"; };
 		BC7CFFA02817D72100CAEB21 /* IncomeListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IncomeListModel.m; sourceTree = "<group>"; };
@@ -2201,7 +2212,6 @@
 		275E8A6627E18F2300DD3F6E /* KulexiuForTeacher */ = {
 			isa = PBXGroup;
 			children = (
-				BC76630A2827D0DD00C91A1D /* 7.6M.mov */,
 				277935D927E325B90010E277 /* Module */,
 				2779309427E30F2D0010E277 /* Common */,
 				275E8ADD27E1B25200DD3F6E /* KulexiuForTeacher.entitlements */,
@@ -4214,6 +4224,8 @@
 		BC8C2C7628264CCE00FBA5D5 /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				BC5FF91528293C5600854D37 /* ReceiveListModel.h */,
+				BC5FF91628293C5600854D37 /* ReceiveListModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -4221,6 +4233,12 @@
 		BC8C2C7728264CCE00FBA5D5 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				BC48C3AC28292FB600EE65C5 /* ReceiveHeaderView.h */,
+				BC48C3AD28292FB600EE65C5 /* ReceiveHeaderView.m */,
+				BC48C3AF28292FBE00EE65C5 /* ReceiveHeaderView.xib */,
+				BC48C3B1282931C000EE65C5 /* ReceiveEvaluateCell.h */,
+				BC48C3B2282931C000EE65C5 /* ReceiveEvaluateCell.m */,
+				BC48C3B3282931C000EE65C5 /* ReceiveEvaluateCell.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -4999,13 +5017,14 @@
 				BC76146F280D57220080FD1F /* HomeworkVideoView.xib in Resources */,
 				277931CE27E30FC20010E277 /* KSPremissionAlert.xib in Resources */,
 				275E3DFC27F46B440010EC30 /* KSBeautySettingView.xib in Resources */,
+				BC48C3B5282931C000EE65C5 /* ReceiveEvaluateCell.xib in Resources */,
 				2779335627E316DD0010E277 /* WMPlayer.bundle in Resources */,
 				275E8A7427E18F2800DD3F6E /* Assets.xcassets in Resources */,
 				2755C06927EC71C8007D9070 /* GroupSettingBodyView.xib in Resources */,
+				BC48C3B028292FBE00EE65C5 /* ReceiveHeaderView.xib in Resources */,
 				BC58E7D5281B9637004B0893 /* PublicNoticeView.xib in Resources */,
 				BCEA752D2819134400886A86 /* CardBindResultBodyView.xib in Resources */,
 				BC1365BD280D163200EB03E2 /* MyVideoSearchView.xib in Resources */,
-				BC76630B2827D0DD00C91A1D /* 7.6M.mov in Resources */,
 				2780A06B27E823D300447CFD /* MineBodyView.xib in Resources */,
 				27F9030127E864AE00C08A19 /* NetworkBodyView.xib in Resources */,
 				BC4BCE7F2823B66A00522C8B /* AddressDetailBodyView.xib in Resources */,
@@ -5389,6 +5408,7 @@
 				BCC9F44B27F69BD200647449 /* KSIMService.m in Sources */,
 				277931C027E30FC20010E277 /* ArchiveTools.m in Sources */,
 				277931FA27E30FC20010E277 /* CALayer+Layout.m in Sources */,
+				BC48C3B4282931C000EE65C5 /* ReceiveEvaluateCell.m in Sources */,
 				BCE6A09A27F83E8E00C97704 /* MinePageVideoCell.m in Sources */,
 				BCC9F41A27F69BD200647449 /* VideoListView.m in Sources */,
 				BCA9CE2127FD642600D558C6 /* MyLiveCourseBodyView.m in Sources */,
@@ -5423,11 +5443,13 @@
 				275FA1A927E7327500CFEA2E /* KSAQRecordManager.m in Sources */,
 				277931D227E30FC20010E277 /* UIButton+Property.m in Sources */,
 				2779309927E30F480010E277 /* BaseViewController.m in Sources */,
+				BC5FF91728293C5600854D37 /* ReceiveListModel.m in Sources */,
 				BC7CFFC92817F2FF00CAEB21 /* CashRecordListCell.m in Sources */,
 				BC7CFFBE2817F1D200CAEB21 /* MyBankCardViewController.m in Sources */,
 				BCA9CE1E27FD5F9D00D558C6 /* MyLiveCourseViewController.m in Sources */,
 				27D83F4227F3EAA700062476 /* MinePageVideoView.m in Sources */,
 				BCC9F44127F69BD200647449 /* ApplySpeechResultMessage.m in Sources */,
+				BC48C3AE28292FB600EE65C5 /* ReceiveHeaderView.m in Sources */,
 				BCC9F42427F69BD200647449 /* VideoMaskView.m in Sources */,
 				BCB399BC27F9831D00AFF376 /* CourseForLiveCell.m in Sources */,
 				277932F127E310070010E277 /* TZLocationManager.m in Sources */,

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


+ 76 - 12
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -195,48 +195,112 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "F2A4D1D2-A8B7-4E06-9413-EFA37F412607"
+            uuid = "89218AD8-4E7D-42B0-9355-467A60283632"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "38"
-            endingLineNumber = "38"
-            landmarkName = "+uploadFile:"
+            startingLineNumber = "149"
+            endingLineNumber = "149"
+            landmarkName = "-mutilUploadImage:fileName:successCallback:faliure:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "9B030730-D880-4C9A-A08A-CC661B803C12"
+            uuid = "7BCF5C4B-259F-481A-8017-0309C7313DAB"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "25"
-            endingLineNumber = "25"
-            landmarkName = "+uploadFile:"
+            startingLineNumber = "111"
+            endingLineNumber = "111"
+            landmarkName = "-mutilUploadImage:fileName:successCallback:faliure:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "50AD0A0B-D83E-48A5-AC45-43C140787930"
+            uuid = "EED0BBE2-9034-4F90-83E9-76D38EEA6503"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "28"
-            endingLineNumber = "28"
-            landmarkName = "+uploadFile:"
+            startingLineNumber = "167"
+            endingLineNumber = "167"
+            landmarkName = "-mutilUploadImage:fileName:successCallback:faliure:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C988CF85-0D45-4AED-BD3C-92AFC2680099"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "140"
+            endingLineNumber = "140"
+            landmarkName = "-mutilUploadImage:fileName:successCallback:faliure:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B139FE3A-9314-40D0-90BB-D30524E1EFA4"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "143"
+            endingLineNumber = "143"
+            landmarkName = "-mutilUploadImage:fileName:successCallback:faliure:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C7415961-E73D-41C2-86F5-7507AFF36BEC"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "990"
+            endingLineNumber = "990"
+            landmarkName = "-submitUrlWith:videoUrl:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EDD42415-D1DA-4F99-AC80-0DE9ED6F86F1"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "41"
+            endingLineNumber = "41"
+            landmarkName = "-configDefault"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

BIN
KulexiuForTeacher/KulexiuForTeacher/7.6M.mov


+ 79 - 65
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseWKWebViewController.m

@@ -451,10 +451,11 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 }
 
 - (void)chooseDocumentWithType:(CHOOSETYPE)fileTyle {
+    self.fileChooseType = fileTyle;
     NSArray *documentTypes = @[@"public.content", @"public.text", @"public.source-code", @"public.image", @"public.audio", @"public.audiovisual-content", @"com.adobe.pdf", @"com.apple.keynote.key", @"com.microsoft.word.doc", @"com.microsoft.excel.xls", @"com.microsoft.powerpoint.ppt"];
     KSDocumentViewController *documentPickerViewController = [[KSDocumentViewController alloc] initWithDocumentTypes:documentTypes inMode:UIDocumentPickerModeImport];
     documentPickerViewController.delegate = self;
-//    documentPickerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
+    documentPickerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
     [self presentViewController:documentPickerViewController animated:YES completion:nil];
 }
 
@@ -464,6 +465,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     self.mediaManager.maxPhotoNumber = maxCount;
     self.mediaManager.baseCtrl = self;
     self.mediaManager.needCropImage = NO;
+    self.mediaManager.videoMaxDuration = 40 * 60;
     MJWeakSelf;
     [self.mediaManager noAlertCallback:^(NSString * _Nullable videoUrl, NSMutableArray * _Nullable imageArray, NSMutableArray * _Nullable imageAsset) {
         
@@ -926,29 +928,22 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         NSData *imgData = [UIImage turnsImaegDataByImage:image];
         [imageDataArray addObject:imgData];
     }
-    [KSNetworkingManager multiImageUpload:KS_POST imgDataArray:imageDataArray success:^(NSArray * _Nonnull dics) {
+    [[KSUploadManager shareInstance] mutilUploadImage:imageDataArray fileName:@"complainImg" successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
         [self removehub];
-        NSDictionary *dic = [dics lastObject];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSMutableArray *urlArray = [NSMutableArray array];
-            for (NSDictionary *result in dics) {
-                NSDictionary *parm = [result dictionaryValueForKey:@"data"];
-                NSString *avatar = [parm stringValueForKey:@"url"];
-                [urlArray addObject:avatar];
-            }
-            NSString *attachments = [urlArray componentsJoinedByString:@","];
-            if (self.chooseFileParm) { // 回调
-                [self.chooseFileParm setValue:attachments forKey:@"fileUrl"];
-                [self postMessage:self.chooseFileParm];
-                self.chooseFileParm = nil;
-            }
+        NSMutableArray *urlArray = [NSMutableArray array];
+        for (NSString *url in urlArray) {
+            [urlArray addObject:url];
         }
-        else {
-            [self removehub];
-            [self MBPShow:MESSAGEKEY];
+        NSString *attachments = [urlArray componentsJoinedByString:@","];
+        if (self.chooseFileParm) { // 回调
+            [self.chooseFileParm setValue:attachments forKey:@"fileUrl"];
+            [self postMessage:self.chooseFileParm];
+            self.chooseFileParm = nil;
         }
-    } faliure:^(NSError * _Nonnull error) {
+    } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
         [self removehub];
+        [self MBPShow:descMessaeg];
+        [self fileChooseErrorCallback];
     }];
 }
 
@@ -959,45 +954,50 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     __block NSString *imageUrl = @"";
     if (previewImage) { // 如果有第一帧
         NSData *imgData = [UIImage turnsImaegDataByImage:previewImage];
-        [KSNetworkingManager multiImageUpload:KS_POST imgDataArray:@[imgData] success:^(NSArray * _Nonnull dics) {
-            NSDictionary *dic = [dics lastObject];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-                NSString *avatar = [result stringValueForKey:@"url"];
-                imageUrl = avatar;
-            }
-            else {
-                [self MBPShow:MESSAGEKEY];
+        NSString *fileName = @"videoPreviewImg";
+        [[KSUploadManager shareInstance] uploadImage:imgData fileName:fileName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+            NSString *url = [fileUrlArray lastObject];
+            imageUrl = url;
+            [self submitUrlWith:imageUrl videoUrl:videoUrl];
+        } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
+            if ([NSString isEmptyString:descMessaeg]) {
+                [self MBPShow:descMessaeg];
             }
-        } faliure:^(NSError * _Nonnull error) {
-            
+            [self fileChooseErrorCallback];
         }];
     }
-    
+    else {
+        [self submitUrlWith:nil videoUrl:videoUrl];
+    }
+}
+
+- (void)submitUrlWith:(NSString *)imgUrl videoUrl:(NSString *)videoUrl {
     // 上传视频
     [self hudTipWillShow:YES];
-    NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:videoUrl]];
-    [KSNetworkingManager videoFileUpload:KS_POST fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+    NSURL *uploadFileUrl = [NSURL fileURLWithPath:videoUrl];
+    NSData *fileData = [NSData dataWithContentsOfURL:uploadFileUrl];
+    NSString *suffix = [NSString stringWithFormat:@".%@",[uploadFileUrl pathExtension]];
+    [[KSUploadManager shareInstance] videoUpload:fileData fileName:@"video" fileSuffix:suffix progress:^(int64_t bytesWritten, int64_t totalBytes) {
         dispatch_main_async_safe(^{
             // 显示进度
             if (self.HUD) {
                 self.HUD.progress = bytesWritten / totalBytes;// progress是回调进度
             }
         });
-    } success:^(NSDictionary * _Nonnull dic) {
+    } successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
         [self hudTipWillShow:NO];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSString *fileUrl = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"url"];
-            [self videoUploadCallback:fileUrl firstFrameImg:imageUrl];
-        }
-        else {
-            [self MBPShow:MESSAGEKEY];
-        }
-    } faliure:^(NSError * _Nonnull error) {
+        NSString *fileUrl = [fileUrlArray lastObject];
+        [self videoUploadCallback:fileUrl firstFrameImg:imgUrl];
+    } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
         [self hudTipWillShow:NO];
+        if ([NSString isEmptyString:descMessaeg]) {
+            [self MBPShow:descMessaeg];
+        }
+        [self videoUploadCallback:@"" firstFrameImg:@""];
     }];
 }
 
+
 - (void)videoUploadCallback:(NSString *)remoteVideoUrl firstFrameImg:(NSString *)imgUrl {
     if (self.chooseFileParm) { // 回调
         [self.chooseFileParm setValue:remoteVideoUrl forKey:@"fileUrl"];
@@ -1030,7 +1030,15 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 #pragma mark ---- UIDocumentPickerDelegate
 - (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller {
-    
+    [self fileChooseErrorCallback];
+}
+
+- (void)fileChooseErrorCallback {
+    if (self.chooseFileParm) { // 回调
+        [self.chooseFileParm setValue:@"" forKey:@"fileUrl"];
+        [self postMessage:self.chooseFileParm];
+        self.chooseFileParm = nil;
+    }
 }
 
 - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url {
@@ -1041,23 +1049,32 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     if (self.fileChooseType == CHOOSETYPE_XML) {
         if (![fileName hasSuffix:@".xml"]) {
             [self MBPShow:@"请上传XML格式文件"];
+            [self fileChooseErrorCallback];
             return;
         }
     }
+    else if (self.fileChooseType == CHOOSETYPE_MIDI) {
+        if (![fileName hasSuffix:@".mid"] || [fileName hasSuffix:@".midi"]) {
+            [self MBPShow:@"请上传mid格式文件"];
+            [self fileChooseErrorCallback];
+            return;
+        }
+    }
+    else if (self.fileChooseType == CHOOSETYPE_MP3) {
+        if (![fileName hasSuffix:@".mp3"]) {
+            [self MBPShow:@"请上传mp3格式文件"];
+            [self fileChooseErrorCallback];
+        }
+        return;
+    }
     else {
         if (![fileName hasSuffix:@".mp3"] && ![fileName hasSuffix:@".aac"]) {
             [self MBPShow:@"暂不支持此格式!"];
+            [self fileChooseErrorCallback];
             return;
         }
     }
     
-    // 获取文件大小
-//    CGFloat fileSize = [self getFileSize:url];
-//    if (fileSize > 10.0) {
-//        [self MBPShow:@"文件大小需小于10M"];
-//        return;
-//    }
-    
     __block NSString * fileUrl = @"";
     if ([KSICloudManager iCloudEnable]) {
         [KSICloudManager downloadWithDocumentURL:url callBack:^(id obj) {
@@ -1074,6 +1091,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
                 }
                 else {
                     [self MBPShow:@"写入文件错误!"];
+                    [self fileChooseErrorCallback];
                 }
             }
             else {
@@ -1085,6 +1103,7 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
     }
     else {
         [self MBPShow:@"iCloud不可用!"];
+        [self fileChooseErrorCallback];
     }
 }
 
@@ -1093,24 +1112,19 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
         [self showhud];
         NSString *suffix = [NSString stringWithFormat:@".%@",[[fileName componentsSeparatedByString:@"."] lastObject]];
         NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:fileUrl]];
-        [KSNetworkingManager fileUpload:KS_POST fileData:fileData fileSuffix:suffix success:^(NSDictionary * _Nonnull dic) {
+        [[KSUploadManager shareInstance] uploadFile:fileData fileName:@"file" fileSuffix:suffix successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
             [self removehub];
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSString *fileUrl = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"url"];
-                if (self.chooseFileParm) { // 回调
-                    [self.chooseFileParm setValue:fileUrl forKey:@"fileUrl"];
-                    [self postMessage:self.chooseFileParm];
-                    self.chooseFileParm = nil;
-                }
-            }
-            else {
-                [self MBPShow:MESSAGEKEY];
+            NSString *fileUrl = [fileUrlArray lastObject];
+            if (self.chooseFileParm) { // 回调
+                [self.chooseFileParm setValue:fileUrl forKey:@"fileUrl"];
+                [self postMessage:self.chooseFileParm];
+                self.chooseFileParm = nil;
             }
-            
-        } faliure:^(NSError * _Nonnull error) {
+        } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
             [self removehub];
+            [self MBPShow:descMessaeg];
+            [self fileChooseErrorCallback];
         }];
-        
     });
 }
 

+ 14 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h

@@ -560,6 +560,18 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)teacherCourseRepliedRequest:(NSString *)post courseScheduleId:(NSString *)courseScheduleId courseGroupId:(NSString *)courseGroupId studentId:(NSString *)studentId teacherReplied:(NSString *)teacherReplied success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+
+// /api-teacher/courseReplied/myReplied
+/// 我收到的评价
+/// @param post post
+/// @param classMonth 上课日期
+/// @param search search
+/// @param page 分页
+/// @param rows 条数
+/// @param success 成功
+/// @param faliure 失败
++ (void)myReceiveRepliedRequest:(NSString *)post classMonth:(NSString *)classMonth search:(NSString *)search page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 #pragma mark ----- 课后作业
 // /api-teacher/homework/list
 
@@ -750,7 +762,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 // /api-mall-portal/member/address/add
 
-/// 添加收地址
+/// 添加收地址
 /// @param post post
 /// @param name 收货人名称
 /// @param phoneNumber 电话号码
@@ -776,7 +788,7 @@ NS_ASSUME_NONNULL_BEGIN
 // 修改收货地址
 // /api-mall-portal/member/address/update/{id}
 
-/// 修改收地址
+/// 修改收地址
 /// @param post post
 /// @param addressId 地址id
 /// @param name 收货人名称

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

@@ -1170,6 +1170,25 @@
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+// /api-teacher/courseReplied/myReplied
+/// 我收到的评价
+/// @param post post
+/// @param classDate 上课日期
+/// @param search search
+/// @param page 分页
+/// @param rows 条数
+/// @param success 成功
+/// @param faliure 失败
++ (void) myReceiveRepliedRequest:(NSString *)post classMonth:(NSString *)classMonth search:(NSString *)search page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@",hostURL, @"/api-teacher/courseReplied/myReplied"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:classMonth forKey:@"classMonth"];
+    [parm setValue:search forKey:@"studentName"];
+    [parm setValue:@(page) forKey:@"page"];
+    [parm setValue:@(rows) forKey:@"rows"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
 
 #pragma mark ----- 课后作业
 // /api-teacher/homework/list
@@ -1477,7 +1496,7 @@
 
 // /api-mall-portal/member/address/add
 
-/// 添加收地址
+/// 添加收地址
 /// @param post post
 /// @param name 收货人名称
 /// @param phoneNumber 电话号码
@@ -1519,7 +1538,7 @@
 // 修改收货地址
 // /api-mall-portal/member/address/update/{id}
 
-/// 修改收地址
+/// 修改收地址
 /// @param post post
 /// @param addressId 地址id
 /// @param name 收货人名称

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

@@ -34,6 +34,8 @@
 #import "UIView+SubViewExtension.h"
 #import "NSObject+KSDateFormatter.h"
 
+#import "KSUploadManager.h"
+
 // 加密使用 NSString+MD5
 #define DEFAULT_SALT (@"D5sIlPU2")
 #define APPSECRET (@"QuMCIKICAgIH0sCiAgICAicGxhdGZvcm0tZGV2IjogW10")
@@ -112,7 +114,8 @@ shouldPrevent = NO; \
 #define hostURL (@"http://dev.colexiu.com")
 #define SEALCLASSHOST (@"http://dev.colexiu.com/api-im")
 #define WEBHOST (@"http://dev.colexiu.com/teacher")
-//#define WEBHOST (@"http://192.168.3.63:5000/teacher")
+//#define WEBHOST (@"http://192.168.3.13:5002")
+
 #define SOCKET_URL (@"ws://mteadev.colexiu.com/audioAnalysis")
 #define JSPUSH_ENVIRONMENT (NO)
 #define RCIM_KEY (@"0vnjpoad0jbdz")

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

@@ -46,7 +46,6 @@
     self.videoQuality = UIImagePickerControllerQualityType640x480;
 }
 
-
 - (void)setMediaType:(MEDIATYPE)mediaType {
     _mediaType = mediaType;
     if (mediaType == MEDIATYPE_PHOTO) {
@@ -154,7 +153,8 @@
         imagePickerVc.allowPickingVideo = YES;
         imagePickerVc.allowPickingImage = NO;
     }
-    imagePickerVc.videoMaximumDuration = 480;
+    
+    imagePickerVc.videoMaximumDuration = self.videoMaxDuration ? self.videoMaxDuration : 480;
     // 设置视频拍摄质量
     [imagePickerVc setUiImagePickerControllerSettingBlock:^(UIImagePickerController *imagePickerController) {
         imagePickerController.videoQuality = UIImagePickerControllerQualityType640x480;
@@ -342,7 +342,7 @@
         }];
     }
     else if ([type isEqualToString:@"public.movie"]) {
-        tzImagePickerVc.videoMaximumDuration = 480;
+        tzImagePickerVc.videoMaximumDuration = self.videoMaxDuration ? self.videoMaxDuration : 480;
         // 设置视频拍摄质量
         [tzImagePickerVc setUiImagePickerControllerSettingBlock:^(UIImagePickerController *imagePickerController) {
             imagePickerController.videoQuality = UIImagePickerControllerQualityType640x480;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KeyChainTools.m

@@ -16,7 +16,7 @@ NSString *const KEY_ASSESSGROUP = @"2K89M44X82.Colexiu";
 + (NSString *)getUUID {
 
     //定义存入keychain中的账号 也就是一个标识 表示是某个app存储的内容   bundle id就好
-    NSString * const KEY_UUID = @"com.Colexiu.KulexiuForTeacher.UUID";
+    NSString * const KEY_UUID = @"com.Colexiu.Kulexiu.UUID";
 
     // 测试用 清除keychain中的内容
 

+ 14 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.h

@@ -6,12 +6,24 @@
 //
 
 #import <Foundation/Foundation.h>
-//typedef <#type#> <#name#>;
+
+typedef void(^KSUploadSuccess)(NSMutableArray * _Nonnull fileUrlArray);
+typedef void(^KSUploadFailer)(NSError * _Nullable error, NSString * _Nullable descMessaeg);
+typedef void(^KSUploadProgress)(int64_t bytesWritten,int64_t totalBytes);
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface KSUploadManager : NSObject
 
-+ (void)uploadFile:(NSString *)fileUrl;
++ (instancetype)shareInstance;
+
+- (void)uploadImage:(NSData *)imageData fileName:(NSString *)fileName successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure;
+
+- (void)mutilUploadImage:(NSMutableArray *)fileDataArray fileName:(NSString *)fileName successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure;
+
+- (void)videoUpload:(NSData *)fileData fileName:(NSString *)fileName fileSuffix:(NSString *)fileSuffix progress:(KSUploadProgress)uploadProgress successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure;
+
+- (void)uploadFile:(NSData *)fileData fileName:(NSString *)fileName fileSuffix:(NSString *)fileSuffix successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure;
 
 @end
 

+ 282 - 15
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m

@@ -9,46 +9,313 @@
 #import <KS3YunSDK.h>
 #import "NSDate+Extension.h"
 
+#define BUCKET_DOMAIN (@"ks3-cn-beijing.ksyuncs.com/daya")
+@interface KSUploadManager ()<KingSoftServiceRequestDelegate>
 
-@interface KSUploadManager ()
+@property (nonatomic, copy) KSUploadSuccess successCallback;
+
+@property (nonatomic, copy) KSUploadFailer faliureCallback;
+
+@property (nonatomic, copy) KSUploadProgress uploadProgress;
+
+@property (nonatomic, strong) NSString *videoLinkUrl;
+
+@property (assign, nonatomic) long long fileSize;
 
 @end
 
 @implementation KSUploadManager
++ (instancetype)shareInstance {
+    static KSUploadManager *manager = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        manager = [[KSUploadManager alloc] init];
+        [manager configCilentBucket];
+    });
+    return manager;
+}
 
-+ (void)uploadFile:(NSString *)fileUrl {
-    NSString *fileName = [[fileUrl componentsSeparatedByString:@"/"] lastObject];
-    NSString *keyValue = [NSString stringWithFormat:@"%@%@",[NSDate getCurrentTimestamp], fileName];
-    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:fileName keyName:keyValue success:^(NSDictionary * _Nonnull dic) {
+- (void)configCilentBucket {
+    [[KS3Client initialize] setBucketDomain:BUCKET_DOMAIN];
+}
+
+- (void)uploadImage:(NSData *)imageData fileName:(NSString *)fileName successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure {
+    if (success) {
+        self.successCallback = success;
+    }
+    if (faliure) {
+        self.faliureCallback = faliure;
+    }
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,[UIImage typeForImageData:imageData]];
+    NSString *keyValue = uploadFileName;
+    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            
             KS3AccessControlList *acl = [[KS3AccessControlList alloc] init];
             [acl setContronAccess:KingSoftYun_Permission_Public_Read];
             
-            KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"/daya" withAcl:acl grantAcl:nil];
-            
-            [putObjRequest setStrKS3Token:[dic stringValueForKey:@"policy"]];
-            NSString *fileName = [[NSBundle mainBundle] pathForResource:@"7.6M" ofType:@"mov"];
-            putObjRequest.data = [NSData dataWithContentsOfFile:fileName options:NSDataReadingMappedIfSafe error:nil];
-            
+            KS3PutObjectRequest *putObjRequest = [[KS3PutObjectRequest alloc] initWithName:@"" withAcl:acl grantAcl:nil];
+            // token
+            [putObjRequest setStrKS3Token:[dic stringValueForKey:@"signature"]];
+            putObjRequest.filename = uploadFileName;
+            putObjRequest.data = imageData;
             [putObjRequest setCompleteRequest];
              
             KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
             if (response.httpStatusCode == 200) {
-                NSLog(@"Set object acl success!");
+                if (response.error == nil) {
+                    if (self.successCallback) {
+                        NSMutableArray *fileUrlArray = [NSMutableArray array];
+                        [fileUrlArray addObject:[NSString stringWithFormat:@"https://%@/%@",BUCKET_DOMAIN,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);
+            }
         }
-         
     } faliure:^(NSError * _Nonnull error) {
+        if (self.faliureCallback) {
+            self.faliureCallback(error, @"获取文件签名失败");
+        }
+    }];
+}
+
+- (void)mutilUploadImage:(NSMutableArray *)fileDataArray fileName:(NSString *)fileName successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure {
+    if (success) {
+        self.successCallback = success;
+    }
+    if (faliure) {
+        self.faliureCallback = faliure;
+    }
+    NSMutableArray *fileNameArray = [NSMutableArray array];
+    for (NSInteger i = 0 ; i < fileDataArray.count; i++) {
+        NSData *fileData = fileDataArray[i];
+        NSString *uploadFileName = [NSString stringWithFormat:@"%@%zd%@%@",[NSDate getCurrentTimestamp], i,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 success:^(NSDictionary * _Nonnull dic) {
+            if ([dic integerValueForKey:@"code"] == 200 && [dic 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 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://%@/%@",BUCKET_DOMAIN,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);
+        }];
+    }
+    
+    dispatch_group_notify(uploadGroup, dispatch_get_main_queue(), ^{
+        if (responses.count > 0) {
+            if (self.successCallback) {
+                self.successCallback([responses copy]);
+            }
+        }
+        if (failResponse.count > 0) {
+            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;
+    }
+    if (faliure) {
+        self.faliureCallback = faliure;
+    }
+    if (uploadProgress) {
+        self.uploadProgress = uploadProgress;
+    }
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,fileSuffix];
+    NSString *keyValue = uploadFileName;
+    self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",BUCKET_DOMAIN,uploadFileName];
+    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic 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 stringValueForKey:@"signature"]];
+            putObjRequest.filename = uploadFileName;
+            putObjRequest.data = fileData;
+            self->_fileSize = putObjRequest.data.length;
+            putObjRequest.delegate = self;
+            [putObjRequest setCompleteRequest];
+            self.videoLinkUrl = [NSString stringWithFormat:@"https://%@/%@",BUCKET_DOMAIN,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");
+                }
+            }
+        }
+        else {
+            if (self.faliureCallback) {
+                self.faliureCallback(nil, MESSAGEKEY);
+            }
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        if (self.faliureCallback) {
+            self.faliureCallback(error, @"获取文件签名失败");
+        }
     }];
 }
 
+- (void)uploadFile:(NSData *)fileData fileName:(NSString *)fileName fileSuffix:(NSString *)fileSuffix successCallback:(KSUploadSuccess)success faliure:(KSUploadFailer)faliure {
+    if (success) {
+        self.successCallback = success;
+    }
+    if (faliure) {
+        self.faliureCallback = faliure;
+    }
+    NSString *uploadFileName = [NSString stringWithFormat:@"%@%@%@",[NSDate getCurrentTimestamp], fileName,fileSuffix];
+    NSString *keyValue = uploadFileName;
+    [KSNetworkingManager getUploadSignRequest:KS_POST fileName:uploadFileName keyName:keyValue success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic 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 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://%@/%@",BUCKET_DOMAIN,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);
+            }
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        if (self.faliureCallback) {
+            self.faliureCallback(error, @"获取文件签名失败");
+        }
+    }];
+}
+
+- (void)request:(KS3ServiceRequest *)request didSendData:(long long)bytesWritten totalBytesWritten:(long long)totalBytesWritten totalBytesExpectedToWrite:(long long)totalBytesExpectedToWrite {
+    if ([request isKindOfClass:[KS3PutObjectRequest class]]) {
+        
+        long long alreadyTotalWriten = totalBytesWritten;
+        double progress = alreadyTotalWriten * 1.0  / _fileSize;
+        NSLog(@"upload progress: %f", progress);
+        if (self.uploadProgress) {
+            self.uploadProgress(bytesWritten, _fileSize);
+        }
+    }
+}
+- (void)request:(KS3Request *)request didReceiveResponse:(NSURLResponse *)response {
+    NSInteger statusCode = ((NSHTTPURLResponse*) response).statusCode;
+    if ( (statusCode>= 200 && statusCode <300) || statusCode == 304) {
+        NSLog(@"Put object success");
+        NSMutableArray *fileUrlArray = [NSMutableArray array];
+        [fileUrlArray addObject:self.videoLinkUrl];
+        self.successCallback(fileUrlArray);
+    }
+    else {
+        NSLog(@"Put object failed");
+        if (self.faliureCallback) {
+            self.faliureCallback(nil, @"上传文件失败");
+        }
+    }
+    
+}
+
+- (void)request:(KS3ServiceRequest *)request didFailWithError:(NSError *)error {
+    if (self.faliureCallback) {
+        self.faliureCallback(nil, @"上传文件失败");
+    }
+}
 
 @end

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/KulexiuForTeacher.entitlements

@@ -4,6 +4,8 @@
 <dict>
 	<key>aps-environment</key>
 	<string>development</string>
+	<key>com.apple.developer.associated-domains</key>
+	<array/>
 	<key>com.apple.developer.icloud-container-identifiers</key>
 	<array>
 		<string>iCloud.com.Colexiu.KulexiuForTeacher</string>

+ 11 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m

@@ -598,26 +598,22 @@
 
 
 - (void)submitFileWithMessage:(RCSightMessage *)sightMessage uploadListener:(RCUploadMediaStatusListener *)uploadListener {
-
-    NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:sightMessage.localPath]];
+    NSURL *fileUrl = [NSURL fileURLWithPath:sightMessage.localPath];
+    NSData *fileData = [NSData dataWithContentsOfURL:fileUrl];
     if (fileData.length) {
-        [KSNetworkingManager videoFileUpload:KS_POST fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+        NSString *suffix = [NSString stringWithFormat:@".%@",[fileUrl pathExtension]];
+        [[KSUploadManager shareInstance] videoUpload:fileData fileName:@"sightVideo" fileSuffix:suffix progress:^(int64_t bytesWritten, int64_t totalBytes) {
             int progress = (int)(bytesWritten / totalBytes * 100);
             uploadListener.updateBlock(progress);
-        } success:^(NSDictionary * _Nonnull dic) {
-            if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                NSString *fileUrl = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"url"];
-                sightMessage.remoteUrl = fileUrl;
-                sightMessage.size = fileData.length;
-                uploadListener.successBlock(sightMessage);
-            }
-            else {
-                uploadListener.errorBlock(ERRORCODE_TIMEOUT);
-            }
-            
-        } faliure:^(NSError * _Nonnull error) {
+        } successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+            NSString *videoUrl = [fileUrlArray lastObject];
+            sightMessage.remoteUrl = videoUrl;
+            sightMessage.size = fileData.length;
+            uploadListener.successBlock(sightMessage);
+        } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
             uploadListener.errorBlock(ERRORCODE_TIMEOUT);
         }];
+        
     }
     else {
         uploadListener.errorBlock(INVALID_PARAMETER);

+ 8 - 16
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/Controller/KSChatComplainController.m

@@ -68,24 +68,16 @@
         NSData *imgData = [UIImage turnsImaegDataByImage:image];
         [imageDataArray addObject:imgData];
     }
-    [KSNetworkingManager multiImageUpload:KS_POST imgDataArray:imageDataArray success:^(NSArray * _Nonnull dics) {
-        NSDictionary *dic = [dics lastObject];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSMutableArray *urlArray = [NSMutableArray array];
-            for (NSDictionary *result in dics) {
-                NSDictionary *parm = [result dictionaryValueForKey:@"data"];
-                NSString *avatar = [parm stringValueForKey:@"url"];
-                [urlArray addObject:avatar];
-            }
-            NSString *attachments = [urlArray componentsJoinedByString:@","];
-            [self uplodMessage:attachments content:content];
-        }
-        else {
-            [self removehub];
-            [self MBPShow:MESSAGEKEY];
+    [[KSUploadManager shareInstance] mutilUploadImage:imageDataArray fileName:@"complainImg" successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+        NSMutableArray *urlArray = [NSMutableArray array];
+        for (NSString *url in fileUrlArray) {
+            [urlArray addObject:url];
         }
-    } faliure:^(NSError * _Nonnull error) {
+        NSString *attachments = [urlArray componentsJoinedByString:@","];
+        [self uplodMessage:attachments content:content];
+    } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
         [self removehub];
+        [self MBPShow:descMessaeg];
     }];
 }
 

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -18,6 +18,7 @@
 #import "UserInfoManager.h"
 #import "TeacherInfo.h"
 #import "MyIncomeViewController.h"
+#import "ReceiveEvaluateListController.h"
 
 @interface HomeViewController ()
 
@@ -205,7 +206,8 @@
             break;
         case HOMEBODYACTION_RECEIVE: // 我收到的评价
         {
-            
+            ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
+            [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;
         case HOMEBODYACTION_INCOME: // 我的收入

+ 10 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.m

@@ -8,6 +8,7 @@
 #import "MyIncomeListCell.h"
 
 @interface MyIncomeListCell ()
+@property (weak, nonatomic) IBOutlet UILabel *incomeFromLabel;
 
 @property (weak, nonatomic) IBOutlet UIImageView *courseTypeImage;
 
@@ -53,13 +54,14 @@
     [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
     NSDate *beginDate = [dateFormatter dateFromString:sourceModel.startTime];
     NSDate *endDate = [dateFormatter dateFromString:sourceModel.endTime];
+    NSDate *createDate = [dateFormatter dateFromString:sourceModel.createTime];
     [dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm"];
     NSString *beginStr = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:beginDate]];
     
     [dateFormatter setDateFormat:@"HH:mm"];
     NSString *endStr = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:endDate]];
     self.courseTime.text = [NSString stringWithFormat:@"%@~%@", beginStr, endStr];
-    
+    self.incomeFromLabel.text = [NSString returnNoNullStringWithString:sourceModel.bizName];
     if ([sourceModel.bizType isEqualToString:@"PRACTICE"]) {
         [self.courseTypeImage setImage:[UIImage imageNamed:@"income_accompany"]];
     }
@@ -68,12 +70,18 @@
     }
     else if ([sourceModel.bizType isEqualToString:@"VIDEO"]) {
         [self.courseTypeImage setImage:[UIImage imageNamed:@"income_video"]];
+        [dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm"];
+        NSString *createTime = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:createDate]];
+        self.courseTime.text = createTime;
     }
     else  {
         [self.courseTypeImage setImage:[UIImage imageNamed:@"income_music"]];
+        [dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm"];
+        NSString *createTime = [NSString returnNoNullStringWithString:[dateFormatter stringFromDate:createDate]];
+        self.courseTime.text = createTime;
     }
 
-    self.incomeLabel.text = [NSString stringWithFormat:@"¥%@",[NSString formatDoubleNumToADecimal:sourceModel.transAmount]];
+    self.incomeLabel.text = [NSString stringWithFormat:@"¥%.2f",sourceModel.transAmount];
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/MyIncomeListCell.xib

@@ -100,6 +100,7 @@
                 <outlet property="courseTime" destination="WBq-ZP-ehT" id="xqH-Ss-mZ6"/>
                 <outlet property="courseTypeImage" destination="2Jh-sq-z46" id="afR-Gn-Yex"/>
                 <outlet property="dayLabelHeight" destination="h84-He-cJc" id="869-U9-uVN"/>
+                <outlet property="incomeFromLabel" destination="kS8-LB-QVW" id="kM8-Iz-AV0"/>
                 <outlet property="incomeLabel" destination="uKk-JC-tKp" id="PZH-LW-Wtg"/>
                 <outlet property="spaceHeight" destination="vn6-47-ha3" id="b3h-NO-mzq"/>
                 <outlet property="timeLabel" destination="ODu-Td-Ufa" id="UWp-Nc-6vx"/>

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

@@ -71,6 +71,7 @@
     }
     else {
         self.bodyView.cardDesc.text = @"您未绑定银行卡";
+        [self showBandCardAlert];
     }
 }
 

+ 44 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m

@@ -10,6 +10,8 @@
 #import "JXCategoryView.h"
 #import "JXPagerListRefreshView.h"
 #import "MyMusicBodyView.h"
+#import "TeacherInfo.h"
+#import "UserInfoManager.h"
 
 #define HEADER_HEIGHT (64)
 
@@ -19,6 +21,8 @@
 
 @property (nonatomic, strong) NSMutableArray *listViewArray;
 
+@property (nonatomic, strong) TeacherInfo *teacherInfo;
+
 @end
 
 @implementation MyMusicViewController
@@ -71,6 +75,7 @@
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+    [self requestTeachMessage];
     if (self.listViewArray.count > self.categoryView.selectedIndex) {
          id value = self.listViewArray[self.categoryView.selectedIndex];
         if ([value isKindOfClass:[MyMusicBodyView class]]) {
@@ -80,6 +85,39 @@
     }
 }
 
+- (void)requestTeachMessage {
+    [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            self.teacherInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+            NSString *rongToken = UserDefault(RongTokenKey);
+            if ([NSString isEmptyString:rongToken]) {
+                [USER_MANAGER queryUserInfoConnectRongCloud:YES];
+            }
+            [self refreshHeadView];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)refreshHeadView {
+    // 刷新老师认证和音乐人认证状态
+    [self refreshAuthStatus];
+}
+
+- (void)refreshAuthStatus {
+    for (NSInteger index = 0; index < self.listViewArray.count; index++) {
+        id view = self.listViewArray[index];
+        if ([view isKindOfClass:[MyMusicBodyView class]]) {
+            MyMusicBodyView *listView = (MyMusicBodyView *)view;
+            listView.musicianStatus = self.teacherInfo.musicianAuthStatus;
+        }
+    }
+}
+
 - (void)viewDidAppear:(BOOL)animated {
     [super viewDidAppear:animated];
     self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0);
@@ -125,6 +163,12 @@
     else {
         listView.selectIndex = 2;
     }
+    if (self.teacherInfo) {
+        listView.musicianStatus = self.teacherInfo.musicianAuthStatus;
+    }
+    else {
+        listView.musicianStatus = @"PASS";
+    }
     [listView beginFirstRefresh];
     return listView;
 }

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.h

@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MyMusicBodyView : KSJXBodyView
 
+@property (nonatomic, strong) NSString *musicianStatus;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 96 - 22
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MyMusicBodyView.m

@@ -10,6 +10,7 @@
 #import "MusicMessageCell.h"
 #import "MusicUploadView.h"
 #import "KSBaseWKWebViewController.h"
+#import "AuthDisplayView.h"
 
 @interface MyMusicBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -28,6 +29,10 @@
 
 @property (nonatomic, strong) MusicUploadView *uploadView;
 
+@property (nonatomic, assign) BOOL authStatus;
+
+@property (nonatomic, strong) AuthDisplayView *authView;
+
 @end
 
 @implementation MyMusicBodyView
@@ -116,15 +121,6 @@
                 MusicMessageModel *model = [[MusicMessageModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
             }
-//            for (int i = 0 ; i < 10; i++) {
-//                MusicMessageModel *model = [[MusicMessageModel alloc] init];
-//                model.username = @"hahahha";
-//                model.chargeType = 0;
-//                model.musicSheetName = @"小夜曲";
-//                model.composer = @"肖邦";
-//                model.musicTag = @"钢琴,古典,10级";
-//                [self.dataArray addObject:model];
-//            }
             if (sourceArray.count < self.rows) {
                 self.isLoadMore = NO;
             }
@@ -174,21 +170,19 @@
         [self addSubview:self.uploadView];
         MJWeakSelf;
         [self.uploadView uploadAction:^(BOOL hasAuth) {
-            [weakSelf uploadSong:hasAuth];
+            [weakSelf uploadSong];
         }];
-        
+        if (self.authStatus == NO) {
+            [self showAuthView];
+        }
+        else {
+            [self hideAuthView];
+        }
     }
 }
 
-- (void)uploadSong:(BOOL)hasAuth {
-    NSString *url = @"";
-    if (hasAuth) {
-        url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
-    }
-    else {
-        url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/musicCert"];
-    }
-    
+- (void)uploadSong {
+    NSString *url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/music-upload"];
     KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
     webCtrl.url = url;
     [self.naviController pushViewController:webCtrl animated:YES];
@@ -275,14 +269,94 @@
     return isExistenceNetwork;
 }
 
-
-
+#pragma mark ---- lazying
 - (NSMutableArray *)dataArray {
     if (!_dataArray) {
         _dataArray = [NSMutableArray array];
     }
     return _dataArray;
 }
+
+- (void)setMusicianStatus:(NSString *)musicianStatus {
+    _musicianStatus = musicianStatus;
+    
+    if ([musicianStatus isEqualToString:@"PASS"]) {
+        self.authStatus = YES;
+    }
+    else {
+        self.authStatus = NO;
+    }
+    
+    if (self.authStatus == NO) {
+        [self showAuthView];
+    }
+    else {
+        [self hideAuthView];
+    }
+}
+
+- (NSString *)getAuthDisplayMessage {
+    
+    if ([self.musicianStatus isEqualToString:@"DOING"]) { // 审核中
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        return @"您还没有完成音乐人认证,认证后才可上传曲谱哦~";
+    }
+}
+
+- (void)showAuthView {
+    [self configAuthDisplay];
+    if ([self.subviews containsObject:self.authView]) {
+        [self bringSubviewToFront:self.authView];
+    }
+    else {
+        [self addSubview:self.authView];
+        [self.authView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.top.bottom.right.mas_equalTo(self);
+        }];
+    }
+}
+
+- (void)hideAuthView {
+    if ([self.subviews containsObject:self.authView]) {
+        [self.authView removeFromSuperview];
+        self.authView = nil;
+    }
+}
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.musicianStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
+- (void)authAction {
+    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/musicCert"];
+    [self.naviController pushViewController:webCtrl animated:YES];
+}
+
+- (AuthDisplayView *)authView {
+    if (!_authView) {
+        _authView = [AuthDisplayView shareInstance];
+        [_authView.imageView setImage:[UIImage imageNamed:[self getAuthDisplayImage]]];
+        MJWeakSelf;
+        [_authView sureCallback:^{
+            [weakSelf authAction];
+        }];
+    }
+    return _authView;
+}
+
+- (NSString *)getAuthDisplayImage {
+    return @"authMuscian";
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 205 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m

@@ -6,9 +6,22 @@
 //
 
 #import "ReceiveEvaluateListController.h"
+#import "ReceiveHeaderView.h"
+#import "ReceiveEvaluateCell.h"
+#import "KSFullDatePicker.h"
+#import "ReceiveListModel.h"
 
-@interface ReceiveEvaluateListController ()
+@interface ReceiveEvaluateListController ()<UITableViewDataSource,UITableViewDelegate>
 
+@property (nonatomic, strong) NSDateFormatter *dateFormatter;
+
+@property (nonatomic, strong) UITableView *tableView;
+
+@property (nonatomic, strong) ReceiveHeaderView *headView;
+
+@property (nonatomic, strong) NSString *chooseDate;
+
+@property (nonatomic, strong) NSString *searchKey;
 @end
 
 @implementation ReceiveEvaluateListController
@@ -16,8 +29,199 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    [self allocTitle:@"我收到的评价"];
+    [self configDefault];
+    [self configUI];
+}
+
+- (void)configDefault {
+    [self.dateFormatter setDateFormat:@"yyyy-MM"];
+    NSDate *date = [NSDate date];
+    self.chooseDate = [self.dateFormatter stringFromDate:date];
+    [self.dateFormatter setDateFormat:@"yyyy年MM月"];
+    self.headView.sortTitleLabel.text = [self.dateFormatter stringFromDate:date];
+}
+
+- (void)configUI {
+    [self.scrollView removeFromSuperview];
+    [self.view addSubview:self.headView];
+    [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(50);
+    }];
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.headView.mas_bottom);
+        make.bottom.mas_equalTo(self.view.mas_bottom).offset(-iPhoneXSafeBottomMargin);
+    }];
+    MJWeakSelf;
+    self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
+        [weakSelf refreshAndRequestData];
+    }];
+    self.tableView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
+        if (weakSelf.isLoadMore) {
+            weakSelf.pages += 1;
+            [weakSelf requestData];
+        }
+        else {
+            [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
+        }
+    }];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self refreshAndRequestData];
+}
+
+- (void)endRefresh {
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self.tableView.mj_header endRefreshing];
+        [self.tableView.mj_footer endRefreshing];
+    });
+}
+
+- (void)refreshAndRequestData {
+    [self resetParamenter];
+    [self requestData];
+    
+}
+
+- (void)requestData {
+    [self showhud];
+    [KSNetworkingManager myReceiveRepliedRequest:KS_POST classMonth:self.chooseDate search:self.searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        [self endRefresh];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            NSLog(@"%@",[dic mj_JSONString]);
+            for (NSDictionary *parm in sourceArray) {
+                ReceiveListModel *model = [[ReceiveListModel alloc] initWithDictionary:parm];
+                [self.dataArray addObject:model];
+            }
+            if (sourceArray.count < self.rows) {
+                self.isLoadMore = NO;
+            }
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+        
+        [self.tableView reloadData];
+        [self changePromptLabelState];
+    } faliure:^(NSError * _Nonnull error) {
+        [self removehub];
+        [self endRefresh];
+        if (self.networkAvaiable == NO) {
+            [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
+        }
+        [self.dataArray removeAllObjects];
+        [self.tableView reloadData];
+    }];
+}
+
+- (void)resetParamenter {
+    self.isLoadMore = YES;
+    self.pages = 1;
+    self.rows = 10;
+    self.dataArray = [NSMutableArray array];
+    [self.tableView.mj_footer resetNoMoreData];
+    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.tableView];
+    [self.tableView reloadData];
 }
 
+#pragma mark ----- table data source
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.dataArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    ReceiveListModel *model = self.dataArray[indexPath.row];
+    ReceiveEvaluateCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ReceiveEvaluateCell"];
+    [cell configWithSource:model];
+    return cell;
+}
+
+
+#pragma mark ----- lazying
+
+- (NSDateFormatter *)dateFormatter {
+    if (!_dateFormatter) {
+        _dateFormatter = [NSObject getDateformatter];
+    }
+    return _dateFormatter;
+}
+
+- (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 registerNib:[UINib nibWithNibName:@"ReceiveEvaluateCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ReceiveEvaluateCell"];
+        _tableView.estimatedRowHeight = 125.0f;
+        _tableView.rowHeight = UITableViewAutomaticDimension;
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 15)];
+        bottomView.backgroundColor = HexRGB(0xf6f8f9);
+        _tableView.tableFooterView = bottomView;
+    }
+    return _tableView;
+}
+
+- (ReceiveHeaderView *)headView {
+    if (!_headView) {
+        _headView = [ReceiveHeaderView shareInstance];
+        MJWeakSelf;
+        [_headView searchCallback:^(RECEIVESORT sortType, NSString * _Nullable searchKey) {
+            [weakSelf searchSource:sortType searchKey:searchKey];
+        }];
+    }
+    return _headView;
+}
+
+- (void)searchSource:(RECEIVESORT)sortType searchKey:(NSString *)searchKey {
+    switch (sortType) {
+        case RECEIVESORT_TIME:
+        {
+            KSFullDatePicker *picker = [[KSFullDatePicker alloc] initWithTitle:@"" date:[NSDate date] pickMode:KSDATEPICKER_MODE_YEAR_MONTH selectDateBlock:^(NSString *date) {
+
+                self.chooseDate = date;
+                NSString *displayTime = [self getTimeDisplay:date];
+                [self.headView.sortTitleLabel setText:displayTime];
+                [self resetPickerStatus];
+                // 请求数据
+                [self refreshAndRequestData];
+            } cancleBlock:^{
+                [self resetPickerStatus];
+            }];
+            [picker show];
+        }
+            break;
+        case RECEIVESORT_NAME:
+        {
+            self.searchKey = searchKey;
+            [self refreshAndRequestData];
+            
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)resetPickerStatus {
+    self.headView.arrowUp = NO;
+}
+
+- (NSString *)getTimeDisplay:(NSString *)chooseMonth {
+    [self.dateFormatter setDateFormat:@"yyyy-MM"];
+    NSDate *chooseDate = [self.dateFormatter dateFromString:chooseMonth];
+    [self.dateFormatter setDateFormat:@"yyyy年MM月"];
+    NSString *displayTime = [self.dateFormatter stringFromDate:chooseDate];
+    return displayTime;
+}
 /*
 #pragma mark - Navigation
 

+ 32 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Model/ReceiveListModel.h

@@ -0,0 +1,32 @@
+//
+//  ReceiveListModel.h
+//
+//  Created by Steven  on 2022/5/9
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+
+@interface ReceiveListModel : NSObject <NSCoding, NSCopying>
+
+@property (nonatomic, strong) NSString *courseGroupId;
+@property (nonatomic, strong) NSString *classDate;
+@property (nonatomic, strong) NSString *realName;
+@property (nonatomic, strong) NSString *studentReplied;
+@property (nonatomic, strong) NSString *subjectId;
+@property (nonatomic, strong) NSString *courseId;
+@property (nonatomic, strong) NSString *avatar;
+@property (nonatomic, strong) NSString *userName;
+@property (nonatomic, strong) NSString *endTime;
+@property (nonatomic, strong) NSString *subjectName;
+@property (nonatomic, assign) double userId;
+@property (nonatomic, strong) NSString *startTime;
+@property (nonatomic, strong) NSString *score;
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
+- (instancetype)initWithDictionary:(NSDictionary *)dict;
+- (NSDictionary *)dictionaryRepresentation;
+
+@end

+ 179 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Model/ReceiveListModel.m

@@ -0,0 +1,179 @@
+//
+//  ReceiveListModel.m
+//
+//  Created by Steven  on 2022/5/9
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
+//
+
+#import "ReceiveListModel.h"
+
+
+NSString *const kReceiveListModelCourseGroupId = @"courseGroupId";
+NSString *const kReceiveListModelClassDate = @"classDate";
+NSString *const kReceiveListModelRealName = @"realName";
+NSString *const kReceiveListModelStudentReplied = @"studentReplied";
+NSString *const kReceiveListModelSubjectId = @"subjectId";
+NSString *const kReceiveListModelCourseId = @"courseId";
+NSString *const kReceiveListModelAvatar = @"avatar";
+NSString *const kReceiveListModelUserName = @"userName";
+NSString *const kReceiveListModelEndTime = @"endTime";
+NSString *const kReceiveListModelSubjectName = @"subjectName";
+NSString *const kReceiveListModelUserId = @"userId";
+NSString *const kReceiveListModelStartTime = @"startTime";
+NSString *const kReceiveListModelScore = @"score";
+
+
+@interface ReceiveListModel ()
+
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
+
+@end
+
+@implementation ReceiveListModel
+
+@synthesize courseGroupId = _courseGroupId;
+@synthesize classDate = _classDate;
+@synthesize realName = _realName;
+@synthesize studentReplied = _studentReplied;
+@synthesize subjectId = _subjectId;
+@synthesize courseId = _courseId;
+@synthesize avatar = _avatar;
+@synthesize userName = _userName;
+@synthesize endTime = _endTime;
+@synthesize subjectName = _subjectName;
+@synthesize userId = _userId;
+@synthesize startTime = _startTime;
+@synthesize score = _score;
+
+
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
+{
+    return [[self alloc] initWithDictionary:dict];
+}
+
+- (instancetype)initWithDictionary:(NSDictionary *)dict
+{
+    self = [super init];
+    
+    // This check serves to make sure that a non-NSDictionary object
+    // passed into the model class doesn't break the parsing.
+    if(self && [dict isKindOfClass:[NSDictionary class]]) {
+            self.courseGroupId = [self objectOrNilForKey:kReceiveListModelCourseGroupId fromDictionary:dict];
+            self.classDate = [self objectOrNilForKey:kReceiveListModelClassDate fromDictionary:dict];
+            self.realName = [self objectOrNilForKey:kReceiveListModelRealName fromDictionary:dict];
+            self.studentReplied = [self objectOrNilForKey:kReceiveListModelStudentReplied fromDictionary:dict];
+            self.subjectId = [self objectOrNilForKey:kReceiveListModelSubjectId fromDictionary:dict];
+            self.courseId = [self objectOrNilForKey:kReceiveListModelCourseId fromDictionary:dict];
+            self.avatar = [self objectOrNilForKey:kReceiveListModelAvatar fromDictionary:dict];
+            self.userName = [self objectOrNilForKey:kReceiveListModelUserName fromDictionary:dict];
+            self.endTime = [self objectOrNilForKey:kReceiveListModelEndTime fromDictionary:dict];
+            self.subjectName = [self objectOrNilForKey:kReceiveListModelSubjectName fromDictionary:dict];
+            self.userId = [[self objectOrNilForKey:kReceiveListModelUserId fromDictionary:dict] doubleValue];
+            self.startTime = [self objectOrNilForKey:kReceiveListModelStartTime fromDictionary:dict];
+            self.score = [self objectOrNilForKey:kReceiveListModelScore fromDictionary:dict];
+
+    }
+    
+    return self;
+    
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setValue:self.courseGroupId forKey:kReceiveListModelCourseGroupId];
+    [mutableDict setValue:self.classDate forKey:kReceiveListModelClassDate];
+    [mutableDict setValue:self.realName forKey:kReceiveListModelRealName];
+    [mutableDict setValue:self.studentReplied forKey:kReceiveListModelStudentReplied];
+    [mutableDict setValue:self.subjectId forKey:kReceiveListModelSubjectId];
+    [mutableDict setValue:self.courseId forKey:kReceiveListModelCourseId];
+    [mutableDict setValue:self.avatar forKey:kReceiveListModelAvatar];
+    [mutableDict setValue:self.userName forKey:kReceiveListModelUserName];
+    [mutableDict setValue:self.endTime forKey:kReceiveListModelEndTime];
+    [mutableDict setValue:self.subjectName forKey:kReceiveListModelSubjectName];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.userId] forKey:kReceiveListModelUserId];
+    [mutableDict setValue:self.startTime forKey:kReceiveListModelStartTime];
+    [mutableDict setValue:self.score forKey:kReceiveListModelScore];
+
+    return [NSDictionary dictionaryWithDictionary:mutableDict];
+}
+
+- (NSString *)description 
+{
+    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
+}
+
+#pragma mark - Helper Method
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
+{
+    id object = [dict objectForKey:aKey];
+    return [object isEqual:[NSNull null]] ? nil : object;
+}
+
+
+#pragma mark - NSCoding Methods
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super init];
+
+    self.courseGroupId = [aDecoder decodeObjectForKey:kReceiveListModelCourseGroupId];
+    self.classDate = [aDecoder decodeObjectForKey:kReceiveListModelClassDate];
+    self.realName = [aDecoder decodeObjectForKey:kReceiveListModelRealName];
+    self.studentReplied = [aDecoder decodeObjectForKey:kReceiveListModelStudentReplied];
+    self.subjectId = [aDecoder decodeObjectForKey:kReceiveListModelSubjectId];
+    self.courseId = [aDecoder decodeObjectForKey:kReceiveListModelCourseId];
+    self.avatar = [aDecoder decodeObjectForKey:kReceiveListModelAvatar];
+    self.userName = [aDecoder decodeObjectForKey:kReceiveListModelUserName];
+    self.endTime = [aDecoder decodeObjectForKey:kReceiveListModelEndTime];
+    self.subjectName = [aDecoder decodeObjectForKey:kReceiveListModelSubjectName];
+    self.userId = [aDecoder decodeDoubleForKey:kReceiveListModelUserId];
+    self.startTime = [aDecoder decodeObjectForKey:kReceiveListModelStartTime];
+    self.score = [aDecoder decodeObjectForKey:kReceiveListModelScore];
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)aCoder
+{
+
+    [aCoder encodeObject:_courseGroupId forKey:kReceiveListModelCourseGroupId];
+    [aCoder encodeObject:_classDate forKey:kReceiveListModelClassDate];
+    [aCoder encodeObject:_realName forKey:kReceiveListModelRealName];
+    [aCoder encodeObject:_studentReplied forKey:kReceiveListModelStudentReplied];
+    [aCoder encodeObject:_subjectId forKey:kReceiveListModelSubjectId];
+    [aCoder encodeObject:_courseId forKey:kReceiveListModelCourseId];
+    [aCoder encodeObject:_avatar forKey:kReceiveListModelAvatar];
+    [aCoder encodeObject:_userName forKey:kReceiveListModelUserName];
+    [aCoder encodeObject:_endTime forKey:kReceiveListModelEndTime];
+    [aCoder encodeObject:_subjectName forKey:kReceiveListModelSubjectName];
+    [aCoder encodeDouble:_userId forKey:kReceiveListModelUserId];
+    [aCoder encodeObject:_startTime forKey:kReceiveListModelStartTime];
+    [aCoder encodeObject:_score forKey:kReceiveListModelScore];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    ReceiveListModel *copy = [[ReceiveListModel alloc] init];
+    
+    if (copy) {
+
+        copy.courseGroupId = [self.courseGroupId copyWithZone:zone];
+        copy.classDate = [self.classDate copyWithZone:zone];
+        copy.realName = [self.realName copyWithZone:zone];
+        copy.studentReplied = [self.studentReplied copyWithZone:zone];
+        copy.subjectId = [self.subjectId copyWithZone:zone];
+        copy.courseId = [self.courseId copyWithZone:zone];
+        copy.avatar = [self.avatar copyWithZone:zone];
+        copy.userName = [self.userName copyWithZone:zone];
+        copy.endTime = [self.endTime copyWithZone:zone];
+        copy.subjectName = [self.subjectName copyWithZone:zone];
+        copy.userId = self.userId;
+        copy.startTime = [self.startTime copyWithZone:zone];
+        copy.score = [self.score copyWithZone:zone];
+    }
+    
+    return copy;
+}
+
+
+@end

+ 19 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.h

@@ -0,0 +1,19 @@
+//
+//  ReceiveEvaluateCell.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/9.
+//
+
+#import <UIKit/UIKit.h>
+#import "ReceiveListModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ReceiveEvaluateCell : UITableViewCell
+
+- (void)configWithSource:(ReceiveListModel *)model;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 74 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.m

@@ -0,0 +1,74 @@
+//
+//  ReceiveEvaluateCell.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/9.
+//
+
+#import "ReceiveEvaluateCell.h"
+#import "KSStarView.h"
+
+@interface ReceiveEvaluateCell ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *userAvatal;
+
+@property (weak, nonatomic) IBOutlet UILabel *studentName;
+
+@property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
+
+@property (weak, nonatomic) IBOutlet KSStarView *starView;
+
+@end
+
+@implementation ReceiveEvaluateCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+    self.starView.allowMark = NO;
+}
+
+- (void)configWithSource:(ReceiveListModel *)model {
+    [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    if ([NSString isEmptyString:model.userName]) {
+        self.studentName.text = [NSString stringWithFormat:@"游客%.0f",model.userId];
+    }
+    else {
+        self.studentName.text = model.userName;
+    }
+    self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    
+    NSDateFormatter *formatter = [NSObject getDateformatter];
+    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *startDate = [formatter dateFromString:model.startTime];
+    NSDate *endDate = [formatter dateFromString:model.endTime];
+    [formatter setDateFormat:@"yyyy/MM/dd HH:mm"];
+    NSString *lessonBegin = [formatter stringFromDate:startDate];
+    [formatter setDateFormat:@"HH:mm"];
+    NSString *lessonEnd = [formatter stringFromDate:endDate];
+    self.timeLabel.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
+    
+    if (![NSString isEmptyString:model.studentReplied]) {
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        [paragraphStyle setLineSpacing:4];//调整行间距
+        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:model.studentReplied attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x333333)}];
+        self.contentLabel.attributedText = attr;
+    }
+    else {
+        self.contentLabel.text = @"";
+    }
+    self.starView.rate = [model.score integerValue] / 5.0f;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 155 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveEvaluateCell.xib

@@ -0,0 +1,155 @@
+<?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" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <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"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="198" id="KGk-i7-Jjw" customClass="ReceiveEvaluateCell">
+            <rect key="frame" x="0.0" y="0.0" width="408" height="198"/>
+            <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="408" height="198"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MGH-Cr-Zxk">
+                        <rect key="frame" x="14" y="0.0" width="380" height="186"/>
+                        <subviews>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="Wt8-lG-CU9">
+                                <rect key="frame" x="12" y="14" width="48" height="48"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="48" id="IhR-JD-Hc4"/>
+                                    <constraint firstAttribute="height" constant="48" id="U0a-kx-vYs"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="24"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="张三" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xTE-Og-veP">
+                                <rect key="frame" x="69" y="14" width="31" height="28"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="28" id="eSo-08-rSw"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2022-3-20 14:00~14:25" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eMc-aY-Ud7">
+                                <rect key="frame" x="69" y="42" width="147.5" height="18"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="EIb-1a-0kX"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Pau-nh-n8u">
+                                <rect key="frame" x="105" y="20" width="32.5" height="16"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zty-U5-4rC">
+                                        <rect key="frame" x="5" y="0.0" width="22.5" height="16"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                                        <color key="textColor" red="1" green="0.54901960780000003" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="1" green="0.94509803920000002" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstItem="Zty-U5-4rC" firstAttribute="leading" secondItem="Pau-nh-n8u" secondAttribute="leading" constant="5" id="EuG-9R-Pti"/>
+                                    <constraint firstItem="Zty-U5-4rC" firstAttribute="top" secondItem="Pau-nh-n8u" secondAttribute="top" id="HaW-FL-cWQ"/>
+                                    <constraint firstAttribute="trailing" secondItem="Zty-U5-4rC" secondAttribute="trailing" constant="5" id="RcD-Re-3ac"/>
+                                    <constraint firstAttribute="height" constant="16" id="SiS-eu-bHG"/>
+                                    <constraint firstAttribute="bottom" secondItem="Zty-U5-4rC" secondAttribute="bottom" id="jRQ-If-lUs"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="4"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NgS-aJ-nZw">
+                                <rect key="frame" x="267" y="18.5" width="95" height="19"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fzq-he-5l2" customClass="KSStarView">
+                                        <rect key="frame" x="0.0" y="0.0" width="95" height="19"/>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="95" id="3c2-qP-zay"/>
+                                    <constraint firstAttribute="trailing" secondItem="Fzq-he-5l2" secondAttribute="trailing" id="HZA-jB-Ahc"/>
+                                    <constraint firstAttribute="bottom" secondItem="Fzq-he-5l2" secondAttribute="bottom" id="dKn-k0-yz1"/>
+                                    <constraint firstItem="Fzq-he-5l2" firstAttribute="leading" secondItem="NgS-aJ-nZw" secondAttribute="leading" id="h2a-Vc-MfD"/>
+                                    <constraint firstItem="Fzq-he-5l2" firstAttribute="top" secondItem="NgS-aJ-nZw" secondAttribute="top" id="jGw-mz-Yap"/>
+                                    <constraint firstAttribute="height" constant="19" id="ybe-DM-aCm"/>
+                                </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="Nj1-Lc-sxE">
+                                <rect key="frame" x="18" y="80" width="344" height="86"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                <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="bottom" secondItem="Nj1-Lc-sxE" secondAttribute="bottom" constant="20" id="2ed-Hw-oSM"/>
+                            <constraint firstItem="Nj1-Lc-sxE" firstAttribute="leading" secondItem="MGH-Cr-Zxk" secondAttribute="leading" constant="18" id="3br-J3-w4W"/>
+                            <constraint firstItem="Wt8-lG-CU9" firstAttribute="top" secondItem="MGH-Cr-Zxk" secondAttribute="top" constant="14" id="4kj-1J-Bhv"/>
+                            <constraint firstItem="Wt8-lG-CU9" firstAttribute="leading" secondItem="MGH-Cr-Zxk" secondAttribute="leading" constant="12" id="Gbb-9c-JEW"/>
+                            <constraint firstItem="NgS-aJ-nZw" firstAttribute="centerY" secondItem="Pau-nh-n8u" secondAttribute="centerY" id="Gk9-y0-asi"/>
+                            <constraint firstItem="xTE-Og-veP" firstAttribute="leading" secondItem="Wt8-lG-CU9" secondAttribute="trailing" constant="9" id="JRe-rX-qQa"/>
+                            <constraint firstItem="Pau-nh-n8u" firstAttribute="centerY" secondItem="xTE-Og-veP" secondAttribute="centerY" id="Nfa-1t-yAT"/>
+                            <constraint firstAttribute="trailing" secondItem="NgS-aJ-nZw" secondAttribute="trailing" constant="18" id="SZn-EX-J0H"/>
+                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="eMc-aY-Ud7" secondAttribute="trailing" constant="15" id="Unb-I0-HKW"/>
+                            <constraint firstItem="xTE-Og-veP" firstAttribute="top" secondItem="Wt8-lG-CU9" secondAttribute="top" id="ceC-Io-nu3"/>
+                            <constraint firstItem="eMc-aY-Ud7" firstAttribute="leading" secondItem="xTE-Og-veP" secondAttribute="leading" id="fQr-mO-Sv1"/>
+                            <constraint firstItem="Nj1-Lc-sxE" firstAttribute="top" secondItem="Wt8-lG-CU9" secondAttribute="bottom" constant="18" id="htb-oE-Pmv"/>
+                            <constraint firstItem="NgS-aJ-nZw" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Pau-nh-n8u" secondAttribute="trailing" constant="15" id="jRf-o4-krI"/>
+                            <constraint firstItem="Pau-nh-n8u" firstAttribute="leading" secondItem="xTE-Og-veP" secondAttribute="trailing" constant="5" id="n1M-0h-xXc"/>
+                            <constraint firstItem="eMc-aY-Ud7" firstAttribute="top" secondItem="xTE-Og-veP" secondAttribute="bottom" id="zg6-ae-b9Q"/>
+                            <constraint firstAttribute="trailing" secondItem="Nj1-Lc-sxE" secondAttribute="trailing" constant="18" id="zis-TH-6Xl"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="10"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="MGH-Cr-Zxk" secondAttribute="trailing" constant="14" id="Lsq-gt-Ds0"/>
+                    <constraint firstAttribute="bottom" secondItem="MGH-Cr-Zxk" secondAttribute="bottom" constant="12" id="RU8-Tb-WKB"/>
+                    <constraint firstItem="MGH-Cr-Zxk" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="ZXV-F5-OlN"/>
+                    <constraint firstItem="MGH-Cr-Zxk" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="z4n-ac-CH9"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <connections>
+                <outlet property="contentLabel" destination="Nj1-Lc-sxE" id="olu-F1-rZT"/>
+                <outlet property="starView" destination="Fzq-he-5l2" id="yde-Qm-JHB"/>
+                <outlet property="studentName" destination="xTE-Og-veP" id="mQE-Xg-hsY"/>
+                <outlet property="subjectLabel" destination="Zty-U5-4rC" id="4JD-GS-UrY"/>
+                <outlet property="timeLabel" destination="eMc-aY-Ud7" id="8w1-eD-2aa"/>
+                <outlet property="userAvatal" destination="Wt8-lG-CU9" id="AgP-Nr-Ht4"/>
+            </connections>
+            <point key="canvasLocation" x="195.6521739130435" y="131.91964285714286"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <image name="user_default_avatal" width="52" height="52"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 33 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.h

@@ -0,0 +1,33 @@
+//
+//  ReceiveHeaderView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/9.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, RECEIVESORT) {
+    RECEIVESORT_TIME, //  搜索月份
+    RECEIVESORT_NAME, // 搜索学员姓名
+};
+typedef void(^RecevieSortCallback)(RECEIVESORT sortType, NSString * _Nullable searchKey);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ReceiveHeaderView : UIView
+
+@property (weak, nonatomic) IBOutlet UILabel *sortTitleLabel;
+
+@property (weak, nonatomic) IBOutlet UITextField *searchField;
+
+
+@property (nonatomic, assign) BOOL arrowUp;
+
++ (instancetype)shareInstance;
+
+- (void)searchCallback:(RecevieSortCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 59 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.m

@@ -0,0 +1,59 @@
+//
+//  ReceiveHeaderView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/9.
+//
+
+#import "ReceiveHeaderView.h"
+
+@interface ReceiveHeaderView ()
+
+@property (weak, nonatomic) IBOutlet UIImageView *arrowImage;
+
+@property (nonatomic, copy) RecevieSortCallback callack;
+
+@end
+
+@implementation ReceiveHeaderView
+
++ (instancetype)shareInstance {
+    ReceiveHeaderView *view = [[[NSBundle mainBundle] loadNibNamed:@"ReceiveHeaderView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)searchCallback:(RecevieSortCallback)callback {
+    if (callback) {
+        self.callack = callback;
+    }
+}
+
+- (IBAction)searchTime:(id)sender {
+    self.arrowUp = YES;
+    [self endEditing:YES];
+    if (self.callack) {
+        self.callack(RECEIVESORT_TIME, nil);
+    }
+}
+
+- (IBAction)searchName:(id)sender {
+    [self endEditing:YES];
+    if (self.callack) {
+        self.callack(RECEIVESORT_NAME, self.searchField.text);
+    }
+}
+
+- (void)setArrowUp:(BOOL)arrowUp {
+    _arrowUp = arrowUp;
+    NSString *imageName = arrowUp ? @"sort_up" : @"sort_down";
+    [self.arrowImage setImage:[UIImage imageNamed:imageName]];
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 117 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/View/ReceiveHeaderView.xib

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ReceiveHeaderView">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="73"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2021年9月" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fme-uE-7Ow">
+                    <rect key="frame" x="14" y="26.5" width="69" height="20"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="20" id="HPQ-7d-UR2"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                    <nil key="highlightedColor"/>
+                </label>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down" translatesAutoresizingMaskIntoConstraints="NO" id="7fU-gS-SKP">
+                    <rect key="frame" x="86" y="33.5" width="8" height="6"/>
+                </imageView>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vqj-4K-BVm">
+                    <rect key="frame" x="14" y="19.5" width="80" height="34"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                    <connections>
+                        <action selector="searchTime:" destination="iN0-l3-epB" eventType="touchUpInside" id="SP3-IV-Bv5"/>
+                    </connections>
+                </button>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wXs-Bd-5S0">
+                    <rect key="frame" x="108" y="18.5" width="292" height="36"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="search_green" translatesAutoresizingMaskIntoConstraints="NO" id="s4c-Q0-TYc">
+                            <rect key="frame" x="11" y="10" width="15" height="16"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="15" id="4zo-OJ-lvo"/>
+                                <constraint firstAttribute="height" constant="16" id="MvD-xK-ein"/>
+                            </constraints>
+                        </imageView>
+                        <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入学员姓名" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Vex-QS-IHP">
+                            <rect key="frame" x="35" y="0.0" width="192" height="36"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                            <textInputTraits key="textInputTraits"/>
+                        </textField>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DDn-7b-hcS">
+                            <rect key="frame" x="232" y="4" width="56" height="28"/>
+                            <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="28" id="BPM-4T-4az"/>
+                                <constraint firstAttribute="width" constant="56" id="idg-my-p6A"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <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="14"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="searchName:" destination="iN0-l3-epB" eventType="touchUpInside" id="Io7-hv-AJG"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="Vex-QS-IHP" secondAttribute="bottom" id="5tf-gE-yPQ"/>
+                        <constraint firstItem="Vex-QS-IHP" firstAttribute="top" secondItem="wXs-Bd-5S0" secondAttribute="top" id="8ms-Qh-lzM"/>
+                        <constraint firstAttribute="trailing" secondItem="DDn-7b-hcS" secondAttribute="trailing" constant="4" id="BiH-m2-1ei"/>
+                        <constraint firstItem="s4c-Q0-TYc" firstAttribute="leading" secondItem="wXs-Bd-5S0" secondAttribute="leading" constant="11" id="X2p-Qs-QDW"/>
+                        <constraint firstItem="DDn-7b-hcS" firstAttribute="centerY" secondItem="wXs-Bd-5S0" secondAttribute="centerY" id="gtY-vy-VbN"/>
+                        <constraint firstItem="DDn-7b-hcS" firstAttribute="leading" secondItem="Vex-QS-IHP" secondAttribute="trailing" constant="5" id="llA-Cl-wVt"/>
+                        <constraint firstItem="Vex-QS-IHP" firstAttribute="leading" secondItem="s4c-Q0-TYc" secondAttribute="trailing" constant="9" id="n0c-w0-xd2"/>
+                        <constraint firstAttribute="height" constant="36" id="n76-NI-wPw"/>
+                        <constraint firstItem="s4c-Q0-TYc" firstAttribute="centerY" secondItem="wXs-Bd-5S0" secondAttribute="centerY" id="vf8-vb-R29"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="18"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="fme-uE-7Ow" firstAttribute="leading" secondItem="vqj-4K-BVm" secondAttribute="leading" id="6dC-mx-lcV"/>
+                <constraint firstItem="7fU-gS-SKP" firstAttribute="centerY" secondItem="fme-uE-7Ow" secondAttribute="centerY" id="Pxi-av-yUO"/>
+                <constraint firstAttribute="trailing" secondItem="wXs-Bd-5S0" secondAttribute="trailing" constant="14" id="SUd-3K-vdQ"/>
+                <constraint firstItem="wXs-Bd-5S0" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="UmU-Lb-sMp"/>
+                <constraint firstItem="7fU-gS-SKP" firstAttribute="centerY" secondItem="vqj-4K-BVm" secondAttribute="centerY" id="g0T-wk-gGS"/>
+                <constraint firstItem="fme-uE-7Ow" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="lIV-hp-nh3"/>
+                <constraint firstItem="7fU-gS-SKP" firstAttribute="trailing" secondItem="vqj-4K-BVm" secondAttribute="trailing" id="roe-bQ-20o"/>
+                <constraint firstItem="wXs-Bd-5S0" firstAttribute="leading" secondItem="7fU-gS-SKP" secondAttribute="trailing" constant="14" id="sqH-Qp-IcS"/>
+                <constraint firstItem="7fU-gS-SKP" firstAttribute="leading" secondItem="fme-uE-7Ow" secondAttribute="trailing" constant="3" id="vNk-kT-TR0"/>
+                <constraint firstItem="fme-uE-7Ow" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="wWz-Sd-WyV"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="arrowImage" destination="7fU-gS-SKP" id="aRr-jD-XF9"/>
+                <outlet property="searchField" destination="Vex-QS-IHP" id="1QS-IT-R0g"/>
+                <outlet property="sortTitleLabel" destination="fme-uE-7Ow" id="sjA-cI-lea"/>
+            </connections>
+            <point key="canvasLocation" x="131.8840579710145" y="-75.334821428571431"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="search_green" width="15" height="16"/>
+        <image name="sort_down" width="8" height="6"/>
+    </resources>
+</document>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressListViewController.m

@@ -137,7 +137,7 @@
 - (void)deleteAddressConfirm:(NSString *)addressId {
     KSImageAlert *alertView = [KSImageAlert shareInstance];
     MJWeakSelf;
-    alertView.titleLabel.text = @"确认删除收地址吗";
+    alertView.titleLabel.text = @"确认删除收地址吗";
     [alertView.cancleButton setTitle:@"取消" forState:UIControlStateNormal];
     [alertView.sureButton setTitle:@"确定" forState:UIControlStateNormal];
     [alertView sureCallback:^(BOOL isSure) {

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/View/MyAddressListCell.m

@@ -42,7 +42,8 @@
     else {
         self.phoneLabel.text = [NSString returnNoNullStringWithString:model.phoneNumber];
     }
-    self.detailAddress.text = [NSString returnNoNullStringWithString:model.detailAddress];
+    self.detailAddress.text = [NSString stringWithFormat:@"%@%@%@ %@", [NSString returnNoNullStringWithString:model.province], [NSString returnNoNullStringWithString:model.city], [NSString returnNoNullStringWithString:model.region], [NSString returnNoNullStringWithString:model.detailAddress]];
+//    self.detailAddress.text = [NSString returnNoNullStringWithString:model.detailAddress];
 }
 
 - (IBAction)modifyAction:(id)sender {

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/UnbindCardViewController.m

@@ -66,7 +66,9 @@
         }
         else {
             [self MBPShow:MESSAGEKEY];
-            [self showResultViewSuccess:NO];
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                [self showResultViewSuccess:NO];
+            });
         }
     } faliure:^(NSError * _Nonnull error) {
         [self removehub];

+ 13 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Controller/MyStyleViewController.m

@@ -242,18 +242,19 @@
 #pragma mark --- 上传视频文件
 - (void)uploadVideoWithUrl:(NSString *)videoUrl {
     [self hudTipWillShow:YES];
-    NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:videoUrl]];
-    [KSNetworkingManager videoFileUpload:KS_POST fileData:fileData progress:^(int64_t bytesWritten, int64_t totalBytes) {
+    NSURL *fileUrl = [NSURL fileURLWithPath:videoUrl];
+    NSData *fileData = [NSData dataWithContentsOfURL:fileUrl];
+    NSString *suffix = [NSString stringWithFormat:@".%@",[fileUrl pathExtension]];
+    [[KSUploadManager shareInstance] videoUpload:fileData fileName:@"video" fileSuffix:suffix progress:^(int64_t bytesWritten, int64_t totalBytes) {
         dispatch_main_async_safe(^{
             // 显示进度
             if (self.HUD) {
                 self.HUD.progress = bytesWritten / totalBytes;// progress是回调进度
             }
         });
-    } success:^(NSDictionary * _Nonnull dic) {
-        [self hudTipWillShow:NO];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSString *fileUrl = [[dic dictionaryValueForKey:@"data"] stringValueForKey:@"url"];
+        } successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+            [self hudTipWillShow:NO];
+            NSString *fileUrl = [fileUrlArray lastObject];
             // 删除文件
             [self removeVideoWithPath:videoUrl];
             StyleVideoModel *model = [[StyleVideoModel alloc] init];
@@ -261,14 +262,12 @@
             model.isChooseVideo = YES;
             [self.videoArray addObject:model];
             [self.tableView reloadData];
-        }
-        else {
-            [self MBPShow:MESSAGEKEY];
-            
-        }
-    } faliure:^(NSError * _Nonnull error) {
-        [self hudTipWillShow:NO];
-    }];
+        } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
+            [self hudTipWillShow:NO];
+            if ([NSString isEmptyString:descMessaeg]) {
+                [self MBPShow:descMessaeg];
+            }
+        }];
 }
 
 - (void)removeVideoWithPath:(NSString *)videoUrl {

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m

@@ -577,7 +577,9 @@
             break;
         case MINEPAGETYPE_MUSIC:  // 上传曲谱
         {
-            
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/music-upload"];
+            [self.naviController pushViewController:webCtrl animated:YES];
         }
             break;
         default:

+ 0 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m

@@ -101,15 +101,6 @@
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
             }
-//                        for (int i = 0 ; i < 10; i++) {
-//                            VideoCourseModel *model = [[VideoCourseModel alloc] init];
-//                            model.username = @"hahahha";
-//                            model.lessonName = @"小夜曲";
-//                            model.lessonPrice = 5.0;
-//                            model.countStudent = 88;
-//                            [self.dataArray addObject:model];
-//                        }
-            
             if (sourceArray.count < self.rows) {
                 self.isLoadMore = NO;
             }

+ 7 - 15
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m

@@ -22,7 +22,6 @@
 #import "AboutUsViewController.h"
 #import "UserInfoManager.h"
 #import "AddressListViewController.h"
-#import "KSUploadManager.h"
 
 @interface SettingViewController ()
  
@@ -202,22 +201,15 @@
 }
 
 - (void)updateWithUserLogo:(UIImage *)image {
-    
-//    [KSUploadManager uploadFile:[[NSBundle mainBundle] pathForResource:@"7.6M" ofType:@"mov"]];
-//    return;
     NSData *imgData = [UIImage turnsImaegDataByImage:image];
-    [KSNetworkingManager multiImageUpload:KS_POST imgDataArray:@[imgData] success:^(NSArray * _Nonnull dics) {
-        NSDictionary *dic = [dics lastObject];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            NSString *avatar = [result stringValueForKey:@"url"];
-            [self modifyUserMessage:avatar gender:nil];
+    NSString *fileName = @"image";
+    [[KSUploadManager shareInstance] uploadImage:imgData fileName:fileName successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+        NSString *avatarUrl = [fileUrlArray lastObject];
+        [self modifyUserMessage:avatarUrl gender:nil];
+    } faliure:^(NSError * _Nullable error, NSString *descMessaeg) {
+        if ([NSString isEmptyString:descMessaeg]) {
+            [self MBPShow:descMessaeg];
         }
-        else {
-            [self MBPShow:MESSAGEKEY];
-        }
-    } faliure:^(NSError * _Nonnull error) {
-
     }];
 }
 

+ 6 - 12
KulexiuForTeacher/KulexiuForTeacher/Module/SealClass/Sections/NewWhiteboard/KSWhiteboardView.m

@@ -673,19 +673,13 @@
         image = [UIImage rotationImage:image rotation:UIImageOrientationLeft];
     }
     NSData *imgData = [UIImage compressImage:image maxLength:5];
-    
-    [KSNetworkingManager multiImageUpload:KS_POST imgDataArray:@[imgData] success:^(NSArray * _Nonnull dics) {
-        NSDictionary *dic = [dics lastObject];
-        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic dictionaryValueForKey:@"data"];
-            NSString *imgUrl = [result stringValueForKey:@"url"];
-            [self insertImageWithUrl:imgUrl size:image.size];
-        }
-        else {
-            [self MBPShow:MESSAGEKEY];
+    [[KSUploadManager shareInstance] uploadImage:imgData fileName:@"classroomPic" successCallback:^(NSMutableArray * _Nonnull fileUrlArray) {
+        NSString *imgUrl = [fileUrlArray lastObject];
+        [self insertImageWithUrl:imgUrl size:image.size];
+    } faliure:^(NSError * _Nullable error, NSString * _Nullable descMessaeg) {
+        if ([NSString isEmptyString:descMessaeg]) {
+            [self MBPShow:descMessaeg];
         }
-    } faliure:^(NSError * _Nonnull error) {
-        
     }];
 }