Pārlūkot izejas kodu

空状态同步

Steven 3 gadi atpakaļ
vecāks
revīzija
a51f15a3c8
40 mainītis faili ar 879 papildinājumiem un 255 dzēšanām
  1. 6 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 26 106
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 22 0
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_videoCourse.imageset/Contents.json
  5. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_videoCourse.imageset/empty_videoCourse@2x.png
  6. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_videoCourse.imageset/empty_videoCourse@3x.png
  7. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/no_networking.imageset/no_networking@2x.png
  8. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/no_networking.imageset/no_networking@3x.png
  9. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/wd_img_zwsj.imageset/wd_img_zwsj@2x.png
  10. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/wd_img_zwsj.imageset/wd_img_zwsj@3x.png
  11. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.m
  12. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.xib
  13. 28 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSButtonStatusView.h
  14. 110 0
      KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSButtonStatusView.m
  15. 29 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  16. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateCourseListViewController.m
  17. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkListViewController.m
  18. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Music/Controller/MyMusicViewController.m
  19. 16 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m
  20. 3 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.h
  21. 91 12
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m
  22. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.h
  23. 39 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m
  24. 15 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m
  25. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib
  26. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.h
  27. 28 8
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/Controller/MyLiveCourseViewController.m
  28. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.h
  29. 107 19
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m
  30. 14 11
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Controller/MinePageViewController.m
  31. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.h
  32. 151 25
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m
  33. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.h
  34. 37 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m
  35. 19 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Controller/VideoCourseViewController.m
  36. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/View/VideoListBodyView.h
  37. 74 24
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/View/VideoListBodyView.m
  38. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.h
  39. 17 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.m
  40. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.xib

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

@@ -637,6 +637,7 @@
 		BCF61BEC28042D1A0000ACFE /* InstrumentMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCF61BEB28042D1A0000ACFE /* InstrumentMessageModel.m */; };
 		BCF61BEF28042F9B0000ACFE /* InstrumentChooseBottonView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCF61BEE28042F9B0000ACFE /* InstrumentChooseBottonView.m */; };
 		BCF61BF128042FA90000ACFE /* InstrumentChooseBottonView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCF61BF028042FA90000ACFE /* InstrumentChooseBottonView.xib */; };
+		BCFE540928168DFF00AD6786 /* KSButtonStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE540828168DFF00AD6786 /* KSButtonStatusView.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -1808,6 +1809,8 @@
 		BCF61BED28042F9B0000ACFE /* InstrumentChooseBottonView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstrumentChooseBottonView.h; sourceTree = "<group>"; };
 		BCF61BEE28042F9B0000ACFE /* InstrumentChooseBottonView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstrumentChooseBottonView.m; sourceTree = "<group>"; };
 		BCF61BF028042FA90000ACFE /* InstrumentChooseBottonView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InstrumentChooseBottonView.xib; sourceTree = "<group>"; };
+		BCFE540728168DFF00AD6786 /* KSButtonStatusView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSButtonStatusView.h; sourceTree = "<group>"; };
+		BCFE540828168DFF00AD6786 /* KSButtonStatusView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSButtonStatusView.m; sourceTree = "<group>"; };
 		CC310B10C17622ABB179BC7C /* libPods-KulexiuForTeacher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KulexiuForTeacher.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
@@ -2540,6 +2543,8 @@
 				2779317027E30FC00010E277 /* UIImage+Addtions.h */,
 				2779312827E30FC00010E277 /* UIImage+Addtions.m */,
 				2779314B27E30FC00010E277 /* YKMultiLevelTableView */,
+				BCFE540728168DFF00AD6786 /* KSButtonStatusView.h */,
+				BCFE540828168DFF00AD6786 /* KSButtonStatusView.m */,
 			);
 			path = Custom;
 			sourceTree = "<group>";
@@ -4837,6 +4842,7 @@
 				BCE6A07F27F7FACA00C97704 /* UIView+SubViewExtension.m in Sources */,
 				BCA9CE5027FD954800D558C6 /* AccompanyRemarkCell.m in Sources */,
 				2779321B27E30FC30010E277 /* SearchView.m in Sources */,
+				BCFE540928168DFF00AD6786 /* KSButtonStatusView.m in Sources */,
 				BC5EB5A92803D85300B4A3B0 /* AccompanyAlertView.m in Sources */,
 				2708565227ED8B8C00EC8E72 /* GroupApplyChooseAllCell.m in Sources */,
 				277932BC27E30FFE0010E277 /* TAAbstractDotView.m in Sources */,

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


+ 26 - 106
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -46,8 +46,8 @@
             filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "118"
-            endingLineNumber = "118"
+            startingLineNumber = "144"
+            endingLineNumber = "144"
             landmarkName = "-requestData"
             landmarkType = "7">
          </BreakpointContent>
@@ -99,160 +99,80 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "3872C421-C200-41D2-9DA8-F85ABDD5D283"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/Controller/MyLiveCourseViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "71"
-            endingLineNumber = "71"
-            landmarkName = "-requestTeachMessage"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "FC22CBA4-3941-4BE6-ADC3-AC97A1FA514A"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "79"
-            endingLineNumber = "79"
-            landmarkName = "-configRequestStatus"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "8B74891D-F7CA-41CE-A8E6-514D39EBD4B9"
+            uuid = "C29CA973-9C0E-43CF-8C97-72452E222E9C"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
+            filePath = "KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "82"
-            endingLineNumber = "82"
-            landmarkName = "-configRequestStatus"
+            startingLineNumber = "454"
+            endingLineNumber = "454"
+            landmarkName = "-tableView:didSelectRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "A64BD3AB-71A2-4C29-8788-4F007A4EF6DB"
+            uuid = "171D4790-A23B-400B-989E-D34F5ACA1295"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
+            filePath = "KulexiuForTeacher/Module/Course/Controller/CourseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "85"
-            endingLineNumber = "85"
-            landmarkName = "-configRequestStatus"
+            startingLineNumber = "448"
+            endingLineNumber = "448"
+            landmarkName = "-adjustCourseWithSource:time:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "34406921-8388-4BDB-976A-B462E12787E6"
+            uuid = "FD38EDFC-31E9-4CA2-9E97-5C867C7DC46D"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "88"
-            endingLineNumber = "88"
-            landmarkName = "-configRequestStatus"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "1F8151AC-690A-4AEA-AD47-C6A8F3578210"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/MinePage/Controller/MinePageViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "105"
-            endingLineNumber = "105"
-            landmarkName = "-refreshAuthStatus"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "34F8CABD-0EB7-4F2F-850F-C8AD4B4FC932"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "452"
-            endingLineNumber = "452"
-            landmarkName = "-setMusicianAuthStatus:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "0F1EC942-2759-4667-8F29-9F899408473E"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "58"
-            endingLineNumber = "58"
-            landmarkName = "-operationAction:parm:"
+            startingLineNumber = "162"
+            endingLineNumber = "162"
+            landmarkName = "-requestData"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "C29CA973-9C0E-43CF-8C97-72452E222E9C"
+            uuid = "BE815144-D68B-47B8-AA5D-BA2F41E7BB3D"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m"
+            filePath = "KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "452"
-            endingLineNumber = "452"
-            landmarkName = "-tableView:didSelectRowAtIndexPath:"
+            startingLineNumber = "313"
+            endingLineNumber = "313"
+            landmarkName = "-showAuthView"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "171D4790-A23B-400B-989E-D34F5ACA1295"
+            uuid = "B6CD09E0-AEAC-4D5F-90DF-628366658FCC"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Course/Controller/CourseViewController.m"
+            filePath = "KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "448"
-            endingLineNumber = "448"
-            landmarkName = "-adjustCourseWithSource:time:"
+            startingLineNumber = "157"
+            endingLineNumber = "157"
+            landmarkName = "-pagerView:initListAtIndex:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

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

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_videoCourse.imageset/empty_videoCourse@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/empty_videoCourse.imageset/empty_videoCourse@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/no_networking.imageset/no_networking@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/no_networking.imageset/no_networking@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/wd_img_zwsj.imageset/wd_img_zwsj@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/EmptyStatus/wd_img_zwsj.imageset/wd_img_zwsj@3x.png


+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.m

@@ -24,7 +24,7 @@
     NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
     [paragraphStyle setLineSpacing:8];//调整行间距
     paragraphStyle.alignment = NSTextAlignmentCenter;
-    NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:tipsMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+    NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:tipsMessage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:15.0f],NSForegroundColorAttributeName:HexRGB(0x999999)}];
     self.tispLabel.attributedText = attrs;
 }
 

+ 7 - 7
KulexiuForTeacher/KulexiuForTeacher/Common/Base/AuthDisplayView.xib

@@ -13,21 +13,21 @@
             <rect key="frame" x="0.0" y="0.0" width="542" height="606"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="auth_bg" translatesAutoresizingMaskIntoConstraints="NO" id="3R9-37-rfJ">
-                    <rect key="frame" x="148" y="30" width="246" height="163"/>
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="authTeacher_accompany" translatesAutoresizingMaskIntoConstraints="NO" id="3R9-37-rfJ">
+                    <rect key="frame" x="141" y="30" width="260" height="230"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="163" id="sYB-Vz-GDL"/>
-                        <constraint firstAttribute="width" constant="246" id="y1Q-1t-vkt"/>
+                        <constraint firstAttribute="height" constant="230" id="62x-qr-i50"/>
+                        <constraint firstAttribute="width" constant="260" id="ody-S9-lK6"/>
                     </constraints>
                 </imageView>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您还没有完成老师认证,认证后才可设置陪练课哦~" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ya2-qu-eeU">
-                    <rect key="frame" x="148" y="203" width="246" height="36"/>
+                    <rect key="frame" x="141" y="270" width="260" height="36"/>
                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xkE-FS-h0V">
-                    <rect key="frame" x="181" y="261" width="180" height="40"/>
+                    <rect key="frame" x="181" y="328" width="180" height="40"/>
                     <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="40" id="vcC-gf-AjX"/>
@@ -67,6 +67,6 @@
         </view>
     </objects>
     <resources>
-        <image name="auth_bg" width="246" height="163"/>
+        <image name="authTeacher_accompany" width="260" height="230"/>
     </resources>
 </document>

+ 28 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSButtonStatusView.h

@@ -0,0 +1,28 @@
+//
+//  KSButtonStatusView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/4/25.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef void(^StatusViewCallback)(void);
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSButtonStatusView : UIView
+
+@property (nonatomic, copy) NSString *text;
+
+@property (nonatomic, strong) NSString *imageName;
+
+@property (nonatomic, strong) UILabel *desLabel;
+
+@property (nonatomic, copy) NSString *buttonTitle;
+
+- (void)buttonClickCallback:(StatusViewCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 110 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/KSButtonStatusView.m

@@ -0,0 +1,110 @@
+//
+//  KSButtonStatusView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/4/25.
+//
+
+#import "KSButtonStatusView.h"
+
+@interface KSButtonStatusView ()
+{
+    UIImageView *_imgView;
+}
+@property (nonatomic, copy) StatusViewCallback callback;
+
+@property (nonatomic, strong) UIButton *sureButton;
+
+@end
+
+
+@implementation KSButtonStatusView
+
+- (instancetype)init {
+    self = [super init];
+    if (self) {
+        
+        _imgView = [[UIImageView alloc] init];
+        [_imgView sizeToFit];
+        [self addSubview:_imgView];
+        [_imgView mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.top.mas_equalTo(self.mas_top).offset(10);
+            make.centerX.mas_equalTo(self.mas_centerX);
+        }];
+        
+        _desLabel = [[UILabel alloc] init];
+        _desLabel.font = [UIFont systemFontOfSize:15.0f];
+        _desLabel.textColor = HexRGB(0x999999);
+        _desLabel.textAlignment = NSTextAlignmentCenter;
+        _desLabel.numberOfLines = 1;
+        [self addSubview:_desLabel];
+        [_desLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(self.mas_centerX);
+            make.top.mas_equalTo(_imgView.mas_bottom).offset(21);
+            make.width.mas_equalTo(280);
+            make.height.mas_equalTo(27);
+        }];
+       
+        
+        _sureButton = [UIButton buttonWithType:UIButtonTypeCustom];
+        _sureButton.backgroundColor = THEMECOLOR;
+        [_sureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        [_sureButton.titleLabel setFont:[UIFont systemFontOfSize:18.0f]];
+        [_sureButton addTarget:self action:@selector(sureButtonClick:) forControlEvents:UIControlEventTouchUpInside];
+        _sureButton.layer.cornerRadius = 22.0f;
+        [self addSubview:_sureButton];
+        [_sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(self.mas_centerX);
+            make.top.mas_equalTo(_desLabel.mas_bottom).offset(25);
+            make.width.mas_equalTo(200);
+            make.height.mas_equalTo(44);
+        }];
+    }
+    return self;
+}
+
+- (void)buttonClickCallback:(StatusViewCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+}
+
+- (void)sureButtonClick:(UIButton *)sender {
+    if (self.callback) {
+        self.callback();
+    }
+}
+
+-(void)setText:(NSString *)strText
+{
+    _desLabel.text = strText;
+    [_desLabel sizeToFit];
+}
+
+- (void)setImageName:(NSString *)imageName {
+    _imageName = imageName;
+    UIImage *image = [UIImage imageNamed:imageName];
+    [_imgView setImage:image];
+}
+
+- (void)setButtonTitle:(NSString *)buttonTitle {
+    _buttonTitle = buttonTitle;
+    if ([NSString isEmptyString:buttonTitle]) {
+        _sureButton.hidden = YES;
+    }
+    else {
+        _sureButton.hidden = NO;
+        [_sureButton setTitle:buttonTitle forState:UIControlStateNormal];
+    }
+    
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 29 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -15,6 +15,8 @@
 #import "HomeworkListViewController.h"
 #import "EvaluateCourseListViewController.h"
 #import "NotiferMessageViewController.h"
+#import "UserInfoManager.h"
+#import "TeacherInfo.h"
 
 @interface HomeViewController ()
 
@@ -24,6 +26,8 @@
 
 @property (nonatomic, strong) HomeBodyView *bodyView;
 
+@property (nonatomic, strong) TeacherInfo *mineInfo;
+
 @end
 
 @implementation HomeViewController
@@ -35,7 +39,27 @@
     [self configUI];
 }
 
-//- ()
+- (void)requestUserInfo {
+    [KSNetworkingManager queryTeacherInfoRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+        if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+            self.mineInfo = [[TeacherInfo alloc] initWithDictionary:[dic dictionaryValueForKey:@"data"]];
+            NSString *rongToken = UserDefault(RongTokenKey);
+            if ([NSString isEmptyString:rongToken]) {
+                [USER_MANAGER queryUserInfoConnectRongCloud:YES];
+            }
+            [self refreshView];
+        }
+        else {
+            [self MBPShow:MESSAGEKEY];
+        }
+    } faliure:^(NSError * _Nonnull error) {
+        
+    }];
+}
+
+- (void)refreshView {
+    [self.headView configMessage:self.mineInfo];
+}
 
 - (void)configUI {
     UIImage *bgImage = [UIImage imageNamed:@"home_bg"];
@@ -76,7 +100,10 @@
     }];
 }
 
-
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self requestUserInfo];
+}
 
 #pragma mark ----- lazying
 

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/EvaluateCourse/Controller/EvaluateCourseListViewController.m

@@ -117,6 +117,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkListViewController.m

@@ -118,6 +118,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 

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

@@ -132,6 +132,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 

+ 16 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Controller/MyCourseViewController.m

@@ -59,11 +59,12 @@
         id view = self.listViewArray[index];
         if ([view isKindOfClass:[MyLessonBodyView class]]) {
             MyLessonBodyView *courseView = (MyLessonBodyView *)view;
-            courseView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            courseView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+            courseView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else if ([view isKindOfClass:[MyVideoCourseBodyView class]]) {
             MyVideoCourseBodyView *videoCourseView = (MyVideoCourseBodyView *)view;
-            videoCourseView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            videoCourseView.teaherStatus = self.teacherInfo.entryStatus;
         }
     }
 }
@@ -154,10 +155,10 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else {
-            listView.teaherAuth = YES;
+            listView.teaherStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;
@@ -169,10 +170,12 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else {
-            listView.teaherAuth = YES;
+            listView.liveFlag = YES;
+            listView.teaherStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;
@@ -183,6 +186,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[KSJXBodyView class]]) {
+            KSJXBodyView *listView = (KSJXBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.h

@@ -14,7 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MyLessonBodyView : KSJXBodyView
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *teaherStatus;
+
+@property (nonatomic, assign) BOOL liveFlag; // 是否有直播权限
 
 @end
 

+ 91 - 12
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m

@@ -51,6 +51,8 @@
 
 @property (nonatomic, strong) NSMutableArray *subjectMessageArray;
 
+@property (nonatomic, assign) BOOL teacherAuthPass;  // 是否通过老师审核
+
 @end
 
 @implementation MyLessonBodyView
@@ -120,7 +122,7 @@
     
     self.dataArray = [NSMutableArray array];
     [self.tableView.mj_footer resetNoMoreData];
-    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.tableView];
+    [self setPromptString:@"暂无课程" imageName:@"wd_img_zwsj" inView:self.tableView];
     [self.tableView reloadData];
 }
 
@@ -225,7 +227,7 @@
         [self.sortView.firstButton setTitle:[self.dateFormatter stringFromDate:currentDate] forState:UIControlStateNormal];
         [self addSubview:self.sortView];
     }
-    if (self.teaherAuth == NO) {
+    if (self.teacherAuthPass == NO) {
         [self showAuthView];
     }
     else {
@@ -522,9 +524,29 @@
     }
     return _dateFormatter;
 }
-- (void)setTeaherAuth:(BOOL)teaherAuth {
-    _teaherAuth = teaherAuth;
-    if (teaherAuth == NO) {
+
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    if ([teaherStatus isEqualToString:@"UNPAALY"]) { // 未申请
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"UNPASS"]) {  // 不通过
+        self.teacherAuthPass = NO;
+    }
+    else  {
+        self.teacherAuthPass = YES;
+    }
+    
+    // 如果
+    if (self.selectIndex == 1) { // 直播课
+        if (self.liveFlag == NO) { // 无直播权限直接改成未通过
+            self.teacherAuthPass = NO;
+        }
+    }
+    if (self.teacherAuthPass == NO) {
         [self showAuthView];
     }
     else {
@@ -532,7 +554,37 @@
     }
 }
 
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if (self.selectIndex == 0) { // 陪练课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) {
+            self.authView.sureButton.userInteractionEnabled = NO;
+            self.authView.sureButton.hidden = YES;
+        }
+        else {
+            self.authView.sureButton.userInteractionEnabled = YES;
+            self.authView.sureButton.hidden = NO;
+        }
+    }
+    else { // 直播课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) {
+            self.authView.sureButton.userInteractionEnabled = NO;
+            self.authView.sureButton.hidden = YES;
+        }
+        else {
+            if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) {
+                [self.authView.sureButton setTitle:@"立即开通" forState:UIControlStateNormal];
+            }
+            else {
+                [self.authView.sureButton setTitle:@"去认证" forState:UIControlStateNormal];
+            }
+            self.authView.sureButton.userInteractionEnabled = YES;
+            self.authView.sureButton.hidden = NO;
+        }
+    }
+}
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -574,19 +626,46 @@
 }
 
 - (NSString *)getAuthDisplayMessage {
-    if (self.selectIndex == 0) {
-        return @"您还没有完成老师认证,认证后才可设置陪练课哦~";
+    if (self.selectIndex == 0) { // 陪练课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+            return @"您已提交认证申请,请耐心等待审核结果~";
+        }
+        else {
+            return @"您还没有完成老师认证,认证后才可设置陪练课哦~";
+        }
     }
-    else {
-        return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+    else { // 直播课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+            return @"您已提交认证申请,请耐心等待审核结果~";
+        }
+        else {
+            if ([self.teaherStatus isEqualToString:@"PASS"] && self.liveFlag == NO) { // 如果老师认证通过
+                return @"您尚未开通直播服务,开通后即可创建直播课程~";
+            }
+            return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+        }
     }
     
 }
 
 - (void)authAction {
-    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
-    [self.naviController pushViewController:webCtrl animated:YES];
+    if (self.selectIndex == 0) {
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
+        [self.naviController pushViewController:webCtrl animated:YES];
+    }
+    else  {
+        if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) { // 开通直播
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/openLive"];
+            [self.naviController pushViewController:webCtrl animated:YES];
+        }
+        else {
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
+            [self.naviController pushViewController:webCtrl animated:YES];
+        }
+    }
 }
 /*
 // Only override drawRect: if you perform custom drawing.

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.h

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface MyVideoCourseBodyView : kSJXCollectionView
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *teaherStatus;
 
 @end
 

+ 39 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyVideoCourseBodyView.m

@@ -38,6 +38,8 @@
 
 @property (nonatomic, strong) NewClassPopView *popView;
 
+@property (nonatomic, assign) BOOL authStatus;
+
 @end
 
 @implementation MyVideoCourseBodyView
@@ -107,14 +109,6 @@
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
             }
-//                        for (int i = 0 ; i < 10; i++) {
-//                            VideoCourseModel *model = [[VideoCourseModel alloc] init];
-//                            model.username = @"hahahha";
-//                            model.lessonName = @"小夜曲";
-//                            model.lessonPrice = 5.0;
-//                            model.purchaseCount = 88;
-//                            [self.dataArray addObject:model];
-//                        }
             
             if (sourceArray.count < self.rows) {
                 self.isLoadMore = NO;
@@ -168,7 +162,7 @@
 
         [self addSubview:self.sortView];
     }
-    if (self.teaherAuth == NO) {
+    if (self.authStatus == NO) {
         [self showAuthView];
     }
     else {
@@ -285,8 +279,38 @@
     return _dataArray;
 }
 
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    
+    if ([teaherStatus isEqualToString:@"PASS"]) {
+        self.authStatus = YES;
+    }
+    else {
+        self.authStatus = NO;
+    }
+    
+    if (self.authStatus == NO) {
+        [self showAuthView];
+    }
+    else {
+        [self hideAuthView];
+    }
+}
+
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
 
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -323,7 +347,12 @@
 }
 
 - (NSString *)getAuthDisplayMessage {
-    return @"您还没有完成老师认证,认证后才可创建视频课哦~";
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+    }
 }
 
 - (void)authAction {

+ 15 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.m

@@ -7,10 +7,12 @@
 
 #import "HomeHeadView.h"
 #import "KSStarView.h"
+#import "UserInfoManager.h"
 
 @interface HomeHeadView ()
 
 @property (weak, nonatomic) IBOutlet UIView *authView;
+@property (weak, nonatomic) IBOutlet UILabel *authLabel;
 
 @property (weak, nonatomic) IBOutlet UIView *descView;
 
@@ -50,6 +52,18 @@
         self.authView.hidden = NO;
         self.descView.hidden = YES;
         self.tipsButton.hidden = NO;
+        if (USER_MANAGER.hiddenTipsButton) {
+            self.tipsButton.hidden = YES;
+        }
+        else {
+            self.tipsButton.hidden = NO;
+        }
+        if ([infoMessage.entryStatus isEqualToString:@"DOING"]) {
+            self.authLabel.text = @"审核中";
+        }
+        else {
+            self.authLabel.text = @"认证老师";
+        }
     }
     self.starView.rate = infoMessage.starGrade / 5.0f;
     
@@ -90,6 +104,7 @@
 
 - (IBAction)hideTipsButton:(id)sender {
     self.tipsButton.hidden = YES;
+    USER_MANAGER.hiddenTipsButton = YES;
 }
 
 /*

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeHeadView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="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="19519"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -275,6 +275,7 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="authLabel" destination="FCe-w1-PSG" id="Fv0-jI-5fQ"/>
                 <outlet property="authView" destination="ixV-E1-X1x" id="oX1-jX-LfE"/>
                 <outlet property="descView" destination="QKO-WL-PjF" id="Rty-dp-jnV"/>
                 <outlet property="fansCount" destination="Xs4-YK-GXn" id="fzy-e9-IbW"/>

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.h

@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL hasAuth;
 
+@property (nonatomic, assign) BOOL hiddenTipsButton;
+
 
 + (instancetype)shareInstance;
 

+ 28 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/Controller/MyLiveCourseViewController.m

@@ -31,7 +31,7 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     [self allocTitle:@"直播课"];
-    _titles = @[@"进行中",@"未上架",@"销售中",@"已完成"];
+    _titles = @[@"进行中",@"未上架",@"销售中",@"已完成",@"已取消"];
     [self configUI];
 }
 
@@ -89,15 +89,26 @@
         id view = self.listViewArray[index];
         if ([view isKindOfClass:[MyLiveCourseBodyView class]]) {
             MyLiveCourseBodyView *listView = (MyLiveCourseBodyView *)view;
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
     }
 }
 
 - (void)rightBtnClick {
-    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/liveCreate"];
-    [self.navigationController pushViewController:webCtrl animated:YES];
+    // 判断
+    if ([self.teacherInfo.entryStatus isEqualToString:@"PASS"] && [self.teacherInfo.liveFlag isEqualToString:@"1"]) {
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/liveCreate"];
+        [self.navigationController pushViewController:webCtrl animated:YES];
+    }
+    else if (![self.teacherInfo.entryStatus isEqualToString:@"PASS"]) {
+        [self MBPShow:@"您还没有完成老师认证,认证后才可创建直播课哦~"];
+    }
+    else if ([self.teacherInfo.entryStatus isEqualToString:@"PASS"] && [self.teacherInfo.liveFlag isEqualToString:@"0"]) {
+        [self MBPShow:@"您尚未开通直播服务 开通后即可设置直播课~"];
+    }
+    
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -152,10 +163,12 @@
     self.listViewArray[index] = listView;
     listView.selectIndex = index;
     if (self.teacherInfo) {
-        listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+        listView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+        listView.teaherStatus = self.teacherInfo.entryStatus;
     }
     else {
-        listView.teaherAuth = YES;
+        listView.liveFlag = YES;
+        listView.teaherStatus = @"PASS";
     }
     [listView beginFirstRefresh];
     return listView;
@@ -164,6 +177,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[MyLiveCourseBodyView class]]) {
+            MyLiveCourseBodyView *listView = (MyLiveCourseBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 
@@ -180,7 +200,7 @@
 
 - (NSMutableArray *)listViewArray {
     if (!_listViewArray) {
-        _listViewArray = [NSMutableArray arrayWithArray:@[@"",@"",@"",@""]];
+        _listViewArray = [NSMutableArray arrayWithArray:@[@"",@"",@"",@"",@""]];
     }
     return _listViewArray;
 }

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.h

@@ -6,15 +6,16 @@
 //
 
 #import "KSJXBodyView.h"
-#import "StateView.h"
+#import "KSButtonStatusView.h"
 #import "Reachability.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MyLiveCourseBodyView : KSJXBodyView
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *teaherStatus;
 
+@property (nonatomic, assign) BOOL liveFlag; // 是否有直播权限
 @end
 
 NS_ASSUME_NONNULL_END

+ 107 - 19
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m

@@ -15,7 +15,7 @@
 
 @property (nonatomic, strong) NSMutableArray *dataArray;
 
-@property (nonatomic, strong) StateView *promptView;
+@property (nonatomic, strong) KSButtonStatusView *promptView;
 @property (nonatomic, strong) UIView *promptPlaceView;
 
 @property (nonatomic, assign) BOOL networkAvaiable; // 网络是否可用
@@ -28,6 +28,8 @@
 
 @property (nonatomic, strong) AuthDisplayView *authView;
 
+@property (nonatomic, assign) BOOL teacherAuthPass;  // 是否通过老师审核
+
 @end
 
 @implementation MyLiveCourseBodyView
@@ -36,7 +38,7 @@
     self = [super initWithFrame:frame];
     if (self) {
         self.backgroundColor = HexRGB(0xf6f8f9);
-        self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) style:UITableViewStylePlain];
+        self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
         self.tableView.backgroundColor = HexRGB(0xf6f8f9);
         self.tableView.showsVerticalScrollIndicator = NO;
         self.tableView.rowHeight = 110.0f;
@@ -44,7 +46,9 @@
         self.tableView.delegate = self;
         self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
         [self addSubview:self.tableView];
-        
+        [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.bottom.top.mas_equalTo(self);
+        }];
         
         UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
         headView.backgroundColor = HexRGB(0xf6f8f9);
@@ -84,9 +88,12 @@
     else if (self.selectIndex == 2) {
         self.groupStatus = @"APPLY";
     }
-    else {
+    else if (self.selectIndex == 3) {
         self.groupStatus = @"COMPLETE";
     }
+    else {
+        self.groupStatus = @"CANCEL";
+    }
 }
 
 - (void)endRefresh {
@@ -108,10 +115,29 @@
     [self configRequestStatus];
     self.dataArray = [NSMutableArray array];
     [self.tableView.mj_footer resetNoMoreData];
-    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.tableView];
+    [self setPromptString:[self getEmptyMessage] imageName:@"authTeacher_Live" buttonTitle:@"立即创建" inView:self.tableView];
+    
     [self.tableView reloadData];
 }
 
+- (NSString *)getEmptyMessage {
+    if (self.selectIndex == 0) {
+        return @"暂无进行中直播课程";
+    }
+    else if (self.selectIndex == 1) {
+        return @"暂无未上架直播课程";
+    }
+    else if (self.selectIndex == 2) {
+        return @"暂无销售中直播课程";
+    }
+    else if (self.selectIndex == 3) {
+        return @"暂无已完成直播课程";
+    }
+    else {
+        return @"暂无已取消直播课程";
+    }
+}
+
 - (void)requestData {
     [KSNetworkingManager LiveCourseGroupRequest:KS_POST groupStatus:self.groupStatus page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
@@ -134,7 +160,7 @@
     } faliure:^(NSError * _Nonnull error) {
         [self endRefresh];
         if (self.networkAvaiable == NO) {
-            [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
+            [self setPromptString:@"暂无网络" imageName:@"no_networking" buttonTitle:@"" inView:self.tableView];
         }
         [self.dataArray removeAllObjects];
         [self.tableView reloadData];
@@ -167,8 +193,7 @@
 
 - (void)layoutSubviews {
     [super layoutSubviews];
-    self.tableView.frame = self.bounds;
-    if (self.teaherAuth == NO) {
+    if (self.teacherAuthPass == NO) {
         [self showAuthView];
     }
     else {
@@ -210,20 +235,33 @@
  @param imgName 图片名称
  @param view 显示在什么地方
  */
-- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName inView:(UIView *)view {
+- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName buttonTitle:(NSString *)buttonTitle inView:(UIView *)view {
     if (self.promptView != nil) {
         [self.promptView removeFromSuperview];
     }
     else {
-        self.promptView = [[StateView alloc]init];
-        self.promptView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 300);
+        self.promptView = [[KSButtonStatusView alloc] init];
     }
     _promptPlaceView = view;
     //当请求不到数据时 ,自定义提示view 将会出现;
     self.promptView.imageName = imgName;
     self.promptView.alpha = 0.0f;
     [self.promptView setText:promptString];
+    [self.promptView setButtonTitle:buttonTitle];
+    MJWeakSelf;
+    [self.promptView buttonClickCallback:^{
+        [weakSelf emptyButtonAction];
+    }];
     [view addSubview:self.promptView];
+    [self.promptView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self);
+    }];
+}
+
+- (void)emptyButtonAction {
+    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/liveCreate"];
+    [self.naviController pushViewController:webCtrl animated:YES];
 }
 
 // 结束刷新后调用方法
@@ -273,9 +311,24 @@
     return _dataArray;
 }
 
-- (void)setTeaherAuth:(BOOL)teaherAuth {
-    _teaherAuth = teaherAuth;
-    if (teaherAuth == NO) {
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    if ([teaherStatus isEqualToString:@"UNPAALY"]) { // 未申请
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"UNPASS"]) {  // 不通过
+        self.teacherAuthPass = NO;
+    }
+    else  {
+        self.teacherAuthPass = YES;
+    }
+    if (self.liveFlag == NO) { // 无直播权限直接改成未通过
+        self.teacherAuthPass = NO;
+    }
+    if (self.teacherAuthPass == NO) {
         [self showAuthView];
     }
     else {
@@ -283,7 +336,27 @@
     }
 }
 
+
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) {
+            [self.authView.sureButton setTitle:@"立即开通" forState:UIControlStateNormal];
+        }
+        else {
+            [self.authView.sureButton setTitle:@"去认证" forState:UIControlStateNormal];
+        }
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
+
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -306,7 +379,6 @@
     if (!_authView) {
         _authView = [AuthDisplayView shareInstance];
         [_authView.imageView setImage:[UIImage imageNamed:[self getAuthDisplayImage]]];
-        [_authView configDisplayMessage:[self getAuthDisplayMessage]];
         MJWeakSelf;
         [_authView sureCallback:^{
             [weakSelf authAction];
@@ -320,13 +392,29 @@
 }
 
 - (NSString *)getAuthDisplayMessage {
-    return @"您还没有完成老师认证,认证后才可创建视频课哦~";
+    if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        if ([self.teaherStatus isEqualToString:@"PASS"] && self.liveFlag == NO) { // 如果老师认证通过
+            return @"您尚未开通直播服务,开通后即可创建直播课程~";
+        }
+        return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+    }
 }
 
 - (void)authAction {
-    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
-    [self.naviController pushViewController:webCtrl animated:YES];
+    if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) { // 开通直播
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/openLive"];
+        [self.naviController pushViewController:webCtrl animated:YES];
+    }
+    else {
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
+        [self.naviController pushViewController:webCtrl animated:YES];
+    }
+    
 }
 /*
 // Only override drawRect: if you perform custom drawing.

+ 14 - 11
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/Controller/MinePageViewController.m

@@ -101,12 +101,13 @@
         id view = self.listViewArray[index];
         if ([view isKindOfClass:[MinePageCourseView class]]) {
             MinePageCourseView *courseView = (MinePageCourseView *)view;
-            courseView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
-            courseView.musicianAuthStatus = [self.teacherInfo.musicianAuthStatus isEqualToString:@"PASS"] ? YES : NO;
+            courseView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+            courseView.teaherStatus = self.teacherInfo.entryStatus;
+            courseView.musicianStatus = self.teacherInfo.musicianAuthStatus;
         }
         else if ([view isKindOfClass:[MinePageVideoView class]]) {
             MinePageVideoView *videoCourseView = (MinePageVideoView *)view;
-            videoCourseView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            videoCourseView.teaherStatus = self.teacherInfo.entryStatus;
         }
     }
 }
@@ -177,10 +178,10 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else {
-            listView.teaherAuth = YES;
+            listView.teaherStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;
@@ -192,10 +193,12 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.liveFlag = [self.teacherInfo.liveFlag isEqualToString:@"1"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else {
-            listView.teaherAuth = YES;
+            listView.liveFlag = YES;
+            listView.teaherStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;
@@ -207,10 +210,10 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.musicianAuthStatus = [self.teacherInfo.musicianAuthStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.musicianStatus = self.teacherInfo.musicianAuthStatus;
         }
         else {
-            listView.musicianAuthStatus = YES;
+            listView.musicianStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;
@@ -222,10 +225,10 @@
         self.listViewArray[index] = listView;
         listView.selectIndex = index;
         if (self.teacherInfo) {
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
         else {
-            listView.teaherAuth = YES;
+            listView.teaherStatus = @"PASS";
         }
         [listView beginFirstRefresh];
         return listView;

+ 3 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.h

@@ -14,10 +14,11 @@ NS_ASSUME_NONNULL_BEGIN
 /// 陪练课、直播课、乐谱page
 @interface MinePageCourseView : KSJXBodyView
 
+@property (nonatomic, strong) NSString *teaherStatus;
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *musicianStatus;
 
-@property (nonatomic, assign) BOOL musicianAuthStatus;
+@property (nonatomic, assign) BOOL liveFlag; // 是否有直播权限
 
 @end
 

+ 151 - 25
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m

@@ -35,6 +35,10 @@
 
 @property (nonatomic, strong) MinePageSubmitView *uploadView;
 
+@property (nonatomic, assign) BOOL teacherAuthPass;  // 是否通过老师审核
+
+@property (nonatomic, assign) BOOL musicianPass; // 是否通过音乐人审核
+
 @end
 
 @implementation MinePageCourseView
@@ -224,7 +228,7 @@
     if (![self.subviews containsObject:self.uploadView]) {
         [self addSubview:self.uploadView];
         if (self.selectIndex == 1 || self.selectIndex == 2) {
-            if (self.teaherAuth == NO) {
+            if (self.teacherAuthPass == NO) {
                 [self showAuthView];
             }
             else {
@@ -232,7 +236,7 @@
             }
         }
         else if (self.selectIndex == 4) {
-            if (self.musicianAuthStatus == NO) {
+            if (self.musicianPass == NO) {
                 [self showAuthView];
             }
             else {
@@ -408,8 +412,31 @@
 }
 
 #pragma mark ----- lazying
-- (void)setTeaherAuth:(BOOL)teaherAuth {
-    _teaherAuth = teaherAuth;
+
+
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    
+    if ([teaherStatus isEqualToString:@"UNPAALY"]) { // 未申请
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"DOING"]) { // 审核中
+        self.teacherAuthPass = NO;
+    }
+    else if ([teaherStatus isEqualToString:@"UNPASS"]) {  // 不通过
+        self.teacherAuthPass = NO;
+    }
+    else  {
+        self.teacherAuthPass = YES;
+    }
+    
+    // 如果
+    if (self.selectIndex == 2) { // 直播课
+        if (self.liveFlag == NO) { // 无直播权限直接改成未通过
+            self.teacherAuthPass = NO;
+        }
+    }
+    
     if (self.selectIndex == 1) {
         self.uploadView.type = MINEPAGETYPE_ACCOMPANY;
     }
@@ -417,7 +444,34 @@
         self.uploadView.type = MINEPAGETYPE_LIVE;
     }
     if (self.selectIndex == 1 || self.selectIndex == 2) {
-        if (teaherAuth == NO) {
+        if (self.teacherAuthPass == NO) {
+            [self showAuthView];
+        }
+        else {
+            [self hideAuthView];
+        }
+    }
+}
+
+- (void)setMusicianStatus:(NSString *)musicianStatus {
+    _musicianStatus = musicianStatus;
+    if ([musicianStatus isEqualToString:@"UNPAALY"]) { // 未申请
+        self.musicianPass = NO;
+    }
+    else if ([musicianStatus isEqualToString:@"DOING"]) { // 审核中
+        self.musicianPass = NO;
+    }
+    else if ([musicianStatus isEqualToString:@"UNPASS"]) {  // 不通过
+        self.musicianPass = NO;
+    }
+    else {
+        self.musicianPass = YES;
+    }
+    if (self.selectIndex == 4) {
+        self.uploadView.type = MINEPAGETYPE_MUSIC;
+    }
+    if (self.selectIndex == 4) {
+        if (self.musicianPass == NO) {
             [self showAuthView];
         }
         else {
@@ -427,6 +481,7 @@
 }
 
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -438,6 +493,48 @@
     }
 }
 
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if (self.selectIndex == 1) { // 陪练课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) {
+            self.authView.sureButton.userInteractionEnabled = NO;
+            self.authView.sureButton.hidden = YES;
+        }
+        else {
+            self.authView.sureButton.userInteractionEnabled = YES;
+            self.authView.sureButton.hidden = NO;
+        }
+    }
+    else if (self.selectIndex == 2) { // 直播课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) {
+            self.authView.sureButton.userInteractionEnabled = NO;
+            self.authView.sureButton.hidden = YES;
+        }
+        else {
+            if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) {
+                [self.authView.sureButton setTitle:@"立即开通" forState:UIControlStateNormal];
+            }
+            else {
+                [self.authView.sureButton setTitle:@"去认证" forState:UIControlStateNormal];
+            }
+            self.authView.sureButton.userInteractionEnabled = YES;
+            self.authView.sureButton.hidden = NO;
+        }
+    }
+    else { // 曲谱
+        if ([self.musicianStatus isEqualToString:@"DOING"]) {
+            self.authView.sureButton.userInteractionEnabled = NO;
+            self.authView.sureButton.hidden = YES;
+        }
+        else {
+            
+            self.authView.sureButton.userInteractionEnabled = YES;
+            self.authView.sureButton.hidden = NO;
+        }
+    }
+    
+}
+
 
 - (void)hideAuthView {
     if ([self.subviews containsObject:self.authView]) {
@@ -446,20 +543,7 @@
     }
 }
 
-- (void)setMusicianAuthStatus:(BOOL)musicianAuthStatus {
-    _musicianAuthStatus = musicianAuthStatus;
-    if (self.selectIndex == 4) {
-        self.uploadView.type = MINEPAGETYPE_MUSIC;
-    }
-    if (self.selectIndex == 4) {
-        if (musicianAuthStatus == NO) {
-            [self showAuthView];
-        }
-        else {
-            [self hideAuthView];
-        }
-    }
-}
+
 
 - (MinePageSubmitView *)uploadView {
     if (!_uploadView) {
@@ -504,7 +588,7 @@
 - (AuthDisplayView *)authView {
     if (!_authView) {
         _authView = [AuthDisplayView shareInstance];
-        [_authView configDisplayMessage:[self getAuthDisplayMessage]];
+        [_authView.imageView setImage:[UIImage imageNamed:[self getAuthDisplayImage]]];
         MJWeakSelf;
         [_authView sureCallback:^{
             [weakSelf authAction];
@@ -513,23 +597,65 @@
     return _authView;
 }
 
-- (NSString *)getAuthDisplayMessage {
+- (NSString *)getAuthDisplayImage {
     if (self.selectIndex == 1) {
-        return @"您还没有完成老师认证,认证后才可设置陪练课哦~";
+        return @"authTeacher_accompany";
     }
     else if (self.selectIndex == 2) {
-        return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+        return @"authTeacher_Live";
     }
     else {
-        return @"您还没有完成音乐人认证,认证后才可上传曲谱哦~";
+        return @"authMuscian";
+    }
+}
+
+- (NSString *)getAuthDisplayMessage {
+    if (self.selectIndex == 1) { // 陪练课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+            return @"您已提交认证申请,请耐心等待审核结果~";
+        }
+        else {
+            return @"您还没有完成老师认证,认证后才可设置陪练课哦~";
+        }
+    }
+    else if (self.selectIndex == 2) { // 直播课
+        if ([self.teaherStatus isEqualToString:@"DOING"]) { // 审核中
+            return @"您已提交认证申请,请耐心等待审核结果~";
+        }
+        else {
+            if ([self.teaherStatus isEqualToString:@"PASS"] && self.liveFlag == NO) { // 如果老师认证通过
+                return @"您尚未开通直播服务,开通后即可创建直播课程~";
+            }
+            return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+        }
+    }
+    else { // 曲谱
+        if ([self.musicianStatus isEqualToString:@"DOING"]) { // 审核中
+            return @"您已提交认证申请,请耐心等待审核结果~";
+        }
+        else {
+            return @"您还没有完成音乐人认证,认证后才可上传曲谱哦~";
+        }
     }
 }
 - (void)authAction {
-    if (self.selectIndex == 1 || self.selectIndex == 2) {
+    if (self.selectIndex == 1) {
         KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
         webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
         [self.naviController pushViewController:webCtrl animated:YES];
     }
+    else if (self.selectIndex == 2) {
+        if ([self.teaherStatus isEqual:@"PASS"] && self.liveFlag == NO) { // 开通直播
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/openLive"];
+            [self.naviController pushViewController:webCtrl animated:YES];
+        }
+        else {
+            KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+            webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];
+            [self.naviController pushViewController:webCtrl animated:YES];
+        }
+    }
     else {
         KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
         webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/musicCert"];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.h

@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
 /// 视频课table
 @interface MinePageVideoView : kSJXCollectionView
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *teaherStatus;
 
 @end
 

+ 37 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageVideoView.m

@@ -31,6 +31,8 @@
 
 @property (nonatomic, strong) AuthDisplayView *authView;
 
+@property (nonatomic, assign) BOOL authStatus;
+
 @end
 
 @implementation MinePageVideoView
@@ -152,7 +154,7 @@
     self.collectionView.frame = CGRectMake(0, topHeight, self.bounds.size.width, self.bounds.size.height - topHeight);
     if (![self.subviews containsObject:self.uploadView]) {
         [self addSubview:self.uploadView];
-        if (self.teaherAuth == NO) {
+        if (self.authStatus == NO) {
             [self showAuthView];
         }
         else {
@@ -257,10 +259,17 @@
 }
 
 #pragma mark ----- lazying
-- (void)setTeaherAuth:(BOOL)teaherAuth {
-    _teaherAuth = teaherAuth;
-    self.uploadView.type = MINEPAGETYPE_ACCOMPANY;
-    if (teaherAuth == NO) {
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    
+    if ([teaherStatus isEqualToString:@"PASS"]) {
+        self.authStatus = YES;
+    }
+    else {
+        self.authStatus = NO;
+    }
+    
+    if (self.authStatus == NO) {
         [self showAuthView];
     }
     else {
@@ -268,7 +277,29 @@
     }
 }
 
+
+- (NSString *)getAuthDisplayMessage {
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        return @"您还没有完成老师认证,认证后才可创建视频课哦~";
+    }
+}
+
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -302,7 +333,7 @@
 - (AuthDisplayView *)authView {
     if (!_authView) {
         _authView = [AuthDisplayView shareInstance];
-        [_authView configDisplayMessage:@"您还没有完成老师认证,认证后才可创建视频课哦~"];
+        [_authView.imageView setImage:[UIImage imageNamed:@"authTeacher_accompany"]];
         MJWeakSelf;
         [_authView sureCallback:^{
             [weakSelf authAction];

+ 19 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Controller/VideoCourseViewController.m

@@ -89,16 +89,22 @@
         id view = self.listViewArray[index];
         if ([view isKindOfClass:[VideoListBodyView class]]) {
             VideoListBodyView *listView = (VideoListBodyView *)view;
-            listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+            listView.teaherStatus = self.teacherInfo.entryStatus;
         }
     }
 }
 
 
 - (void)rightBtnClick { // 创建视频课
-    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
-    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/videoCreate"];
-    [self.navigationController pushViewController:webCtrl animated:YES];
+    if ([self.teacherInfo.entryStatus isEqualToString:@"PASS"]) {
+        KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+        webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/videoCreate"];
+        [self.navigationController pushViewController:webCtrl animated:YES];
+    }
+    else {
+        [self MBPShow:@"您还没有完成老师认证,认证后才可创建直播课哦~"];
+    }
+    
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -153,10 +159,10 @@
     self.listViewArray[index] = listView;
     listView.selectIndex = index;
     if (self.teacherInfo) {
-        listView.teaherAuth = [self.teacherInfo.entryStatus isEqualToString:@"PASS"] ? YES : NO;
+        listView.teaherStatus = self.teacherInfo.entryStatus;
     }
     else {
-        listView.teaherAuth = YES;
+        listView.teaherStatus = @"PASS";
     }
     [listView beginFirstRefresh];
     return listView;
@@ -165,6 +171,13 @@
 #pragma mark - JXCategoryViewDelegate
 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
     self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
+    if (self.listViewArray.count > index) {
+        id value = self.listViewArray[index];
+        if ([value isKindOfClass:[VideoListBodyView class]]) {
+            VideoListBodyView *listView = (VideoListBodyView *)value;
+            [listView beginFirstRefresh];
+        }
+    }
 }
 
 

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/View/VideoListBodyView.h

@@ -6,7 +6,7 @@
 //
 
 #import "kSJXCollectionView.h"
-#import "StateView.h"
+#import "KSButtonStatusView.h"
 #import "Reachability.h"
 
 
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface VideoListBodyView : kSJXCollectionView
 
-@property (nonatomic, assign) BOOL teaherAuth;
+@property (nonatomic, strong) NSString *teaherStatus;
 
 @end
 

+ 74 - 24
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/View/VideoListBodyView.m

@@ -15,7 +15,7 @@
 
 @property (nonatomic, strong) NSMutableArray *dataArray;
 
-@property (nonatomic, strong) StateView *promptView;
+@property (nonatomic, strong) KSButtonStatusView *promptView;
 @property (nonatomic, strong) UIView *promptPlaceView;
 
 @property (nonatomic, assign) BOOL networkAvaiable; // 网络是否可用
@@ -27,6 +27,9 @@
 @property (nonatomic, strong) NSString *audioStatus; // 审核状态(0:待审核;1:通过;2:未通过)
 
 @property (nonatomic, strong) AuthDisplayView *authView;
+
+@property (nonatomic, assign) BOOL authStatus;
+
 @end
 
 @implementation VideoListBodyView
@@ -38,7 +41,7 @@
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
         layout.sectionInset = UIEdgeInsetsMake(12, 14, 12, 14);
         
-        self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) collectionViewLayout:layout];
+        self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
         self.collectionView.backgroundColor = HexRGB(0xf6f8f9);
         self.collectionView.delegate = self;
         self.collectionView.dataSource = self;
@@ -46,6 +49,10 @@
         self.collectionView.showsHorizontalScrollIndicator = NO;
         [self.collectionView registerNib:[UINib nibWithNibName:@"VideoCourseCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"VideoCourseCell"];
         [self addSubview:self.collectionView];
+        [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.bottom.top.mas_equalTo(self);
+        }];
+        
         MJWeakSelf;
         self.collectionView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
             [weakSelf resetParamenter];
@@ -91,10 +98,22 @@
     }
     self.dataArray = [NSMutableArray array];
     [self.collectionView.mj_footer resetNoMoreData];
-    [self setPromptString:@"暂无内容" imageName:@"wd_img_zwsj" inView:self.collectionView];
+    [self setPromptString:[self getEmptyMessage] imageName:@"empty_videoCourse" buttonTitle:@"立即创建" inView:self.collectionView];
     [self.collectionView reloadData];
 }
 
+- (NSString *)getEmptyMessage {
+    if (self.selectIndex == 0) {
+        return @"暂无已上架视频课程";
+    }
+    else if (self.selectIndex == 1) {
+        return @"暂无审核中视频课程";
+    }
+    else  {
+        return @"暂无审核失败视频课程";
+    }
+}
+
 - (void)requestData {
     [KSNetworkingManager videoLessonListRequest:KS_POST lessonSubject:nil auditStatus:self.audioStatus pageNo:self.pages pageSize:self.rows success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
@@ -104,14 +123,6 @@
                 VideoCourseModel *model = [[VideoCourseModel alloc] initWithDictionary:parm];
                 [self.dataArray addObject:model];
             }
-//                        for (int i = 0 ; i < 10; i++) {
-//                            VideoCourseModel *model = [[VideoCourseModel alloc] init];
-//                            model.username = @"hahahha";
-//                            model.lessonName = @"小夜曲";
-//                            model.lessonPrice = 5.0;
-//                            model.purchaseCount = 88;
-//                            [self.dataArray addObject:model];
-//                        }
             
             if (sourceArray.count < self.rows) {
                 self.isLoadMore = NO;
@@ -125,7 +136,7 @@
     } faliure:^(NSError * _Nonnull error) {
         [self endRefresh];
         if (self.networkAvaiable == NO) {
-            [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.collectionView];
+            [self setPromptString:@"暂无网络" imageName:@"no_networking" buttonTitle:@"" inView:self.collectionView];
         }
         [self.dataArray removeAllObjects];
         [self.collectionView reloadData];
@@ -153,8 +164,7 @@
 
 - (void)layoutSubviews {
     [super layoutSubviews];
-    self.collectionView.frame = self.bounds;
-    if (self.teaherAuth == NO) {
+    if (self.authStatus == NO) {
         [self showAuthView];
     }
     else {
@@ -201,6 +211,7 @@
 - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
     return CGSizeMake((kScreenWidth - 28 - 11) / 2.0f, 200);
 }
+
 /**
  设置没有数据时的显示
  
@@ -208,20 +219,33 @@
  @param imgName 图片名称
  @param view 显示在什么地方
  */
-- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName inView:(UIView *)view {
+- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName buttonTitle:(NSString *)buttonTitle inView:(UIView *)view {
     if (self.promptView != nil) {
         [self.promptView removeFromSuperview];
     }
     else {
-        self.promptView = [[StateView alloc]init];
-        self.promptView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 300);
+        self.promptView = [[KSButtonStatusView alloc] init];
     }
     _promptPlaceView = view;
     //当请求不到数据时 ,自定义提示view 将会出现;
     self.promptView.imageName = imgName;
     self.promptView.alpha = 0.0f;
     [self.promptView setText:promptString];
+    [self.promptView setButtonTitle:buttonTitle];
+    MJWeakSelf;
+    [self.promptView buttonClickCallback:^{
+        [weakSelf emptyButtonAction];
+    }];
     [view addSubview:self.promptView];
+    [self.promptView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.bottom.mas_equalTo(self);
+    }];
+}
+
+- (void)emptyButtonAction {
+    KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
+    webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/videoCreate"];
+    [self.naviController pushViewController:webCtrl animated:YES];
 }
 
 // 结束刷新后调用方法
@@ -273,9 +297,17 @@
     return _dataArray;
 }
 
-- (void)setTeaherAuth:(BOOL)teaherAuth {
-    _teaherAuth = teaherAuth;
-    if (teaherAuth == NO) {
+- (void)setTeaherStatus:(NSString *)teaherStatus {
+    _teaherStatus = teaherStatus;
+    
+    if ([teaherStatus isEqualToString:@"PASS"]) {
+        self.authStatus = YES;
+    }
+    else {
+        self.authStatus = NO;
+    }
+    
+    if (self.authStatus == NO) {
         [self showAuthView];
     }
     else {
@@ -283,7 +315,29 @@
     }
 }
 
+- (NSString *)getAuthDisplayMessage {
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        return @"您已提交认证申请,请耐心等待审核结果~";
+    }
+    else {
+        return @"您还没有完成老师认证,认证后才可创建直播课哦~";
+    }
+}
+
+- (void)configAuthDisplay {
+    [self.authView configDisplayMessage:[self getAuthDisplayMessage]];
+    if ([self.teaherStatus isEqualToString:@"DOING"]) {
+        self.authView.sureButton.userInteractionEnabled = NO;
+        self.authView.sureButton.hidden = YES;
+    }
+    else {
+        self.authView.sureButton.userInteractionEnabled = YES;
+        self.authView.sureButton.hidden = NO;
+    }
+}
+
 - (void)showAuthView {
+    [self configAuthDisplay];
     if ([self.subviews containsObject:self.authView]) {
         [self bringSubviewToFront:self.authView];
     }
@@ -319,10 +373,6 @@
     return @"authTeacher_Live";
 }
 
-- (NSString *)getAuthDisplayMessage {
-    return @"您还没有完成老师认证,认证后才可创建直播课哦~";
-}
-
 - (void)authAction {
     KSBaseWKWebViewController *webCtrl = [[KSBaseWKWebViewController alloc] init];
     webCtrl.url = [NSString stringWithFormat:@"%@%@", WEBHOST, @"/#/teacherCert"];

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.h

@@ -32,6 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL isShowTips;
 
+@property (weak, nonatomic) IBOutlet UILabel *authLabel;
+
 + (instancetype)shareInstance;
 
 - (void)operationCallback:(MineViewCallback)callback;

+ 17 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.m

@@ -7,6 +7,7 @@
 
 #import "MineBodyView.h"
 #import "KSStarView.h"
+#import "UserInfoManager.h"
 
 @interface MineBodyView ()
 @property (weak, nonatomic) IBOutlet UIImageView *userAvatal;
@@ -63,9 +64,22 @@
     else {
         self.authView.hidden = NO;
         self.descView.hidden = YES;
-        self.tipsButton.hidden = NO;
+        if (USER_MANAGER.hiddenTipsButton) {
+            self.tipsButton.hidden = YES;
+        }
+        else {
+            self.tipsButton.hidden = NO;
+        }
         
+        
+        if ([infoMessage.entryStatus isEqualToString:@"DOING"]) {
+            self.authLabel.text = @"审核中";
+        }
+        else {
+            self.authLabel.text = @"认证老师";
+        }
     }
+    
     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]];
@@ -81,6 +95,7 @@
         self.userName.text = infoMessage.username;
     }
     
+    
     if ([infoMessage.musicianAuthStatus isEqualToString:@"DOING"]) {
         self.musicianStatusLabel.text = @"审核中";
     }
@@ -116,6 +131,7 @@
 
 - (IBAction)hideTipsButton:(id)sender {
     self.tipsButton.hidden = YES;
+    USER_MANAGER.hiddenTipsButton = YES;
 }
 
 /*

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineBodyView.xib

@@ -849,6 +849,7 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="authLabel" destination="xuX-rV-262" id="NwI-7k-6MF"/>
                 <outlet property="authView" destination="eq0-JE-kle" id="A2F-j8-Me1"/>
                 <outlet property="cardStatusLabel" destination="EQt-Ei-IA1" id="HBE-Oz-GFC"/>
                 <outlet property="descView" destination="gCP-gg-9Jo" id="BNg-nM-ypu"/>