Steven 3 年之前
父節點
當前提交
ab7b2c657a
共有 100 個文件被更改,包括 2184 次插入73 次删除
  1. 58 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 1 1
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/xcschememanagement.plist
  3. 二進制
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  4. 64 0
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 二進制
      KulexiuForTeacher/KulexiuForTeacher/7.6M.mov
  6. 45 2
      KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m
  7. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_message.imageset/Contents.json
  8. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_message.imageset/empty_message@2x.png
  9. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_message.imageset/empty_message@3x.png
  10. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/Contents.json
  11. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/clear_notifer.imageset/Contents.json
  12. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/clear_notifer.imageset/clear_notifer@2x.png
  13. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/clear_notifer.imageset/clear_notifer@3x.png
  14. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/course_cell.imageset/Contents.json
  15. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/course_cell.imageset/course_cell@2x.png
  16. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/course_cell.imageset/course_cell@3x.png
  17. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_all.imageset/Contents.json
  18. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_all.imageset/message_all@2x.png
  19. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_all.imageset/message_all@3x.png
  20. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_course.imageset/Contents.json
  21. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_course.imageset/message_course@2x.png
  22. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_course.imageset/message_course@3x.png
  23. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_notice.imageset/Contents.json
  24. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_notice.imageset/message_notice@2x.png
  25. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_notice.imageset/message_notice@3x.png
  26. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_system.imageset/Contents.json
  27. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_system.imageset/message_system@2x.png
  28. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_system.imageset/message_system@3x.png
  29. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/notice_cell.imageset/Contents.json
  30. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/notice_cell.imageset/notice_cell@2x.png
  31. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/notice_cell.imageset/notice_cell@3x.png
  32. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/system_cell.imageset/Contents.json
  33. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/system_cell.imageset/system_cell@2x.png
  34. 二進制
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/system_cell.imageset/system_cell@3x.png
  35. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSBaseViewController.h
  36. 56 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  37. 86 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  38. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSUpdateAlert.xib
  39. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+phone.h
  40. 12 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+phone.m
  41. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDate+Extension.h
  42. 9 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDate+Extension.m
  43. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSString+Extension.h
  44. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSString+Extension.m
  45. 18 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.h
  46. 54 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m
  47. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupApplyChooseCell.m
  48. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupApplyMemberCell.m
  49. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupMemberListCell.m
  50. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupSettingBodyView.m
  51. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/View/KSSearchResultViewCell.m
  52. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/View/GroupListViewCell.m
  53. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.m
  54. 12 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  55. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/View/EvaluateCouseCell.m
  56. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkListCell.m
  57. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/Controller/MyIncomeViewController.m
  58. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/View/MusicMessageCell.m
  59. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLiveCourseCell.m
  60. 299 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m
  61. 24 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Model/NotiferMessageModel.h
  62. 187 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Model/NotiferMessageModel.m
  63. 32 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.h
  64. 204 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.m
  65. 346 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.xib
  66. 5 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.h
  67. 53 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.m
  68. 82 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.xib
  69. 16 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.h
  70. 31 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m
  71. 14 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.h
  72. 43 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.m
  73. 14 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.xib
  74. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m
  75. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveVideoRoomViewController.m
  76. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/LiveSeatApplyCell.m
  77. 8 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/LoginViewController.m
  78. 11 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m
  79. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/LoginBodyView.h
  80. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/LoginBodyView.m
  81. 4 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/PasswordBodyView.h
  82. 0 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/PasswordBodyView.m
  83. 8 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressDetailViewController.m
  84. 44 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressListViewController.m
  85. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/View/CardBandBodyView.m
  86. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Model/KSVideoHelper.m
  87. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/View/InstrumentChooseCell.m
  88. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m
  89. 4 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.m
  90. 31 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.xib
  91. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageMusicCell.m
  92. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageTopView.m
  93. 6 3
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoCell.m
  94. 30 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoCell.xib
  95. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m
  96. 5 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneCheckController.m
  97. 5 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m
  98. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/VeriCheckView.m
  99. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.h
  100. 7 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.m

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

@@ -493,6 +493,8 @@
 		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 */; };
@@ -514,6 +516,9 @@
 		BC7CFFD22817FF6D00CAEB21 /* CardDisplayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC7CFFD12817FF6D00CAEB21 /* CardDisplayView.xib */; };
 		BC7CFFD5281801A800CAEB21 /* CardBandBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7CFFD4281801A800CAEB21 /* CardBandBodyView.m */; };
 		BC7CFFD7281801B700CAEB21 /* CardBandBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC7CFFD6281801B700CAEB21 /* CardBandBodyView.xib */; };
+		BC8C2C642824EB9000FBA5D5 /* NotiferHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C632824EB9000FBA5D5 /* NotiferHeadView.m */; };
+		BC8C2C662824EB9800FBA5D5 /* NotiferHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8C2C652824EB9800FBA5D5 /* NotiferHeadView.xib */; };
+		BC8C2C7A28264CF400FBA5D5 /* ReceiveEvaluateListController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C7928264CF400FBA5D5 /* ReceiveEvaluateListController.m */; };
 		BCA723FB2806A96000DA0D0D /* HomeworkDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA723FA2806A96000DA0D0D /* HomeworkDetailViewController.m */; };
 		BCA723FF2806AEA000DA0D0D /* AccompanyHomeworkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA723FD2806AEA000DA0D0D /* AccompanyHomeworkCell.m */; };
 		BCA724002806AEA000DA0D0D /* AccompanyHomeworkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA723FE2806AEA000DA0D0D /* AccompanyHomeworkCell.xib */; };
@@ -1603,6 +1608,9 @@
 		BC76146B280D571B0080FD1F /* HomeworkVideoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkVideoView.h; sourceTree = "<group>"; };
 		BC76146C280D571B0080FD1F /* HomeworkVideoView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeworkVideoView.m; sourceTree = "<group>"; };
 		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>"; };
@@ -1637,6 +1645,11 @@
 		BC7CFFD3281801A800CAEB21 /* CardBandBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CardBandBodyView.h; sourceTree = "<group>"; };
 		BC7CFFD4281801A800CAEB21 /* CardBandBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CardBandBodyView.m; sourceTree = "<group>"; };
 		BC7CFFD6281801B700CAEB21 /* CardBandBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardBandBodyView.xib; sourceTree = "<group>"; };
+		BC8C2C622824EB9000FBA5D5 /* NotiferHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotiferHeadView.h; sourceTree = "<group>"; };
+		BC8C2C632824EB9000FBA5D5 /* NotiferHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotiferHeadView.m; sourceTree = "<group>"; };
+		BC8C2C652824EB9800FBA5D5 /* NotiferHeadView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NotiferHeadView.xib; sourceTree = "<group>"; };
+		BC8C2C7828264CF400FBA5D5 /* ReceiveEvaluateListController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReceiveEvaluateListController.h; sourceTree = "<group>"; };
+		BC8C2C7928264CF400FBA5D5 /* ReceiveEvaluateListController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReceiveEvaluateListController.m; sourceTree = "<group>"; };
 		BCA723F92806A96000DA0D0D /* HomeworkDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeworkDetailViewController.h; sourceTree = "<group>"; };
 		BCA723FA2806A96000DA0D0D /* HomeworkDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeworkDetailViewController.m; sourceTree = "<group>"; };
 		BCA723FC2806AEA000DA0D0D /* AccompanyHomeworkCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccompanyHomeworkCell.h; sourceTree = "<group>"; };
@@ -2188,6 +2201,7 @@
 		275E8A6627E18F2300DD3F6E /* KulexiuForTeacher */ = {
 			isa = PBXGroup;
 			children = (
+				BC76630A2827D0DD00C91A1D /* 7.6M.mov */,
 				277935D927E325B90010E277 /* Module */,
 				2779309427E30F2D0010E277 /* Common */,
 				275E8ADD27E1B25200DD3F6E /* KulexiuForTeacher.entitlements */,
@@ -2407,6 +2421,8 @@
 				277930A327E30FBA0010E277 /* SafeControl */,
 				277930B327E30FBB0010E277 /* VideoEditor */,
 				277931AD27E30FC10010E277 /* VoNetworking */,
+				BC7663072827C95200C91A1D /* KSUploadManager.h */,
+				BC7663082827C95200C91A1D /* KSUploadManager.m */,
 			);
 			path = Tools;
 			sourceTree = "<group>";
@@ -3144,6 +3160,7 @@
 		277935FA27E32BBF0010E277 /* Home */ = {
 			isa = PBXGroup;
 			children = (
+				BC8C2C7428264CCE00FBA5D5 /* ReceiveEvaluate */,
 				BCFE540A28178BD100AD6786 /* Income */,
 				BC1365BE280D44D500EB03E2 /* NotiferMessage */,
 				BC41103C28066E4100800BD9 /* EvaluateCourse */,
@@ -3842,6 +3859,9 @@
 				BC1365C5280D476500EB03E2 /* NotiferMessageCell.h */,
 				BC1365C6280D476500EB03E2 /* NotiferMessageCell.m */,
 				BC1365C7280D476500EB03E2 /* NotiferMessageCell.xib */,
+				BC8C2C622824EB9000FBA5D5 /* NotiferHeadView.h */,
+				BC8C2C632824EB9000FBA5D5 /* NotiferHeadView.m */,
+				BC8C2C652824EB9800FBA5D5 /* NotiferHeadView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -4172,6 +4192,39 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		BC8C2C7428264CCE00FBA5D5 /* ReceiveEvaluate */ = {
+			isa = PBXGroup;
+			children = (
+				BC8C2C7528264CCE00FBA5D5 /* Controller */,
+				BC8C2C7628264CCE00FBA5D5 /* Model */,
+				BC8C2C7728264CCE00FBA5D5 /* View */,
+			);
+			path = ReceiveEvaluate;
+			sourceTree = "<group>";
+		};
+		BC8C2C7528264CCE00FBA5D5 /* Controller */ = {
+			isa = PBXGroup;
+			children = (
+				BC8C2C7828264CF400FBA5D5 /* ReceiveEvaluateListController.h */,
+				BC8C2C7928264CF400FBA5D5 /* ReceiveEvaluateListController.m */,
+			);
+			path = Controller;
+			sourceTree = "<group>";
+		};
+		BC8C2C7628264CCE00FBA5D5 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		BC8C2C7728264CCE00FBA5D5 /* View */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
 		BCA9CE1827FD5EBF00D558C6 /* LiveCourse */ = {
 			isa = PBXGroup;
 			children = (
@@ -4952,6 +5005,7 @@
 				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 */,
@@ -5046,6 +5100,7 @@
 				BC7CFFD7281801B700CAEB21 /* CardBandBodyView.xib in Resources */,
 				275E3DE327F467410010EC30 /* BaseEmoji.plist in Resources */,
 				273C75A027E9681700F7C26F /* SettingBodyView.xib in Resources */,
+				BC8C2C662824EB9800FBA5D5 /* NotiferHeadView.xib in Resources */,
 				2779329A27E30FEB0010E277 /* mss_browseLoading@2x.png in Resources */,
 				27F9CAFC27EC1AF3003E0FE4 /* ContractListCell.xib in Resources */,
 				BCA9CE5127FD954800D558C6 /* AccompanyRemarkCell.xib in Resources */,
@@ -5443,6 +5498,7 @@
 				2779323827E30FC30010E277 /* LLPhoto.m in Sources */,
 				BCC9F43427F69BD200647449 /* ApplySpeechMessage.m in Sources */,
 				2779331627E310AA0010E277 /* UIView+ShowProgress.m in Sources */,
+				BC7663092827C95200C91A1D /* KSUploadManager.m in Sources */,
 				BC4BCE7A2823AB6500522C8B /* KSAddressPickerView.m in Sources */,
 				BCC9F42727F69BD200647449 /* KSWhiteboardControl.m in Sources */,
 				277935E527E328C00010E277 /* CustomNavViewController.m in Sources */,
@@ -5551,10 +5607,12 @@
 				2779329727E30FEB0010E277 /* MSSBrowseRemindView.m in Sources */,
 				27D83F4C27F3EC1500062476 /* CreateLiveBodyView.m in Sources */,
 				2779322027E30FC30010E277 /* GRScanManager.m in Sources */,
+				BC8C2C642824EB9000FBA5D5 /* NotiferHeadView.m in Sources */,
 				27F902F427E863B600C08A19 /* NetworkingCheckController.m in Sources */,
 				2779362327E334470010E277 /* KSUpdateAlert.m in Sources */,
 				BC5EB5C02804085500B4A3B0 /* MyStyleVideoCell.m in Sources */,
 				BCC9F44A27F69BD200647449 /* RTCService.m in Sources */,
+				BC8C2C7A28264CF400FBA5D5 /* ReceiveEvaluateListController.m in Sources */,
 				BCC9F40E27F69BD200647449 /* TimeStampCell.m in Sources */,
 				277932BB27E30FFE0010E277 /* TAAnimatedDotView.m in Sources */,
 				2779321827E30FC30010E277 /* SkipTextField.m in Sources */,

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>KulexiuForTeacher.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>26</integer>
+			<integer>27</integer>
 		</dict>
 	</dict>
 </dict>

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


+ 64 - 0
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -176,5 +176,69 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "75BE27A9-82AE-4CB6-9829-7AF974E93790"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "100"
+            endingLineNumber = "100"
+            landmarkName = "-requestData"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F2A4D1D2-A8B7-4E06-9413-EFA37F412607"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "38"
+            endingLineNumber = "38"
+            landmarkName = "+uploadFile:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "9B030730-D880-4C9A-A08A-CC661B803C12"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "25"
+            endingLineNumber = "25"
+            landmarkName = "+uploadFile:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "50AD0A0B-D83E-48A5-AC45-43C140787930"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForTeacher/Common/Tools/KSUploadManager.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "28"
+            endingLineNumber = "28"
+            landmarkName = "+uploadFile:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

二進制
KulexiuForTeacher/KulexiuForTeacher/7.6M.mov


+ 45 - 2
KulexiuForTeacher/KulexiuForTeacher/AppDelegate.m

@@ -29,6 +29,11 @@
 #import "RCConnectionManager.h"
 #import "KSRCIMDataSource.h"
 
+#import "KSBaseWKWebViewController.h"
+#import "CustomNavViewController.h"
+#import "ReceiveEvaluateListController.h"
+#import "HomeworkDetailViewController.h"
+
 @interface RCNaviDataInfo : NSObject
 
 @property (nonatomic, assign) NSTimeInterval uploadVideoDurationLimit;
@@ -140,7 +145,7 @@
     [self registerRemoteNotification:application];
     
     
-//    [self versionCheck];
+    [self versionCheck];
     
     if(@available(iOS 11.0, *)){
         
@@ -487,7 +492,45 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 
 #pragma mark 根据不同消息跳转不同界面
 - (void)getVCUserInfoDict:(NSMutableDictionary *)infoDict {
-    
+    if (![NSString isEmptyString:[infoDict stringValueForKey:@"memo"]]) {
+        NSString *memoStr = [infoDict stringValueForKey:@"memo"];
+        NSString *headStr = [[memoStr componentsSeparatedByString:@"?"] firstObject];
+        if ([headStr isEqualToString:@"buyPractice"] || [headStr isEqualToString:@"courseRemind"]) { // 课表
+            [self.tabBarController tabBarSelectedWithIndex:1];
+            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+            [navCtrl popToRootViewControllerAnimated:YES];
+        }
+        else if ([headStr isEqualToString:@"evaluate"]) { // 评价页面
+            [self.tabBarController tabBarSelectedWithIndex:0];
+            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+            ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
+            [navCtrl pushViewController:ctrl animated:YES];
+        }
+        else if ([headStr isEqualToString:@"H5"]) { // web
+            NSString *valueStr = [[memoStr componentsSeparatedByString:@"?"] lastObject];
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = valueStr;
+            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+            [navCtrl pushViewController:webCtrl animated:YES];
+        }
+        else if ([headStr isEqualToString:@"homework"]) { // 作业详情
+            NSString *valueStr = [[memoStr componentsSeparatedByString:@"?"] lastObject];
+            NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
+            NSString *courseId = nil;
+            for (NSString *subStr in parmArray) {
+                if ([subStr containsString:@"courseId"]) {
+                    courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
+                }
+            }
+            HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+            detailVC.courseId = courseId;
+            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+            [navCtrl pushViewController:detailVC animated:YES];
+        }
+    }
+    else { // 跳转到聊天
+        [self.tabBarController tabBarSelectedWithIndex:2];
+    }
 }
 
 - (BOOL)isLowerVersionCompareLocalVersion:(NSString *)localVersion serviceVersion:(NSString *)version {

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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_message.imageset/empty_message@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_message.imageset/empty_message@3x.png


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

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

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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/clear_notifer.imageset/clear_notifer@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/clear_notifer.imageset/clear_notifer@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/course_cell.imageset/course_cell@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/course_cell.imageset/course_cell@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_all.imageset/message_all@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_all.imageset/message_all@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_course.imageset/message_course@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_course.imageset/message_course@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_notice.imageset/message_notice@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_notice.imageset/message_notice@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_system.imageset/message_system@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/message_system.imageset/message_system@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/notice_cell.imageset/notice_cell@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/notice_cell.imageset/notice_cell@3x.png


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

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

二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/system_cell.imageset/system_cell@2x.png


二進制
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/MessageCenter/system_cell.imageset/system_cell@3x.png


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

@@ -66,6 +66,8 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)backAction; // 返回
 -(void)allocTitle:(NSString*)Ntitle withColor:(UIColor *)color;
 
+- (void)selectBarHomeWithIndex:(NSInteger)index;
+
 //结束页面编辑
 - (void)endViewEditing;
 // 重置数据

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

@@ -25,9 +25,17 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)logoutAction;
 
 #pragma mark ----- version
+
 // api-admin/appVersionInfo/queryByPlatform
 + (void)appVersionInfoRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+#pragma mark ----- 获取上传签名
+// 获取上传签名
+// /teacher-server/getUploadSign
++ (void)getUploadSignRequest:(NSString *)post fileName:(NSString *)fileName keyName:(NSString *)keyName success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 #pragma mark ---- 图片上传
+
 /**
  图片上传
  
@@ -766,7 +774,7 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)queryAddressDetailRequst:(NSString *)get addressId:(NSString *)addressId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 // 修改收货地址
-// /mall-portal-server/member/address/update/{id}
+// /api-mall-portal/member/address/update/{id}
 
 /// 修改收获地址
 /// @param post post
@@ -783,5 +791,52 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)updateAddressRequest:(NSString *)post addressId:(NSString *)addressId name:(NSString *)name phoneNumber:(NSString *)phoneNumber defaultStatus:(NSInteger)defaultStatus detailAddress:(NSString *)detailAddress province:(NSString *)province city:(NSString *)city region:(NSString *)region postCode:(NSString *)postCode success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
+// /api-mall-portal/member/address/delete/{id}
+
+/// 删除收货地址
+/// @param post post
+/// @param addressId 地址id
+/// @param success 成功
+/// @param faliure 失败
++ (void)deleteAddressRequest:(NSString *)post addressId:(NSString *)addressId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+
+#pragma mark ------- 消息中心
+// /api-teacher/sysMessage/list
+
+/// 消息列表
+/// @param post post
+/// @param group 消息组 SYSTEM:系统消息 COURSE:课程信息 NOTICE:公告
+/// @param page 分页
+/// @param rows 条数
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysMessageListRequest:(NSString *)post group:(NSString *)group page:(NSInteger)page rows:(NSInteger)rows success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+// /api-teacher/sysMessage/queryCountOfUnread
+
+/// 获取未读消息条数
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryCountOfUnreadRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+    
+// /api-teacher/sysMessage/setRead/{id}
+
+/// 设置消息已读
+/// @param post post
+/// @param messageId 消息id
+/// @param success 成功
+/// @param faliure 失败
++ (void)setReadMessage:(NSString *)post messageId:(NSString *)messageId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
+
+// /api-teacher/sysMessage/batchSetRead
+
+/// 消息一键已读
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)batchSetReadRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 @end
 NS_ASSUME_NONNULL_END

+ 86 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m

@@ -306,6 +306,21 @@
     [self request:get andWithUrl:url and:parm success:success faliure:faliure];
 }
 
+#pragma mark ----- 获取上传签名
+// 获取上传签名
+// /api-teacher/getUploadSign
++ (void)getUploadSignRequest:(NSString *)post fileName:(NSString *)fileName keyName:(NSString *)keyName success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/getUploadSign"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:fileName forKey:@"fileName"];
+    [parm setValue:@{@"acl":@"public-read",
+                    @"key" :keyName
+    } forKey:@"postData"];
+    [parm setValue:@[] forKey:@"unknowValueField"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 #pragma mark ---- 图片上传
 /**
  图片上传
@@ -1502,7 +1517,7 @@
 }
 
 // 修改收货地址
-// /mall-portal-server/member/address/update/{id}
+// /api-mall-portal/member/address/update/{id}
 
 /// 修改收获地址
 /// @param post post
@@ -1530,6 +1545,76 @@
     [parm setValue:region forKey:@"region"];
     [parm setValue:postCode forKey:@"postCode"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /api-mall-portal/member/address/delete/{id}
+
+/// 删除收货地址
+/// @param post post
+/// @param addressId 地址id
+/// @param success 成功
+/// @param faliure 失败
++ (void)deleteAddressRequest:(NSString *)post addressId:(NSString *)addressId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@%@", hostURL, @"/api-mall-portal/member/address/delete/",addressId];
+    [self request:post andWithUrl:url and:nil success:success faliure:faliure];
+}
+
+
+#pragma mark ------- 消息中心
+// /api-teacher/sysMessage/list
+
+/// 消息列表
+/// @param post post
+/// @param group 消息组 SYSTEM:系统消息 COURSE:课程信息 NOTICE:公告
+/// @param page 分页
+/// @param rows 条数
+/// @param success 成功
+/// @param faliure 失败
++ (void)sysMessageListRequest:(NSString *)post group:(NSString *)group 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/sysMessage/list"];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [parm setValue:group forKey:@"group"];
+    [parm setValue:@(page) forKey:@"page"];
+    [parm setValue:@(rows) forKey:@"rows"];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
+// /api-teacher/sysMessage/queryCountOfUnread
+
+/// 获取未读消息条数
+/// @param get get
+/// @param success 成功
+/// @param faliure 失败
++ (void)queryCountOfUnreadRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/sysMessage/queryCountOfUnread"];
+    [self request:get andWithUrl:url and:nil success:success faliure:faliure];
+}
     
+// /api-teacher/sysMessage/setRead/{id}
+
+/// 设置消息已读
+/// @param post post
+/// @param messageId 消息id
+/// @param success 成功
+/// @param faliure 失败
++ (void)setReadMessage:(NSString *)post messageId:(NSString *)messageId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@%@", hostURL, @"/api-teacher/sysMessage/setRead/",messageId];
+    [self request:post andWithUrl:url and:nil success:success faliure:faliure];
+}
+
+
+// /api-teacher/sysMessage/batchSetRead
+
+/// 消息一键已读
+/// @param post post
+/// @param success 成功
+/// @param faliure 失败
++ (void)batchSetReadRequest:(NSString *)post success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/sysMessage/batchSetRead"];
+    [self request:post andWithUrl:url and:nil success:success faliure:faliure];
 }
 @end

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

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<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="17126"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+phone.h

@@ -16,4 +16,6 @@
 
 + (BOOL)isMobileNum:(NSString *)mobile;
 
++ (BOOL)isMobilePhoneNumber:(NSString *)phoneNum;
+
 @end

+ 12 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/NSString+phone.m

@@ -87,4 +87,16 @@
     }
 }
 
++ (BOOL)isMobilePhoneNumber:(NSString *)phoneNum {
+    NSString *phoneRegex = @"^1[3-9]\\d{9}$";
+    NSPredicate *regextestPHS = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", phoneRegex];
+
+    if ([regextestPHS evaluateWithObject:phoneNum] == YES) {
+        return YES;
+    }
+    else {
+        return NO;
+    }
+}
+
 @end

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDate+Extension.h

@@ -233,4 +233,6 @@
 + (NSString *)ymdHmsFormat;
 + (NSString *)yMFormat;
 
+// get current timestamp sice 1970
++ (NSString *)getCurrentTimestamp;
 @end

+ 9 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSDate+Extension.m

@@ -695,4 +695,13 @@
                                       toDate:fromDate
                                      options:0];
 }
+
+// get current timestamp sice 1970
++ (NSString *)getCurrentTimestamp {
+    // 以下这个结果是10位数,interval得出的数会有6位小数,应该是精确到微秒
+    NSTimeInterval interval = [[NSDate date] timeIntervalSince1970] *1000;
+    NSInteger time = interval;
+    NSString *timestamp = [NSString stringWithFormat:@"%zd",time];
+    return timestamp;
+}
 @end

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSString+Extension.h

@@ -30,6 +30,8 @@ typedef NS_ENUM(NSInteger,CHECKTYPE){
 + (NSString*)deviceVersion;//获取手机型号
 + (NSString*)dictionaryToJson:(NSDictionary *)dic;
 - (NSString *)dateFormatString; // 返回年月日 传入格式 YYYY-MM-dd hh:mm:ss
+// url encoding
+- (NSString *)getUrlEndcodeString;
 
 /**
  获取字符串首字母(传入汉字字符串,返回大写拼音首字母)

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Extension/NSString+Extension.m

@@ -233,6 +233,12 @@
     }
 }
 
+// url encoding
+- (NSString *)getUrlEndcodeString {
+    return [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];;
+}
+
+
 /**
  获取字符串首字母(传入汉字字符串,返回大写拼音首字母)
  

+ 18 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.h

@@ -0,0 +1,18 @@
+//
+//  KSUploadManager.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/8.
+//
+
+#import <Foundation/Foundation.h>
+//typedef <#type#> <#name#>;
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSUploadManager : NSObject
+
++ (void)uploadFile:(NSString *)fileUrl;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 54 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/KSUploadManager.m

@@ -0,0 +1,54 @@
+//
+//  KSUploadManager.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/8.
+//
+
+#import "KSUploadManager.h"
+#import <KS3YunSDK.h>
+#import "NSDate+Extension.h"
+
+
+@interface KSUploadManager ()
+
+@end
+
+@implementation KSUploadManager
+
++ (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) {
+        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];
+            
+            [putObjRequest setCompleteRequest];
+             
+            KS3PutObjectResponse *response = [[KS3Client initialize] putObject:putObjRequest];
+            if (response.httpStatusCode == 200) {
+                NSLog(@"Set object acl success!");
+            }
+            else {
+                NSLog(@"Set object acl error: %@", response.error.description);
+            }
+        }
+        else {
+            
+        }
+         
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+
+@end

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupApplyChooseCell.m

@@ -35,7 +35,7 @@
         [self.userAvatal setImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
     }
     else {
-        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:source.avatar] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:[source.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
     }
     if ([NSString isEmptyString:source.username]) {
         self.userName.text = [NSString stringWithFormat:@"用户:%@",source.userId];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupApplyMemberCell.m

@@ -32,7 +32,7 @@
         [self.userAvatal setImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
     }
     else {
-        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:source.avatar] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:[source.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
     }
     if ([NSString isEmptyString:source.username]) {
         self.userName.text = [NSString stringWithFormat:@"用户:%@",source.userId];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Group/View/GroupMemberListCell.m

@@ -39,7 +39,7 @@
         self.chatButton.userInteractionEnabled = YES;
         GroupMemberModel *model = source;
         self.sourceModel = source;
-        [self.memberLogo sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+        [self.memberLogo sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
         if ([NSString isEmptyString:model.nickname]) {
             self.memberName.text = [NSString stringWithFormat:@"用户:%@",model.userId];
         }

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

@@ -77,7 +77,7 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
     if (callback) {
         self.callback = callback;
     }
-    [self.memberLogo sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
+    [self.memberLogo sd_setImageWithURL:[NSURL URLWithString:[url getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
     self.memberLabel.text = [NSString returnNoNullStringWithString:name];
     self.targetId = targetId;
 }
@@ -117,7 +117,7 @@ typedef void(^ChooseMemberCallback)(NSString *targetId);
             [self.groupImage setImage:[UIImage imageNamed:CHAT_USER_DEFAULT_LOGO]];
         }
         else {
-            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
+            [self.groupImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:GROUP_LOGO]];
         }
         
         self.groupName.text = [NSString returnNoNullStringWithString:model.name];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Search/View/KSSearchResultViewCell.m

@@ -99,12 +99,12 @@
     } else {
         if (model.conversationType == ConversationType_GROUP) {
             [self.headerView
-                sd_setImageWithURL:[NSURL URLWithString:model.portraitUri]
+                sd_setImageWithURL:[NSURL URLWithString:[model.portraitUri getUrlEndcodeString]]
                   placeholderImage:[self imageNamed:@"default_group_portrait" ofBundle:@"RongCloud.bundle"]];
         }
         else {
             [self.headerView
-                sd_setImageWithURL:[NSURL URLWithString:model.portraitUri]
+                sd_setImageWithURL:[NSURL URLWithString:[model.portraitUri getUrlEndcodeString]]
                   placeholderImage:[self imageNamed:@"default_portrait_msg" ofBundle:@"RongCloud.bundle"]];
         }
         

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

@@ -46,7 +46,7 @@
             [self.groupLogo setImage:[UIImage imageNamed:defaultLogo]];
         }
         else {
-            [self.groupLogo sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:defaultLogo]];
+            [self.groupLogo sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:defaultLogo]];
         }
     }
 }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/View/AccompanyCourseInfoCell.m

@@ -50,7 +50,7 @@
         self.studentName.text = studentName;
     }
     self.studentName.text = [NSString returnNoNullStringWithString:studentName];
-    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:studentAvatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[studentAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.studentSubject.text = [NSString returnNoNullStringWithString:studentSubject];
 
     self.userId = studentId;

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

@@ -61,7 +61,8 @@
 - (void)requestCountMessage {
     [KSNetworkingManager homeCountMessage:KS_GET success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-            
+            NSDictionary *parm = [dic dictionaryValueForKey:@"data"];
+            [self configHeadSource:parm];
         }
         else {
             [self MBPShow:MESSAGEKEY];
@@ -71,6 +72,16 @@
     }];
 }
 
+- (void)configHeadSource:(NSDictionary *)parm {
+    self.bodyView.hideCount = NO;
+    self.bodyView.courseCountLabel.text = [NSString stringWithFormat:@"%zd 课时",[parm integerValueForKey:@"courseSchedule"]];
+    self.bodyView.homeworkCount.text = [NSString stringWithFormat:@"本周共 %zd 节课",[parm integerValueForKey:@"courseHomework"]];
+    self.bodyView.evaluateCountLabel.text = [NSString stringWithFormat:@"剩余 %zd 节",[parm integerValueForKey:@"courseScheduleReplied"]];
+    self.bodyView.musicCountLabel.text = [NSString stringWithFormat:@"共 %zd 支",[parm integerValueForKey:@"musicSheet"]];
+    self.bodyView.receiveCountLabel.text = [NSString stringWithFormat:@"%zd 个评价",[parm integerValueForKey:@"studentReplied"]];
+    self.bodyView.amountLabel.text = [NSString stringWithFormat:@"%.2f 元",[parm doubleValueForKey:@"decimal"]];
+}
+
 - (void)refreshView {
     [self.headView configMessage:self.mineInfo];
 }

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

@@ -35,7 +35,7 @@
     [formatter setDateFormat:@"HH:mm"];
     NSString *lessonEnd = [formatter stringFromDate:endDate];
     self.courseTime.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
-    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     if ([NSString isEmptyString:model.userName]) {
         self.studentName.text = [NSString stringWithFormat:@"游客%@",model.userId];
     }

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

@@ -53,7 +53,7 @@
         self.studentNameLabel.text = sourceModel.studentName;
     }
     
-    [self.studentAvatal sd_setImageWithURL:[NSURL URLWithString:sourceModel.studentAvatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.studentAvatal sd_setImageWithURL:[NSURL URLWithString:[sourceModel.studentAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:sourceModel.subjectName];
 
     self.userId = sourceModel.studentId;

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

@@ -206,7 +206,7 @@
         _tableView.estimatedRowHeight = 125.0f;
         _tableView.rowHeight = UITableViewAutomaticDimension;
         UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 15)];
-        bottomView.backgroundColor = HexRGB(0xf3f4f8);
+        bottomView.backgroundColor = HexRGB(0xf6f8f9);
         _tableView.tableFooterView = bottomView;
     }
     return _tableView;

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

@@ -45,7 +45,7 @@
     [self.typeImage setImage:[UIImage imageNamed:typeImgName]];
     
     self.uploaderName.text = [NSString returnNoNullStringWithString:songMessage.username];
-    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:songMessage.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:[songMessage.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
 }
 
 - (CGFloat)getTagViewMaxWidth:(NSString *)teacherName {

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

@@ -38,7 +38,7 @@
     if (callback) {
         self.callback = callback;
     }
-    [self.courseCoverImage sd_setImageWithURL:[NSURL URLWithString:model.backgroundPic] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
+    [self.courseCoverImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseNameLabel.text = [NSString returnNoNullStringWithString:model.courseGroupName];
     self.subjectName.text = [NSString returnNoNullStringWithString:model.subjectName];
     self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.studentCount];

+ 299 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Controller/NotiferMessageViewController.m

@@ -6,8 +6,21 @@
 //
 
 #import "NotiferMessageViewController.h"
+#import "NotiferMessageCell.h"
+#import "NotiferHeadView.h"
+#import "NotiferMessageModel.h"
+#import "KSBaseWKWebViewController.h"
+#import "CustomNavViewController.h"
+#import "ReceiveEvaluateListController.h"
+#import "HomeworkDetailViewController.h"
+#import "UIButton+EnlargeEdge.h"
+@interface NotiferMessageViewController ()<UITableViewDelegate, UITableViewDataSource>
 
-@interface NotiferMessageViewController ()
+@property (nonatomic, strong) NotiferHeadView *headView;
+
+@property (nonatomic, strong) UITableView *tableView;
+
+@property (nonatomic, strong) NSString *groupType;
 
 @end
 
@@ -17,9 +30,294 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     [self allocTitle:@"消息盒子"];
+    [self configRightButton];
+    [self configUI];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self queryUnReadCount];
+    [self resetSourceAndRequest];
+}
+
+- (void)configRightButton {
+    UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
+    [rightButton setTitle:@"全部已读" forState:UIControlStateNormal];
+    [rightButton setTitleColor:HexRGB(0x999999) forState:UIControlStateNormal];
+    [rightButton setImage:[UIImage imageNamed:@"clear_notifer"] forState:UIControlStateNormal];
+    rightButton.frame =CGRectMake(0, 0, 80, 40);
+    //使图片在右边,文字在左边(正常情况下是文字在右边,图片在左边)
+    [rightButton setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft];
+    //设置图片和文字之间的间隙
+    rightButton.imageEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
+    [rightButton.titleLabel setFont:[UIFont systemFontOfSize:11.0f]];
+    [rightButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
+    [rightButton addTarget:self action:@selector(rightBtnClick) forControlEvents:UIControlEventTouchUpInside];
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithCustomView:rightButton];
+    self.navigationItem.rightBarButtonItem = rightItem;
+}
+
+- (void)rightBtnClick {
+    [KSNetworkingManager batchSetReadRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            [self MBPShow:@"清除成功"];
+            [self resetSourceAndRequest];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (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(100);
+    }];
+    [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 resetSourceAndRequest];
+    }];
+    self.tableView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
+        if (weakSelf.isLoadMore) {
+            weakSelf.pages += 1;
+            [weakSelf requestData];
+        }
+        else {
+            [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
+        }
+    }];
+}
+
+- (void)resetSourceAndRequest {
+    [self resetParamenter];
+    [self requestData];
+}
+
+- (void)queryUnReadCount {
+    [KSNetworkingManager queryCountOfUnreadRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            NSArray *countArray = [dic arrayValueForKey:@"data"];
+            NSInteger courseCount = 0;
+            NSInteger sysCount = 0;
+            NSInteger noticeCount = 0;
+            for (NSDictionary *parm in countArray) {
+                if ([[parm stringValueForKey:@"key"] isEqualToString:@"COURSE"]) {
+                    courseCount = [parm integerValueForKey:@"value"];
+                }
+                if ([[parm stringValueForKey:@"key"] isEqualToString:@"SYSTEM"]) {
+                    sysCount = [parm integerValueForKey:@"value"];
+                }
+                if ([[parm stringValueForKey:@"key"] isEqualToString:@"NOTICE"]) {
+                    noticeCount = [parm integerValueForKey:@"value"];
+                }
+            }
+            
+            [self.headView configUnreadCountCourse:0 sysMessage:0 noticeCount:0];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)resetParamenter {
+    self.pages = 1;
+    self.isLoadMore = YES;
+    self.dataArray = [NSMutableArray array];
+    [self.tableView.mj_footer resetNoMoreData];
+    [self setPromptString:@"暂无消息~" imageName:@"empty_message" inView:self.tableView];
+    [self.tableView reloadData];
+}
+
+- (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)requestData {
+    [self showhud];
+    [KSNetworkingManager sysMessageListRequest:KS_POST group:self.groupType page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
+        [self removehub];
+        [self endRefresh];
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            // rows
+            NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
+            for (NSDictionary *parm in sourceArray) {
+                NotiferMessageModel *model = [[NotiferMessageModel 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];
+        [self changePromptLabelState];
+    }];
+}
+
+#pragma mark ----- table data source
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.dataArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    NotiferMessageModel *model = self.dataArray[indexPath.row];
+    NotiferMessageCell *cell = [tableView dequeueReusableCellWithIdentifier:@"NotiferMessageCell"];
+    [cell configCellWithSource:model];
+    return cell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    // 选择跳转
+    NotiferMessageModel *model = self.dataArray[indexPath.row];
+    if (model.readStatus == 0) {
+        NotiferMessageCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+        [self readMessage:model baseCell:cell];
+    }
+    else {
+        // 跳转页面
+        [self toDetailViewWithTypeString:model.memo];
+    }
+}
+
+- (void)readMessage:(NotiferMessageModel *)model baseCell:(NotiferMessageCell *)cell {
+    [KSNetworkingManager setReadMessage:KS_POST messageId:model.internalBaseClassIdentifier success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            model.readStatus = 1;
+            cell.isRead = YES;
+            // 跳转页面
+            [self toDetailViewWithTypeString:model.memo];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
 
+- (void)toDetailViewWithTypeString:(NSString *)memo {
+    if (![NSString isEmptyString:memo]) {
+        NSString *headStr = [[memo componentsSeparatedByString:@"?"] firstObject];
+        if ([headStr isEqualToString:@"buyPractice"] || [headStr isEqualToString:@"courseRemind"]) { // 课表
+            [self toCourseTable];
+        }
+        else if ([headStr isEqualToString:@"evaluate"]) { // 评价页面
+            ReceiveEvaluateListController *ctrl = [[ReceiveEvaluateListController alloc] init];
+            [self.navigationController pushViewController:ctrl animated:YES];
+        }
+        else if ([headStr isEqualToString:@"H5"]) { // web
+            NSString *valueStr = [[memo componentsSeparatedByString:@"?"] lastObject];
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = valueStr;
+            CustomNavViewController *navCtrl = self.tabBarController.selectedViewController;
+            [navCtrl pushViewController:webCtrl animated:YES];
+        }
+        else if ([headStr isEqualToString:@"homework"]) { // 作业详情
+            NSString *valueStr = [[memo componentsSeparatedByString:@"?"] lastObject];
+            NSArray *parmArray = [valueStr componentsSeparatedByString:@"&"];
+            NSString *courseId = nil;
+            for (NSString *subStr in parmArray) {
+                if ([subStr containsString:@"courseId"]) {
+                    courseId = [[subStr componentsSeparatedByString:@"="] lastObject];
+                }
+            }
+            HomeworkDetailViewController *detailVC = [[HomeworkDetailViewController alloc] init];
+            detailVC.courseId = courseId;
+            [self.navigationController pushViewController:detailVC animated:YES];
+        }
+    }
+}
+
+- (void)toCourseTable {
+    [self selectBarHomeWithIndex:1];
+    [self.navigationController popToRootViewControllerAnimated:YES];
+}
+
+#pragma mark ---- lazying
+- (NotiferHeadView *)headView {
+    if (!_headView) {
+        _headView = [NotiferHeadView shareIntance];
+        MJWeakSelf;
+        [_headView chooseTypeCallback:^(NOTIFER_TYPE type) {
+            [weakSelf chooseTypeSort:type];
+        }];
+    }
+    return _headView;
+}
+
+- (void)chooseTypeSort:(NOTIFER_TYPE)type {
+    switch (type) {
+        case NOTIFER_TYPE_ALL:
+        {
+            self.groupType = nil;
+        }
+            break;
+        case NOTIFER_TYPE_COURSE:
+        {
+            self.groupType = @"COURSE";
+        }
+            break;
+        case NOTIFER_TYPE_SYSMSG:
+        {
+            self.groupType = @"SYSTEM";
+        }
+            break;
+        case NOTIFER_TYPE_NOTICE:
+        {
+            self.groupType = @"NOTICE";
+        }
+            break;
+        default:
+            break;
+    }
+    [self resetSourceAndRequest];
+}
+
+- (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:@"NotiferMessageCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"NotiferMessageCell"];
+        _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;
+}
 
 /*
 #pragma mark - Navigation

+ 24 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Model/NotiferMessageModel.h

@@ -1,16 +1,34 @@
 //
 //  NotiferMessageModel.h
-//  KulexiuForTeacher
 //
-//  Created by 王智 on 2022/4/18.
+//  Created by Steven  on 2022/5/7
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
 //
 
 #import <Foundation/Foundation.h>
 
-NS_ASSUME_NONNULL_BEGIN
 
-@interface NotiferMessageModel : NSObject
 
-@end
+@interface NotiferMessageModel : NSObject <NSCoding, NSCopying>
+
+@property (nonatomic, strong) NSString *internalBaseClassIdentifier;
+@property (nonatomic, strong) NSString *modifyOn;
+@property (nonatomic, strong) NSString *clientId;
+@property (nonatomic, strong) NSString *sendTime;
+@property (nonatomic, strong) NSString *receiver;
+@property (nonatomic, strong) NSString *errorMsg;
+@property (nonatomic, strong) NSString *createOn;
+@property (nonatomic, strong) NSString *memo;
+@property (nonatomic, strong) NSString *content;
+@property (nonatomic, strong) NSString *type;
+@property (nonatomic, strong) NSString *title;
+@property (nonatomic, strong) NSString *userId;
+@property (nonatomic, strong) NSString *group;
+@property (nonatomic, assign) double readStatus;
+@property (nonatomic, strong) NSString *status;
 
-NS_ASSUME_NONNULL_END
++ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
+- (instancetype)initWithDictionary:(NSDictionary *)dict;
+- (NSDictionary *)dictionaryRepresentation;
+
+@end

+ 187 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/Model/NotiferMessageModel.m

@@ -1,12 +1,197 @@
 //
 //  NotiferMessageModel.m
-//  KulexiuForTeacher
 //
-//  Created by 王智 on 2022/4/18.
+//  Created by Steven  on 2022/5/7
+//  Copyright (c) 2022 __MyCompanyName__. All rights reserved.
 //
 
 #import "NotiferMessageModel.h"
 
+
+NSString *const kNotiferMessageModelId = @"id";
+NSString *const kNotiferMessageModelModifyOn = @"modifyOn";
+NSString *const kNotiferMessageModelClientId = @"clientId";
+NSString *const kNotiferMessageModelSendTime = @"sendTime";
+NSString *const kNotiferMessageModelReceiver = @"receiver";
+NSString *const kNotiferMessageModelErrorMsg = @"errorMsg";
+NSString *const kNotiferMessageModelCreateOn = @"createOn";
+NSString *const kNotiferMessageModelMemo = @"memo";
+NSString *const kNotiferMessageModelContent = @"content";
+NSString *const kNotiferMessageModelType = @"type";
+NSString *const kNotiferMessageModelTitle = @"title";
+NSString *const kNotiferMessageModelUserId = @"userId";
+NSString *const kNotiferMessageModelGroup = @"group";
+NSString *const kNotiferMessageModelReadStatus = @"readStatus";
+NSString *const kNotiferMessageModelStatus = @"status";
+
+
+@interface NotiferMessageModel ()
+
+- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
+
+@end
+
 @implementation NotiferMessageModel
 
+@synthesize internalBaseClassIdentifier = _internalBaseClassIdentifier;
+@synthesize modifyOn = _modifyOn;
+@synthesize clientId = _clientId;
+@synthesize sendTime = _sendTime;
+@synthesize receiver = _receiver;
+@synthesize errorMsg = _errorMsg;
+@synthesize createOn = _createOn;
+@synthesize memo = _memo;
+@synthesize content = _content;
+@synthesize type = _type;
+@synthesize title = _title;
+@synthesize userId = _userId;
+@synthesize group = _group;
+@synthesize readStatus = _readStatus;
+@synthesize status = _status;
+
+
++ (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.internalBaseClassIdentifier = [self objectOrNilForKey:kNotiferMessageModelId fromDictionary:dict];
+            self.modifyOn = [self objectOrNilForKey:kNotiferMessageModelModifyOn fromDictionary:dict];
+            self.clientId = [self objectOrNilForKey:kNotiferMessageModelClientId fromDictionary:dict];
+            self.sendTime = [self objectOrNilForKey:kNotiferMessageModelSendTime fromDictionary:dict];
+            self.receiver = [self objectOrNilForKey:kNotiferMessageModelReceiver fromDictionary:dict];
+            self.errorMsg = [self objectOrNilForKey:kNotiferMessageModelErrorMsg fromDictionary:dict];
+            self.createOn = [self objectOrNilForKey:kNotiferMessageModelCreateOn fromDictionary:dict];
+            self.memo = [self objectOrNilForKey:kNotiferMessageModelMemo fromDictionary:dict];
+            self.content = [self objectOrNilForKey:kNotiferMessageModelContent fromDictionary:dict];
+            self.type = [self objectOrNilForKey:kNotiferMessageModelType fromDictionary:dict];
+            self.title = [self objectOrNilForKey:kNotiferMessageModelTitle fromDictionary:dict];
+            self.userId = [self objectOrNilForKey:kNotiferMessageModelUserId fromDictionary:dict];
+            self.group = [self objectOrNilForKey:kNotiferMessageModelGroup fromDictionary:dict];
+            self.readStatus = [[self objectOrNilForKey:kNotiferMessageModelReadStatus fromDictionary:dict] doubleValue];
+            self.status = [self objectOrNilForKey:kNotiferMessageModelStatus fromDictionary:dict];
+
+    }
+    
+    return self;
+    
+}
+
+- (NSDictionary *)dictionaryRepresentation
+{
+    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
+    [mutableDict setValue:self.internalBaseClassIdentifier forKey:kNotiferMessageModelId];
+    [mutableDict setValue:self.modifyOn forKey:kNotiferMessageModelModifyOn];
+    [mutableDict setValue:self.clientId forKey:kNotiferMessageModelClientId];
+    [mutableDict setValue:self.sendTime forKey:kNotiferMessageModelSendTime];
+    [mutableDict setValue:self.receiver forKey:kNotiferMessageModelReceiver];
+    [mutableDict setValue:self.errorMsg forKey:kNotiferMessageModelErrorMsg];
+    [mutableDict setValue:self.createOn forKey:kNotiferMessageModelCreateOn];
+    [mutableDict setValue:self.memo forKey:kNotiferMessageModelMemo];
+    [mutableDict setValue:self.content forKey:kNotiferMessageModelContent];
+    [mutableDict setValue:self.type forKey:kNotiferMessageModelType];
+    [mutableDict setValue:self.title forKey:kNotiferMessageModelTitle];
+    [mutableDict setValue:self.userId forKey:kNotiferMessageModelUserId];
+    [mutableDict setValue:self.group forKey:kNotiferMessageModelGroup];
+    [mutableDict setValue:[NSNumber numberWithDouble:self.readStatus] forKey:kNotiferMessageModelReadStatus];
+    [mutableDict setValue:self.status forKey:kNotiferMessageModelStatus];
+
+    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];
+    if ([object isKindOfClass:[NSNumber class]]) {
+        NSNumber *number = object;
+        object = [number stringValue];
+    }
+    return [object isEqual:[NSNull null]] ? nil : object;
+}
+
+
+#pragma mark - NSCoding Methods
+
+- (id)initWithCoder:(NSCoder *)aDecoder
+{
+    self = [super init];
+
+    self.internalBaseClassIdentifier = [aDecoder decodeObjectForKey:kNotiferMessageModelId];
+    self.modifyOn = [aDecoder decodeObjectForKey:kNotiferMessageModelModifyOn];
+    self.clientId = [aDecoder decodeObjectForKey:kNotiferMessageModelClientId];
+    self.sendTime = [aDecoder decodeObjectForKey:kNotiferMessageModelSendTime];
+    self.receiver = [aDecoder decodeObjectForKey:kNotiferMessageModelReceiver];
+    self.errorMsg = [aDecoder decodeObjectForKey:kNotiferMessageModelErrorMsg];
+    self.createOn = [aDecoder decodeObjectForKey:kNotiferMessageModelCreateOn];
+    self.memo = [aDecoder decodeObjectForKey:kNotiferMessageModelMemo];
+    self.content = [aDecoder decodeObjectForKey:kNotiferMessageModelContent];
+    self.type = [aDecoder decodeObjectForKey:kNotiferMessageModelType];
+    self.title = [aDecoder decodeObjectForKey:kNotiferMessageModelTitle];
+    self.userId = [aDecoder decodeObjectForKey:kNotiferMessageModelUserId];
+    self.group = [aDecoder decodeObjectForKey:kNotiferMessageModelGroup];
+    self.readStatus = [aDecoder decodeDoubleForKey:kNotiferMessageModelReadStatus];
+    self.status = [aDecoder decodeObjectForKey:kNotiferMessageModelStatus];
+    return self;
+}
+
+- (void)encodeWithCoder:(NSCoder *)aCoder
+{
+
+    [aCoder encodeObject:_internalBaseClassIdentifier forKey:kNotiferMessageModelId];
+    [aCoder encodeObject:_modifyOn forKey:kNotiferMessageModelModifyOn];
+    [aCoder encodeObject:_clientId forKey:kNotiferMessageModelClientId];
+    [aCoder encodeObject:_sendTime forKey:kNotiferMessageModelSendTime];
+    [aCoder encodeObject:_receiver forKey:kNotiferMessageModelReceiver];
+    [aCoder encodeObject:_errorMsg forKey:kNotiferMessageModelErrorMsg];
+    [aCoder encodeObject:_createOn forKey:kNotiferMessageModelCreateOn];
+    [aCoder encodeObject:_memo forKey:kNotiferMessageModelMemo];
+    [aCoder encodeObject:_content forKey:kNotiferMessageModelContent];
+    [aCoder encodeObject:_type forKey:kNotiferMessageModelType];
+    [aCoder encodeObject:_title forKey:kNotiferMessageModelTitle];
+    [aCoder encodeObject:_userId forKey:kNotiferMessageModelUserId];
+    [aCoder encodeObject:_group forKey:kNotiferMessageModelGroup];
+    [aCoder encodeDouble:_readStatus forKey:kNotiferMessageModelReadStatus];
+    [aCoder encodeObject:_status forKey:kNotiferMessageModelStatus];
+}
+
+- (id)copyWithZone:(NSZone *)zone
+{
+    NotiferMessageModel *copy = [[NotiferMessageModel alloc] init];
+    
+    if (copy) {
+
+        copy.internalBaseClassIdentifier = [self.internalBaseClassIdentifier copyWithZone:zone];
+        copy.modifyOn = [self.modifyOn copyWithZone:zone];
+        copy.clientId = [self.clientId copyWithZone:zone];
+        copy.sendTime = [self.sendTime copyWithZone:zone];
+        copy.receiver = [self.receiver copyWithZone:zone];
+        copy.errorMsg = [self.errorMsg copyWithZone:zone];
+        copy.createOn = [self.createOn copyWithZone:zone];
+        copy.memo = [self.memo copyWithZone:zone];
+        copy.content = [self.content copyWithZone:zone];
+        copy.type = [self.type copyWithZone:zone];
+        copy.title = [self.title copyWithZone:zone];
+        copy.userId = [self.userId copyWithZone:zone];
+        copy.group = [self.group copyWithZone:zone];
+        copy.readStatus = self.readStatus;
+        copy.status = [self.status copyWithZone:zone];
+    }
+    
+    return copy;
+}
+
+
 @end

+ 32 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.h

@@ -0,0 +1,32 @@
+//
+//  NotiferHeadView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/6.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, NOTIFER_TYPE) {
+    NOTIFER_TYPE_ALL,
+    NOTIFER_TYPE_COURSE,
+    NOTIFER_TYPE_SYSMSG,
+    NOTIFER_TYPE_NOTICE,
+};
+
+typedef void(^NotiferChooseAction)(NOTIFER_TYPE type);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NotiferHeadView : UIView
+
+
++ (instancetype)shareIntance;
+
+- (void)configUnreadCountCourse:(NSInteger)courseCount sysMessage:(NSInteger)sysMessageCount noticeCount:(NSInteger)noticeCount;
+
+- (void)chooseTypeCallback:(NotiferChooseAction)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 204 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.m

@@ -0,0 +1,204 @@
+//
+//  NotiferHeadView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/6.
+//
+
+#import "NotiferHeadView.h"
+
+@interface NotiferHeadView ()
+
+@property (weak, nonatomic) IBOutlet UIView *allView;
+
+@property (weak, nonatomic) IBOutlet UILabel *allLabel;
+
+@property (weak, nonatomic) IBOutlet UIView *courseView;
+
+@property (weak, nonatomic) IBOutlet UILabel *courseLabel;
+
+@property (weak, nonatomic) IBOutlet UIView *systemView;
+
+@property (weak, nonatomic) IBOutlet UILabel *systemLabel;
+
+@property (weak, nonatomic) IBOutlet UIView *noticeView;
+
+@property (weak, nonatomic) IBOutlet UILabel *noticeLabel;
+
+@property (nonatomic, assign) NOTIFER_TYPE type;
+
+@property (nonatomic, copy) NotiferChooseAction callback;
+
+@property (weak, nonatomic) IBOutlet UILabel *allCountLabel;
+@property (weak, nonatomic) IBOutlet UILabel *courseCountLabel;
+@property (weak, nonatomic) IBOutlet UILabel *systemCountLabel;
+@property (weak, nonatomic) IBOutlet UILabel *noticeCountLabel;
+
+@end
+
+@implementation NotiferHeadView
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    [self configDefault];
+}
+
+- (void)configDefault {
+    self.type = NOTIFER_TYPE_ALL;
+    [self configUnreadCountCourse:0 sysMessage:0 noticeCount:0];
+}
+
++ (instancetype)shareIntance {
+    NotiferHeadView *view = [[[NSBundle mainBundle] loadNibNamed:@"NotiferHeadView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)chooseTypeCallback:(NotiferChooseAction)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (void)configUnreadCountCourse:(NSInteger)courseCount sysMessage:(NSInteger)sysMessageCount noticeCount:(NSInteger)noticeCount {
+    NSInteger allCount = courseCount + sysMessageCount + noticeCount;
+    // 全部
+    if (allCount <= 0) {
+        self.allView.hidden = YES;
+    }
+    else {
+        self.allView.hidden = NO;
+        NSString *countString = @"";
+        if (allCount > 99) {
+            countString = @"99+";
+        }
+        else {
+            countString = [NSString stringWithFormat:@"%zd",allCount];
+        }
+        self.allCountLabel.text = countString;
+    }
+    // 课程
+    if (courseCount == 0) {
+        self.courseView.hidden = YES;
+    }
+    else {
+        self.courseView.hidden = NO;
+        NSString *countString = @"";
+        if (courseCount > 99) {
+            countString = @"99+";
+        }
+        else {
+            countString = [NSString stringWithFormat:@"%zd",courseCount];
+        }
+        self.courseCountLabel.text = countString;
+    }
+    
+    // 系统
+    if (sysMessageCount == 0) {
+        self.systemView.hidden = YES;
+    }
+    else {
+        self.systemView.hidden = NO;
+        NSString *countString = @"";
+        if (sysMessageCount > 99) {
+            countString = @"99+";
+        }
+        else {
+            countString = [NSString stringWithFormat:@"%zd",sysMessageCount];
+        }
+        self.noticeCountLabel.text = countString;
+    }
+    
+    // 公共
+    if (noticeCount == 0) {
+        self.noticeView.hidden = YES;
+    }
+    else {
+        self.noticeView.hidden = NO;
+        NSString *countString = @"";
+        if (noticeCount > 99) {
+            countString = @"99+";
+        }
+        else {
+            countString = [NSString stringWithFormat:@"%zd",noticeCount];
+        }
+        self.systemCountLabel.text = countString;
+    }
+}
+
+
+- (IBAction)chooseAll:(id)sender {
+    self.type = NOTIFER_TYPE_ALL;
+    if (self.callback) {
+        self.callback(self.type);
+    }
+}
+
+- (IBAction)chooseCourse:(id)sender {
+    self.type = NOTIFER_TYPE_COURSE;
+    if (self.callback) {
+        self.callback(self.type);
+    }
+}
+
+- (IBAction)chooseSystem:(id)sender {
+    self.type = NOTIFER_TYPE_SYSMSG;
+    if (self.callback) {
+        self.callback(self.type);
+    }
+}
+
+- (IBAction)chooseNotice:(id)sender {
+    self.type = NOTIFER_TYPE_NOTICE;
+    if (self.callback) {
+        self.callback(self.type);
+    }
+}
+
+- (void)setType:(NOTIFER_TYPE)type {
+    _type = type;
+    switch (type) {
+        case NOTIFER_TYPE_ALL:
+        {
+            self.allLabel.textColor = HexRGB(0x3333333);
+            self.courseLabel.textColor = HexRGB(0x999999);
+            self.systemLabel.textColor = HexRGB(0x999999);
+            self.noticeLabel.textColor = HexRGB(0x999999);
+        }
+            break;
+        case NOTIFER_TYPE_COURSE:
+        {
+            self.allLabel.textColor = HexRGB(0x999999);
+            self.courseLabel.textColor = HexRGB(0x3333333);
+            self.systemLabel.textColor = HexRGB(0x999999);
+            self.noticeLabel.textColor = HexRGB(0x999999);
+        }
+            break;
+        case NOTIFER_TYPE_SYSMSG:
+        {
+            self.allLabel.textColor = HexRGB(0x999999);
+            self.courseLabel.textColor = HexRGB(0x999999);
+            self.systemLabel.textColor = HexRGB(0x3333333);
+            self.noticeLabel.textColor = HexRGB(0x999999);
+        }
+            break;
+        case NOTIFER_TYPE_NOTICE:
+        {
+            self.allLabel.textColor = HexRGB(0x999999);
+            self.courseLabel.textColor = HexRGB(0x999999);
+            self.systemLabel.textColor = HexRGB(0x999999);
+            self.noticeLabel.textColor = HexRGB(0x3333333);
+        }
+            break;
+        default:
+            break;
+    }
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 346 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferHeadView.xib

@@ -0,0 +1,346 @@
+<?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="NotiferHeadView">
+            <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Jh-gC-egy">
+                    <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pkz-EP-p4Q">
+                            <rect key="frame" x="27" y="0.0" width="80.5" height="100"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message_all" translatesAutoresizingMaskIntoConstraints="NO" id="N8l-kR-aoj">
+                                    <rect key="frame" x="12" y="22" width="56" height="56"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="56" id="3Wd-gG-xg9"/>
+                                        <constraint firstAttribute="width" constant="56" id="E7d-pn-3mD"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Aal-ZD-MlT">
+                                    <rect key="frame" x="27.5" y="79" width="25" height="14.5"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TI9-h7-JQo">
+                                    <rect key="frame" x="47" y="54" width="21" height="14"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e5M-E8-SSs">
+                                            <rect key="frame" x="4" y="0.0" width="13" height="14"/>
+                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <color key="backgroundColor" red="1" green="0.074509803921568626" blue="0.074509803921568626" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="trailing" secondItem="e5M-E8-SSs" secondAttribute="trailing" constant="4" id="EdX-nD-NcK"/>
+                                        <constraint firstAttribute="bottom" secondItem="e5M-E8-SSs" secondAttribute="bottom" id="OFc-sp-NzZ"/>
+                                        <constraint firstItem="e5M-E8-SSs" firstAttribute="leading" secondItem="TI9-h7-JQo" secondAttribute="leading" constant="4" id="Smh-zq-Y7a"/>
+                                        <constraint firstItem="e5M-E8-SSs" firstAttribute="top" secondItem="TI9-h7-JQo" secondAttribute="top" id="Tf2-Fu-sS9"/>
+                                        <constraint firstAttribute="height" constant="14" id="chU-X5-U69"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="7"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hxb-AV-79g">
+                                    <rect key="frame" x="12" y="22" width="56" height="71.5"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <connections>
+                                        <action selector="chooseAll:" destination="iN0-l3-epB" eventType="touchUpInside" id="gxr-MQ-ykS"/>
+                                    </connections>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="N8l-kR-aoj" firstAttribute="centerX" secondItem="Pkz-EP-p4Q" secondAttribute="centerX" id="5XZ-17-Vec"/>
+                                <constraint firstItem="N8l-kR-aoj" firstAttribute="centerY" secondItem="Pkz-EP-p4Q" secondAttribute="centerY" id="9yG-IL-ewx"/>
+                                <constraint firstItem="Hxb-AV-79g" firstAttribute="top" secondItem="N8l-kR-aoj" secondAttribute="top" id="FRE-eD-FoY"/>
+                                <constraint firstItem="Hxb-AV-79g" firstAttribute="trailing" secondItem="N8l-kR-aoj" secondAttribute="trailing" id="IGS-pH-2yp"/>
+                                <constraint firstItem="Aal-ZD-MlT" firstAttribute="centerX" secondItem="N8l-kR-aoj" secondAttribute="centerX" id="dix-GQ-gSF"/>
+                                <constraint firstItem="Aal-ZD-MlT" firstAttribute="top" secondItem="N8l-kR-aoj" secondAttribute="bottom" constant="1" id="i1g-8e-IRF"/>
+                                <constraint firstItem="Hxb-AV-79g" firstAttribute="leading" secondItem="N8l-kR-aoj" secondAttribute="leading" id="iBg-4z-Iji"/>
+                                <constraint firstItem="TI9-h7-JQo" firstAttribute="trailing" secondItem="N8l-kR-aoj" secondAttribute="trailing" id="l5R-U5-zLe"/>
+                                <constraint firstItem="TI9-h7-JQo" firstAttribute="bottom" secondItem="N8l-kR-aoj" secondAttribute="bottom" constant="-10" id="u2O-gZ-dcJ"/>
+                                <constraint firstItem="Aal-ZD-MlT" firstAttribute="bottom" secondItem="Hxb-AV-79g" secondAttribute="bottom" id="vrV-Ml-Wzc"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kR0-tA-2uF">
+                            <rect key="frame" x="107.5" y="0.0" width="80" height="100"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message_course" translatesAutoresizingMaskIntoConstraints="NO" id="8Z5-lf-RVU">
+                                    <rect key="frame" x="12" y="22" width="56" height="56"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="56" id="bfW-hq-s3W"/>
+                                        <constraint firstAttribute="height" constant="56" id="yLb-Jd-Kfp"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="课程信息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ql-22-T6t">
+                                    <rect key="frame" x="15" y="79" width="49.5" height="14.5"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                    <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oMw-71-EQZ">
+                                    <rect key="frame" x="47" y="54" width="21" height="14"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Ev-de-Era">
+                                            <rect key="frame" x="4" y="0.0" width="13" height="14"/>
+                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <color key="backgroundColor" red="1" green="0.074509803920000006" blue="0.074509803920000006" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstItem="0Ev-de-Era" firstAttribute="leading" secondItem="oMw-71-EQZ" secondAttribute="leading" constant="4" id="Gr7-FD-bFG"/>
+                                        <constraint firstAttribute="trailing" secondItem="0Ev-de-Era" secondAttribute="trailing" constant="4" id="KMC-tF-L2A"/>
+                                        <constraint firstItem="0Ev-de-Era" firstAttribute="top" secondItem="oMw-71-EQZ" secondAttribute="top" id="bSk-S2-fGH"/>
+                                        <constraint firstAttribute="bottom" secondItem="0Ev-de-Era" secondAttribute="bottom" id="qc5-26-N56"/>
+                                        <constraint firstAttribute="height" constant="14" id="szo-02-4bz"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="7"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XuM-Lg-sm7">
+                                    <rect key="frame" x="12" y="22" width="56" height="71.5"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <connections>
+                                        <action selector="chooseCourse:" destination="iN0-l3-epB" eventType="touchUpInside" id="bWc-aR-VJd"/>
+                                    </connections>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="oMw-71-EQZ" firstAttribute="trailing" secondItem="8Z5-lf-RVU" secondAttribute="trailing" id="30r-Hx-POG"/>
+                                <constraint firstItem="oMw-71-EQZ" firstAttribute="bottom" secondItem="8Z5-lf-RVU" secondAttribute="bottom" constant="-10" id="C8d-5e-iUn"/>
+                                <constraint firstItem="8Ql-22-T6t" firstAttribute="top" secondItem="8Z5-lf-RVU" secondAttribute="bottom" constant="1" id="EWQ-Yi-Zo0"/>
+                                <constraint firstItem="8Z5-lf-RVU" firstAttribute="top" secondItem="XuM-Lg-sm7" secondAttribute="top" id="Lel-B2-nF4"/>
+                                <constraint firstItem="8Ql-22-T6t" firstAttribute="centerX" secondItem="8Z5-lf-RVU" secondAttribute="centerX" id="Quv-Ys-Rou"/>
+                                <constraint firstItem="8Z5-lf-RVU" firstAttribute="centerY" secondItem="kR0-tA-2uF" secondAttribute="centerY" id="VZU-Ga-Wym"/>
+                                <constraint firstItem="8Z5-lf-RVU" firstAttribute="leading" secondItem="XuM-Lg-sm7" secondAttribute="leading" id="dJw-ip-hsE"/>
+                                <constraint firstItem="8Z5-lf-RVU" firstAttribute="centerX" secondItem="kR0-tA-2uF" secondAttribute="centerX" id="knO-Ib-wqa"/>
+                                <constraint firstItem="8Ql-22-T6t" firstAttribute="bottom" secondItem="XuM-Lg-sm7" secondAttribute="bottom" id="qcI-Mh-jaD"/>
+                                <constraint firstItem="8Z5-lf-RVU" firstAttribute="trailing" secondItem="XuM-Lg-sm7" secondAttribute="trailing" id="seO-ea-nqI"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QCV-gH-UT2">
+                            <rect key="frame" x="187.5" y="0.0" width="80.5" height="100"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message_system" translatesAutoresizingMaskIntoConstraints="NO" id="ALm-DM-xIP">
+                                    <rect key="frame" x="12" y="22" width="56" height="56"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="56" id="Av4-mU-hXq"/>
+                                        <constraint firstAttribute="height" constant="56" id="gta-F5-xNK"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="系统消息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZT2-JL-dMl">
+                                    <rect key="frame" x="15.5" y="79" width="49.5" height="14.5"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                    <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PnS-8p-3Z9">
+                                    <rect key="frame" x="47" y="54" width="21" height="14"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="43u-at-Vor">
+                                            <rect key="frame" x="4" y="0.0" width="13" height="14"/>
+                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <color key="backgroundColor" red="1" green="0.074509803920000006" blue="0.074509803920000006" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstItem="43u-at-Vor" firstAttribute="leading" secondItem="PnS-8p-3Z9" secondAttribute="leading" constant="4" id="9XC-dG-siH"/>
+                                        <constraint firstAttribute="trailing" secondItem="43u-at-Vor" secondAttribute="trailing" constant="4" id="Kqx-aN-PC2"/>
+                                        <constraint firstAttribute="height" constant="14" id="bNV-H0-xoS"/>
+                                        <constraint firstItem="43u-at-Vor" firstAttribute="top" secondItem="PnS-8p-3Z9" secondAttribute="top" id="vAd-Z8-UfQ"/>
+                                        <constraint firstAttribute="bottom" secondItem="43u-at-Vor" secondAttribute="bottom" id="ya9-SB-vcT"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="7"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="03g-eS-bHv">
+                                    <rect key="frame" x="12" y="22" width="56" height="71.5"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <connections>
+                                        <action selector="chooseSystem:" destination="iN0-l3-epB" eventType="touchUpInside" id="baU-me-4pJ"/>
+                                    </connections>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="PnS-8p-3Z9" firstAttribute="bottom" secondItem="ALm-DM-xIP" secondAttribute="bottom" constant="-10" id="FMk-Tg-HiP"/>
+                                <constraint firstItem="PnS-8p-3Z9" firstAttribute="trailing" secondItem="ALm-DM-xIP" secondAttribute="trailing" id="Iym-n2-dE5"/>
+                                <constraint firstItem="ALm-DM-xIP" firstAttribute="centerY" secondItem="QCV-gH-UT2" secondAttribute="centerY" id="Kzx-C9-hMH"/>
+                                <constraint firstItem="ZT2-JL-dMl" firstAttribute="centerX" secondItem="ALm-DM-xIP" secondAttribute="centerX" id="LK1-Hs-L8w"/>
+                                <constraint firstItem="ALm-DM-xIP" firstAttribute="top" secondItem="03g-eS-bHv" secondAttribute="top" id="Ytj-Ci-mFT"/>
+                                <constraint firstItem="ALm-DM-xIP" firstAttribute="leading" secondItem="03g-eS-bHv" secondAttribute="leading" id="bX9-bz-a35"/>
+                                <constraint firstItem="ALm-DM-xIP" firstAttribute="centerX" secondItem="QCV-gH-UT2" secondAttribute="centerX" id="imn-KT-bbt"/>
+                                <constraint firstItem="ZT2-JL-dMl" firstAttribute="top" secondItem="ALm-DM-xIP" secondAttribute="bottom" constant="1" id="mwG-b9-az2"/>
+                                <constraint firstItem="ALm-DM-xIP" firstAttribute="trailing" secondItem="03g-eS-bHv" secondAttribute="trailing" id="r6X-Rs-3YH"/>
+                                <constraint firstItem="ZT2-JL-dMl" firstAttribute="bottom" secondItem="03g-eS-bHv" secondAttribute="bottom" id="voU-Gi-fym"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fQd-6C-OHk">
+                            <rect key="frame" x="268" y="0.0" width="80" height="100"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="message_notice" translatesAutoresizingMaskIntoConstraints="NO" id="pZt-Oo-gp5">
+                                    <rect key="frame" x="12" y="22" width="56" height="56"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="56" id="Kv2-rZ-mvB"/>
+                                        <constraint firstAttribute="width" constant="56" id="PgP-KG-Z5c"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="公告" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HPj-WQ-UEe">
+                                    <rect key="frame" x="27.5" y="79" width="25" height="14.5"/>
+                                    <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                    <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HFT-lc-XxE">
+                                    <rect key="frame" x="47" y="54" width="21" height="14"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eSf-NN-z0H">
+                                            <rect key="frame" x="4" y="0.0" width="13" height="14"/>
+                                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <color key="backgroundColor" red="1" green="0.074509803920000006" blue="0.074509803920000006" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="bottom" secondItem="eSf-NN-z0H" secondAttribute="bottom" id="Ao6-V2-K7x"/>
+                                        <constraint firstAttribute="trailing" secondItem="eSf-NN-z0H" secondAttribute="trailing" constant="4" id="P8c-bz-7La"/>
+                                        <constraint firstItem="eSf-NN-z0H" firstAttribute="top" secondItem="HFT-lc-XxE" secondAttribute="top" id="g29-vT-Syl"/>
+                                        <constraint firstItem="eSf-NN-z0H" firstAttribute="leading" secondItem="HFT-lc-XxE" secondAttribute="leading" constant="4" id="lcq-U7-od2"/>
+                                        <constraint firstAttribute="height" constant="14" id="nVm-N4-ebc"/>
+                                    </constraints>
+                                    <userDefinedRuntimeAttributes>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                            <real key="value" value="7"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+                                            <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        </userDefinedRuntimeAttribute>
+                                        <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+                                            <real key="value" value="1"/>
+                                        </userDefinedRuntimeAttribute>
+                                    </userDefinedRuntimeAttributes>
+                                </view>
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gMB-qb-caO">
+                                    <rect key="frame" x="12" y="22" width="56" height="71.5"/>
+                                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    <connections>
+                                        <action selector="chooseNotice:" destination="iN0-l3-epB" eventType="touchUpInside" id="NbI-SQ-tv4"/>
+                                    </connections>
+                                </button>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="pZt-Oo-gp5" firstAttribute="trailing" secondItem="gMB-qb-caO" secondAttribute="trailing" id="04x-KE-Efe"/>
+                                <constraint firstItem="HFT-lc-XxE" firstAttribute="trailing" secondItem="pZt-Oo-gp5" secondAttribute="trailing" id="1Ki-Zu-wQ9"/>
+                                <constraint firstItem="pZt-Oo-gp5" firstAttribute="centerY" secondItem="fQd-6C-OHk" secondAttribute="centerY" id="6Uc-tu-c8E"/>
+                                <constraint firstItem="pZt-Oo-gp5" firstAttribute="centerX" secondItem="fQd-6C-OHk" secondAttribute="centerX" id="DGp-cN-87P"/>
+                                <constraint firstItem="HFT-lc-XxE" firstAttribute="bottom" secondItem="pZt-Oo-gp5" secondAttribute="bottom" constant="-10" id="DId-eC-xtY"/>
+                                <constraint firstItem="pZt-Oo-gp5" firstAttribute="top" secondItem="gMB-qb-caO" secondAttribute="top" id="I11-F0-hN5"/>
+                                <constraint firstItem="HPj-WQ-UEe" firstAttribute="centerX" secondItem="pZt-Oo-gp5" secondAttribute="centerX" id="QTq-0M-Qj2"/>
+                                <constraint firstItem="pZt-Oo-gp5" firstAttribute="leading" secondItem="gMB-qb-caO" secondAttribute="leading" id="TY7-WD-hzE"/>
+                                <constraint firstItem="HPj-WQ-UEe" firstAttribute="bottom" secondItem="gMB-qb-caO" secondAttribute="bottom" id="dYO-dM-HQn"/>
+                                <constraint firstItem="HPj-WQ-UEe" firstAttribute="top" secondItem="pZt-Oo-gp5" secondAttribute="bottom" constant="1" id="yJD-DK-Eqd"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="kR0-tA-2uF" firstAttribute="leading" secondItem="Pkz-EP-p4Q" secondAttribute="trailing" id="1Ip-8J-r0Y"/>
+                        <constraint firstItem="QCV-gH-UT2" firstAttribute="leading" secondItem="kR0-tA-2uF" secondAttribute="trailing" id="5XL-gG-2d1"/>
+                        <constraint firstItem="QCV-gH-UT2" firstAttribute="top" secondItem="3Jh-gC-egy" secondAttribute="top" id="83M-kH-ZX2"/>
+                        <constraint firstAttribute="bottom" secondItem="QCV-gH-UT2" secondAttribute="bottom" id="9n2-1w-ajk"/>
+                        <constraint firstAttribute="bottom" secondItem="fQd-6C-OHk" secondAttribute="bottom" id="CkM-y7-C53"/>
+                        <constraint firstItem="fQd-6C-OHk" firstAttribute="leading" secondItem="QCV-gH-UT2" secondAttribute="trailing" id="ICS-ae-fgD"/>
+                        <constraint firstItem="kR0-tA-2uF" firstAttribute="top" secondItem="3Jh-gC-egy" secondAttribute="top" id="Krt-V9-C5o"/>
+                        <constraint firstItem="kR0-tA-2uF" firstAttribute="width" secondItem="Pkz-EP-p4Q" secondAttribute="width" id="KwJ-3g-Oyd"/>
+                        <constraint firstItem="fQd-6C-OHk" firstAttribute="width" secondItem="Pkz-EP-p4Q" secondAttribute="width" id="Lam-1s-b14"/>
+                        <constraint firstItem="fQd-6C-OHk" firstAttribute="top" secondItem="3Jh-gC-egy" secondAttribute="top" id="OmA-Vs-5a4"/>
+                        <constraint firstItem="QCV-gH-UT2" firstAttribute="width" secondItem="Pkz-EP-p4Q" secondAttribute="width" id="UDC-kF-oA1"/>
+                        <constraint firstAttribute="bottom" secondItem="Pkz-EP-p4Q" secondAttribute="bottom" id="Xe3-qK-0uc"/>
+                        <constraint firstAttribute="trailing" secondItem="fQd-6C-OHk" secondAttribute="trailing" constant="27" id="an7-AV-hCa"/>
+                        <constraint firstItem="Pkz-EP-p4Q" firstAttribute="leading" secondItem="3Jh-gC-egy" secondAttribute="leading" constant="27" id="gwc-XA-mID"/>
+                        <constraint firstItem="Pkz-EP-p4Q" firstAttribute="top" secondItem="3Jh-gC-egy" secondAttribute="top" id="hzy-aK-mPq"/>
+                        <constraint firstAttribute="bottom" secondItem="kR0-tA-2uF" secondAttribute="bottom" id="igt-71-5Ke"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="3Jh-gC-egy" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="5cR-eo-oqb"/>
+                <constraint firstItem="3Jh-gC-egy" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Pjl-Eu-PVe"/>
+                <constraint firstAttribute="bottom" secondItem="3Jh-gC-egy" secondAttribute="bottom" id="ceN-NI-xsi"/>
+                <constraint firstAttribute="trailing" secondItem="3Jh-gC-egy" secondAttribute="trailing" id="dWr-Ly-BNN"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="allCountLabel" destination="e5M-E8-SSs" id="K0U-Gl-zvZ"/>
+                <outlet property="allLabel" destination="Aal-ZD-MlT" id="qXn-oy-bSz"/>
+                <outlet property="allView" destination="TI9-h7-JQo" id="qgI-md-1u4"/>
+                <outlet property="courseCountLabel" destination="0Ev-de-Era" id="cKf-js-cO3"/>
+                <outlet property="courseLabel" destination="8Ql-22-T6t" id="8Fh-PC-Qtm"/>
+                <outlet property="courseView" destination="oMw-71-EQZ" id="UtK-s0-Kf4"/>
+                <outlet property="noticeCountLabel" destination="eSf-NN-z0H" id="7yQ-Yb-0Zz"/>
+                <outlet property="noticeLabel" destination="HPj-WQ-UEe" id="i39-mh-PC6"/>
+                <outlet property="noticeView" destination="HFT-lc-XxE" id="AEn-pk-RrT"/>
+                <outlet property="systemCountLabel" destination="43u-at-Vor" id="FPQ-la-BzB"/>
+                <outlet property="systemLabel" destination="ZT2-JL-dMl" id="XSb-em-5Kr"/>
+                <outlet property="systemView" destination="PnS-8p-3Z9" id="QV4-d4-ySy"/>
+            </connections>
+            <point key="canvasLocation" x="28.260869565217394" y="-52.901785714285715"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="message_all" width="56" height="56"/>
+        <image name="message_course" width="56" height="56"/>
+        <image name="message_notice" width="56" height="56"/>
+        <image name="message_system" width="56" height="56"/>
+    </resources>
+</document>

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.h

@@ -6,11 +6,16 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "NotiferMessageModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface NotiferMessageCell : UITableViewCell
 
+@property (nonatomic, assign) BOOL isRead; // 是否已读
+
+- (void)configCellWithSource:(NotiferMessageModel *)model;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 53 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.m

@@ -7,6 +7,22 @@
 
 #import "NotiferMessageCell.h"
 
+@interface NotiferMessageCell ()
+
+@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
+
+@property (weak, nonatomic) IBOutlet UIImageView *messageTypeView;
+
+@property (weak, nonatomic) IBOutlet UIView *redDot;
+
+@property (weak, nonatomic) IBOutlet UILabel *topTitleLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *descMessageLabel;
+
+@property (nonatomic, strong) NotiferMessageModel *model;
+
+@end
+
 @implementation NotiferMessageCell
 
 - (void)awakeFromNib {
@@ -15,6 +31,43 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
+- (void)configCellWithSource:(NotiferMessageModel *)model {
+    self.model = model;
+    self.isRead = model.readStatus == 1 ? YES : NO;
+    // 根据type设置图片
+    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *messageDate = [dateFormatter dateFromString:model.createOn];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
+    NSString *dateStr = [dateFormatter stringFromDate:messageDate];
+    self.timeLabel.text = [NSString returnNoNullStringWithString:dateStr];
+    self.topTitleLabel.text = [NSString returnNoNullStringWithString:model.title];
+    
+    NSString *messgage = [NSString returnNoNullStringWithString:self.model.content];
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    [paragraphStyle setLineSpacing:4];//调整行间距
+    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:messgage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x7a7a7a)}];
+    self.descMessageLabel.attributedText = attrStr;
+    if ([model.group isEqualToString:@"COURSE"]) {
+        [self.messageTypeView setImage:[UIImage imageNamed:@"course_cell"]];
+    }
+    else if ([model.group isEqualToString:@"SYSTEM"]) {
+        [self.messageTypeView setImage:[UIImage imageNamed:@"system_cell"]];
+    }
+    else if ([model.group isEqualToString:@"NOTICE"]) {
+        [self.messageTypeView setImage:[UIImage imageNamed:@"notice_cell"]];
+    }
+}
+
+- (void)setIsRead:(BOOL)isRead {
+    _isRead = isRead;
+    if (isRead) {
+        self.redDot.hidden = YES;
+    }
+    else {
+        self.redDot.hidden = NO;
+    }
+}
 
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 82 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.xib

@@ -1,21 +1,95 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<?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>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <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"/>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="NotiferMessageCell">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+        <tableViewCell autoresizesSubviews="NO" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="108" id="KGk-i7-Jjw" customClass="NotiferMessageCell">
+            <rect key="frame" x="0.0" y="0.0" width="425" height="108"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
+                <rect key="frame" x="0.0" y="0.0" width="425" height="108"/>
                 <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_cell" translatesAutoresizingMaskIntoConstraints="NO" id="3FS-75-ZgU">
+                        <rect key="frame" x="16" y="32" width="44" height="44"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="44" id="Abw-Pq-4OW"/>
+                            <constraint firstAttribute="width" constant="44" id="cte-lB-Tzl"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="22"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </imageView>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上课提醒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dWN-rA-dKm">
+                        <rect key="frame" x="70" y="22" width="66" height="22"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="22" id="Amz-LZ-Qr5"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
+                        <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您好,长笛基础教学·李老师的直播课60分钟后…教学·李老师的直播课60分钟后…" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aCp-hw-uSQ">
+                        <rect key="frame" x="70" y="46" width="339" height="40"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <color key="textColor" red="0.47843137254901957" green="0.47843137254901957" blue="0.47843137254901957" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2022-3-25" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PnY-EC-LkF">
+                        <rect key="frame" x="350" y="26" width="59" height="14"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
+                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="heX-9o-hn0">
+                        <rect key="frame" x="141" y="19" width="6" height="6"/>
+                        <color key="backgroundColor" red="1" green="0.074509803921568626" blue="0.074509803921568626" alpha="1" colorSpace="calibratedRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="6" id="4aE-tI-b0y"/>
+                            <constraint firstAttribute="height" constant="6" id="dxV-BU-vQb"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="3"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="aCp-hw-uSQ" secondAttribute="bottom" constant="22" id="0DI-6H-dc0"/>
+                    <constraint firstItem="dWN-rA-dKm" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="22" id="0gk-xb-9OT"/>
+                    <constraint firstItem="dWN-rA-dKm" firstAttribute="leading" secondItem="3FS-75-ZgU" secondAttribute="trailing" constant="10" id="FNS-ca-wiG"/>
+                    <constraint firstItem="aCp-hw-uSQ" firstAttribute="leading" secondItem="dWN-rA-dKm" secondAttribute="leading" id="GSa-tm-lZr"/>
+                    <constraint firstItem="3FS-75-ZgU" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Lvw-p8-dTf"/>
+                    <constraint firstItem="heX-9o-hn0" firstAttribute="leading" secondItem="dWN-rA-dKm" secondAttribute="trailing" constant="5" id="Pz3-5h-Y3h"/>
+                    <constraint firstItem="heX-9o-hn0" firstAttribute="centerY" secondItem="dWN-rA-dKm" secondAttribute="top" id="Rcd-NR-oK0"/>
+                    <constraint firstItem="PnY-EC-LkF" firstAttribute="centerY" secondItem="dWN-rA-dKm" secondAttribute="centerY" id="U2W-vQ-SXe"/>
+                    <constraint firstItem="aCp-hw-uSQ" firstAttribute="top" secondItem="dWN-rA-dKm" secondAttribute="bottom" constant="2" id="X0T-fD-Ccl"/>
+                    <constraint firstAttribute="trailing" secondItem="aCp-hw-uSQ" secondAttribute="trailing" constant="16" id="YQg-oV-3Kc"/>
+                    <constraint firstItem="3FS-75-ZgU" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="j1p-Kp-mXl"/>
+                    <constraint firstAttribute="trailing" secondItem="PnY-EC-LkF" secondAttribute="trailing" constant="16" id="qnJ-3l-15h"/>
+                </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="descMessageLabel" destination="aCp-hw-uSQ" id="UbP-ED-VTA"/>
+                <outlet property="messageTypeView" destination="3FS-75-ZgU" id="5O0-dQ-mpQ"/>
+                <outlet property="redDot" destination="heX-9o-hn0" id="tAI-79-1Gy"/>
+                <outlet property="timeLabel" destination="PnY-EC-LkF" id="vJS-8I-7KV"/>
+                <outlet property="topTitleLabel" destination="dWN-rA-dKm" id="lsT-AW-Yo5"/>
+            </connections>
+            <point key="canvasLocation" x="207.97101449275365" y="58.258928571428569"/>
         </tableViewCell>
     </objects>
+    <resources>
+        <image name="course_cell" width="44" height="43"/>
+    </resources>
 </document>

+ 16 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.h

@@ -0,0 +1,16 @@
+//
+//  ReceiveEvaluateListController.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/7.
+//
+
+#import "KSBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ReceiveEvaluateListController : KSBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 31 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ReceiveEvaluate/Controller/ReceiveEvaluateListController.m

@@ -0,0 +1,31 @@
+//
+//  ReceiveEvaluateListController.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/5/7.
+//
+
+#import "ReceiveEvaluateListController.h"
+
+@interface ReceiveEvaluateListController ()
+
+@end
+
+@implementation ReceiveEvaluateListController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 14 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.h

@@ -21,6 +21,20 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface HomeBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet UILabel *courseCountLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *homeworkCount;
+
+@property (weak, nonatomic) IBOutlet UILabel *evaluateCountLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *musicCountLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *receiveCountLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *amountLabel;
+
+@property (nonatomic, assign) BOOL hideCount;
+
 + (instancetype)shareInstance;
 
 - (void)homebodyViewAction:(HomeBodyViewCallback)callback;

+ 43 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeBodyView.m

@@ -8,12 +8,22 @@
 #import "HomeBodyView.h"
 
 @interface HomeBodyView ()
+@property (weak, nonatomic) IBOutlet UILabel *courseDesc;
+@property (weak, nonatomic) IBOutlet UILabel *homeworkDesc;
+@property (weak, nonatomic) IBOutlet UILabel *evaluateDesc;
+@property (weak, nonatomic) IBOutlet UILabel *musicDesc;
+@property (weak, nonatomic) IBOutlet UILabel *receiveDesc;
+@property (weak, nonatomic) IBOutlet UILabel *amountDesc;
 
 @property (nonatomic, copy) HomeBodyViewCallback callback;
 
 @end
 
 @implementation HomeBodyView
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    self.hideCount = YES;
+}
 
 + (instancetype)shareInstance {
     HomeBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"HomeBodyView" owner:nil options:nil] firstObject];
@@ -37,6 +47,39 @@
 - (CGFloat)getViewHeight {
     return 360;
 }
+
+- (void)setHideCount:(BOOL)hideCount {
+    _hideCount = hideCount;
+    if (hideCount) {
+        self.courseCountLabel.hidden = YES;
+        self.courseDesc.hidden = YES;
+        self.homeworkCount.hidden = YES;
+        self.homeworkDesc.hidden = YES;
+        self.evaluateCountLabel.hidden = YES;
+        self.evaluateDesc.hidden = YES;
+        self.musicCountLabel.hidden = YES;
+        self.musicDesc.hidden = YES;
+        self.receiveCountLabel.hidden = YES;
+        self.receiveDesc.hidden = YES;
+        self.amountLabel.hidden = YES;
+        self.amountDesc.hidden = YES;
+        
+    }
+    else {
+        self.courseCountLabel.hidden = NO;
+        self.courseDesc.hidden = NO;
+        self.homeworkCount.hidden = NO;
+        self.homeworkDesc.hidden = NO;
+        self.evaluateCountLabel.hidden = NO;
+        self.evaluateDesc.hidden = NO;
+        self.musicCountLabel.hidden = NO;
+        self.musicDesc.hidden = NO;
+        self.receiveCountLabel.hidden = NO;
+        self.receiveDesc.hidden = NO;
+        self.amountLabel.hidden = NO;
+        self.amountDesc.hidden = NO;
+    }
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

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

@@ -474,6 +474,20 @@
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="amountDesc" destination="Wzw-Br-OUX" id="K5f-Fw-CpA"/>
+                <outlet property="amountLabel" destination="U2e-AK-Ago" id="4S5-Bu-hM8"/>
+                <outlet property="courseCountLabel" destination="gjM-0G-5wl" id="2s1-8S-td6"/>
+                <outlet property="courseDesc" destination="oVx-ca-Ghb" id="lmE-1t-EUS"/>
+                <outlet property="evaluateCountLabel" destination="a0b-W1-IsU" id="H9c-FI-Zrb"/>
+                <outlet property="evaluateDesc" destination="hnO-me-wU1" id="Qal-nh-4ea"/>
+                <outlet property="homeworkCount" destination="d8W-zM-YSf" id="igK-Vz-92F"/>
+                <outlet property="homeworkDesc" destination="2Oj-o0-cys" id="Sj9-0M-1AZ"/>
+                <outlet property="musicCountLabel" destination="4P3-ma-o7o" id="AQX-h5-o36"/>
+                <outlet property="musicDesc" destination="4tw-Od-8ks" id="IZw-sg-8H5"/>
+                <outlet property="receiveCountLabel" destination="VdL-wz-T2w" id="vB2-QR-Nhs"/>
+                <outlet property="receiveDesc" destination="5oS-sy-fYb" id="DEE-I1-HAx"/>
+            </connections>
             <point key="canvasLocation" x="131.8840579710145" y="-82.366071428571431"/>
         </view>
         <tapGestureRecognizer id="tvD-fE-luX">

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

@@ -88,7 +88,7 @@
     self.starView.rate = infoMessage.starGrade / 5.0f;
     
     if (![NSString isEmptyString:infoMessage.heardUrl]) {
-        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:infoMessage.heardUrl] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [self.userAvatal sd_setImageWithURL:[NSURL URLWithString:[infoMessage.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     }
     else {
         [self.userAvatal setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];

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

@@ -158,7 +158,7 @@
     [self.view addSubview:self.headView];
     self.headView.boardcastName.text = [NSString returnNoNullStringWithString:self.createrName];
     if (![NSString isEmptyString:self.createrAvatal]) {
-        [self.headView.boardcastAvatal sd_setImageWithURL:[NSURL URLWithString:self.createrAvatal] placeholderImage:[UIImage imageNamed:@"teacher_logo"]];
+        [self.headView.boardcastAvatal sd_setImageWithURL:[NSURL URLWithString:[self.createrAvatal getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"teacher_logo"]];
     }
     [self countLikeMessageCount];
     

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/LiveSeatApplyCell.m

@@ -38,7 +38,7 @@
         self.callback = callback;
     }
     self.member = member;
-    [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:member.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[member.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.userName.text = [NSString returnNoNullStringWithString:member.name];
     if (member.isConnected) {
         self.refuseButton.hidden = YES;

+ 8 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/LoginViewController.m

@@ -10,7 +10,7 @@
 #import "VefiCodeLoginController.h"
 #import "PasswordLoginController.h"
 #import "KSBaseWKWebViewController.h"
-
+#import "NSString+phone.h"
 @interface LoginViewController ()
 
 @property (nonatomic, strong) LoginBodyView *bodyView;
@@ -28,6 +28,9 @@
 
 - (void)configUI {
     _bodyView = [LoginBodyView shareInstance];
+    if (![NSString isEmptyString:UserDefault(PHONEKEY)]) {
+        _bodyView.phoneField.text = UserDefault(PHONEKEY);
+    }
     CGFloat height = KPortraitHeight;
     [self.scrollView addSubview:_bodyView];
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -45,6 +48,10 @@
     switch (action) {
         case LOGINACTION_CODE:
         {
+            if (![NSString isMobileNum:phone]) {
+                [self MBPShow:@"手机号码输入有误"];
+                return;
+            }
             VefiCodeLoginController *ctrl = [[VefiCodeLoginController alloc] init];
             ctrl.phoneNo = phone;
             [self.navigationController pushViewController:ctrl animated:YES];

+ 11 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m

@@ -9,6 +9,7 @@
 #import "PasswordBodyView.h"
 #import "AppDelegate.h"
 #import "UserInfoManager.h"
+#import "NSString+phone.h"
 
 @interface PasswordLoginController ()
 
@@ -28,6 +29,12 @@
 - (void)configUI {
     CGFloat height = KPortraitHeight;
     _bodyView = [PasswordBodyView shareInstance];
+    if (![NSString isEmptyString:UserDefault(PHONEKEY)]) {
+        _bodyView.phoneField.text = UserDefault(PHONEKEY);
+    }
+    if (![NSString isEmptyString:UserDefault(PASSWORDKEY)]) {
+        _bodyView.passwordField.text = UserDefault(PASSWORDKEY);
+    }
     [self.scrollView addSubview:_bodyView];
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.mas_equalTo(self.scrollView.mas_top);
@@ -52,6 +59,10 @@
         [self backAction];
     }
     else if (action == PWDLOGIN_LOGIN) {
+        if (![NSString isMobileNum:[parm stringValueForKey:@"phone"]]) {
+            [self MBPShow:@"手机号码输入有误"];
+            return;
+        }
         [self showhud];
         [KSNetworkingManager LoginRequest:KS_POST phone:[parm stringValueForKey:@"phone"] password:[parm stringValueForKey:@"password"] success:^(NSDictionary * _Nonnull dic) {
             [self removehub];

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/LoginBodyView.h

@@ -20,6 +20,8 @@ typedef void(^LoginAction)(LOGINACTION action, NSString *phoneNo);
 
 @interface LoginBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet UITextField *phoneField;
+
 + (instancetype)shareInstance;
 
 - (void)loginActionCallback:(LoginAction)callback;

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/LoginBodyView.m

@@ -9,7 +9,6 @@
 
 @interface LoginBodyView ()<UITextFieldDelegate>
 
-@property (weak, nonatomic) IBOutlet UITextField *phoneField;
 
 @property (weak, nonatomic) IBOutlet UILabel *registerProtocalLabel;
 

+ 4 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/PasswordBodyView.h

@@ -17,6 +17,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface PasswordBodyView : UIView
 
+@property (weak, nonatomic) IBOutlet UITextField *phoneField;
+
+@property (weak, nonatomic) IBOutlet UITextField *passwordField;
+
 + (instancetype)shareInstance;
 
 - (void)passwordLoginActionCallback:(PwdCallback)callback;

+ 0 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/PasswordBodyView.m

@@ -9,9 +9,7 @@
 
 @interface PasswordBodyView ()<UITextFieldDelegate>
 
-@property (weak, nonatomic) IBOutlet UITextField *phoneField;
 
-@property (weak, nonatomic) IBOutlet UITextField *passwordField;
 
 @property (nonatomic, copy) PwdCallback callback;
 

+ 8 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressDetailViewController.m

@@ -9,6 +9,7 @@
 #import "KSAddressPickerView.h"
 #import "NSObject+ReadDocument.h"   // 读取文件
 #import "AddressDetailBodyView.h"
+#import "NSString+phone.h"
 
 @interface AddressDetailViewController ()
 
@@ -122,15 +123,19 @@
         return;
     }
     // 判断手机号是否合规
-    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", PHONE_REGEX_FORMAT];
-    if ([predicate evaluateWithObject:phoneNo] == NO) {
-        [self MBPShow:@"手机号格式输入有误"];
+    if (![NSString isMobileNum:phoneNo]) {
+        [self MBPShow:@"手机号码输入有误"];
         return;
     }
+    
     if ([NSString isEmptyString:self.bodyView.addressView.text]) {
         [self MBPShow:@"请选择地址"];
         return;
     }
+    if ([NSString isEmptyString:self.bodyView.detailAddress.text]) {
+        [self MBPShow:@"请填写详细地址"];
+        return;
+    }
     if (self.modifyAddress) {
         [self showhud];
         [KSNetworkingManager updateAddressRequest:KS_POST addressId:self.addressId name:self.bodyView.nameField.text phoneNumber:phoneNo defaultStatus:self.bodyView.isOn detailAddress:self.bodyView.detailAddress.text province:self.province city:self.city region:self.region postCode:self.cityCode success:^(NSDictionary * _Nonnull dic) {

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

@@ -10,7 +10,7 @@
 #import "AddressBottomView.h"
 #import "AddressDetailViewController.h"
 #import "AddressListModel.h"
-
+#import "KSImageAlert.h"
 @interface AddressListViewController ()<UITableViewDataSource,UITableViewDelegate>
 
 @property (nonatomic, strong) UITableView *tableView;
@@ -120,6 +120,49 @@
     [self.navigationController pushViewController:ctrl animated:YES];
 }
 
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+    return YES;
+}
+
+- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
+    AddressListModel *model = self.dataArray[indexPath.row];
+    UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
+        [self deleteAddressConfirm:model.internalBaseClassIdentifier];
+    }];
+    deleteRowAction.backgroundColor = THEMECOLOR;
+    
+    return @[deleteRowAction];
+}
+// 删除
+- (void)deleteAddressConfirm:(NSString *)addressId {
+    KSImageAlert *alertView = [KSImageAlert shareInstance];
+    MJWeakSelf;
+    alertView.titleLabel.text = @"确认删除收获地址吗";
+    [alertView.cancleButton setTitle:@"取消" forState:UIControlStateNormal];
+    [alertView.sureButton setTitle:@"确定" forState:UIControlStateNormal];
+    [alertView sureCallback:^(BOOL isSure) {
+        if (isSure) {
+            [weakSelf deleteAddress:addressId];
+        }
+    }];
+    [alertView showAlert];
+}
+
+- (void)deleteAddress:(NSString *)addressId {
+    [self showhud];
+    [KSNetworkingManager deleteAddressRequest:KS_POST addressId:addressId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200) {
+            [self MBPShow:@"删除成功"];
+            [self refreshAndRequestData];
+        }
+        else {
+            [self MBPShow:[dic stringValueForKey:@"message"]];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
 - (UITableView *)tableView {
     if (!_tableView) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/View/CardBandBodyView.m

@@ -51,6 +51,7 @@
 
 #pragma mark ---- text field delegate
 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    [string replaceAll:@" " WithString:@""];
     if ([string isEqualToString:@"\n"]) {
         [self endEditing:YES];
         return YES;
@@ -66,7 +67,7 @@
         }
     }
     else if (textField == self.cardNoField) {
-        if (newString.length > 16) {
+        if (newString.length > 20) {
             return NO;
         }
     }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/Model/KSVideoHelper.m

@@ -14,7 +14,7 @@
 @implementation KSVideoHelper
 
 + (void)getVideoPreviewImageUrl:(NSString *)videoUrl forImageView:(UIImageView *)imageView placeholder:(UIImage *)placeHolder {
-
+    videoUrl = [videoUrl getUrlEndcodeString];
     [[SDImageCache sharedImageCache] queryCacheOperationForKey:videoUrl done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
         //是否有缓存图片
         if(image){
@@ -28,7 +28,7 @@
 
 // 获取视频第一帧
 + (void)getVideoFirstViewImage:(NSString *)videoURL forImageView:(UIImageView *)imageView placeHolderImage:(UIImage *)placeHolder {
-   
+    videoURL = [videoURL getUrlEndcodeString];
     NSString *url = videoURL;
     __block UIImage *videoImage;
     dispatch_async(dispatch_get_global_queue(0, 0), ^{

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CreateStyle/View/InstrumentChooseCell.m

@@ -26,7 +26,7 @@
 
 - (void)configCellWithModel:(InstrumentMessageModel *)model {
     self.subjectName.text = [NSString returnNoNullStringWithString:model.name];
-    [self.subjectImage sd_setImageWithURL:[NSURL URLWithString:model.img]];
+    [self.subjectImage sd_setImageWithURL:[NSURL URLWithString:[model.img getUrlEndcodeString]]];
     NSString *imageName = model.isChoose ? @"choose_instrument" : @"unChoose_instrument";
     [self.statusImage setImage:[UIImage imageNamed:imageName]];
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/AccompanyCourseCell.m

@@ -46,7 +46,7 @@
         self.callback = callback;
     }
     self.sourceModel = model;
-    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.studentName.text = [NSString returnNoNullStringWithString:model.userName];
     self.studentSubject.text = [NSString returnNoNullStringWithString:model.subjectName];
     // time
@@ -109,7 +109,7 @@
     }
     self.lessonModel = model;
     
-    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.studentAvatar sd_setImageWithURL:[NSURL URLWithString:[model.cover getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     if ([NSString isEmptyString:model.name]) {
         self.studentName.text = [NSString stringWithFormat:@"游客%@",model.userId];
     }

+ 4 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.m

@@ -17,6 +17,7 @@
 @property (weak, nonatomic) IBOutlet UILabel *courseTime;
 @property (weak, nonatomic) IBOutlet UILabel *priceLabel;
 @property (weak, nonatomic) IBOutlet UIView *orderView;
+@property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 
 @end
@@ -30,7 +31,7 @@
 }
 
 - (void)configCellWithSource:(LiveCourseModel *)model hideStudentInfo:(BOOL)hiddenInfo {
-    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:model.backgroundPic] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
+    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
     if ([NSString isEmptyString:model.teacherName]) {
         self.teacherName.text = [NSString stringWithFormat:@"游客%@",model.teacherId];
@@ -38,7 +39,7 @@
     else {
         self.teacherName.text = model.teacherName;
     }
-    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     
     if (hiddenInfo) {
         self.orderView.hidden = YES;
@@ -57,6 +58,7 @@
     [formatter setDateFormat:@"yyyy/MM/dd HH:mm"];
     NSString *courseBegin = [formatter stringFromDate:startDate];
     self.courseTime.text = [NSString returnNoNullStringWithString:courseBegin];
+    self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
 }
 
 

+ 31 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.xib

@@ -117,6 +117,32 @@
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZsQ-DL-KCn">
+                                <rect key="frame" x="15" y="74" width="24.5" height="13"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="86M-c7-rTW">
+                                        <rect key="frame" x="3" y="0.0" width="18.5" height="13"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="13" id="xbM-8z-Sjb"/>
+                                        </constraints>
+                                        <fontDescription key="fontDescription" type="system" pointSize="9"/>
+                                        <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="86M-c7-rTW" secondAttribute="bottom" id="9Pn-BI-LYd"/>
+                                    <constraint firstItem="86M-c7-rTW" firstAttribute="top" secondItem="ZsQ-DL-KCn" secondAttribute="top" id="DxL-wa-Gxo"/>
+                                    <constraint firstAttribute="trailing" secondItem="86M-c7-rTW" secondAttribute="trailing" constant="3" id="Hqu-Kg-L2i"/>
+                                    <constraint firstItem="86M-c7-rTW" firstAttribute="leading" secondItem="ZsQ-DL-KCn" secondAttribute="leading" constant="3" id="rl4-oz-os6"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="1"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </view>
                         </subviews>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
@@ -129,12 +155,14 @@
                             <constraint firstAttribute="trailing" secondItem="1P8-Tt-vJy" secondAttribute="trailing" constant="12" id="UNf-bn-NGG"/>
                             <constraint firstItem="fS2-h4-cBg" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="trailing" constant="12" id="W9V-Py-L3p"/>
                             <constraint firstItem="ubJ-4G-VNk" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="10" id="XPT-f9-5Pb"/>
+                            <constraint firstItem="ZsQ-DL-KCn" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="leading" constant="4" id="YQP-hP-shh"/>
                             <constraint firstAttribute="trailing" secondItem="pom-27-xPp" secondAttribute="trailing" constant="11" id="apX-z2-tWj"/>
                             <constraint firstItem="BL0-yX-dfU" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" constant="-1" id="btl-DG-Sfp"/>
                             <constraint firstItem="xxS-NZ-g2N" firstAttribute="top" secondItem="Mvt-WC-c3g" secondAttribute="top" constant="16" id="jSd-RY-pLM"/>
                             <constraint firstItem="61W-Je-OUA" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="11" id="kPQ-yR-Otc"/>
                             <constraint firstItem="1P8-Tt-vJy" firstAttribute="leading" secondItem="MXm-cL-DLC" secondAttribute="trailing" constant="6" id="kde-1c-4bz"/>
                             <constraint firstItem="MXm-cL-DLC" firstAttribute="leading" secondItem="BL0-yX-dfU" secondAttribute="trailing" constant="5" id="kf6-VF-jse"/>
+                            <constraint firstItem="ZsQ-DL-KCn" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" id="pFj-uP-SFQ"/>
                             <constraint firstItem="pom-27-xPp" firstAttribute="top" secondItem="ubJ-4G-VNk" secondAttribute="bottom" constant="8" id="pi1-8d-yCC"/>
                             <constraint firstItem="fS2-h4-cBg" firstAttribute="top" secondItem="xxS-NZ-g2N" secondAttribute="top" constant="1" id="png-nh-Js2"/>
                             <constraint firstItem="61W-Je-OUA" firstAttribute="top" secondItem="ubJ-4G-VNk" secondAttribute="bottom" constant="11" id="tNX-e1-ZuP"/>
@@ -165,16 +193,17 @@
                 <outlet property="orderUser" destination="alu-CI-VLe" id="g7W-md-Ny2"/>
                 <outlet property="orderView" destination="1P8-Tt-vJy" id="sV7-bt-dlE"/>
                 <outlet property="priceLabel" destination="pom-27-xPp" id="YX9-DU-Cu6"/>
+                <outlet property="subjectLabel" destination="86M-c7-rTW" id="zvd-kH-qDI"/>
                 <outlet property="teacherAvatar" destination="BL0-yX-dfU" id="lqv-h8-ALv"/>
                 <outlet property="teacherName" destination="MXm-cL-DLC" id="fmJ-YR-WPh"/>
             </connections>
-            <point key="canvasLocation" x="131.8840579710145" y="104.46428571428571"/>
+            <point key="canvasLocation" x="131.8840579710145" y="104.12946428571428"/>
         </tableViewCell>
     </objects>
     <resources>
         <image name="course_time" width="16" height="16"/>
         <image name="user_default_avatal" width="52" height="52"/>
-        <image name="video_placeholder" width="168" height="111"/>
+        <image name="video_placeholder" width="103" height="72"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

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

@@ -51,7 +51,7 @@
     else {
         self.uploaderName.text = songMessage.username;
     }
-    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:songMessage.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.uploaderLogo sd_setImageWithURL:[NSURL URLWithString:[songMessage.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
 }
 
 - (CGFloat)getTagViewMaxWidth:(NSString *)teacherName {

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

@@ -49,7 +49,7 @@
         [self displayCount:infoMessage.expTime inView:self.courseCount];
         self.starView.rate = infoMessage.starGrade / 5.0f;
         if (![NSString isEmptyString:infoMessage.heardUrl]) {
-            [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:infoMessage.heardUrl] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+            [self.userAvatar sd_setImageWithURL:[NSURL URLWithString:[infoMessage.heardUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
         }
         else {
             [self.userAvatar setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];

+ 6 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoCell.m

@@ -21,6 +21,8 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *descLabel;
 
+@property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
+
 @end
 
 @implementation MinePageVideoCell
@@ -31,13 +33,14 @@
 }
 
 - (void)configSourceModel:(VideoCourseModel *)model {
-    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:model.lessonCoverUrl] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
+    [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.lessonCoverUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseTitle.text = [NSString returnNoNullStringWithString:model.lessonName];
-    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     self.teacherName.text = [NSString returnNoNullStringWithString:model.username];
-    self.courseMessage.text = [NSString  stringWithFormat:@"¥%.0f/%.0f课时",model.lessonPrice,model.lessonCount];
+    self.courseMessage.text = [NSString  stringWithFormat:@"¥%.2f/%.0f课时",model.lessonPrice,model.lessonCount];
     
     self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
+    self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
 }
 
 @end

+ 30 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoCell.xib

@@ -27,6 +27,32 @@
                                     <constraint firstAttribute="height" constant="111" id="nAv-x7-LNJ"/>
                                 </constraints>
                             </imageView>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UwI-V7-ylA">
+                                <rect key="frame" x="8" y="6" width="24.5" height="13"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4gv-0P-tG8">
+                                        <rect key="frame" x="3" y="0.0" width="18.5" height="13"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="13" id="DKP-ZU-4j4"/>
+                                        </constraints>
+                                        <fontDescription key="fontDescription" type="system" pointSize="9"/>
+                                        <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstItem="4gv-0P-tG8" firstAttribute="top" secondItem="UwI-V7-ylA" secondAttribute="top" id="00s-cC-CMI"/>
+                                    <constraint firstAttribute="bottom" secondItem="4gv-0P-tG8" secondAttribute="bottom" id="Esv-jZ-Cqm"/>
+                                    <constraint firstAttribute="trailing" secondItem="4gv-0P-tG8" secondAttribute="trailing" constant="3" id="FXd-5L-aql"/>
+                                    <constraint firstItem="4gv-0P-tG8" firstAttribute="leading" secondItem="UwI-V7-ylA" secondAttribute="leading" constant="3" id="as5-6m-1iS"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="1"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </view>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从零开始学竖笛视频课" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uOk-ia-Vh6">
                                 <rect key="frame" x="11" y="117" width="185" height="17"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -93,6 +119,7 @@
                         <constraints>
                             <constraint firstItem="uOk-ia-Vh6" firstAttribute="top" secondItem="U59-Pt-Ft1" secondAttribute="bottom" constant="6" id="1pe-xh-lmN"/>
                             <constraint firstAttribute="trailing" secondItem="U59-Pt-Ft1" secondAttribute="trailing" id="4Dp-mH-SWc"/>
+                            <constraint firstItem="UwI-V7-ylA" firstAttribute="leading" secondItem="U59-Pt-Ft1" secondAttribute="leading" constant="8" id="8W4-IQ-qBy"/>
                             <constraint firstItem="yqj-pv-E9y" firstAttribute="leading" secondItem="RA1-Ms-Rdt" secondAttribute="leading" constant="11" id="8kQ-Qp-GAi"/>
                             <constraint firstItem="yqj-pv-E9y" firstAttribute="top" secondItem="uOk-ia-Vh6" secondAttribute="bottom" constant="5" id="AJV-xP-ti7"/>
                             <constraint firstItem="Nwj-Ef-Sig" firstAttribute="leading" secondItem="yqj-pv-E9y" secondAttribute="trailing" constant="5" id="Hbg-5d-IwB"/>
@@ -104,6 +131,7 @@
                             <constraint firstAttribute="trailing" secondItem="e8Z-Ri-oh9" secondAttribute="trailing" constant="10" id="ctU-1d-uaS"/>
                             <constraint firstItem="W3y-Mv-wxM" firstAttribute="top" secondItem="yqj-pv-E9y" secondAttribute="bottom" constant="5" id="e3y-jZ-ZPa"/>
                             <constraint firstItem="Nwj-Ef-Sig" firstAttribute="centerY" secondItem="yqj-pv-E9y" secondAttribute="centerY" id="lOz-ZL-BdG"/>
+                            <constraint firstItem="UwI-V7-ylA" firstAttribute="top" secondItem="U59-Pt-Ft1" secondAttribute="top" constant="6" id="mtN-nv-Jk1"/>
                             <constraint firstItem="e8Z-Ri-oh9" firstAttribute="centerY" secondItem="Nwj-Ef-Sig" secondAttribute="centerY" id="wg1-be-1hH"/>
                             <constraint firstItem="W3y-Mv-wxM" firstAttribute="leading" secondItem="RA1-Ms-Rdt" secondAttribute="leading" constant="9" id="xR2-mV-JFQ"/>
                         </constraints>
@@ -128,6 +156,7 @@
                 <outlet property="courseTitle" destination="uOk-ia-Vh6" id="vHO-8t-9sg"/>
                 <outlet property="coverImage" destination="U59-Pt-Ft1" id="46O-sh-EXw"/>
                 <outlet property="descLabel" destination="1HX-v1-naa" id="RbV-LD-Rl1"/>
+                <outlet property="subjectLabel" destination="4gv-0P-tG8" id="ZbB-cP-L8Y"/>
                 <outlet property="teacherAvatar" destination="yqj-pv-E9y" id="zcT-kt-aqU"/>
                 <outlet property="teacherName" destination="Nwj-Ef-Sig" id="gQl-V3-DUn"/>
             </connections>
@@ -136,7 +165,7 @@
     </objects>
     <resources>
         <image name="user_default_avatal" width="52" height="52"/>
-        <image name="video_placeholder" width="168" height="111"/>
+        <image name="video_placeholder" width="103" height="72"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m

@@ -13,6 +13,7 @@
 #import "CustomNavViewController.h"
 #import "JPUSHService.h"
 #import "RCConnectionManager.h"
+#import "NSString+phone.h"
 
 @interface ModifyPhoneChangeController ()
 {
@@ -47,6 +48,10 @@
 }
 
 - (void)operationWithAction:(CHANGEACTION)action parm:(NSDictionary *)parm {
+    if (![NSString isMobileNum:[parm stringValueForKey:@"phone"]]) {
+        [self MBPShow:@"手机号码输入有误"];
+        return;
+    }
     if (action == CHANGEACTION_CODE) {
         // 图形化验证
         [self veriCheckWithParm:parm];
@@ -58,6 +63,7 @@
 
 #pragma mark --- 修改手机号
 - (void)modifyPhoneWithParm:(NSDictionary *)parm {
+    
     [self showhud];
     [KSNetworkingManager updatePhoneRequest:KS_POST oldPhone:self.prePhone authCode:[parm stringValueForKey:@"code"] newPhone:[parm stringValueForKey:@"phone"] success:^(NSDictionary * _Nonnull dic) {
         [self removehub];

+ 5 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneCheckController.m

@@ -8,7 +8,7 @@
 #import "ModifyPhoneCheckController.h"
 #import "PhoneCheckBodyView.h"
 #import "ModifyPhoneChangeController.h"
-
+#import "NSString+phone.h"
 @interface ModifyPhoneCheckController ()
 
 @property (nonatomic, strong) PhoneCheckBodyView *bodyView;
@@ -41,6 +41,10 @@
 }
 
 - (void)checkWithPhone:(NSString *)phoneNo password:(NSString *)password {
+    if (![NSString isMobileNum:phoneNo]) {
+        [self MBPShow:@"手机号码输入有误"];
+        return;
+    }
     [self showhud];
     [KSNetworkingManager checkUserRequest:KS_GET phone:phoneNo password:password success:^(NSDictionary * _Nonnull dic) {
         [self removehub];

+ 5 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/SettingViewController.m

@@ -22,6 +22,7 @@
 #import "AboutUsViewController.h"
 #import "UserInfoManager.h"
 #import "AddressListViewController.h"
+#import "KSUploadManager.h"
 
 @interface SettingViewController ()
  
@@ -55,7 +56,7 @@
 
 - (void)configMessage {
     if (![NSString isEmptyString:self.mineInfo.avatar]) {
-        [self.bodyView.userAvatal sd_setImageWithURL:[NSURL URLWithString:self.mineInfo.avatar] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
+        [self.bodyView.userAvatal sd_setImageWithURL:[NSURL URLWithString:[self.mineInfo.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     }
     else {
         [self.bodyView.userAvatal setImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
@@ -201,6 +202,9 @@
 }
 
 - (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];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/VeriCheckView.m

@@ -108,7 +108,7 @@
     self.phoneNo = phoneNo;
     NSString *url = [NSString stringWithFormat:@"%@%@?phone=%@",hostURL, @"/api-teacher/code/getImageCode",phoneNo];
     [[SDImageCache sharedImageCache] removeImageForKey:url withCompletion:^{
-        [self.checkImage sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:[UIImage imageNamed:@"image_placeholder"] options:SDWebImageRefreshCached];
+        [self.checkImage sd_setImageWithURL:[NSURL URLWithString:[url getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"image_placeholder"] options:SDWebImageRefreshCached];
     }];
 }
 

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.h

@@ -29,6 +29,7 @@
 @property (nonatomic, strong) NSString *lessonTag;
 @property (nonatomic, assign) double topFlag;
 @property (nonatomic, strong) NSString *updateTime;
+@property (nonatomic, strong) NSString *lessonSubjectName;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.m

@@ -26,7 +26,7 @@ NSString *const kVideoCourseModelSortNumber = @"sortNumber";
 NSString *const kVideoCourseModelLessonTag = @"lessonTag";
 NSString *const kVideoCourseModelTopFlag = @"topFlag";
 NSString *const kVideoCourseModelUpdateTime = @"updateTime";
-
+NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
 
 @interface VideoCourseModel ()
 
@@ -54,7 +54,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
 @synthesize lessonTag = _lessonTag;
 @synthesize topFlag = _topFlag;
 @synthesize updateTime = _updateTime;
-
+@synthesize lessonSubjectName = _lessonSubjectName;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -86,7 +86,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
             self.lessonTag = [self objectOrNilForKey:kVideoCourseModelLessonTag fromDictionary:dict];
             self.topFlag = [[self objectOrNilForKey:kVideoCourseModelTopFlag fromDictionary:dict] doubleValue];
             self.updateTime = [self objectOrNilForKey:kVideoCourseModelUpdateTime fromDictionary:dict];
-
+        self.lessonSubjectName = [self objectOrNilForKey:kVideoCourseModelLessonSubjectName fromDictionary:dict];
     }
     
     return self;
@@ -114,7 +114,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
     [mutableDict setValue:self.lessonTag forKey:kVideoCourseModelLessonTag];
     [mutableDict setValue:[NSNumber numberWithDouble:self.topFlag] forKey:kVideoCourseModelTopFlag];
     [mutableDict setValue:self.updateTime forKey:kVideoCourseModelUpdateTime];
-
+    [mutableDict setValue:self.lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -159,6 +159,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
     self.lessonTag = [aDecoder decodeObjectForKey:kVideoCourseModelLessonTag];
     self.topFlag = [aDecoder decodeDoubleForKey:kVideoCourseModelTopFlag];
     self.updateTime = [aDecoder decodeObjectForKey:kVideoCourseModelUpdateTime];
+    self.lessonSubjectName = [aDecoder decodeObjectForKey:kVideoCourseModelLessonSubjectName];
     return self;
 }
 
@@ -183,6 +184,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
     [aCoder encodeObject:_lessonTag forKey:kVideoCourseModelLessonTag];
     [aCoder encodeDouble:_topFlag forKey:kVideoCourseModelTopFlag];
     [aCoder encodeObject:_updateTime forKey:kVideoCourseModelUpdateTime];
+    [aCoder encodeObject:_lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -209,6 +211,7 @@ NSString *const kVideoCourseModelUpdateTime = @"updateTime";
         copy.lessonTag = [self.lessonTag copyWithZone:zone];
         copy.topFlag = self.topFlag;
         copy.updateTime = [self.updateTime copyWithZone:zone];
+        copy.lessonSubjectName = [self.lessonSubjectName copyWithZone:zone];
     }
     
     return copy;

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