Steven 3 gadi atpakaļ
vecāks
revīzija
02741cce67
45 mainītis faili ar 492 papildinājumiem un 247 dzēšanām
  1. 12 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 3 51
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 14 5
      KulexiuForTeacher/KulexiuForTeacher/Base.lproj/Main.storyboard
  5. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.h
  6. 3 2
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSNetworkingManager.m
  7. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m
  8. 24 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m
  9. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m
  10. 18 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  11. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/Controller/HomeworkDetailViewController.m
  12. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeHeaderView.xib
  13. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/CashRecordViewController.m
  14. 7 7
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/Controller/WithdrawViewController.m
  15. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/CashRecordListCell.m
  16. 5 19
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/WithdrawApplyBodyView.xib
  17. 5 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/WithdrawBodyView.xib
  18. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/LiveLessonModel.h
  19. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/LiveLessonModel.m
  20. 26 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MusicRoomCourseCell.xib
  21. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MyLessonBodyView.m
  22. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.m
  23. 18 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.h
  24. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.m
  25. 34 22
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m
  26. 18 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.h
  27. 37 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m
  28. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.h
  29. 141 73
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.m
  30. 14 18
      KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.xib
  31. 4 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/LoginViewController.m
  32. 2 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.h
  33. 11 5
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.m
  34. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.h
  35. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m
  36. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Login/View/LoginBodyView.m
  37. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/AddressList/Controller/AddressDetailViewController.m
  38. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/MyBankCardViewController.m
  39. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/View/KSConfirmAlertView.xib
  40. 22 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m
  41. 12 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m
  42. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m
  43. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneCheckController.m
  44. 8 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/UserSettingViewController.m
  45. 0 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.m

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

@@ -749,6 +749,8 @@
 		BCDB093E2805C0EF00D0BDAD /* NewClassPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB093A2805C0ED00D0BDAD /* NewClassPopCell.m */; };
 		BCDB093F2805C0EF00D0BDAD /* NewClassPopCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCDB093B2805C0EE00D0BDAD /* NewClassPopCell.xib */; };
 		BCDB09402805C0EF00D0BDAD /* NewClassPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB093D2805C0EF00D0BDAD /* NewClassPopView.m */; };
+		BCDBC59D286156E700647197 /* LiveRoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDBC59C286156E700647197 /* LiveRoomViewController.m */; };
+		BCDBC5A028615E0300647197 /* HomeTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDBC59F28615E0300647197 /* HomeTopView.m */; };
 		BCE06F2B2818146700234817 /* KSConfirmAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE06F2A2818146700234817 /* KSConfirmAlertView.m */; };
 		BCE06F2D2818147000234817 /* KSConfirmAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCE06F2C2818147000234817 /* KSConfirmAlertView.xib */; };
 		BCE6A07F27F7FACA00C97704 /* UIView+SubViewExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE6A07E27F7FACA00C97704 /* UIView+SubViewExtension.m */; };
@@ -2164,6 +2166,10 @@
 		BCDB093B2805C0EE00D0BDAD /* NewClassPopCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NewClassPopCell.xib; sourceTree = "<group>"; };
 		BCDB093C2805C0EE00D0BDAD /* NewClassPopCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewClassPopCell.h; sourceTree = "<group>"; };
 		BCDB093D2805C0EF00D0BDAD /* NewClassPopView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewClassPopView.m; sourceTree = "<group>"; };
+		BCDBC59B286156E700647197 /* LiveRoomViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LiveRoomViewController.h; sourceTree = "<group>"; };
+		BCDBC59C286156E700647197 /* LiveRoomViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LiveRoomViewController.m; sourceTree = "<group>"; };
+		BCDBC59E28615E0300647197 /* HomeTopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeTopView.h; sourceTree = "<group>"; };
+		BCDBC59F28615E0300647197 /* HomeTopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeTopView.m; sourceTree = "<group>"; };
 		BCE06F292818146700234817 /* KSConfirmAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSConfirmAlertView.h; sourceTree = "<group>"; };
 		BCE06F2A2818146700234817 /* KSConfirmAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSConfirmAlertView.m; sourceTree = "<group>"; };
 		BCE06F2C2818147000234817 /* KSConfirmAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KSConfirmAlertView.xib; sourceTree = "<group>"; };
@@ -3506,6 +3512,8 @@
 				2723B68A27F1685500E0B90B /* HomeNavView.h */,
 				2723B68B27F1685500E0B90B /* HomeNavView.m */,
 				2723B68D27F1686100E0B90B /* HomeNavView.xib */,
+				BCDBC59E28615E0300647197 /* HomeTopView.h */,
+				BCDBC59F28615E0300647197 /* HomeTopView.m */,
 				2723B68F27F1803F00E0B90B /* HomeHeadView.h */,
 				2723B69027F1803F00E0B90B /* HomeHeadView.m */,
 				2723B69227F1806500E0B90B /* HomeHeadView.xib */,
@@ -3727,6 +3735,8 @@
 				27D83F5327F408E000062476 /* LivePrepareViewController.m */,
 				275E3DA427F442B70010EC30 /* LiveVideoRoomViewController.h */,
 				275E3DA527F442B70010EC30 /* LiveVideoRoomViewController.m */,
+				BCDBC59B286156E700647197 /* LiveRoomViewController.h */,
+				BCDBC59C286156E700647197 /* LiveRoomViewController.m */,
 			);
 			path = Controller;
 			sourceTree = "<group>";
@@ -6449,6 +6459,7 @@
 				275FA55827F30AE300EB6240 /* VideoCourseModel.m in Sources */,
 				275B172927EB26920081FDEF /* ChatAddressHeaderView.m in Sources */,
 				BC7CFFA22817D72200CAEB21 /* IncomeListModel.m in Sources */,
+				BCDBC5A028615E0300647197 /* HomeTopView.m in Sources */,
 				BC0A22A9284751F80065C1AB /* FullVideoView.m in Sources */,
 				2755C06C27EC7F0E007D9070 /* KSChatComplainController.m in Sources */,
 				27F9CB1127EC60D0003E0FE4 /* GroupListModel.m in Sources */,
@@ -6488,6 +6499,7 @@
 				277931E327E30FC20010E277 /* UITextView+ZWPlaceHolder.m in Sources */,
 				BCB908DB2850A71100F5FF69 /* ShareMusicCellContentView.m in Sources */,
 				BC0A2285284751DF0065C1AB /* KSValuePopView.m in Sources */,
+				BCDBC59D286156E700647197 /* LiveRoomViewController.m in Sources */,
 				BCC9F40B27F69BD200647449 /* CREmojiCollectionCell.m in Sources */,
 				2779320927E30FC30010E277 /* KSRecordPowerAnimationView.m in Sources */,
 				27BC3B3327F2FD2D00D81E30 /* VideoListBodyView.m in Sources */,

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


+ 3 - 51
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -68,7 +68,7 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "0AC7083A-0E97-40A5-821A-015E63A3C9F8"
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m"
@@ -403,22 +403,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "E9B08BCF-C9A7-4819-BE36-A3A77F271C4D"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Chat/Controller/ChatAddressViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "104"
-            endingLineNumber = "104"
-            landmarkName = "-viewWillAppear:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "2AEA3612-7AE7-4BEC-92D5-66F8021C9E5B"
             shouldBeEnabled = "No"
             ignoreCount = "0"
@@ -442,8 +426,8 @@
             filePath = "KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "673"
-            endingLineNumber = "673"
+            startingLineNumber = "679"
+            endingLineNumber = "679"
             landmarkName = "-submitFileWithMessage:uploadListener:"
             landmarkType = "7">
          </BreakpointContent>
@@ -576,37 +560,5 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "BD235637-2AE9-4EC4-B458-DD4B8C7C9DEA"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Controller/HomeViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "179"
-            endingLineNumber = "179"
-            landmarkName = "-configHeadSource:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "7D20DFA9-B712-455D-904D-1A8D77BB7501"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "115"
-            endingLineNumber = "115"
-            landmarkName = "-requestData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 14 - 5
KulexiuForTeacher/KulexiuForTeacher/Base.lproj/Main.storyboard

@@ -1,24 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+    <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--View Controller-->
         <scene sceneID="tne-QT-ifu">
             <objects>
-                <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
+                <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
+            <point key="canvasLocation" x="39" y="62"/>
         </scene>
     </scenes>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

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

@@ -714,10 +714,11 @@ NS_ASSUME_NONNULL_BEGIN
 /// 作业点评
 /// @param post post
 /// @param courseScheduleId 课程编号
+/// @param studentId 学生id
 /// @param review 点评内容
 /// @param success 成功
 /// @param faliure 失败
-+ (void)homeworkReviewRequest:(NSString *)post courseScheduleId:(NSString *)courseScheduleId review:(NSString *)review success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
++ (void)homeworkReviewRequest:(NSString *)post courseScheduleId:(NSString *)courseScheduleId studentId:(NSString *)studentId review:(NSString *)review success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 
 
 #pragma mark ----- 课表相关

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

@@ -1399,20 +1399,21 @@
     [parm setValue:courseScheduleId forKey:@"courseScheduleId"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
-// /api-teacher/homework/review
 
 /// 作业点评
 /// @param post post
 /// @param courseScheduleId 课程编号
+/// @param studentId 学生id
 /// @param review 点评内容
 /// @param success 成功
 /// @param faliure 失败
-+ (void)homeworkReviewRequest:(NSString *)post courseScheduleId:(NSString *)courseScheduleId review:(NSString *)review success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
++ (void)homeworkReviewRequest:(NSString *)post courseScheduleId:(NSString *)courseScheduleId studentId:(NSString *)studentId review:(NSString *)review success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
     [self configRequestMethodJSON];
     NSString *url = [NSString stringWithFormat:@"%@%@", hostURL, @"/api-teacher/homework/review"];
     NSMutableDictionary *parm = [NSMutableDictionary dictionary];
     [parm setValue:review forKey:@"review"];
     [parm setValue:courseScheduleId forKey:@"courseScheduleId"];
+    [parm setValue:studentId forKey:@"studentId"];
     [self request:post andWithUrl:url and:parm success:success faliure:faliure];
 }
 

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatConversationViewController.m

@@ -439,6 +439,12 @@
 
 }
 
+- (void)willDisplayMessageCell:(RCMessageBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath {
+    UIImageView *imageView = (UIImageView *)((RCMessageCell *)cell).portraitImageView;
+    imageView.contentMode = UIViewContentModeScaleAspectFill;
+    imageView.layer.masksToBounds = YES;
+}
+
 
 #pragma mark ----- chatSessionInputBarControl delegate
 - (void)sightDidFinishRecord:(NSString *)url thumbnail:(UIImage *)image duration:(NSUInteger)duration {

+ 24 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Chat/Controller/KSChatListViewController.m

@@ -193,6 +193,30 @@
     return 80.0f;
 }
 
+- (void)willDisplayConversationTableCell:(RCConversationBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath {
+    UIImageView *imageView = (UIImageView *)((RCConversationCell *)cell).headerImageView;
+    UIView *tagView = (UIView *)((RCConversationCell *)cell).conversationTagView;
+    imageView.contentMode = UIViewContentModeScaleAspectFill;
+    imageView.layer.masksToBounds = YES;
+    
+    RCConversationModel *model = self.conversationListDataSource[indexPath.row];
+    if (model.conversationType == ConversationType_GROUP) {
+        if ([model.targetId containsString:@"FAN"]) { // 粉丝群
+            [imageView setImage:[UIImage imageNamed:@"chat_fansGroup_logo"]];
+            UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"groupType_fans"]];
+            [tagView removeAllSubViews];
+            [tagView addSubview:tagImage];
+            tagImage.frame = CGRectMake(0, 2, 45, 17);
+        }
+        else if ([model.targetId containsString:@"COURSE"]) { // 课程群
+            [imageView setImage:[UIImage imageNamed:@"chat_group_Logo"]];
+            UIImageView *tagImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"groupType_course"]];
+            [tagView removeAllSubViews];
+            [tagView addSubview:tagImage];
+            tagImage.frame = CGRectMake(0, 2, 45, 17);
+        }
+    }
+}
 
 - (UIView *)stateView {
     if (!_stateView) {

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

@@ -321,7 +321,7 @@
 
 - (void)commentAction:(NSString *)commentMessage {
     [self showhud];
-    [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId review:commentMessage success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:commentMessage success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             [self MBPShow:@"点评成功"];

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

@@ -26,6 +26,7 @@
 #import "AccompanyDetailViewController.h"
 #import "RecentCourseModel.h"
 #import "AppDelegate.h"
+#import "MusicRoomViewController.h"
 
 @interface HomeViewController ()<SDCycleScrollViewDelegate>
 
@@ -176,7 +177,7 @@
     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"]];
-    self.bodyView.timeCountLabel.text = [NSString stringWithFormat:@"%zd 分钟",[parm integerValueForKey:@"studentReplied"]];
+    self.bodyView.timeCountLabel.text = [NSString stringWithFormat:@"%zd 分钟",[parm integerValueForKey:@"pianoTime"]];
 }
 
 - (void)refreshView {
@@ -198,18 +199,28 @@
         make.height.mas_equalTo(kNaviBarHeight);
     }];
     [self.view bringSubviewToFront:self.scrollView];
+    [self.view bringSubviewToFront:self.navView];
     [self.scrollView mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
-        make.top.mas_equalTo(self.navView.mas_bottom);
+        make.top.mas_equalTo(self.view.mas_top);
         make.bottom.mas_equalTo(self.view.mas_bottom);
     }];
     self.scrollView.backgroundColor = [UIColor clearColor];
     
+    UIView *topView = [[UIView alloc] init];
+    topView.backgroundColor = [UIColor clearColor];
+    [self.scrollView addSubview:topView];
+    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.mas_equalTo(self.view);
+        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.height.mas_equalTo(kNaviBarHeight);
+    }];
+    
     [self.scrollView addSubview:self.headView];
     CGFloat headHeight = [self.headView getViewHeight];
     [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self.view);
-        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.top.mas_equalTo(topView.mas_bottom);
         make.height.mas_equalTo(headHeight);
     }];
     
@@ -399,7 +410,10 @@
         [self.navigationController pushViewController:detailVC animated:YES];
     }
     else if (type == RECENTCOURSE_TYPE_MUSICCLASS) { // 琴房课
-        
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseId = courseModel.courseId;
+        ctrl.courseGroupId = courseModel.courseGroupId;
+        [self.navigationController pushViewController:ctrl animated:YES];
     }
     else {
         KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];

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

@@ -173,7 +173,7 @@
 
 - (void)evaluateAction:(NSString *)evaluateContent {
     [self showhud];
-    [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId review:evaluateContent success:^(NSDictionary * _Nonnull dic) {
+    [KSNetworkingManager homeworkReviewRequest:KS_POST courseScheduleId:self.courseId studentId:self.studentId review:evaluateContent success:^(NSDictionary * _Nonnull dic) {
         [self removehub];
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             [self MBPShow:@"点评成功"];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/View/IncomeHeaderView.xib

@@ -50,7 +50,7 @@
                             </constraints>
                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                            <state key="normal" title="提现"/>
+                            <state key="normal" title="结算"/>
                             <userDefinedRuntimeAttributes>
                                 <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                                     <real key="value" value="16"/>

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

@@ -37,7 +37,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"提现记录"];
+    [self allocTitle:@"结算记录"];
     [self configUI];
     [self setDefaultConfig];
 }
@@ -194,7 +194,7 @@
     switch (action) {
         case RECORDACTION_TYPE:
         {
-            [self.popView refreshWithSourceArray:@[@"全部",@"审核中",@"提现成功",@"提现失败"] preChooseIndex:self.chooseIndex inView:self.view actionItem:0];
+            [self.popView refreshWithSourceArray:@[@"全部",@"审核中",@"结算成功",@"结算失败"] preChooseIndex:self.chooseIndex inView:self.view actionItem:0];
         }
             break;
         case RECORDACTION_TIME:

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

@@ -30,7 +30,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    [self allocTitle:@"提现"];
+    [self allocTitle:@"结算"];
     [self configUIDisplay];
 }
 
@@ -56,10 +56,10 @@
 }
 
 - (void)evaluateSource {
-    self.bodyView.descLabel.text = [NSString stringWithFormat:@"单次收入提现时,平台将收取%.2f元手续费",self.drawModel.withdrawalServiceFee];
+    self.bodyView.descLabel.text = [NSString stringWithFormat:@"单次收入结算时,平台将收取%.2f元手续费",self.drawModel.withdrawalServiceFee];
     self.bodyView.amount = self.drawModel.amountWithdrawal;
     NSString *descAmout = [NSString formatMoneyDoubleNum:self.drawModel.amountWithdrawal];
-    self.bodyView.availableAmoutLabel.text = [NSString returnNoNullStringWithString:[NSString stringWithFormat:@"可提现余额 ¥%@",descAmout]];
+    self.bodyView.availableAmoutLabel.text = [NSString returnNoNullStringWithString:[NSString stringWithFormat:@"可结算余额 ¥%@",descAmout]];
     if (self.drawModel.userBankCard) {
         NSString *cardNumber = self.drawModel.userBankCard.bankCard;
         if (cardNumber.length > 4) {
@@ -77,7 +77,7 @@
 
 - (void)configUIDisplay {
     [self.scrollView removeFromSuperview];
-    [self rightButtonTitle:@"提现记录"];
+    [self rightButtonTitle:@"结算记录"];
     self.bodyView = [WithdrawBodyView shareInstance];
     [self.view addSubview:self.bodyView];
     [self.bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -95,11 +95,11 @@
         return;
     }
     if ([NSString isEmptyString:amountString]) {
-        [self MBPShow:@"请输入提现金额"];
+        [self MBPShow:@"请输入结算金额"];
         return;
     }
     if ([amountString doubleValue] <= self.drawModel.withdrawalServiceFee) {
-        [self MBPShow:@"提现金额需要大于手续费"];
+        [self MBPShow:@"结算金额需要大于手续费"];
         return;
     }
     
@@ -127,7 +127,7 @@
 - (void)showBandCardAlert {
     KSConfirmAlertView *alert = [KSConfirmAlertView shareInstance];
     alert.frame = self.view.bounds;
-    [alert configWithTitle:@"绑定银行卡" subTitle:@"您需要先绑定银行卡后才能提现"];
+    [alert configWithTitle:@"绑定银行卡" subTitle:@"您需要先绑定银行卡后才能结算"];
     MJWeakSelf;
     [alert opreationSure:^{
         [weakSelf bandCard];

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/CashRecordListCell.m

@@ -44,11 +44,11 @@
         self.statusLabel.textColor = HexRGB(0x666666);
     }
     else if ([sourceModel.status isEqualToString:@"PASS"]) {
-        self.statusLabel.text = @"提现成功";
+        self.statusLabel.text = @"结算成功";
         self.statusLabel.textColor = THEMECOLOR;
     }
     else {
-        self.statusLabel.text = @"提现失败";
+        self.statusLabel.text = @"结算失败";
         self.statusLabel.textColor = HexRGB(0xff5c5f);
     }
 }

+ 5 - 19
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/WithdrawApplyBodyView.xib

@@ -20,7 +20,7 @@
                         <constraint firstAttribute="width" constant="260" id="jVf-K3-gOU"/>
                     </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="zNT-zc-fnl">
+                <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="zNT-zc-fnl">
                     <rect key="frame" x="130.5" y="262" width="153" height="27"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="27" id="E6B-bT-PHc"/>
@@ -30,7 +30,7 @@
                     <nil key="highlightedColor"/>
                 </label>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8ob-Ni-H4W">
-                    <rect key="frame" x="109" y="365" width="196" height="44"/>
+                    <rect key="frame" x="109" y="359.5" width="196" height="44"/>
                     <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="196" id="HFu-y6-qnF"/>
@@ -48,27 +48,13 @@
                     </connections>
                 </button>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vhp-hV-vrO">
-                    <rect key="frame" x="46" y="300" width="322" height="43"/>
+                    <rect key="frame" x="46" y="300" width="322" height="37.5"/>
                     <attributedString key="attributedText">
-                        <fragment content="平台将在">
+                        <fragment content="平台将在2个工作日内将结算金额转账至你所绑定的银行卡,请留意银行卡收入信息">
                             <attributes>
                                 <color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                                 <font key="NSFont" size="15" name=".PingFangSC-Regular"/>
-                                <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="8" tighteningFactorForTruncation="0.0"/>
-                            </attributes>
-                        </fragment>
-                        <fragment content="2">
-                            <attributes>
-                                <color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
-                                <font key="NSFont" metaFont="system" size="15"/>
-                                <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="8" tighteningFactorForTruncation="0.0"/>
-                            </attributes>
-                        </fragment>
-                        <fragment content="个工作日内将提现金额转账至你所绑定的银行卡,请留意银行卡收入信息">
-                            <attributes>
-                                <color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
-                                <font key="NSFont" size="15" name=".PingFangSC-Regular"/>
-                                <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="8" tighteningFactorForTruncation="0.0"/>
+                                <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
                             </attributes>
                         </fragment>
                     </attributedString>

+ 5 - 5
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Income/WithDraw/View/WithdrawBodyView.xib

@@ -63,7 +63,7 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mtd-rZ-pVF">
                     <rect key="frame" x="14" y="141" width="366" height="156"/>
                     <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提现金额" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cnO-cN-4BH">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="结算金额" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cnO-cN-4BH">
                             <rect key="frame" x="11" y="10" width="65.5" height="22"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="38c-lq-W6r"/>
@@ -104,14 +104,14 @@
                             </constraints>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                            <state key="normal" title="全部提现">
+                            <state key="normal" title="全部结算">
                                 <color key="titleColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
                             </state>
                             <connections>
                                 <action selector="allWithdrawAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="5Nq-kt-ffa"/>
                             </connections>
                         </button>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可提现余额 " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yfw-hh-XkE">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="可结算余额 " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yfw-hh-XkE">
                             <rect key="frame" x="14" y="115" width="75.5" height="41"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
@@ -151,7 +151,7 @@
                             <rect key="frame" x="0.0" y="0.0" width="366" height="37"/>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         </view>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单次收入提现时,平台将收取2元手续费" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="us0-rn-BWY">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单次收入结算时,平台将收取2元手续费" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="us0-rn-BWY">
                             <rect key="frame" x="11" y="10" width="252" height="17"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" red="0.8784313725490196" green="0.58039215686274503" blue="0.3529411764705882" alpha="1" colorSpace="calibratedRGB"/>
@@ -181,7 +181,7 @@
                         <constraint firstAttribute="height" constant="44" id="2tv-U1-iXk"/>
                     </constraints>
                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                    <state key="normal" title="确认提现"/>
+                    <state key="normal" title="确认结算"/>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
                             <real key="value" value="22"/>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/LiveLessonModel.h

@@ -20,6 +20,7 @@
 @property (nonatomic, strong) NSString *startTime;
 @property (nonatomic, strong) NSString *courseGroupName;
 @property (nonatomic, strong) NSString *imGroupId;
+@property (nonatomic, strong) NSString *courseId;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/Model/LiveLessonModel.m

@@ -17,6 +17,7 @@ NSString *const kLiveLessonModelSubjectName = @"subjectName";
 NSString *const kLiveLessonModelStartTime = @"startTime";
 NSString *const kLiveLessonModelCourseGroupName = @"courseGroupName";
 NSString *const kLiveLessonModelImGroupId = @"imGroupId";
+NSString *const kLiveLessonModelCourseId = @"courseId";
 
 @interface LiveLessonModel ()
 
@@ -35,6 +36,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
 @synthesize startTime = _startTime;
 @synthesize courseGroupName = _courseGroupName;
 @synthesize imGroupId = _imGroupId;
+@synthesize courseId = _courseId;
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
@@ -57,6 +59,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
             self.startTime = [self objectOrNilForKey:kLiveLessonModelStartTime fromDictionary:dict];
             self.courseGroupName = [self objectOrNilForKey:kLiveLessonModelCourseGroupName fromDictionary:dict];
             self.imGroupId = [self objectOrNilForKey:kLiveLessonModelImGroupId fromDictionary:dict];
+            self.courseId = [self objectOrNilForKey:kLiveLessonModelCourseId fromDictionary:dict];
     }
     
     return self;
@@ -75,6 +78,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
     [mutableDict setValue:self.startTime forKey:kLiveLessonModelStartTime];
     [mutableDict setValue:self.courseGroupName forKey:kLiveLessonModelCourseGroupName];
     [mutableDict setValue:self.imGroupId forKey:kLiveLessonModelImGroupId];
+    [mutableDict setValue:self.courseId forKey:kLiveLessonModelCourseId];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 
@@ -110,6 +114,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
     self.startTime = [aDecoder decodeObjectForKey:kLiveLessonModelStartTime];
     self.courseGroupName = [aDecoder decodeObjectForKey:kLiveLessonModelCourseGroupName];
     self.imGroupId = [aDecoder decodeObjectForKey:kLiveLessonModelImGroupId];
+    self.courseId = [aDecoder decodeObjectForKey:kLiveLessonModelCourseId];
     return self;
 }
 
@@ -125,6 +130,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
     [aCoder encodeObject:_startTime forKey:kLiveLessonModelStartTime];
     [aCoder encodeObject:_courseGroupName forKey:kLiveLessonModelCourseGroupName];
     [aCoder encodeObject:_imGroupId forKey:kLiveLessonModelImGroupId];
+    [aCoder encodeObject:_courseId forKey:kLiveLessonModelCourseId];
 }
 
 - (id)copyWithZone:(NSZone *)zone
@@ -142,6 +148,7 @@ NSString *const kLiveLessonModelImGroupId = @"imGroupId";
         copy.startTime = [self.startTime copyWithZone:zone];
         copy.courseGroupName = [self.courseGroupName copyWithZone:zone];
         copy.imGroupId = [self.imGroupId copyWithZone:zone];
+        copy.courseId = [self.courseId copyWithZone:zone];
     }
     
     return copy;

+ 26 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MusicRoomCourseCell.xib

@@ -2,6 +2,7 @@
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
+        <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -28,7 +29,7 @@
                                 </constraints>
                             </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2021/09/17 14:00~14:25" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UxS-Xs-zTk">
-                                <rect key="frame" x="34" y="11" width="313" height="18"/>
+                                <rect key="frame" x="34" y="11" width="147" height="18"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="18" id="iT4-St-ibp"/>
                                 </constraints>
@@ -36,6 +37,22 @@
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="6人" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IdU-Te-VFw">
+                                <rect key="frame" x="308" y="11.5" width="30" height="17"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="30" id="UXQ-qE-PN9"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_member" translatesAutoresizingMaskIntoConstraints="NO" id="ryL-Bc-GJQ">
+                                <rect key="frame" x="339" y="11" width="18" height="18"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="18" id="3mV-q5-U7p"/>
+                                    <constraint firstAttribute="height" constant="18" id="PjQ-RL-p6f"/>
+                                </constraints>
+                            </imageView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t3h-kH-4md">
                                 <rect key="frame" x="357" y="0.0" width="40" height="40"/>
                                 <constraints>
@@ -136,17 +153,22 @@
                         </subviews>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
+                            <constraint firstItem="ryL-Bc-GJQ" firstAttribute="centerY" secondItem="IdU-Te-VFw" secondAttribute="centerY" id="3UU-Gv-EOP"/>
                             <constraint firstItem="4jM-hU-dts" firstAttribute="leading" secondItem="Wl9-sn-VK0" secondAttribute="leading" constant="12" id="55F-l8-Qg1"/>
                             <constraint firstItem="4jM-hU-dts" firstAttribute="top" secondItem="89l-Qb-VVR" secondAttribute="bottom" constant="15" id="5TE-2w-8xg"/>
                             <constraint firstItem="VjP-WA-4SG" firstAttribute="leading" secondItem="Wl9-sn-VK0" secondAttribute="leading" constant="12" id="76s-eU-Ril"/>
                             <constraint firstItem="l2B-EY-GWY" firstAttribute="leading" secondItem="4jM-hU-dts" secondAttribute="trailing" constant="12" id="8wP-id-bji"/>
                             <constraint firstItem="Dys-CR-rsC" firstAttribute="top" secondItem="l2B-EY-GWY" secondAttribute="bottom" id="9Pu-wW-GUr"/>
+                            <constraint firstItem="Vxw-2k-cqR" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="l2B-EY-GWY" secondAttribute="trailing" constant="10" id="ARB-Ze-HIb"/>
                             <constraint firstItem="VjP-WA-4SG" firstAttribute="top" secondItem="Wl9-sn-VK0" secondAttribute="top" constant="12" id="B95-QO-f7C"/>
                             <constraint firstItem="UxS-Xs-zTk" firstAttribute="leading" secondItem="VjP-WA-4SG" secondAttribute="trailing" constant="6" id="Ct9-78-SuQ"/>
                             <constraint firstAttribute="trailing" secondItem="89l-Qb-VVR" secondAttribute="trailing" constant="10" id="J29-HZ-el6"/>
                             <constraint firstAttribute="trailing" secondItem="t3h-kH-4md" secondAttribute="trailing" constant="10" id="Mvo-kN-6G0"/>
+                            <constraint firstItem="ryL-Bc-GJQ" firstAttribute="leading" secondItem="IdU-Te-VFw" secondAttribute="trailing" constant="1" id="U4p-qV-v44"/>
                             <constraint firstItem="t3h-kH-4md" firstAttribute="top" secondItem="Wl9-sn-VK0" secondAttribute="top" id="UrD-2D-HXJ"/>
-                            <constraint firstItem="t3h-kH-4md" firstAttribute="leading" secondItem="UxS-Xs-zTk" secondAttribute="trailing" constant="10" id="fbH-VF-UbO"/>
+                            <constraint firstItem="t3h-kH-4md" firstAttribute="leading" secondItem="ryL-Bc-GJQ" secondAttribute="trailing" id="VyO-Ow-aW3"/>
+                            <constraint firstItem="t3h-kH-4md" firstAttribute="centerY" secondItem="ryL-Bc-GJQ" secondAttribute="centerY" id="Yt0-TJ-55n"/>
+                            <constraint firstItem="IdU-Te-VFw" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="UxS-Xs-zTk" secondAttribute="trailing" constant="10" id="h3i-Bo-NfI"/>
                             <constraint firstItem="Dys-CR-rsC" firstAttribute="leading" secondItem="l2B-EY-GWY" secondAttribute="leading" id="h8r-WE-IEp"/>
                             <constraint firstAttribute="bottom" secondItem="4jM-hU-dts" secondAttribute="bottom" constant="19" id="kBX-xJ-Bc3"/>
                             <constraint firstItem="89l-Qb-VVR" firstAttribute="leading" secondItem="Wl9-sn-VK0" secondAttribute="leading" constant="10" id="pgO-Fi-Mwz"/>
@@ -177,6 +199,7 @@
                 <outlet property="courseDesc" destination="n6Q-Lb-t2R" id="6EB-Qw-D3R"/>
                 <outlet property="courseName" destination="l2B-EY-GWY" id="D00-Cj-zrr"/>
                 <outlet property="courseTimeLabel" destination="UxS-Xs-zTk" id="dkq-PI-dck"/>
+                <outlet property="memberCount" destination="IdU-Te-VFw" id="1Lu-Rg-nb5"/>
                 <outlet property="statusButton" destination="Vxw-2k-cqR" id="0Ra-cW-84Y"/>
                 <outlet property="subjectName" destination="TPd-JA-v98" id="HaG-Uj-2h3"/>
             </connections>
@@ -185,6 +208,7 @@
     </objects>
     <resources>
         <image name="course_chat" width="19" height="18"/>
+        <image name="course_member" width="18" height="18"/>
         <image name="course_time" width="16" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

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

@@ -481,7 +481,7 @@
     else { // 直播课程组详情
         LiveLessonModel *model = self.dataArray[indexPath.row];
         KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-        NSString *url = [NSString stringWithFormat:@"%@%@%@", WEBHOST, @"/#/liveDetail?groupId=",model.courseGroupId];
+        NSString *url = [NSString stringWithFormat:@"%@/#/liveDetail?groupId=%@&classId=%@", WEBHOST, model.courseGroupId,model.courseId];
         ctrl.url = url;
         [self.naviController pushViewController:ctrl animated:YES];
         

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

@@ -59,7 +59,7 @@
         if ([self.courseModel.courseType isEqualToString:@"LIVE"]) {
             type = RECENTCOURSE_TYPE_LIVE;
         }
-        else if ([self.courseModel.courseType isEqualToString:@"LIVE"]) {
+        else if ([self.courseModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"]) {
             type = RECENTCOURSE_TYPE_MUSICCLASS;
         }
         else /*if ([self.courseModel.courseType isEqualToString:@"PRACTICE"])*/ {

+ 18 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.h

@@ -0,0 +1,18 @@
+//
+//  HomeTopView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/21.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HomeTopView : UIView
+
+- (CGFloat)getViewHeight;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeTopView.m

@@ -0,0 +1,20 @@
+//
+//  HomeTopView.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/21.
+//
+
+#import "HomeTopView.h"
+
+@implementation HomeTopView
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 34 - 22
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LivePrepareViewController.m

@@ -19,6 +19,8 @@
 
 @property (nonatomic, strong) LivePreviewBodyView *bodyView;
 
+@property (nonatomic, strong) RCRTCVideoView *videoView;
+
 // 音频配置
 @property(strong, nonatomic) RCRTCEngine *engine;
 
@@ -36,7 +38,6 @@
     // Do any additional setup after loading the view.
     self.ks_prefersNavigationBarHidden = YES;
     [self configUI];
-    [self configEngine];
 }
 
 - (void)configUI {
@@ -52,21 +53,29 @@
     
 }
 
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self configEngine];
+}
+
 - (void)configEngine {
-    self.engine = [RCRTCEngine sharedInstance];
-    RCRTCVideoView *videoView = [[RCRTCVideoView alloc] init];
-    videoView.fillMode = RCRTCVideoFillModeAspectFill;
+    if (!self.videoView) {
+        self.videoView = [[RCRTCVideoView alloc] init];
+        self.videoView.fillMode = RCRTCVideoFillModeAspectFill;
+
+        self.videoView.frameAnimated = NO;
+        [self.bodyView.videoView addSubview:self.videoView];
+        [self.videoView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.top.bottom.right.mas_equalTo(self.bodyView.videoView);
+        }];
+    }
     
-    videoView.frameAnimated = NO;
-    [self.bodyView.videoView addSubview:videoView];
-    [videoView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.top.bottom.right.mas_equalTo(self.bodyView.videoView);
-    }];
-    [self.engine.defaultVideoStream setVideoView:videoView];
-    RCRTCVideoStreamConfig *videoConfig = self.engine.defaultVideoStream.videoConfig;
+    
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoView:self.videoView];
+    RCRTCVideoStreamConfig *videoConfig = [RCRTCEngine sharedInstance].defaultVideoStream.videoConfig;
     videoConfig.videoSizePreset = RCRTCVideoSizePreset1280x720;
-    [self.engine.defaultVideoStream setVideoConfig:videoConfig];
-    [self.engine.defaultVideoStream startCapture];
+    [[RCRTCEngine sharedInstance].defaultVideoStream setVideoConfig:videoConfig];
+    [[RCRTCEngine sharedInstance].defaultVideoStream startCapture];
     self.filterLevel = 50;
 }
 
@@ -122,18 +131,22 @@
 
 - (void)displayBeautyView {
     [self displayBottomView:YES];
+    if (_settingView == nil) {
+        
+        RCRTCBeautyOption *option = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyOption];
+        RCRTCBeautyFilter filter = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyFilter];
+        FILTER_TYPE type = [self getFilterType:filter];
+        MJWeakSelf;
+        [self.settingView evaluateMessageWithWhite:option.whitenessLevel smoothLevel:option.smoothLevel ruddyLevel:option.ruddyLevel brightLevel:option.brightLevel filter:type filterLevel:self.filterLevel callback:^(BOOL isOpenBeauty, NSInteger white, NSInteger smoothLevel, NSInteger ruddyLevel, NSInteger brightLevel, FILTER_TYPE type, int filterLevel) {
+            [weakSelf configSettingBeauty:YES white:white smoothLevel:smoothLevel ruddyLevel:ruddyLevel brightLevel:brightLevel filter:[self getRongBeautyWithType:type] filterLevel:filterLevel];
+        }];
+    }
+    
     [self.view addSubview:self.settingView];
     [self.settingView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.top.bottom.mas_equalTo(self.view);
     }];
     
-    RCRTCBeautyOption *option = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyOption];
-    RCRTCBeautyFilter filter = [[RCRTCBeautyEngine sharedInstance] getCurrentBeautyFilter];
-    FILTER_TYPE type = [self getFilterType:filter];
-    MJWeakSelf;
-    [self.settingView evaluateMessageWithBeauty:self.isBeautyOn white:option.whitenessLevel smoothLevel:option.smoothLevel ruddyLevel:option.ruddyLevel brightLevel:option.brightLevel filter:type filterLevel:self.filterLevel callback:^(BOOL isOpenBeauty, NSInteger white, NSInteger smoothLevel, NSInteger ruddyLevel, NSInteger brightLevel, FILTER_TYPE type, int filterLevel) {
-        [weakSelf configSettingBeauty:isOpenBeauty white:white smoothLevel:smoothLevel ruddyLevel:ruddyLevel brightLevel:brightLevel filter:[self getRongBeautyWithType:type] filterLevel:filterLevel];
-    }];
 }
 
 - (FILTER_TYPE)getFilterType:(RCRTCBeautyFilter)filter {
@@ -147,7 +160,7 @@
         case RCRTCBeautyFilterRomantic:
             return FILTER_TYPE_LANGMAN;
         default:
-            return FILTER_TYPE_NOMAL;
+            return FILTER_TYPE_NONE;
             break;
     }
 }
@@ -155,7 +168,6 @@
 - (RCRTCBeautyFilter)getRongBeautyWithType:(FILTER_TYPE)type {
     switch (type) {
         case FILTER_TYPE_NONE:
-        case FILTER_TYPE_NOMAL:
             return RCRTCBeautyFilterNone;
         case FILTER_TYPE_QINGXIN:
             return RCRTCBeautyFilterFresh;

+ 18 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.h

@@ -0,0 +1,18 @@
+//
+//  LiveRoomViewController.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/21.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LiveRoomViewController : BaseViewController
+
+@property (nonatomic, strong) NSString *roomId; // 房间号
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 37 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -0,0 +1,37 @@
+//
+//  LiveRoomViewController.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2022/6/21.
+//
+
+#import "LiveRoomViewController.h"
+#import "LivePreviewBodyView.h"
+#import <RongRTCLib/RongRTCLib.h>
+#import <RongIMKit/RongIMKit.h>
+#import <RongFaceBeautifier/RongFaceBeautifier.h>
+#import "KSBeautySettingView.h"
+#import "KSEnterLiveroomManager.h"
+
+@interface LiveRoomViewController ()
+
+@end
+
+@implementation LiveRoomViewController
+
+- (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

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.h

@@ -10,7 +10,6 @@
 
 typedef NS_ENUM(NSInteger, FILTER_TYPE) {
     FILTER_TYPE_NONE = 0,  // 无
-    FILTER_TYPE_NOMAL, // 正常
     FILTER_TYPE_WEIMEI, // 唯美
     FILTER_TYPE_QINGXIN, // 清新
     FILTER_TYPE_LANGMAN, // 浪漫
@@ -19,13 +18,14 @@ typedef NS_ENUM(NSInteger, FILTER_TYPE) {
 typedef void(^BeautyCallback)(BOOL isOpenBeauty, NSInteger white, NSInteger smoothLevel, NSInteger ruddyLevel, NSInteger brightLevel, FILTER_TYPE type, int filterLevel);
 
 typedef void(^HiddenBeautyCallback)(void);
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface KSBeautySettingView : UIView
 
 + (instancetype)shareInstance;
 
-- (void)evaluateMessageWithBeauty:(BOOL)isOpenBeauty white:(NSInteger)whitenessLevel smoothLevel:(NSInteger)smoothLevel ruddyLevel:(NSInteger)ruddyLevel brightLevel:(NSInteger)brightLevel filter:(FILTER_TYPE)filter filterLevel:(int)filterLevel callback:(BeautyCallback)callback;
+- (void)evaluateMessageWithWhite:(NSInteger)whitenessLevel smoothLevel:(NSInteger)smoothLevel ruddyLevel:(NSInteger)ruddyLevel brightLevel:(NSInteger)brightLevel filter:(FILTER_TYPE)filter filterLevel:(int)filterLevel callback:(BeautyCallback)callback;
 
 - (void)hiddenViewCallback:(HiddenBeautyCallback)callback;
 

+ 141 - 73
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.m

@@ -16,6 +16,7 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 };
 
 @interface KSBeautySettingView ()<UIGestureRecognizerDelegate>
+
 @property (weak, nonatomic) IBOutlet UILabel *valueLabel;
 @property (weak, nonatomic) IBOutlet UIView *sliderBgView;
 
@@ -35,6 +36,7 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 @property (weak, nonatomic) IBOutlet UISlider *slider;
 
 @property (weak, nonatomic) IBOutlet UIView *beautyView;
+@property (weak, nonatomic) IBOutlet UILabel *beautyStatusLabel;
 
 @property (weak, nonatomic) IBOutlet UIButton *beautySwitchButton; // 美颜开关
 
@@ -56,6 +58,7 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 
 @property (weak, nonatomic) IBOutlet UIView *filterView;
 
+/// 是否开启美颜
 @property (nonatomic, assign) BOOL isOpenBeauty;
 
 @property (nonatomic, copy) BeautyCallback callback;
@@ -68,15 +71,11 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 @property (nonatomic, assign) NSInteger brightLevel;
 
 
-
 @property (weak, nonatomic) IBOutlet UIView *bottomView;
 
 @property (weak, nonatomic) IBOutlet UIButton *filterNoneButton;
 @property (weak, nonatomic) IBOutlet UILabel *noneLabel;
 
-@property (weak, nonatomic) IBOutlet UIImageView *nomalImage;
-@property (weak, nonatomic) IBOutlet UILabel *nomalTitle;
-
 @property (weak, nonatomic) IBOutlet UIImageView *beautyfulImg;
 @property (weak, nonatomic) IBOutlet UILabel *beautifulTitle;
 
@@ -86,6 +85,13 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 @property (weak, nonatomic) IBOutlet UIImageView *romanceImage;
 @property (weak, nonatomic) IBOutlet UILabel *romanceTitle;
 
+// 默认配置
+@property (nonatomic, assign) NSInteger defaultWhite;
+@property (nonatomic, assign) NSInteger defaultSmooth;
+@property (nonatomic, assign) NSInteger defaultRuddy;
+@property (nonatomic, assign) NSInteger defaultBrightless;
+@property (nonatomic, assign) FILTER_TYPE defaultFilter;
+@property (nonatomic, assign) int defaultFilterLevel;
 @end
 
 @implementation KSBeautySettingView
@@ -133,33 +139,33 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     }
 }
 
-- (void)evaluateMessageWithBeauty:(BOOL)isOpenBeauty white:(NSInteger)whitenessLevel smoothLevel:(NSInteger)smoothLevel ruddyLevel:(NSInteger)ruddyLevel brightLevel:(NSInteger)brightLevel filter:(FILTER_TYPE)filter filterLevel:(int)filterLevel callback:(nonnull BeautyCallback)callback {
+- (void)evaluateMessageWithWhite:(NSInteger)whitenessLevel smoothLevel:(NSInteger)smoothLevel ruddyLevel:(NSInteger)ruddyLevel brightLevel:(NSInteger)brightLevel filter:(FILTER_TYPE)filter filterLevel:(int)filterLevel callback:(nonnull BeautyCallback)callback {
     if (callback) {
         self.callback = callback;
     }
-
-    self.isOpenBeauty = isOpenBeauty;
-    self.filter = filter;
-    self.filterLevel = filterLevel;
-    if (isOpenBeauty) {
-        self.whitenessLevel = whitenessLevel;
-        self.smoothLevel = smoothLevel;
-        self.ruddyLevel = ruddyLevel;
-        self.brightLevel = brightLevel;
-    }
-    else {
-        self.whitenessLevel = 0;
-        self.smoothLevel = 0;
-        self.ruddyLevel = 0;
-        self.brightLevel = 5;
-    }
+    
+    self.defaultWhite = whitenessLevel;
+    self.defaultSmooth = smoothLevel;
+    self.defaultRuddy = ruddyLevel;
+    self.defaultBrightless = brightLevel;
+    self.defaultFilter = filter;;
+    self.defaultFilterLevel = filterLevel;
+    
     [self showDefaultDisplay];
 }
 
 
 - (void)showDefaultDisplay {
     self.isChooseBeauty = YES;
+    self.isOpenBeauty = YES;
     self.chooseIndex = BEAUTY_INDEX_NONE;
+    
+    self.filter = self.defaultFilter;
+    self.filterLevel = self.defaultFilterLevel;
+    self.whitenessLevel = self.defaultWhite;
+    self.smoothLevel = self.defaultSmooth;
+    self.ruddyLevel = self.defaultRuddy;
+    self.brightLevel = self.defaultBrightless;
 }
 
 + (instancetype)shareInstance {
@@ -169,15 +175,34 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
 
 // 重置美颜和滤镜
 - (IBAction)resetButtonAction:(id)sender {
-    
-    
+    // 重置所有美颜状态
+    [self resetBeautyPage];
+    [self resetFilterPage];
+    self.sliderBgView.hidden = YES;
 }
 
+- (void)resetFilterPage {
+    [self clearFilterStatus];
+    self.filter = self.defaultFilter;
+    self.filterLevel = self.defaultFilterLevel;
+}
+
+// 重置美颜
+- (void)resetBeautyPage {
+    self.whitenessLevel = self.defaultWhite;
+    self.smoothLevel = self.defaultSmooth;
+    self.ruddyLevel = self.defaultRuddy;
+    self.brightLevel = self.defaultBrightless;
+    // 剔除上次选中状态
+    [self clearLastChooseStatus:self.chooseIndex];
+    self.chooseIndex = BEAUTY_INDEX_NONE;
+}
 
 - (IBAction)switchButtonAction:(UIButton *)sender {
+    [self resetBeautyPage];
     self.isOpenBeauty = !self.isOpenBeauty;
     if (self.callback) {
-        self.callback(self.isOpenBeauty, 0, 0, 0, 5, self.filter,self.filterLevel);
+        self.callback(self.isOpenBeauty, self.whitenessLevel, self.smoothLevel, self.ruddyLevel, self.brightLevel, self.filter,self.filterLevel);
     }
 }
 
@@ -186,24 +211,25 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     // 回调数据
     if (self.isChooseBeauty) { // 如果当前是美颜table
         if (self.chooseIndex == BEAUTY_INDEX_WHITE) {
-            self.whitenessLevel = sender.value;
+            self.whitenessLevel = [self.valueLabel.text integerValue];
         }
         else if (self.chooseIndex == BEAUTY_INDEX_SMOOTH) {
-            self.smoothLevel = sender.value;
+            self.smoothLevel = [self.valueLabel.text integerValue];
         }
         else if (self.chooseIndex == BEAUTY_INDEX_RUDDY) {
-            self.ruddyLevel = sender.value;
+            self.ruddyLevel = [self.valueLabel.text integerValue];
         }
         else if (self.chooseIndex == BEAUTY_INDEX_LIGHT) {
-            self.brightLevel = sender.value;
+            self.brightLevel = [self.valueLabel.text integerValue];
         }
     }
     else { // 滤镜
-        self.filterLevel = sender.value;
+        self.filterLevel = [self.valueLabel.text intValue];
     }
     if (self.callback) {
-        self.callback(self.isOpenBeauty, 0, 0, 0, 5, self.filter,self.filterLevel);
+        self.callback(self.isOpenBeauty, self.whitenessLevel, self.smoothLevel, self.ruddyLevel, self.brightLevel, self.filter,self.filterLevel);
     }
+    NSLog(@"----- white : %zd smooth : %zd ruddy :%zd bright : %zd", self.whitenessLevel,self.smoothLevel,self.ruddyLevel,self.brightLevel);
 }
 
 
@@ -215,6 +241,7 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
         [self.ruddyImage setImage:[UIImage imageNamed:@"ruddy_unselect"]];
         [self.lightImage setImage:[UIImage imageNamed:@"light_unselect"]];
         [self.beautySwitchButton setImage:[UIImage imageNamed:@"beauty_on"] forState:UIControlStateNormal];
+        self.beautyStatusLabel.text = @"已开启";
     }
     else {
         
@@ -223,22 +250,29 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
         [self.ruddyImage setImage:[UIImage imageNamed:@"ruddy_alpha"]];
         [self.lightImage setImage:[UIImage imageNamed:@"light_alpha"]];
         [self.beautySwitchButton setImage:[UIImage imageNamed:@"beauty_close"] forState:UIControlStateNormal];
+        self.beautyStatusLabel.text = @"关闭";
     }
     [self resetTitleColor];
 }
+
 - (void)resetTitleColor {
-    [self.whiteTitle setTextColor:HexRGB(0xffffff)];
-    [self.smoothTitle setTextColor:HexRGB(0xffffff)];
-    [self.ruddyTitle setTextColor:HexRGB(0xffffff)];
-    [self.lightLabel setTextColor:HexRGB(0xffffff)];
+    if (_isOpenBeauty) {
+        [self.whiteTitle setTextColor:HexRGB(0xffffff)];
+        [self.smoothTitle setTextColor:HexRGB(0xffffff)];
+        [self.ruddyTitle setTextColor:HexRGB(0xffffff)];
+        [self.lightLabel setTextColor:HexRGB(0xffffff)];
+    }
+    else {
+        [self.whiteTitle setTextColor:HexRGBAlpha(0xffffff, 0.6f)];
+        [self.smoothTitle setTextColor:HexRGBAlpha(0xffffff, 0.6f)];
+        [self.ruddyTitle setTextColor:HexRGBAlpha(0xffffff, 0.6f)];
+        [self.lightLabel setTextColor:HexRGBAlpha(0xffffff, 0.6f)];
+    }
+    
 }
 
 - (void)setIsChooseBeauty:(BOOL)isChooseBeauty {
     _isChooseBeauty = isChooseBeauty;
-//    [self clearLastChooseStatus:self.chooseIndex];
-//    self.chooseIndex = BEAUTY_INDEX_NONE;
-//    self.slider.hidden = YES;
-    // 判断是否有选中的
     
     if (_isChooseBeauty) {
         self.beautyView.hidden = NO;
@@ -259,9 +293,29 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
         [self.filterTitle setFont:[UIFont systemFontOfSize:16.0f weight:UIFontWeightMedium]];
         [self.filterTitle setTextColor:HexRGB(0xffffff)];
         self.slider.maximumValue = 100;
+        
     }
+    // 设置当前选择的状态
+    self.filterLevel = self.defaultFilterLevel;
+    self.whitenessLevel = self.defaultWhite;
+    self.smoothLevel = self.defaultSmooth;
+    self.ruddyLevel = self.defaultRuddy;
+    self.brightLevel = self.defaultBrightless;
+    [self displaySliderStatus];
 }
 
+- (void)displaySliderStatus {
+    if (self.isChooseBeauty) {
+        BEAUTY_INDEX index = self.chooseIndex;
+        self.chooseIndex = index;
+    }
+    else {
+        FILTER_TYPE type = self.filter;
+        self.filter = type;
+    }
+}
+
+
 #pragma mark ---- page Control
 - (IBAction)switchBeautyPage:(id)sender {
     if (self.isChooseBeauty) {
@@ -285,22 +339,24 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     if (self.chooseIndex == BEAUTY_INDEX_WHITE) {
         return;
     }
-    [self showSliderBarWithValue:self.whitenessLevel maxValue:9];
     // 剔除上次选中状态
     [self clearLastChooseStatus:self.chooseIndex];
     [self.whiteImage setImage:[UIImage imageNamed:@"white_selected"]];
     [self.whiteTitle setTextColor:THEMECOLOR];
     self.chooseIndex = BEAUTY_INDEX_WHITE;
-    self.slider.value = self.whitenessLevel;
-    self.valueLabel.text = [NSString stringWithFormat:@"%zd",self.whitenessLevel];
 }
 
 - (void)showSliderBarWithValue:(NSInteger)value maxValue:(NSInteger)maxValue {
-    self.slider.hidden = NO;
+    self.sliderBgView.hidden = NO;
     self.slider.maximumValue = maxValue;
     self.slider.value = value;
+    self.valueLabel.text = [NSString stringWithFormat:@"%zd",value];
+    if (self.callback) {
+        self.callback(self.isOpenBeauty, self.whitenessLevel, self.smoothLevel, self.ruddyLevel, self.brightLevel, self.filter,self.filterLevel);
+    }
 }
 
+
 - (IBAction)smoothAction:(id)sender {
     if (self.isOpenBeauty == NO) {
         return;
@@ -308,14 +364,11 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     if (self.chooseIndex == BEAUTY_INDEX_SMOOTH) {
         return;
     }
-    [self showSliderBarWithValue:self.smoothLevel maxValue:9];
     // 剔除上次选中状态
     [self clearLastChooseStatus:self.chooseIndex];
     [self.smoothImage setImage:[UIImage imageNamed:@"smooth_selected"]];
     [self.smoothTitle setTextColor:THEMECOLOR];
     self.chooseIndex = BEAUTY_INDEX_SMOOTH;
-    self.slider.value = self.smoothLevel;
-    self.valueLabel.text = [NSString stringWithFormat:@"%zd",self.smoothLevel];
 }
 
 - (IBAction)ruddyAction:(id)sender {
@@ -325,16 +378,11 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     if (self.chooseIndex == BEAUTY_INDEX_RUDDY) {
         return;
     }
-    [self showSliderBarWithValue:self.ruddyLevel maxValue:9];
     // 剔除上次选中状态
     [self clearLastChooseStatus:self.chooseIndex];
     [self.ruddyImage setImage:[UIImage imageNamed:@"ruddy_selected"]];
     [self.ruddyTitle setTextColor:THEMECOLOR];
     self.chooseIndex = BEAUTY_INDEX_RUDDY;
-    self.slider.value = self.ruddyLevel;
-    self.valueLabel.text = [NSString stringWithFormat:@"%zd",self.ruddyLevel];
-    self.slider.value = self.brightLevel;
-    self.valueLabel.text = [NSString stringWithFormat:@"%zd",self.brightLevel];
 }
 
 - (IBAction)lightAction:(id)sender {
@@ -345,7 +393,6 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
         return;
     }
     // 剔除上次选中状态
-    [self showSliderBarWithValue:self.brightLevel maxValue:9];
     [self clearLastChooseStatus:self.chooseIndex];
     [self.lightImage setImage:[UIImage imageNamed:@"light_selected"]];
     [self.lightLabel setTextColor:THEMECOLOR];
@@ -383,6 +430,42 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     }
 }
 
+- (void)setChooseIndex:(BEAUTY_INDEX)chooseIndex {
+    _chooseIndex = chooseIndex;
+    switch (chooseIndex) {
+        case BEAUTY_INDEX_NONE: // 无美颜
+        {
+            self.sliderBgView.hidden = YES;
+            self.whitenessLevel = self.defaultWhite;
+            self.smoothLevel = self.defaultSmooth;
+            self.ruddyLevel = self.defaultRuddy;
+            self.brightLevel = self.defaultBrightless;
+        }
+            break;
+        case BEAUTY_INDEX_WHITE: // 美白
+        {
+            [self showSliderBarWithValue:self.whitenessLevel maxValue:9];
+        }
+            break;
+        case BEAUTY_INDEX_SMOOTH: // 磨皮
+        {
+            [self showSliderBarWithValue:self.smoothLevel maxValue:9];
+        }
+            break;
+        case BEAUTY_INDEX_RUDDY:  // 红润
+        {
+            [self showSliderBarWithValue:self.ruddyLevel maxValue:9];
+        }
+            break;
+        case BEAUTY_INDEX_LIGHT:  // 亮度
+        {
+            [self showSliderBarWithValue:self.brightLevel maxValue:9];
+        }
+        default:
+            break;
+    }
+}
+
 
 #pragma mark ---- fliter action
 
@@ -394,15 +477,6 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     self.filter = FILTER_TYPE_NONE;
 }
 
-- (IBAction)nomalAction:(id)sender {
-    if (self.filter == FILTER_TYPE_NOMAL) {
-        return;
-    }
-    // 清除上次选中状态
-    [self clearFilterStatus];
-    self.filter = FILTER_TYPE_NOMAL;
-}
-
 - (IBAction)beautifulFilter:(id)sender {
     if (self.filter == FILTER_TYPE_WEIMEI) {
         return;
@@ -417,6 +491,7 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
     }
     [self clearFilterStatus];
     self.filter = FILTER_TYPE_QINGXIN;
+    
 }
 
 - (IBAction)romanceFilter:(id)sender {
@@ -436,12 +511,6 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
             [self.noneLabel setTextColor:HexRGB(0xffffff)];
         }
             break;
-        case FILTER_TYPE_NOMAL:
-        {
-            [self.nomalImage setImage:[UIImage imageNamed:@"filter_nomal"]];
-            [self.nomalTitle setTextColor:HexRGB(0xffffff)];
-        }
-            break;
         case FILTER_TYPE_WEIMEI:
         {
             [self.beautyfulImg setImage:[UIImage imageNamed:@"filter_nomal"]];
@@ -472,37 +541,36 @@ typedef NS_ENUM(NSInteger, BEAUTY_INDEX) {
         {
             [self.filterNoneButton setImage:[UIImage imageNamed:@"filter_none_selected"] forState:UIControlStateNormal];
             [self.noneLabel setTextColor:THEMECOLOR];
-        }
-            break;
-        case FILTER_TYPE_NOMAL:
-        {
-            [self.nomalImage setImage:[UIImage imageNamed:@"filter_selected"]];
-            [self.nomalTitle setTextColor:THEMECOLOR];
+            self.sliderBgView.hidden = YES;
+            self.filterLevel = self.defaultFilterLevel;
         }
             break;
         case FILTER_TYPE_WEIMEI:
         {
             [self.beautyfulImg setImage:[UIImage imageNamed:@"filter_selected"]];
             [self.beautifulTitle setTextColor:THEMECOLOR];
+            self.sliderBgView.hidden = NO;
         }
             break;
         case FILTER_TYPE_QINGXIN:
         {
             [self.freshImage setImage:[UIImage imageNamed:@"filter_selected"]];
             [self.freshTitle setTextColor:THEMECOLOR];
+            self.sliderBgView.hidden = NO;
         }
             break;
         case FILTER_TYPE_LANGMAN:
         {
             [self.romanceImage setImage:[UIImage imageNamed:@"filter_selected"]];
             [self.romanceTitle setTextColor:THEMECOLOR];
+            self.sliderBgView.hidden = NO;
         }
             break;
         default:
             break;
     }
     self.slider.value = self.filterLevel;
-    self.valueLabel.text = [NSString stringWithFormat:@"%zd",self.filterLevel];
+    self.valueLabel.text = [NSString stringWithFormat:@"%d",self.filterLevel];
     
     if (self.callback) {
         self.callback(self.isOpenBeauty, self.whitenessLevel, self.smoothLevel, self.ruddyLevel, self.brightLevel, self.filter, self.filterLevel);

+ 14 - 18
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/KSBeautySettingView.xib

@@ -413,10 +413,10 @@
                                                     <rect key="frame" x="15" y="0.0" width="48" height="48"/>
                                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                     <connections>
-                                                        <action selector="nomalAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="R6v-n5-308"/>
+                                                        <action selector="beautifulFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="Qnb-RV-zDS"/>
                                                     </connections>
                                                 </button>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="正常" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kJw-qo-bpn">
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="唯美" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kJw-qo-bpn">
                                                     <rect key="frame" x="27.5" y="62" width="22.5" height="16"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="16" id="DAR-Yu-PR5"/>
@@ -452,10 +452,10 @@
                                                     <rect key="frame" x="15" y="0.0" width="48" height="48"/>
                                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                     <connections>
-                                                        <action selector="beautifulFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="pWe-UM-GiV"/>
+                                                        <action selector="freshFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="sVg-GI-5ZY"/>
                                                     </connections>
                                                 </button>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="唯美" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S8s-I0-tSC">
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="清新" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S8s-I0-tSC">
                                                     <rect key="frame" x="27.5" y="62" width="22.5" height="16"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="16" id="4Br-0c-MHX"/>
@@ -491,10 +491,10 @@
                                                     <rect key="frame" x="14.5" y="0.0" width="48" height="48"/>
                                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                                     <connections>
-                                                        <action selector="freshFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="Xnw-uK-M7i"/>
+                                                        <action selector="romanceFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="XCD-FC-1xy"/>
                                                     </connections>
                                                 </button>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="清新" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Y4-Ad-CzM">
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="浪漫" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Y4-Ad-CzM">
                                                     <rect key="frame" x="27.5" y="62" width="22.5" height="16"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="16" id="sb4-tU-H6b"/>
@@ -516,7 +516,7 @@
                                                 <constraint firstItem="pdh-ud-bTE" firstAttribute="top" secondItem="20H-t7-qSf" secondAttribute="top" id="hBV-gA-x29"/>
                                             </constraints>
                                         </view>
-                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8SF-4D-mgk">
+                                        <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8SF-4D-mgk">
                                             <rect key="frame" x="233" y="0.0" width="77.5" height="80"/>
                                             <subviews>
                                                 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="filter_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="CJv-aL-jke">
@@ -529,9 +529,6 @@
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cqs-nS-u45">
                                                     <rect key="frame" x="14.5" y="0.0" width="48" height="48"/>
                                                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                                    <connections>
-                                                        <action selector="romanceFilter:" destination="iN0-l3-epB" eventType="touchUpInside" id="vUr-mW-G2J"/>
-                                                    </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="浪漫" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cVb-q0-hke">
                                                     <rect key="frame" x="27.5" y="62" width="22.5" height="16"/>
@@ -653,25 +650,24 @@
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
-                <outlet property="beautifulTitle" destination="S8s-I0-tSC" id="lZk-Dj-zQa"/>
+                <outlet property="beautifulTitle" destination="kJw-qo-bpn" id="ibg-E4-g7q"/>
+                <outlet property="beautyStatusLabel" destination="3F5-20-8I7" id="mQq-kY-YTg"/>
                 <outlet property="beautySwitchButton" destination="aez-Hv-K2d" id="pyu-68-WwD"/>
                 <outlet property="beautyTitle" destination="FzD-oX-5MY" id="Dj5-WA-h75"/>
                 <outlet property="beautyView" destination="WYa-RN-BOA" id="4JB-rm-vYQ"/>
-                <outlet property="beautyfulImg" destination="5Uz-vA-T1r" id="sk2-Jn-hLA"/>
+                <outlet property="beautyfulImg" destination="lQ2-kl-BsL" id="p8I-19-H8H"/>
                 <outlet property="bottomView" destination="Vtz-4V-iot" id="8YT-x7-y0M"/>
                 <outlet property="filterNoneButton" destination="YAj-7D-uan" id="aDE-HP-rU2"/>
                 <outlet property="filterTitle" destination="E8U-19-un4" id="x58-hS-CQq"/>
                 <outlet property="filterView" destination="PTj-Ed-zUJ" id="15H-X5-6Gf"/>
-                <outlet property="freshImage" destination="20H-t7-qSf" id="6M1-pO-jyR"/>
-                <outlet property="freshTitle" destination="4Y4-Ad-CzM" id="jci-4x-pKK"/>
+                <outlet property="freshImage" destination="5Uz-vA-T1r" id="bLc-nP-tDe"/>
+                <outlet property="freshTitle" destination="S8s-I0-tSC" id="nhD-6q-9Ri"/>
                 <outlet property="leftSpace" destination="BIX-iO-Xwt" id="p3S-y6-KVs"/>
                 <outlet property="lightImage" destination="ake-IX-Mjz" id="d20-dO-4Q7"/>
                 <outlet property="lightLabel" destination="snn-G3-zna" id="8oL-T8-XEv"/>
-                <outlet property="nomalImage" destination="lQ2-kl-BsL" id="Y27-YB-b8T"/>
-                <outlet property="nomalTitle" destination="kJw-qo-bpn" id="osV-II-k01"/>
                 <outlet property="noneLabel" destination="9x3-Uf-pnA" id="NZJ-7s-ISH"/>
-                <outlet property="romanceImage" destination="CJv-aL-jke" id="6QD-J6-Kkb"/>
-                <outlet property="romanceTitle" destination="cVb-q0-hke" id="BmK-gc-PUw"/>
+                <outlet property="romanceImage" destination="20H-t7-qSf" id="Dbr-E9-jga"/>
+                <outlet property="romanceTitle" destination="4Y4-Ad-CzM" id="XYf-lJ-nLq"/>
                 <outlet property="ruddyImage" destination="tYC-6T-e9a" id="W8V-gt-yGD"/>
                 <outlet property="ruddyTitle" destination="vA3-2g-fa1" id="rnf-p1-IWL"/>
                 <outlet property="slider" destination="4do-5b-7tz" id="SHD-Eb-8en"/>

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

@@ -48,7 +48,7 @@
     switch (action) {
         case LOGINACTION_CODE:
         {
-            if (![NSString isMobileNum:phone]) {
+            if (![NSString isMobilePhoneNumber:phone]) {
                 [self MBPShow:@"手机号码输入有误"];
                 return;
             }
@@ -60,6 +60,9 @@
         case LOGINACTION_PASSWORD:
         {
             PasswordLoginController *ctrl = [[PasswordLoginController alloc] init];
+            if (![NSString isEmptyString:phone]) {
+                ctrl.phoneNo = phone;
+            }
             [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Controller/PasswordLoginController.h

@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface PasswordLoginController : KSBaseViewController
 
+@property (nonatomic, strong) NSString *phoneNo;
+
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -29,12 +29,18 @@
 - (void)configUI {
     CGFloat height = KPortraitHeight;
     _bodyView = [PasswordBodyView shareInstance];
-    if (![NSString isEmptyString:UserDefault(PHONEKEY)]) {
-        _bodyView.phoneField.text = UserDefault(PHONEKEY);
+    if (![NSString isEmptyString:self.phoneNo] && ![self.phoneNo isEqualToString:UserDefault(PHONEKEY)]) {
+        _bodyView.phoneField.text = self.phoneNo;
     }
-    if (![NSString isEmptyString:UserDefault(PASSWORDKEY)]) {
-        _bodyView.passwordField.text = UserDefault(PASSWORDKEY);
+    else {
+        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);
@@ -59,7 +65,7 @@
         [self backAction];
     }
     else if (action == PWDLOGIN_LOGIN) {
-        if (![NSString isMobileNum:[parm stringValueForKey:@"phone"]]) {
+        if (![NSString isMobilePhoneNumber:[parm stringValueForKey:@"phone"]]) {
             [self MBPShow:@"手机号码输入有误"];
             return;
         }

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

@@ -7,6 +7,7 @@
 
 #import <Foundation/Foundation.h>
 #import "UserInfo.h"
+#import <RongIMKit/RongIMKit.h>
 
 
 typedef void(^UserInfoCallback)(UserInfo * _Nonnull userInfo);

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Login/Model/UserInfoManager.m

@@ -9,7 +9,6 @@
 #import "ArchiveTools.h"
 #import "JPUSHService.h"
 #import <Bugly/Bugly.h>
-#import <RongIMKit/RongIMKit.h>
 #import "RCConnectionManager.h"
 #import "AppDelegate.h"
 

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

@@ -78,7 +78,7 @@
 
 - (IBAction)passwordLogin:(id)sender {
     if (self.callback) {
-        self.callback(LOGINACTION_PASSWORD, @"");
+        self.callback(LOGINACTION_PASSWORD, self.phoneField.text);
     }
 }
 

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

@@ -123,7 +123,7 @@
         return;
     }
     // 判断手机号是否合规
-    if (![NSString isMobileNum:phoneNo]) {
+    if (![NSString isMobilePhoneNumber:phoneNo]) {
         [self MBPShow:@"手机号码输入有误"];
         return;
     }

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/Controller/MyBankCardViewController.m

@@ -125,7 +125,7 @@
     if (!_emptyView) {
         _emptyView = [[KSButtonStatusView alloc] init];
         _emptyView.imageName = @"empty_card";
-        [_emptyView setText:@"您暂未绑定银行卡绑定后可将收入提现"];
+        [_emptyView setText:@"您暂未绑定银行卡绑定后可将收入结算"];
         _emptyView.buttonTitle = @"立即绑卡";
         MJWeakSelf;
         [_emptyView buttonClickCallback:^{

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/BankCard/View/KSConfirmAlertView.xib

@@ -76,7 +76,7 @@
                                 <action selector="sureAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Hbi-Z3-eFU"/>
                             </connections>
                         </button>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="解绑后将无法将收入提现,请确认是否继续解绑" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dpE-gf-YK1">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="解绑后将无法将收入结算,请确认是否继续解绑" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dpE-gf-YK1">
                             <rect key="frame" x="19" y="67" width="277" height="33.5"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                             <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>

+ 22 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m

@@ -82,34 +82,44 @@
     [self.view addSubview:imageView];
     
     [self.view addSubview:self.navView];
-    CGFloat navHeight = CGRectGetHeight(self.navView.frame);
+    [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(kNaviBarHeight);
+    }];
+    
     [self.view bringSubviewToFront:self.scrollView];
+    [self.view bringSubviewToFront:self.navView];
     [self.scrollView mas_remakeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(self.view.mas_top).offset(navHeight);
+        make.top.mas_equalTo(self.view.mas_top);
         make.left.right.mas_equalTo(self.view);
         make.bottom.mas_equalTo(self.view.mas_bottom);
     }];
+    self.scrollView.backgroundColor = [UIColor clearColor];
     
+    UIView *headView = [[UIView alloc] init];
+    headView.backgroundColor = [UIColor clearColor];
+    [self.scrollView addSubview:headView];
+    [headView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.left.right.mas_equalTo(self.view);
+        make.height.mas_equalTo(kNaviBarHeight);
+    }];
     // bodyView;
     _bodyView = [MineBodyView shareInstance];
     [self.scrollView addSubview:_bodyView];
     CGFloat contentMinHeight = [_bodyView getViewHeight];
-    CGFloat contentHeight = kScreenHeight - kTabBarHeight - navHeight;
+    CGFloat contentHeight = kScreenHeight - kTabBarHeight - kNaviBarHeight;
     CGFloat viewHeight = contentMinHeight > contentHeight ? contentMinHeight : contentHeight;
     [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.mas_equalTo(self.scrollView.mas_top);
+        make.top.mas_equalTo(headView.mas_bottom);
         make.left.right.mas_equalTo(self.view);
         make.height.mas_equalTo(viewHeight);
+        make.bottom.mas_equalTo(self.scrollView.mas_bottom);
     }];
     MJWeakSelf;
     [_bodyView operationCallback:^(MINEVIEWTYPE type) {
         [weakSelf operationAction:type];
     }];
-    
-    [self.scrollView setContentSize:CGSizeMake(kScreenWidth, viewHeight)];
-    if (viewHeight + navHeight > kScreenHeight - kNaviBarHeight) {
-        self.scrollView.scrollEnabled = YES;
-    }
 }
 
 - (void)operationAction:(MINEVIEWTYPE)type {
@@ -148,7 +158,9 @@
             break;
         case MINEVIEWTYPE_ORDER: // 商品订单
         {
-            
+            KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
+            ctrl.url = [NSString stringWithFormat:@"%@%@",WEBHOST,@"/#/goodsOrder"];
+            [self.navigationController pushViewController:ctrl animated:YES];
         }
             break;
         case MINEVIEWTYPE_ACCOMPANY: // 陪练课设置

+ 12 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyNameViewController.m

@@ -7,6 +7,7 @@
 
 #import "ModifyNameViewController.h"
 #import "ModifyNameBodyView.h"
+#import "UserInfoManager.h"
 
 @interface ModifyNameViewController ()
 
@@ -57,7 +58,6 @@
         [KSNetworkingManager imGroupModify:KS_POST name:self.bodyView.nameField.text groupId:self.groupId success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
-                UserDefaultSetObjectForKey(self.bodyView.nameField.text, NicknameKey)
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
                     if (weakSelf.callback) {
@@ -81,8 +81,11 @@
         [KSNetworkingManager modifyTeacherMessage:KS_POST avatal:avatal gender:gendar username:self.bodyView.nameField.text success:^(NSDictionary * _Nonnull dic) {
             [self removehub];
             if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
+                UserDefaultSetObjectForKey(self.bodyView.nameField.text, NicknameKey);
+
                 MJWeakSelf;
                 [self KSShowMsg:@"修改成功" promptCompletion:^{
+                    [weakSelf updateRongCloudUserInfo];
                     if (weakSelf.callback) {
                         weakSelf.callback();
                     }
@@ -96,7 +99,14 @@
             [self removehub];
         }];
     }
-    
+}
+
+- (void)updateRongCloudUserInfo {
+    // 设置个人信息
+    RCUserInfo *currentUserInfo =
+    [[RCUserInfo alloc] initWithUserId:UserDefault(UIDKey) name:UserDefault(NicknameKey) portrait:UserDefault(AvatarUrlKey)];
+    [RCIM sharedRCIM].currentUserInfo = currentUserInfo;
+    [[RCIM sharedRCIM] clearGroupUserInfoCache];
 }
 
 /*

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/ModifyPhoneChangeController.m

@@ -48,7 +48,7 @@
 }
 
 - (void)operationWithAction:(CHANGEACTION)action parm:(NSDictionary *)parm {
-    if (![NSString isMobileNum:[parm stringValueForKey:@"phone"]]) {
+    if (![NSString isMobilePhoneNumber:[parm stringValueForKey:@"phone"]]) {
         [self MBPShow:@"手机号码输入有误"];
         return;
     }

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

@@ -41,7 +41,7 @@
 }
 
 - (void)checkWithPhone:(NSString *)phoneNo password:(NSString *)password {
-    if (![NSString isMobileNum:phoneNo]) {
+    if (![NSString isMobilePhoneNumber:phoneNo]) {
         [self MBPShow:@"手机号码输入有误"];
         return;
     }

+ 8 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/Controller/UserSettingViewController.m

@@ -195,6 +195,7 @@
             [self MBPShow:@"修改成功"];
             if (![NSString isEmptyString:imgUrl]) {
                 UserDefaultSetObjectForKey(imgUrl, AvatarUrlKey);
+                [self updateRongCloudUserInfo];
             }
             
             [self requestUserMessage];
@@ -207,7 +208,13 @@
     }];
 }
 
-
+- (void)updateRongCloudUserInfo {
+    // 设置个人信息
+    RCUserInfo *currentUserInfo =
+    [[RCUserInfo alloc] initWithUserId:UserDefault(UIDKey) name:UserDefault(NicknameKey) portrait:UserDefault(AvatarUrlKey)];
+    [RCIM sharedRCIM].currentUserInfo = currentUserInfo;
+    [[RCIM sharedRCIM] clearGroupUserInfoCache];
+}
 
 - (void)showModifySexAlert {
     NSString *titleString = @"选择性别";

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineNavView.m

@@ -23,7 +23,6 @@
 
 + (instancetype)shareInstance {
     MineNavView *view = [[[NSBundle mainBundle] loadNibNamed:@"MineNavView" owner:nil options:nil] firstObject];
-    view.frame = CGRectMake(0, 0, kScreenWidth, kNaviBarHeight);
     return view;
 }