Sfoglia il codice sorgente

首页小组课按钮

Steven 2 mesi fa
parent
commit
3cb3c937f9
22 ha cambiato i file con 246 aggiunte e 658 eliminazioni
  1. 10 6
      KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj
  2. 22 0
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/Contents.json
  3. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/group_tips@2x.png
  4. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/group_tips@3x.png
  5. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/program_tips.imageset/program_tips@2x.png
  6. BIN
      KulexiuForStudent/KulexiuForStudent/Assets.xcassets/program_tips.imageset/program_tips@3x.png
  7. 12 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m
  8. 9 2
      KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m
  9. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/Controller/MyGroupCourseGroupController.m
  10. 22 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.h
  11. 64 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.m
  12. 85 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.xib
  13. 1 1
      KulexiuForStudent/KulexiuForStudent/Module/Course/View/MusicRoomCourseCell.xib
  14. 2 0
      KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.h
  15. 2 14
      KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.m
  16. 2 6
      KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeNavView.xib
  17. 8 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m
  18. 1 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.h
  19. 3 0
      KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.m
  20. 2 6
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseGroupNavView.xib
  21. 0 21
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.h
  22. 0 601
      KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.m

+ 10 - 6
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -247,7 +247,6 @@
 		BC106C4D2A933E75000759A9 /* LiveRoomHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC106C4A2A933E74000759A9 /* LiveRoomHeadView.m */; };
 		BC106C502A9351DA000759A9 /* LiveModuleService.m in Sources */ = {isa = PBXBuildFile; fileRef = BC106C4F2A9351DA000759A9 /* LiveModuleService.m */; };
 		BC1191FF280ED64E00A716F7 /* MyCourseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC1191FE280ED64E00A716F7 /* MyCourseViewController.m */; };
-		BC119213280ED6A900A716F7 /* MyLessonBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC119200280ED6A600A716F7 /* MyLessonBodyView.m */; };
 		BC119215280ED6A900A716F7 /* MyLiveCourseCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC119203280ED6A700A716F7 /* MyLiveCourseCell.xib */; };
 		BC119216280ED6A900A716F7 /* MyLiveCourseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC119204280ED6A700A716F7 /* MyLiveCourseCell.m */; };
 		BC119217280ED6A900A716F7 /* MyLessonSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC119206280ED6A700A716F7 /* MyLessonSearchView.xib */; };
@@ -749,6 +748,8 @@
 		BCA0CB3E2D1A61B600488F8E /* GroupCourseGroupNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA0CB362D1A61B600488F8E /* GroupCourseGroupNavView.xib */; };
 		BCA0CB3F2D1A61B600488F8E /* GroupCourseListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA0CB392D1A61B600488F8E /* GroupCourseListCell.xib */; };
 		BCA0CB422D1A625200488F8E /* GroupCourseGroupInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA0CB412D1A625200488F8E /* GroupCourseGroupInfoModel.m */; };
+		BCA0CB452D1A835000488F8E /* MyGroupCourseGroupTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA0CB442D1A835000488F8E /* MyGroupCourseGroupTipsView.m */; };
+		BCA0CB472D1A835700488F8E /* MyGroupCourseGroupTipsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA0CB462D1A835700488F8E /* MyGroupCourseGroupTipsView.xib */; };
 		BCA1136828A3A5CF007FAFB9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1136728A3A5CF007FAFB9 /* Accelerate.framework */; };
 		BCA193B8282B6094004A585D /* RecentCourseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA193B7282B6094004A585D /* RecentCourseModel.m */; };
 		BCA336992C942B280074DF75 /* KSSourceDownloadAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA336962C942B270074DF75 /* KSSourceDownloadAlert.m */; };
@@ -1528,8 +1529,6 @@
 		BC106C4F2A9351DA000759A9 /* LiveModuleService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LiveModuleService.m; sourceTree = "<group>"; };
 		BC1191FD280ED64E00A716F7 /* MyCourseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyCourseViewController.h; sourceTree = "<group>"; };
 		BC1191FE280ED64E00A716F7 /* MyCourseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyCourseViewController.m; sourceTree = "<group>"; };
-		BC119200280ED6A600A716F7 /* MyLessonBodyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyLessonBodyView.m; sourceTree = "<group>"; };
-		BC119202280ED6A600A716F7 /* MyLessonBodyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyLessonBodyView.h; sourceTree = "<group>"; };
 		BC119203280ED6A700A716F7 /* MyLiveCourseCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyLiveCourseCell.xib; sourceTree = "<group>"; };
 		BC119204280ED6A700A716F7 /* MyLiveCourseCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyLiveCourseCell.m; sourceTree = "<group>"; };
 		BC119205280ED6A700A716F7 /* MyLiveCourseCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyLiveCourseCell.h; sourceTree = "<group>"; };
@@ -2301,6 +2300,9 @@
 		BCA0CB392D1A61B600488F8E /* GroupCourseListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupCourseListCell.xib; sourceTree = "<group>"; };
 		BCA0CB402D1A625200488F8E /* GroupCourseGroupInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GroupCourseGroupInfoModel.h; sourceTree = "<group>"; };
 		BCA0CB412D1A625200488F8E /* GroupCourseGroupInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GroupCourseGroupInfoModel.m; sourceTree = "<group>"; };
+		BCA0CB432D1A835000488F8E /* MyGroupCourseGroupTipsView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyGroupCourseGroupTipsView.h; sourceTree = "<group>"; };
+		BCA0CB442D1A835000488F8E /* MyGroupCourseGroupTipsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyGroupCourseGroupTipsView.m; sourceTree = "<group>"; };
+		BCA0CB462D1A835700488F8E /* MyGroupCourseGroupTipsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyGroupCourseGroupTipsView.xib; sourceTree = "<group>"; };
 		BCA1136728A3A5CF007FAFB9 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
 		BCA193B6282B6094004A585D /* RecentCourseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecentCourseModel.h; sourceTree = "<group>"; };
 		BCA193B7282B6094004A585D /* RecentCourseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecentCourseModel.m; sourceTree = "<group>"; };
@@ -4131,8 +4133,6 @@
 				BC7354742CEED28000C2B35C /* MyCourseSortView */,
 				BC73547A2CEED28000C2B35C /* VideoCourseGroup */,
 				BC7354802CEED28000C2B35C /* VIPCourseGroup */,
-				BC119202280ED6A600A716F7 /* MyLessonBodyView.h */,
-				BC119200280ED6A600A716F7 /* MyLessonBodyView.m */,
 				BC119208280ED6A800A716F7 /* MyLessonSearchView.h */,
 				BC119209280ED6A800A716F7 /* MyLessonSearchView.m */,
 				BC119206280ED6A700A716F7 /* MyLessonSearchView.xib */,
@@ -5884,6 +5884,9 @@
 				BCA0CB372D1A61B600488F8E /* GroupCourseListCell.h */,
 				BCA0CB382D1A61B600488F8E /* GroupCourseListCell.m */,
 				BCA0CB392D1A61B600488F8E /* GroupCourseListCell.xib */,
+				BCA0CB432D1A835000488F8E /* MyGroupCourseGroupTipsView.h */,
+				BCA0CB442D1A835000488F8E /* MyGroupCourseGroupTipsView.m */,
+				BCA0CB462D1A835700488F8E /* MyGroupCourseGroupTipsView.xib */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -7014,6 +7017,7 @@
 				BC8C2C5B2823F57100FBA5D5 /* AddressBottomView.xib in Resources */,
 				BC71D261288804CD0010F14B /* img_50.png in Resources */,
 				BC71D25B288804CD0010F14B /* img_52.png in Resources */,
+				BCA0CB472D1A835700488F8E /* MyGroupCourseGroupTipsView.xib in Resources */,
 				BC40BA202812552300DEC0D1 /* KSHomeButton.xib in Resources */,
 				BC7663162827E49900C91A1D /* NotiferHeadView.xib in Resources */,
 				BC802D9928BC4FE90079E350 /* HomeHotMusicView.xib in Resources */,
@@ -7582,7 +7586,6 @@
 				BC71D13A2887CEB70010F14B /* LaunchAnimationViewController.m in Sources */,
 				2723B67E27F15D3D00E0B90B /* ModifyPhoneCheckController.m in Sources */,
 				BC542E5D2840A60100633781 /* UserSettingViewController.m in Sources */,
-				BC119213280ED6A900A716F7 /* MyLessonBodyView.m in Sources */,
 				BCCE95F32AB05F3D00AB6385 /* TenantHotAlbumCell.m in Sources */,
 				BC31BF262B21925700F7D538 /* WMGaugeView.m in Sources */,
 				BCB9FA35286D7C2F005D766B /* GuideListView.m in Sources */,
@@ -7686,6 +7689,7 @@
 				BC119263280FA90100A716F7 /* HomeworkDetailModel.m in Sources */,
 				BC7401192CD22FFA0056756A /* CBAutoScrollLabel.m in Sources */,
 				BCC0F6A52A8CDD3F00C4EFA4 /* CREmojiCollectionCell.m in Sources */,
+				BCA0CB452D1A835000488F8E /* MyGroupCourseGroupTipsView.m in Sources */,
 				2723B62427F157D500E0B90B /* NoticeEditBodyView.m in Sources */,
 				BCFDA65F28BCAEC80022B497 /* HomeInformationBodyView.m in Sources */,
 				BC38C4532AFA095D00ABFCC2 /* UserMusicFormalModel.m in Sources */,

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/Contents.json

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

BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/group_tips@2x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/Course/group_tips.imageset/group_tips@3x.png


BIN
KulexiuForStudent/KulexiuForStudent/Assets.xcassets/program_tips.imageset/program_tips@2x.png


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


+ 12 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/Controller/CourseViewController.m

@@ -67,6 +67,10 @@
 
 @property (nonatomic, assign) NSInteger pianoEndTime;        // 琴房课结束后退出时间配置(分钟)
 
+@property (nonatomic, assign) NSInteger groupStartTime;      // 小组课开课前可进入时间配置(分钟)
+
+@property (nonatomic, assign) NSInteger groupEndTime;        // 小组课结束后退出时间配置(分钟)
+
 @end
 
 @implementation CourseViewController
@@ -345,13 +349,19 @@
             NSDictionary *config = [[dic ks_dictionaryValueForKey:@"data"] ks_dictionaryValueForKey:@"sysConfig"];
             self.vipStartTime = [config ks_integerValueForKey:@"vipStartTime"];
             self.vipEndTime = [config ks_integerValueForKey:@"vipEndTime"];
+            
             self.practiceStartTime = [config ks_integerValueForKey:@"practiceStartTime"];
             self.practiceEndTime = [config ks_integerValueForKey:@"practiceEndTime"];
+            
             self.liveStartTime = [config ks_integerValueForKey:@"liveStartTime"];
             self.liveEndTime = [config ks_integerValueForKey:@"liveEndTime"];
+            
             self.pianoStartTime = [config ks_integerValueForKey:@"pianoStartTime"];
             self.pianoEndTime = [config ks_integerValueForKey:@"pianoEndTime"];
             
+            self.groupStartTime = [config ks_integerValueForKey:@"groupStartTime"];
+            self.groupEndTime = [config ks_intValueForKey:@"groupEndTime"];
+            
             NSArray *courseArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"studentList"];
             NSMutableArray *lessonArray = [NSMutableArray array];
             for (NSDictionary *parm in courseArray) {
@@ -443,8 +453,9 @@
     else {
         MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
         BOOL isGroup = [model.courseType isEqualToString:@"GROUP"] ? YES : NO;
+        NSInteger beforeTime = isGroup ? self.groupStartTime : self.pianoStartTime;
         MJWeakSelf;
-        [cell configWithSource:model isGroup:isGroup beforeTime:self.pianoStartTime callback:^(NSString * _Nonnull targetId) {
+        [cell configWithSource:model isGroup:isGroup beforeTime:beforeTime callback:^(NSString * _Nonnull targetId) {
             [weakSelf chatAction:targetId groupName:@"" isGroup:YES];
         }];
         return cell;

+ 9 - 2
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -79,8 +79,15 @@
     [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result ks_integerValueForKey:@"pianoStartTime"];
-            self.quitRomeEndTime = [result ks_integerValueForKey:@"pianoEndTime"];
+            if (self.courseType == MUTIL_COURSE_TYPE_GROUP) {
+                self.joinRoomBeforeTime = [result ks_integerValueForKey:@"groupStartTime"];
+                self.quitRomeEndTime = [result ks_integerValueForKey:@"groupEndTime"];
+            }
+            else {
+                self.joinRoomBeforeTime = [result ks_integerValueForKey:@"pianoStartTime"];
+                self.quitRomeEndTime = [result ks_integerValueForKey:@"pianoEndTime"];
+            }
+            
         }
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/Controller/MyGroupCourseGroupController.m

@@ -145,6 +145,7 @@
         ProgramCourseGroupBodyView *listView = (ProgramCourseGroupBodyView *)value;
         listView.enterStartTime = self.enterStartTime;
         listView.quitEndTime = self.quitEndTime;
+        listView.minStudentMum = self.infoModel.mixStudentNum;
         [listView beginFirstRefresh];
     }
 }

+ 22 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.h

@@ -0,0 +1,22 @@
+//
+//  MyGroupCourseGroupTipsView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/12/24.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MyGroupCourseGroupTipsView : UIView
+
++ (instancetype)sharedInstance;
+
+- (void)configWithMinStudentCount:(NSInteger)count;
+
++ (CGFloat)getViewHeightWithCount:(NSInteger)count;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 64 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.m

@@ -0,0 +1,64 @@
+//
+//  MyGroupCourseGroupTipsView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/12/24.
+//
+
+#import "MyGroupCourseGroupTipsView.h"
+
+@interface MyGroupCourseGroupTipsView ()
+
+@property (weak, nonatomic) IBOutlet UILabel *tipsLabel;
+
+
+@end
+
+@implementation MyGroupCourseGroupTipsView
+
++ (instancetype)sharedInstance {
+    MyGroupCourseGroupTipsView *view = [[[NSBundle mainBundle] loadNibNamed:@"MyGroupCourseGroupTipsView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+- (void)configWithMinStudentCount:(NSInteger)count {
+    NSString *descString = [NSString stringWithFormat:@"该小组课销售截止后,报名人数若少于%zd人将取消开课,已购买学员付费金额将自动返还,请您放心购买",count];
+    NSMutableParagraphStyle *paragraphStyle = [MyGroupCourseGroupTipsView getParagraphStyleWithFont:[UIFont systemFontOfSize:12.0f] lineHeight:23.0f];
+    CGFloat baselineOffset = [MyGroupCourseGroupTipsView getBaseOffline:[UIFont systemFontOfSize:12.0f] lineHeight:23.0f];
+    NSMutableAttributedString *introduceAttrs = [[NSMutableAttributedString alloc] initWithString:descString attributes:@{NSParagraphStyleAttributeName:paragraphStyle, NSBaselineOffsetAttributeName:@(baselineOffset),NSFontAttributeName:[UIFont systemFontOfSize:12.0f], NSForegroundColorAttributeName:HexRGB(0x777777)}];
+    self.tipsLabel.attributedText = introduceAttrs;
+}
+
++ (CGFloat)getViewHeightWithCount:(NSInteger)count {
+    NSString *descString = [NSString stringWithFormat:@"该小组课销售截止后,报名人数若少于%zd人将取消开课,已购买学员付费金额将自动返还,请您放心购买",count];
+    return 54 + 30 + [self getViewRealHeight:descString];
+}
+
++ (CGFloat)getBaseOffline:(UIFont *)font lineHeight:(CGFloat)lineHeight {
+    CGFloat baselineOffset = (lineHeight - font.lineHeight) / 4;
+    return baselineOffset;
+}
+
++ (NSMutableParagraphStyle *)getParagraphStyleWithFont:(UIFont *)font lineHeight:(CGFloat)lineHeigh {
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    paragraphStyle.maximumLineHeight = lineHeigh;
+    paragraphStyle.minimumLineHeight = lineHeigh;
+    return paragraphStyle;
+}
+
++ (CGFloat)getViewRealHeight:(NSString *)descString {
+    NSMutableParagraphStyle *paragraphStyle = [self getParagraphStyleWithFont:[UIFont systemFontOfSize:12.0f] lineHeight:23.0f];
+    CGFloat baselineOffset = [self getBaseOffline:[UIFont systemFontOfSize:12.0f] lineHeight:23.0f];
+    CGFloat height = [descString boundingRectWithSize:CGSizeMake(KPortraitWidth - 26, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSParagraphStyleAttributeName:paragraphStyle, NSBaselineOffsetAttributeName:@(baselineOffset),NSFontAttributeName:[UIFont systemFontOfSize:12.0f]} context:nil].size.height + 1;
+    return height;
+}
+
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 85 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/MyGroupCourse/View/MyGroupCourseGroupTipsView.xib

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MyGroupCourseGroupTipsView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="134"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cLT-ll-5be">
+                    <rect key="frame" x="14" y="0.0" width="365" height="104"/>
+                    <subviews>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="group_tips" translatesAutoresizingMaskIntoConstraints="NO" id="op9-EE-toU">
+                            <rect key="frame" x="12" y="12" width="18" height="18"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="18" id="mZM-d9-TXx"/>
+                                <constraint firstAttribute="width" constant="18" id="mmS-LY-3kL"/>
+                            </constraints>
+                        </imageView>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提示" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2jX-NY-K1H">
+                            <rect key="frame" x="36" y="10.333333333333334" width="72" height="21.666666666666664"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <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="iuN-hM-fdu">
+                            <rect key="frame" x="12" y="42" width="341" height="50"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="0.47843137254901957" green="0.47843137254901957" blue="0.47843137254901957" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="op9-EE-toU" firstAttribute="top" secondItem="cLT-ll-5be" secondAttribute="top" constant="12" id="1Ej-iG-vnf"/>
+                        <constraint firstAttribute="trailing" secondItem="iuN-hM-fdu" secondAttribute="trailing" constant="12" id="AmD-hz-RVJ"/>
+                        <constraint firstItem="2jX-NY-K1H" firstAttribute="centerY" secondItem="op9-EE-toU" secondAttribute="centerY" id="BZY-DO-aYA"/>
+                        <constraint firstItem="iuN-hM-fdu" firstAttribute="leading" secondItem="cLT-ll-5be" secondAttribute="leading" constant="12" id="Gjx-Wa-AvF"/>
+                        <constraint firstItem="2jX-NY-K1H" firstAttribute="leading" secondItem="op9-EE-toU" secondAttribute="trailing" constant="6" id="HaM-VP-Bkl"/>
+                        <constraint firstItem="iuN-hM-fdu" firstAttribute="top" secondItem="op9-EE-toU" secondAttribute="bottom" constant="12" id="S6U-su-OiW"/>
+                        <constraint firstItem="op9-EE-toU" firstAttribute="leading" secondItem="cLT-ll-5be" secondAttribute="leading" constant="12" id="TPY-Gd-JUc"/>
+                        <constraint firstAttribute="bottom" secondItem="iuN-hM-fdu" secondAttribute="bottom" constant="12" id="wSp-jg-1ev"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="8"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="cLT-ll-5be" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="0wc-Dm-VQX"/>
+                <constraint firstAttribute="bottom" secondItem="cLT-ll-5be" secondAttribute="bottom" constant="30" id="T6J-9w-2Yt"/>
+                <constraint firstItem="cLT-ll-5be" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ZUw-8t-xlw"/>
+                <constraint firstAttribute="trailing" secondItem="cLT-ll-5be" secondAttribute="trailing" constant="14" id="hIG-Ge-FPl"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <userDefinedRuntimeAttributes>
+                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                    <real key="value" value="8"/>
+                </userDefinedRuntimeAttribute>
+            </userDefinedRuntimeAttributes>
+            <connections>
+                <outlet property="tipsLabel" destination="iuN-hM-fdu" id="z79-py-HYz"/>
+            </connections>
+            <point key="canvasLocation" x="23.664122137404579" y="-55.633802816901408"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="group_tips" width="18" height="18"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 1 - 1
KulexiuForStudent/KulexiuForStudent/Module/Course/View/MusicRoomCourseCell.xib

@@ -201,7 +201,7 @@
     </objects>
     <resources>
         <image name="course_chat" width="19" height="18"/>
-        <image name="course_musicRoom" width="40" height="40"/>
+        <image name="course_musicRoom" width="56" height="56"/>
         <image name="course_time" width="16" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.h

@@ -28,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) UIColor *sortBgColor;
 
+@property (nonatomic, assign) NSInteger minStudentMum;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 2 - 14
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.m

@@ -126,20 +126,6 @@
     });
 }
 
-- (void)requestRoomConfig {
-    [KSNetworkingManager selectRoomConfigRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
-            self.joinRoomBeforeTime = [result ks_integerValueForKey:@"practiceStartTime"];
-            self.quitRomeEndTime = [result ks_integerValueForKey:@"practiceEndTime"];
-        }
-        else {
-            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
-        }
-    } faliure:^(NSError * _Nonnull error) {
-        
-    }];
-}
 
 - (void)requestData {
     NSString *classDate = nil;
@@ -545,6 +531,8 @@
     _sortBgColor = sortBgColor;
     self.sortView.backgroundColor = sortBgColor;
 }
+
+
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 2 - 6
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeNavView.xib

@@ -30,11 +30,7 @@
                             </connections>
                         </button>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="program_tips" translatesAutoresizingMaskIntoConstraints="NO" id="VqX-k4-IdB">
-                            <rect key="frame" x="359" y="12" width="20" height="20"/>
-                            <constraints>
-                                <constraint firstAttribute="height" constant="20" id="aNe-7N-jYM"/>
-                                <constraint firstAttribute="width" constant="20" id="eBX-73-7N0"/>
-                            </constraints>
+                            <rect key="frame" x="355" y="9.6666666666666643" width="24" height="25"/>
                         </imageView>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fmL-Hf-OFx">
                             <rect key="frame" x="349" y="0.0" width="44" height="44"/>
@@ -85,6 +81,6 @@
     </objects>
     <resources>
         <image name="back_black" width="12" height="20"/>
-        <image name="program_tips" width="20" height="20"/>
+        <image name="program_tips" width="24" height="25"/>
     </resources>
 </document>

+ 8 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -1449,6 +1449,14 @@
     }
     else if (type == RECENTCOURSE_TYPE_MUSICCLASS) { // 琴房课
         MusicRoomDetailViewController *detailVC = [[MusicRoomDetailViewController alloc] init];
+        detailVC.courseType = MUTIL_COURSE_TYPE_MUSIC;
+        detailVC.courseId = courseModel.courseId;
+        detailVC.courseGroupId = courseModel.courseGroupId;
+        [self.navigationController pushViewController:detailVC animated:YES];
+    }
+    else if (type == RECENTCOURSE_TYPE_GROUP) { // 小组
+        MusicRoomDetailViewController *detailVC = [[MusicRoomDetailViewController alloc] init];
+        detailVC.courseType = MUTIL_COURSE_TYPE_GROUP;
         detailVC.courseId = courseModel.courseId;
         detailVC.courseGroupId = courseModel.courseGroupId;
         [self.navigationController pushViewController:detailVC animated:YES];

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.h

@@ -12,6 +12,7 @@ typedef NS_ENUM(NSInteger, RECENTCOURSE_TYPE) {
     RECENTCOURSE_TYPE_LIVE,
     RECENTCOURSE_TYPE_ACCOMPANY,
     RECENTCOURSE_TYPE_MUSICCLASS, // 琴房
+    RECENTCOURSE_TYPE_GROUP,      // 小组课
     RECENTCOURSE_TYPE_VIP,
 };
 

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/View/RecentCourse/HomeRecentCourseView.m

@@ -89,6 +89,9 @@
         else if ([self.courseModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"]) {
             type = RECENTCOURSE_TYPE_MUSICCLASS;
         }
+        else if ([self.courseModel.courseType isEqualToString:@"GROUP"]) {
+            type = RECENTCOURSE_TYPE_GROUP;
+        }
         else if ([self.courseModel.courseType isEqualToString:@"VIP"]) {
             type = RECENTCOURSE_TYPE_VIP;
         }

+ 2 - 6
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyCourseGroupNavView.xib

@@ -36,11 +36,7 @@
                             <nil key="highlightedColor"/>
                         </label>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="program_tips" translatesAutoresizingMaskIntoConstraints="NO" id="cd4-ry-QF5">
-                            <rect key="frame" x="359" y="12" width="20" height="20"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="20" id="ZhB-TP-zNf"/>
-                                <constraint firstAttribute="height" constant="20" id="udx-p5-aah"/>
-                            </constraints>
+                            <rect key="frame" x="355" y="9.6666666666666643" width="24" height="25"/>
                         </imageView>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2NZ-5x-aXa">
                             <rect key="frame" x="349" y="0.0" width="44" height="44"/>
@@ -85,6 +81,6 @@
     </objects>
     <resources>
         <image name="back_black" width="12" height="20"/>
-        <image name="program_tips" width="20" height="20"/>
+        <image name="program_tips" width="24" height="25"/>
     </resources>
 </document>

+ 0 - 21
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.h

@@ -1,21 +0,0 @@
-//
-//  MyLessonBodyView.h
-//  KulexiuForTeacher
-//
-//  Created by 王智 on 2022/4/12.
-//
-
-#import <KSJXBodyView.h>
-#import "StateView.h"
-#import "Reachability.h"
-
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface MyLessonBodyView : KSJXBodyView
-
-@property (nonatomic, strong) NSMutableArray *subjectList;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 601
KulexiuForStudent/KulexiuForStudent/Module/Mine/MineCourse/View/MyLessonBodyView.m

@@ -1,601 +0,0 @@
-//
-//  MyLessonBodyView.m
-//  KulexiuForTeacher
-//
-//  Created by 王智 on 2022/4/12.
-//
-
-#import "MyLessonBodyView.h"
-#import "KSBaseWKWebViewController.h"
-#import "MyLiveCourseCell.h"
-#import "AccompanyCourseCell.h"
-#import "LiveLessonModel.h"
-#import "AccompanyLessonModel.h"
-#import "KSChatConversationViewController.h"
-#include "KSGroupConversationController.h"
-#import "MyLessonSearchView.h"
-#import "NewClassPopView.h"
-#import <KSFullDatePicker.h>
-#import "AccompanyDetailViewController.h"
-#import <KSChoosePicker.h>
-#import "MusicRoomCourseCell.h"
-#import "MusicRoomListModel.h"
-#import "MusicRoomDetailViewController.h"
-
-@interface MyLessonBodyView ()<UITableViewDelegate,UITableViewDataSource>
-
-@property (nonatomic, strong) NSDateFormatter *dateFormatter;
-
-@property (nonatomic, copy) MyLessonSearchView *sortView;
-
-@property (nonatomic, strong) NewClassPopView *popView;
-
-@property (nonatomic, strong) NSMutableArray *dataArray;
-
-@property (nonatomic, strong) StateView *promptView;
-@property (nonatomic, strong) UIView *promptPlaceView;
-
-@property (nonatomic, assign) BOOL networkAvaiable; // 网络是否可用
-
-@property (nonatomic, assign) BOOL isLoadMore;
-@property (nonatomic, assign) NSInteger rows;
-@property (nonatomic, assign) NSInteger pages;
-
-@property (nonatomic, assign) NSInteger secondChooseIndex;
-
-@property (nonatomic, assign) NSInteger thirdChooseIndex;
-
-@property (nonatomic, strong) NSString *classDate;
-
-@property (nonatomic, strong) NSString *status;
-
-@property (nonatomic, strong) NSString *subjectId;
-
-@property (nonatomic, strong) NSMutableArray *subjectMessageArray;
-
-@end
-
-@implementation MyLessonBodyView
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        
-        self.backgroundColor = HexRGB(0xf6f8f9);
-        self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) style:UITableViewStylePlain];
-        self.tableView.backgroundColor = HexRGB(0xf6f8f9);
-        self.tableView.showsVerticalScrollIndicator = NO;
-
-        self.tableView.dataSource = self;
-        self.tableView.delegate = self;
-        self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-        [self addSubview:self.tableView];
-        
-        
-        UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
-        headView.backgroundColor = HexRGB(0xf6f8f9);
-        self.tableView.tableHeaderView = headView;
-        
-        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
-        bottomView.backgroundColor = HexRGB(0xf6f8f9);
-        self.tableView.tableFooterView = bottomView;
-        [self.tableView registerNib:[UINib nibWithNibName:@"AccompanyCourseCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyCourseCell"];
-        [self.tableView registerNib:[UINib nibWithNibName:@"MyLiveCourseCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MyLiveCourseCell"];
-        [self.tableView registerNib:[UINib nibWithNibName:@"MusicRoomCourseCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MusicRoomCourseCell"];
-        
-        [self.dateFormatter setDateFormat:@"yyyy-MM"];
-        NSDate *currentDate = [NSDate date];
-        self.classDate = [self.dateFormatter stringFromDate:currentDate];
-        MJWeakSelf;
-        self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
-            [weakSelf resetParamenter];
-            [weakSelf requestData];
-        }];
-        self.tableView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
-            if (weakSelf.isLoadMore) {
-                weakSelf.pages += 1;
-                [weakSelf requestData];
-            }
-            else {
-                [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
-            }
-        }];
-    }
-    return self;
-}
-
-- (void)endRefresh {
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [self.tableView.mj_header endRefreshing];
-        [self.tableView.mj_footer endRefreshing];
-    });
-}
-
-- (void)refreshAndRequestData {
-    [self resetParamenter];
-    [self requestData];
-}
-
-- (void)resetParamenter {
-    self.isLoadMore = YES;
-    self.pages = 1;
-    self.rows = 10;
-    
-    self.dataArray = [NSMutableArray array];
-    [self.tableView.mj_footer resetNoMoreData];
-    [self setPromptString:@"暂无课程" imageName:@"empty_course" inView:self.tableView];
-    [self.tableView reloadData];
-}
-
-- (void)requestData {
-    if (self.selectIndex == 0) { // 趣纠课
-        [KSNetworkingManager queryStudentPracticeCourse:KS_POST classMonth:self.classDate status:self.status subjectId:self.subjectId page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-            [self endRefresh];
-            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
-                for (NSDictionary *parm in sourceArray) {
-                    AccompanyLessonModel *model = [[AccompanyLessonModel alloc] initWithDictionary:parm];
-                    [self.dataArray addObject:model];
-                }
-                
-                if (sourceArray.count < self.rows) {
-                    self.isLoadMore = NO;
-                }
-            }
-            else {
-                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
-            }
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        } faliure:^(NSError * _Nonnull error) {
-            [self endRefresh];
-            if (self.networkAvaiable == NO) {
-                [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
-            }
-            [self.dataArray removeAllObjects];
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        }];
-    }
-    else if (self.selectIndex == 1) { // 直播课
-        NSString *searchKey = nil;
-        [KSNetworkingManager queryMyLiveCourse:KS_POST courseType:@"LIVE" classDate:self.classDate status:self.status subjectId:self.subjectId search:searchKey page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-            [self endRefresh];
-            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
-                for (NSDictionary *parm in sourceArray) {
-                    LiveLessonModel *model = [[LiveLessonModel alloc] initWithDictionary:parm];
-                    [self.dataArray addObject:model];
-                }
-                
-                if (sourceArray.count < self.rows) {
-                    self.isLoadMore = NO;
-                }
-            }
-            else {
-                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
-            }
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        } faliure:^(NSError * _Nonnull error) {
-            [self endRefresh];
-            if (self.networkAvaiable == NO) {
-                [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
-            }
-            [self.dataArray removeAllObjects];
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        }];
-    }
-    else { // 琴房课
-        [KSNetworkingManager queryPianoClassRequest:KS_POST classMonth:self.classDate status:self.status subjectId:self.subjectId page:self.pages rows:self.rows success:^(NSDictionary * _Nonnull dic) {
-            [self endRefresh];
-            if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-                NSArray *sourceArray = [[dic ks_dictionaryValueForKey:@"data"] ks_arrayValueForKey:@"rows"];
-                for (NSDictionary *parm in sourceArray) {
-                    MusicRoomListModel *model = [[MusicRoomListModel alloc] initWithDictionary:parm];
-                    [self.dataArray addObject:model];
-                }
-                
-                if (sourceArray.count < self.rows) {
-                    self.isLoadMore = NO;
-                }
-            }
-            else {
-                [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
-            }
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        } faliure:^(NSError * _Nonnull error) {
-            [self endRefresh];
-            if (self.networkAvaiable == NO) {
-                [self setPromptString:@"暂无网络" imageName:@"no_networking" inView:self.tableView];
-            }
-            [self.dataArray removeAllObjects];
-            [self.tableView reloadData];
-            [self changePromptLabelStateWithArray:self.dataArray];
-        }];
-    }
-}
-
-- (void)beginRefreshImmediately {
-    [self.tableView.mj_header beginRefreshing];
-}
-
-- (void)beginFirstRefresh {
-    if (!self.isHeaderRefreshed) {
-        [self beginRefreshImmediately];
-    }
-}
-- (void)selectCellAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (self.lastSelectedIndexPath == indexPath) {
-        return;
-    }
-    if (self.lastSelectedIndexPath != nil) {
-        UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:self.lastSelectedIndexPath];
-        [cell setSelected:NO animated:NO];
-    }
-    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
-    [cell setSelected:YES animated:NO];
-    self.lastSelectedIndexPath = indexPath;
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    self.tableView.frame = self.bounds;
-    CGFloat topHeight = 55.0f;
-    self.tableView.frame = CGRectMake(0, topHeight, self.bounds.size.width, self.bounds.size.height - topHeight);
-    if (!_sortView) {
-        _sortView = [MyLessonSearchView shareInstance];
-        _sortView.frame = CGRectMake(0, 0, kScreenWidth, 55);
-        MJWeakSelf;
-        [_sortView sortAction:^(SORT_TYPE type) {
-            [weakSelf sortWithType:type];
-        }];
-        [self.dateFormatter setDateFormat:@"yyyy年MM月"];
-        NSDate *currentDate = [NSDate date];
-        [self.sortView.firstLabel setText:[self.dateFormatter stringFromDate:currentDate]];
-        [self addSubview:self.sortView];
-    }
-}
-
-- (void)sortWithType:(SORT_TYPE)type {
-    
-    if (type == SORT_TYPE_TIME) { // time
-        [self showPickerView];
-    }
-    else if (type == SORT_TYPE_STATUS) { // 状态
-        [self.popView refreshWithSourceArray:@[@"全部",@"未开始",@"进行中",@"已结束"] preChooseIndex:_secondChooseIndex inView:self actionItem:1];
-    }
-    else if (type == SORT_TYPE_SUBJECT) {
-        if (self.subjectList.count) {
-            NSMutableArray *nameArray = [NSMutableArray array];
-            [nameArray addObject:@"全部"];
-            for (NSDictionary *parm in self.subjectList) {
-                [nameArray addObject:[parm ks_stringValueForKey:@"subjectName"]];
-            }
-            MJWeakSelf;
-            KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"声部筛选" sourceData:nameArray  lastChooseIndex:0 sureButtonColor:CLIENT_THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
-                if (chooseIndex == 0) {
-                    [weakSelf.sortView.thirdLabel setText:@"全部声部"];
-                    weakSelf.subjectId = nil;
-                }
-                else {
-                    [weakSelf.sortView.thirdLabel setText:returnValue];
-                    NSDictionary *parm = self.subjectList[chooseIndex-1];
-                    weakSelf.subjectId = [parm ks_stringValueForKey:@"subjectId"];
-                }
-                self.sortView.thirdArrowUp = NO;
-                [weakSelf refreshAndRequestData];
-            } cancel:^{
-                self.sortView.thirdArrowUp = NO;
-            }];
-            [picker showPicker];
-        }
-        else {
-            [LOADING_MANAGER MBShowAUTOHidingInWindow:@"无声部信息"];
-            self.sortView.thirdArrowUp = NO;
-        }
-
-    }
-    else {
-        [self hiddenPopView];
-    }
-}
-
-- (void)showPickerView {
-    KSFullDatePicker *picker = [[KSFullDatePicker alloc] initWithTitle:@"" date:[NSDate date] pickMode:KSDATEPICKER_MODE_YEAR_MONTH sureButtonColor:CLIENT_THEMECOLOR selectDateBlock:^(NSString *date) {
-
-        self.classDate = date;
-        NSString *displayTime = [self getTimeDisplay:date];
-        [self.sortView.firstLabel setText:displayTime];
-        [self resetPickerStatus];
-        // 请求数据
-        [self refreshAndRequestData];
-    } cancleBlock:^{
-        [self resetPickerStatus];
-    }];
-    [picker show];
-}
-
-
-- (NSString *)getTimeDisplay:(NSString *)chooseMonth {
-    [self.dateFormatter setDateFormat:@"yyyy-MM"];
-    NSDate *chooseDate = [self.dateFormatter dateFromString:chooseMonth];
-    [self.dateFormatter setDateFormat:@"yyyy年MM月"];
-    NSString *displayTime = [self.dateFormatter stringFromDate:chooseDate];
-    return displayTime;
-}
-- (void)resetPickerStatus {
-    self.sortView.firstArrowUp = NO;
-}
-
-- (NewClassPopView *)popView {
-    if (!_popView) {
-        MJWeakSelf;
-        _popView = [[NewClassPopView alloc] initWithFrame:CGRectMake(0, 55, kScreenWidth, kScreenHeight - 55 - kNaviBarHeight - iPhoneXSafeBottomMargin) chooseCallback:^(NSString * _Nonnull sortStr, NSInteger chooseIndex, NSInteger item) {
-            if (chooseIndex != 0) {
-                // 回调
-                [weakSelf sortWithChooseIndex:chooseIndex item:item title:sortStr];
-            }
-            [weakSelf hiddenPopView];
-        }];
-    }
-    return _popView;
-}
-
-- (void)sortWithChooseIndex:(NSInteger)chooseIndex item:(NSInteger)item title:(NSString *)title {
-    if (item == 0) { //
-    }
-    else if (item == 1) { // 课程状态
-        self.secondChooseIndex = chooseIndex;
-        self.thirdChooseIndex = 0;
-        [self.sortView.secondLabel setText:title];
-        switch (chooseIndex) {
-            case 1:
-            {
-                self.status = nil;
-                [self.sortView.secondLabel setText:@"课程状态"];
-            }
-                break;
-            case 2:
-            {
-                self.status = @"NOT_START";
-            }
-                break;
-            case 3:
-            {
-                self.status = @"ING";
-            }
-                break;
-            case 4:
-            {
-                self.status = @"COMPLETE";
-            }
-                break;
-                
-            default:
-                break;
-        }
-    }
-    else if (item == 2) { // 声部筛选
-        self.thirdChooseIndex = chooseIndex;
-        [self.sortView.thirdLabel setText:title];
-
-        if (chooseIndex == 1) {
-            self.subjectId = nil;
-            [self.sortView.thirdLabel setText:@"全部声部"];
-        }
-        else {
-            NSDictionary *parm = self.subjectMessageArray[chooseIndex-1];
-            self.subjectId = [parm ks_stringValueForKey:@"subjectId"];
-        }
-    }
-    [self resetParamenter];
-    [self requestData];
-}
-
-
-- (void)hiddenPopView {
-    self.sortView.firstArrowUp = NO;
-    self.sortView.secondArrowUp = NO;
-    self.sortView.thirdArrowUp = NO;
-    [self.popView hiddenView];
-}
-
-#pragma mark - UITableViewDataSource
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return self.dataArray.count;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    if (self.selectIndex == 0 || self.selectIndex == 3) {
-        return 127.0f;
-    }
-    else {
-        return 164.0f;
-    }
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (self.selectIndex == 0) {
-        AccompanyLessonModel *model = self.dataArray[indexPath.row];
-        AccompanyCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AccompanyCourseCell"];
-        MJWeakSelf;
-        [cell configWithSource:model actionCallback:^(ACCOMPANY_TYPE type, AccompanyLessonModel * _Nonnull source) {
-            [weakSelf courseOperation:type sourceModel:source];
-        }];
-        return cell;
-    }
-    else if (self.selectIndex == 1) {
-        LiveLessonModel *model = self.dataArray[indexPath.row];
-        MyLiveCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyLiveCourseCell"];
-        MJWeakSelf;
-        [cell configCellWithSource:model callback:^(NSString *targetId) {
-            [weakSelf chatAction:targetId];
-        }];
-        return cell;
-    }
-    else {
-        MusicRoomListModel *model = self.dataArray[indexPath.row];
-        MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
-        MJWeakSelf;
-        [cell configWithSource:model isGroup:NO beforeTime:0 callback:^(NSString * _Nonnull targetId) {
-            [weakSelf chatAction:targetId];
-        }];
-        return cell;
-    }
-}
-
-- (void)courseOperation:(ACCOMPANY_TYPE)type sourceModel:(AccompanyLessonModel *)model {
-    switch (type) {
-        case ACCOMPANY_TYPE_CHAT: // 聊天
-        {
-            TUIChatConversationModel *conversation = [[TUIChatConversationModel alloc] init];
-            conversation.userID = model.imUserId;
-            KSChatConversationViewController *ctrl = [[KSChatConversationViewController alloc] init];
-            ctrl.conversation = conversation;
-            [self.naviController pushViewController:ctrl animated:YES];
-        }
-            break;
-        case ACCOMPANY_DETAIL:  // 趣纠课详情
-        {
-            [self showAccompanyDetail:model];
-        }
-            break;
-
-        default:
-            break;
-    }
-}
-
-- (void)showAccompanyDetail:(AccompanyLessonModel *)model {
-    AccompanyDetailViewController *detailVC = [[AccompanyDetailViewController alloc] init];
-    detailVC.courseId = model.courseId;
-    detailVC.courseGroupId = model.courseGoupId;
-//    detailVC.teacherId = model.userId;
-    [self.naviController pushViewController:detailVC animated:YES];
-}
-
-
-
-- (void)chatAction:(NSString *)targetId {
-    if ([NSString isEmptyString:targetId]) {
-        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"报名未结束,暂无群组"];
-        return;
-    }
-    TUIChatConversationModel *model = [[TUIChatConversationModel alloc] init];
-    model.groupID = targetId;
-    KSGroupConversationController *ctrl = [[KSGroupConversationController alloc] init];
-    ctrl.conversation = model;
-    [self.naviController pushViewController:ctrl animated:YES];
-}
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    if (self.selectIndex == 0) { // 进入趣纠课详情
-        AccompanyLessonModel *model = self.dataArray[indexPath.row];
-        [self showAccompanyDetail:model];
-    }
-    else if (self.selectIndex == 1) { // 直播课程组详情
-        LiveLessonModel *model = self.dataArray[indexPath.row];
-        KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
-        NSString *url = [NSString stringWithFormat:@"%@/#/liveDetail?joinRoom=1&groupId=%@&classId=%@", WEBHOST, model.courseGoupId,model.courseId];
-        ctrl.url = url;
-        [self.naviController pushViewController:ctrl animated:YES];
-    }
-    else {
-        MusicRoomListModel *model = self.dataArray[indexPath.row];
-        [self showMusicRoomDetail:model];
-    }
-}
-
-- (void)showMusicRoomDetail:(MusicRoomListModel *)model {
-    MusicRoomDetailViewController *detailVC = [[MusicRoomDetailViewController alloc] init];
-    detailVC.courseId = model.courseId;
-    detailVC.courseGroupId = model.courseGroupId;
-    [self.naviController pushViewController:detailVC animated:YES];
-}
-
-/**
- 设置没有数据时的显示
- 
- @param promptString 提示语
- @param imgName 图片名称
- @param view 显示在什么地方
- */
-- (void)setPromptString:(NSString *)promptString imageName:(NSString *)imgName inView:(UIView *)view {
-    if (self.promptView != nil) {
-        [self.promptView removeFromSuperview];
-    }
-    else {
-        self.promptView = [[StateView alloc]init];
-        self.promptView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 300);
-    }
-    _promptPlaceView = view;
-    //当请求不到数据时 ,自定义提示view 将会出现;
-    self.promptView.imageName = imgName;
-    self.promptView.alpha = 0.0f;
-    [self.promptView setText:promptString];
-    [view addSubview:self.promptView];
-}
-
-// 结束刷新后调用方法
-- (void)changePromptLabelStateWithArray:(NSMutableArray *)array {
-    NSInteger count;
-    if (array.count) {
-        count = array.count;
-    } else {
-        count = 0;
-    }
-    
-    [UIView animateWithDuration:0.1 animations:^{
-        [[self promptView] setAlpha:count ? 0.0f :1.0f ] ;
-    }] ;
-    
-}
-
-- (BOOL)networkAvaiable {
-    return [self checkNetworkAvaiable];
-}
-
-- (BOOL)checkNetworkAvaiable {
-    BOOL isExistenceNetwork = YES;
-    Reachability *reach = [Reachability reachabilityWithHostName:@"www.apple.com"];
-    switch ([reach currentReachabilityStatus]) {
-        case NotReachable:
-            isExistenceNetwork = NO;
-            //NSLog(@"notReachable");
-            break;
-        case ReachableViaWiFi:
-            isExistenceNetwork = YES;
-            //NSLog(@"WIFI");
-            break;
-        case ReachableViaWWAN:
-            isExistenceNetwork = YES;
-            //NSLog(@"3G");
-            break;
-    }
-    return isExistenceNetwork;
-}
-#pragma mark ----- lazying
-- (NSDateFormatter *)dateFormatter {
-    if (!_dateFormatter) {
-        _dateFormatter = [NSObject getDateformatter];
-    }
-    return _dateFormatter;
-}
-- (void)setSubjectList:(NSMutableArray *)subjectList {
-    _subjectList = subjectList;
-    self.thirdChooseIndex = 0;
-}
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
-    // Drawing code
-}
-*/
-
-@end