浏览代码

琴房课详情,剩余学员列表

Steven 8 月之前
父节点
当前提交
5e589c7293
共有 21 个文件被更改,包括 1129 次插入108 次删除
  1. 26 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/AccompanyCourse/Controller/AccompanyCourseGroupViewController.m
  3. 6 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.h
  4. 260 67
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.m
  5. 19 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.h
  6. 135 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.m
  7. 202 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.xib
  8. 25 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.h
  9. 163 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.m
  10. 161 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.xib
  11. 18 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentPageView.h
  12. 20 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentPageView.m
  13. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/Controller/VIPCourseGroupViewController.m
  14. 7 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.h
  15. 34 9
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.m
  16. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseInfoView.m
  17. 12 11
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseInfoView.xib
  18. 7 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseListCell.m
  19. 17 16
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseListCell.xib
  20. 6 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MusicRoomCourseGroup/MyMusicRoomCourseGroupView.m
  21. 1 1
      KulexiuForTeacher/KulexiuForTeacher/configuration/Config-dev.xcconfig

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

@@ -624,6 +624,11 @@
 		BC58E7D5281B9637004B0893 /* PublicNoticeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC58E7D4281B9637004B0893 /* PublicNoticeView.xib */; };
 		BC58E7DD281B969B004B0893 /* MinePageTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC58E7DC281B969B004B0893 /* MinePageTopView.m */; };
 		BC58E7DF281B96A4004B0893 /* MinePageTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC58E7DE281B96A4004B0893 /* MinePageTopView.xib */; };
+		BC5A4B762CF412E8008C2FDD /* MusicRoomGroupHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC5A4B752CF412E8008C2FDD /* MusicRoomGroupHeadView.xib */; };
+		BC5A4B772CF412E8008C2FDD /* MusicRoomGroupHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5A4B742CF412E8008C2FDD /* MusicRoomGroupHeadView.m */; };
+		BC5A4B7A2CF41392008C2FDD /* MusicRoomStudentPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5A4B792CF41392008C2FDD /* MusicRoomStudentPageView.m */; };
+		BC5A4B7E2CF416D4008C2FDD /* MusicRoomCourseListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC5A4B7D2CF416D3008C2FDD /* MusicRoomCourseListCell.xib */; };
+		BC5A4B7F2CF416D4008C2FDD /* MusicRoomCourseListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5A4B7C2CF416D3008C2FDD /* MusicRoomCourseListCell.m */; };
 		BC5EB5A92803D85300B4A3B0 /* AccompanyAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5EB5A82803D85300B4A3B0 /* AccompanyAlertView.m */; };
 		BC5EB5AB2803D86500B4A3B0 /* AccompanyAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC5EB5AA2803D86500B4A3B0 /* AccompanyAlertView.xib */; };
 		BC5EB5B22804027500B4A3B0 /* MyStyleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5EB5B12804027500B4A3B0 /* MyStyleViewController.m */; };
@@ -2268,6 +2273,14 @@
 		BC58E7DB281B969B004B0893 /* MinePageTopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MinePageTopView.h; sourceTree = "<group>"; };
 		BC58E7DC281B969B004B0893 /* MinePageTopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MinePageTopView.m; sourceTree = "<group>"; };
 		BC58E7DE281B96A4004B0893 /* MinePageTopView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MinePageTopView.xib; sourceTree = "<group>"; };
+		BC5A4B732CF412E8008C2FDD /* MusicRoomGroupHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicRoomGroupHeadView.h; sourceTree = "<group>"; };
+		BC5A4B742CF412E8008C2FDD /* MusicRoomGroupHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicRoomGroupHeadView.m; sourceTree = "<group>"; };
+		BC5A4B752CF412E8008C2FDD /* MusicRoomGroupHeadView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MusicRoomGroupHeadView.xib; sourceTree = "<group>"; };
+		BC5A4B782CF41392008C2FDD /* MusicRoomStudentPageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicRoomStudentPageView.h; sourceTree = "<group>"; };
+		BC5A4B792CF41392008C2FDD /* MusicRoomStudentPageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicRoomStudentPageView.m; sourceTree = "<group>"; };
+		BC5A4B7B2CF416D3008C2FDD /* MusicRoomCourseListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicRoomCourseListCell.h; sourceTree = "<group>"; };
+		BC5A4B7C2CF416D3008C2FDD /* MusicRoomCourseListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicRoomCourseListCell.m; sourceTree = "<group>"; };
+		BC5A4B7D2CF416D3008C2FDD /* MusicRoomCourseListCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MusicRoomCourseListCell.xib; sourceTree = "<group>"; };
 		BC5E4AE2291E5E26001BBCD2 /* KulexiuForTeacher-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KulexiuForTeacher-Bridging-Header.h"; sourceTree = "<group>"; };
 		BC5EB5A72803D85300B4A3B0 /* AccompanyAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccompanyAlertView.h; sourceTree = "<group>"; };
 		BC5EB5A82803D85300B4A3B0 /* AccompanyAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AccompanyAlertView.m; sourceTree = "<group>"; };
@@ -6726,6 +6739,14 @@
 				BCA353E12859797400377661 /* MusicRoomStudentCell.h */,
 				BCA353E22859797400377661 /* MusicRoomStudentCell.m */,
 				BCA353E32859797400377661 /* MusicRoomStudentCell.xib */,
+				BC5A4B7B2CF416D3008C2FDD /* MusicRoomCourseListCell.h */,
+				BC5A4B7C2CF416D3008C2FDD /* MusicRoomCourseListCell.m */,
+				BC5A4B7D2CF416D3008C2FDD /* MusicRoomCourseListCell.xib */,
+				BC5A4B732CF412E8008C2FDD /* MusicRoomGroupHeadView.h */,
+				BC5A4B742CF412E8008C2FDD /* MusicRoomGroupHeadView.m */,
+				BC5A4B752CF412E8008C2FDD /* MusicRoomGroupHeadView.xib */,
+				BC5A4B782CF41392008C2FDD /* MusicRoomStudentPageView.h */,
+				BC5A4B792CF41392008C2FDD /* MusicRoomStudentPageView.m */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -7909,6 +7930,7 @@
 				BCDF820C2A8A2955005F8B82 /* ClassMemberSettingView.xib in Resources */,
 				BCA1134E28A23229007FAFB9 /* HomeHotMusicCellView.xib in Resources */,
 				BC9EFEB82C0480A500CFA7B1 /* StudentChooseDisplayCell.xib in Resources */,
+				BC5A4B7E2CF416D4008C2FDD /* MusicRoomCourseListCell.xib in Resources */,
 				275B173127EB27960081FDEF /* GroupCreateView.xib in Resources */,
 				BCB908F82850C6EF00F5FF69 /* MusicChooseCell.xib in Resources */,
 				BC8831052873D67C00C702A0 /* LiveVideoCollectionViewCell.xib in Resources */,
@@ -8064,6 +8086,7 @@
 				BC71D297288811BF0010F14B /* tabbar2.json in Resources */,
 				27BC3B3027F2FC7200D81E30 /* VideoCourseCell.xib in Resources */,
 				BC71DEFB2A89F470003F165E /* TXQuitChooseView.xib in Resources */,
+				BC5A4B762CF412E8008C2FDD /* MusicRoomGroupHeadView.xib in Resources */,
 				BC7CFFB62817E90700CAEB21 /* KSSegView.xib in Resources */,
 				2779362227E334470010E277 /* KSUpdateAlert.xib in Resources */,
 				BC3BF6452B9FED9B00831494 /* ShareFunctionView.xib in Resources */,
@@ -8932,6 +8955,7 @@
 				BCA353ED2859B4EC00377661 /* MusicRoomHomeworkStudentController.m in Sources */,
 				BC6BEAA4288A4C2A00022109 /* KSHomeButton.m in Sources */,
 				27A2F63027E70E57009E2380 /* UserInfo.m in Sources */,
+				BC5A4B772CF412E8008C2FDD /* MusicRoomGroupHeadView.m in Sources */,
 				BCAF36F42CEAE57B009434AD /* MinePageLiveCourseView.m in Sources */,
 				BCEA751A2818D59300886A86 /* BankNameModel.m in Sources */,
 				BC38C48F2AFA20AB00ABFCC2 /* KSNewGifRefreshFooter.m in Sources */,
@@ -8955,6 +8979,7 @@
 				BC206EEE2CF01838001F2B85 /* ProgramCourseListCell.m in Sources */,
 				BC106C552A9365DE000759A9 /* ClassMemberEmptyView.m in Sources */,
 				BC02BCE628B324C9005CB483 /* LiveDownSeatView.m in Sources */,
+				BC5A4B7F2CF416D4008C2FDD /* MusicRoomCourseListCell.m in Sources */,
 				27BC3B3327F2FD2D00D81E30 /* VideoListBodyView.m in Sources */,
 				BCFE541028178FF600AD6786 /* MyIncomeViewController.m in Sources */,
 				2779322527E30FC30010E277 /* NSString+MD5.m in Sources */,
@@ -9069,6 +9094,7 @@
 				BC1E28502C77218A0063E0A1 /* KSDeleteFailedAlertView.m in Sources */,
 				BC106B7F2A8F4586000759A9 /* TXLiveMessagePauseLive.m in Sources */,
 				BC60E3BD287D294C00B05441 /* AccountDeleteViewController.m in Sources */,
+				BC5A4B7A2CF41392008C2FDD /* MusicRoomStudentPageView.m in Sources */,
 				BC73549D2CEED5A400C2B35C /* MyCourseRankSortView.m in Sources */,
 				BC56C95829233F1700AF301F /* CoursewareBottomView.m in Sources */,
 				BC6BEAAA288E3D7400022109 /* HomeNewHeadView.m in Sources */,

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

@@ -186,7 +186,7 @@
     listView.naviController = self.navigationController;
     listView.selectIndex = index;
     listView.courseGroupId = self.courseGroupId;
-    listView.isVipCourse = NO;
+    listView.courseType = COURSE_GROUP_TYPE_ACCOMPANY;
     if (self.enterStartTime) {
         listView.enterStartTime = self.enterStartTime;
         listView.quitEndTime = self.quitEndTime;

+ 6 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.h

@@ -6,6 +6,8 @@
 //
 
 #import "KSBaseViewController.h"
+#import "JXCategoryView.h"
+#import "JXPagerView.h"
 
 NS_ASSUME_NONNULL_BEGIN
 // 琴房课--课程组
@@ -13,6 +15,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) NSString *courseGroupId; // 课程组ID
 
+@property (nonatomic, strong) JXPagerView *pagerView;
+@property (nonatomic, strong, readonly) JXCategoryTitleView *categoryView;
+@property (nonatomic, strong) NSArray <NSString *> *titles;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 260 - 67
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomGroupViewController.m

@@ -6,24 +6,36 @@
 //
 
 #import "MusicRoomGroupViewController.h"
-#import <RecordCheckManager.h>
-#import "KSPremissionAlert.h"
-#import "OnlineClassManager.h"
-#import "HomeworkDetailModel.h"
+#import "CourseGroupNavView.h"
+#import "JXCategoryView.h"
+#import "JXPagerListRefreshView.h"
+#import "MusicRoomGroupHeadView.h"
+#import "ProgramCourseGroupBodyView.h"
+#import "CourseGroupDetailModel.h"
+#import "CourseGroupPlanAlertView.h"
+#import "MusicRoomStudentPageView.h"
 
-@interface MusicRoomGroupViewController ()
+@interface MusicRoomGroupViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,JXPagerMainTableViewGestureDelegate>
 
-@property (nonatomic, strong) NSString *courseId;
+@property (nonatomic, strong) NSMutableArray *listViewArray;
 
-@property (nonatomic, strong) NSString *studentId;
+@property (nonatomic, strong) CourseGroupNavView *navView;
 
-@property (nonatomic, assign) NSInteger joinRoomBeforeTime; // 上课开始时间
+@property (nonatomic, assign) NSInteger headHeight;
 
-@property (nonatomic, assign) NSInteger quitRomeEndTime;    // 下课截止时间
+@property (nonatomic, assign) NSInteger topViewHeight;
 
-@property (nonatomic, strong) HomeworkDetailModel *homeworkModel;
+@property (nonatomic, strong) MusicRoomGroupHeadView *infoView;
 
-@property (nonatomic, strong) OnlineClassManager *classManager;
+@property (nonatomic, assign) BOOL isFirstLoad;
+
+@property (nonatomic, strong) CourseGroupDetailModel *detailModel;
+
+@property (nonatomic, assign) NSInteger enterStartTime;  // 开课前可进入时间配置(分钟)
+
+@property (nonatomic, assign) NSInteger quitEndTime;    // 结束后退出时间配置(分钟)
+
+@property (nonatomic, strong) UIImageView *bgImageView;
 
 @end
 
@@ -32,85 +44,266 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    self.ks_prefersNavigationBarHidden = YES;
+    [self configUI];
+    self.isFirstLoad = YES;
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forceScroll) name:@"UITextViewScroll" object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enableScroll) name:@"UITextViewEndScroll" object:nil];
 }
 
-- (void)tryJoinRoom {
-    
-    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
-    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
-    NSDate *beginDate = [dateFormatter dateFromString:self.homeworkModel.startTime];
-    NSDate *endDate = [dateFormatter dateFromString:self.homeworkModel.endTime];
-    NSDate *currentDate = [NSDate date];
-    NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
-    NSTimeInterval endTimeInterval = [currentDate timeIntervalSinceDate:endDate];
-    if (beginTimeInterval <= self.joinRoomBeforeTime * 60 && endTimeInterval < 0) {
-        [self joinClassRoom];
-    }
-    else if (endTimeInterval > 0) {
-        [LOADING_MANAGER MBShowAUTOHidingInWindow:@"该课程已结束"];
-    }
-    else {
-        NSString *tipsString = [NSString stringWithFormat:@"课程还未开始,请在上课前%zd分钟进入", self.joinRoomBeforeTime];
-        [LOADING_MANAGER MBShowAUTOHidingInWindow:tipsString];
-    }
+
+- (void)forceScroll {
+    self.pagerView.mainTableView.scrollEnabled = NO;
 }
 
-// 加入房间
-- (void)joinClassRoom {
+- (void)enableScroll {
+    self.pagerView.mainTableView.scrollEnabled = YES;
+}
+
+- (void)configUI {
+    [self.scrollView removeFromSuperview];
+    UIImage *bgImage = [UIImage imageNamed:@"courseDetail_bg"];
+    NSInteger height = (NSInteger)(bgImage.size.height / bgImage.size.width * KPortraitWidth);
+    self.bgImageView = [[UIImageView alloc] initWithImage:bgImage];
+    self.bgImageView.frame = CGRectMake(0, 0, KPortraitWidth, height);
+    [self.view addSubview:self.bgImageView];
     
-    // 加入房间前判断摄像头和麦克风逻辑
-    [RecordCheckManager checkCameraPremissionAvaiableCallback:^(PREMISSIONTYPE type) {
-        [self afterCheckCameraCheckMic:type];
+    [self.view addSubview:self.navView];
+    CGFloat navHeight = [CourseGroupNavView getViewHeight];
+    [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.right.top.mas_equalTo(self.view);
+        make.height.mas_equalTo(navHeight);
     }];
+    self.headHeight = 44.0f;
+    self.titles = @[@"课程列表",@"上课学生"];
+    [self configCategoryView:navHeight];
 }
 
-- (void)afterCheckCameraCheckMic:(PREMISSIONTYPE)cameraType {
-    [RecordCheckManager checkMicPermissionAvaiableCallback:^(PREMISSIONTYPE type) {
-        if (type == PREMISSIONTYPE_YES && cameraType == PREMISSIONTYPE_YES) {
-            // 判断是否进行课前检测
-            [self.classManager joinRoomWithId:self.courseId subjectName:self.homeworkModel.subjectName classEndTime:self.homeworkModel.endTime inViewController:self];
+- (void)requestCourseInfo {
+    
+    [KSNetworkingManager getCourseGroupDetailRequest:KS_POST courseGroupId:self.courseGroupId success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            NSDictionary *parm = [dic ks_dictionaryValueForKey:@"data"];
+            self.detailModel = [[CourseGroupDetailModel alloc] initWithDictionary:parm];
+            // 配置信息
+            NSDictionary *config = [[dic ks_dictionaryValueForKey:@"data"] ks_dictionaryValueForKey:@"sysConfig"];
+            self.enterStartTime = [config ks_integerValueForKey:@"pianoStartTime"];
+            self.quitEndTime = [config ks_integerValueForKey:@"pianoEndTime"];
         }
         else {
-            NSString *content = @"";
-            CHECKDEVICETYPE checkType = CHECKDEVICETYPE_BOTH;
-            if (cameraType == PREMISSIONTYPE_NO && type == PREMISSIONTYPE_NO) {
-                content = @"请开启相机和麦克风访问权限";
-                checkType = CHECKDEVICETYPE_BOTH;
-            }
-            else if (cameraType == PREMISSIONTYPE_NO && type == PREMISSIONTYPE_YES) {
-                content =  @"请开启相机访问权限";
-                checkType = CHECKDEVICETYPE_CAMREA;
-            }
-            else if (cameraType == PREMISSIONTYPE_YES && type == PREMISSIONTYPE_NO) {
-                content = @"请开启麦克风访问权限";
-                checkType = CHECKDEVICETYPE_MIC;
-            }
-            [self showAlertWithMessage:content type:checkType];
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
+        [self refreshHeadView];
+    } faliure:^(NSError * _Nonnull error) {
+        [self refreshHeadView];
     }];
+}
+
+- (void)refreshHeadView {
+    [self refreshListPage];
+    self.topViewHeight = [MusicRoomGroupHeadView getViewHeightWithPlanString:self.detailModel.coursePlan];
+    [self.infoView configWithSource:self.detailModel];
+    [self.pagerView reloadData];
+}
+
+- (void)configCategoryView:(NSInteger)topHeight {
+    
+    _categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, topHeight, KPortraitWidth, self.headHeight)];
+    self.categoryView.titles = self.titles;
+    self.categoryView.delegate = self;
+    self.categoryView.titleFont = [UIFont systemFontOfSize:16.0f];
+    self.categoryView.titleSelectedFont = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold];
+    self.categoryView.titleSelectedColor = HexRGB(0x333333);
+    self.categoryView.titleColor = HexRGB(0x666666);
+    self.categoryView.titleColorGradientEnabled = YES;
+    
+    JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
+    lineView.indicatorColor = THEMECOLOR;
+    lineView.indicatorWidth = 16;
+    lineView.indicatorHeight = 4;
+    self.categoryView.indicators = @[lineView];
     
+    _pagerView = [self preferredPagingView];
+    self.pagerView.frame = CGRectMake(0, topHeight, KPortraitWidth, KPortraitHeight - topHeight);
+    self.pagerView.backgroundColor = [UIColor clearColor];
+    self.pagerView.mainTableView.backgroundColor = [UIColor clearColor];
+    self.pagerView.listContainerView.backgroundColor = [UIColor clearColor];
+    self.pagerView.mainTableView.gestureDelegate = self;
+    self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
+    self.pagerView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
+    [self.view addSubview:self.pagerView];
 }
 
-- (void)showAlertWithMessage:(NSString *)message type:(CHECKDEVICETYPE)deviceType {
-    [KSPremissionAlert shareInstanceDisplayImage:deviceType message:message showInView:self.view cancel:^{
-        
-    } confirm:^{
-        [self openSettingView];
-    }];
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0);
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+    // 刷新课程详情
+    [self requestCourseInfo];
+    if (self.isFirstLoad == NO) {
+        [self refreshListPage];
+    }
+    self.isFirstLoad = NO;
+}
+
+- (void)refreshListPage {
+    id value = self.listViewArray[0];
+    if ([value isKindOfClass:[ProgramCourseGroupBodyView class]]) {
+        ProgramCourseGroupBodyView *listView = (ProgramCourseGroupBodyView *)value;
+        listView.enterStartTime = self.enterStartTime;
+        listView.quitEndTime = self.quitEndTime;
+        [listView beginFirstRefresh];
+    }
+}
+
+- (JXPagerView *)preferredPagingView {
+    return [[JXPagerListRefreshView alloc] initWithDelegate:self];
+}
+
+#pragma mark - JXPagerViewDelegate
+
+- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
+    return self.infoView;
+}
+
+- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
+    return self.topViewHeight;
+}
+
+- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
+    return self.headHeight;
+}
+
+- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
+    return self.categoryView;
+}
+
+- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
+    //和categoryView的item数量一致
+    return self.titles.count;
+}
+
+- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
+    if (index == 0) {
+        ProgramCourseGroupBodyView *listView = [[ProgramCourseGroupBodyView alloc] init];
+        listView.naviController = self.navigationController;
+        listView.selectIndex = index;
+        listView.courseGroupId = self.courseGroupId;
+        listView.courseType = COURSE_GROUP_TYPE_MUSICROOM;
+        [self.listViewArray replaceObjectAtIndex:index withObject:listView];
+        self.listViewArray[index] = listView;
+        [listView beginFirstRefresh];
+        return listView;
+    }
+    else {
+        MusicRoomStudentPageView *listView = [[MusicRoomStudentPageView alloc] init];
+        listView.naviController = self.navigationController;
+        listView.selectIndex = index;
+        listView.courseGroupId = self.courseGroupId;
+        [self.listViewArray replaceObjectAtIndex:index withObject:listView];
+        self.listViewArray[index] = listView;
+        [listView beginFirstRefresh];
+        return listView;
+    }
+    
+}
+
+- (void)pagerView:(JXPagerView *)pagerView mainTableViewDidScroll:(UIScrollView *)scrollView {
     
+    NSLog(@"sscroll content offset y %f", scrollView.contentOffset.y);
+    CGFloat height = self.topViewHeight;
+    CGFloat space = scrollView.contentOffset.y;
+    if (space > 100) {
+        CGFloat rate = (space - 100) / (height - 100);
+        NSLog(@"rate ---------%f",rate);
+        self.navView.backgroundColor = HexRGBAlpha(0xffffff, rate);
+        if (rate == 1) {
+            self.bgImageView.hidden = YES;
+        }
+        else {
+            self.bgImageView.hidden = NO;
+        }
+    }
+    else {
+        self.navView.backgroundColor = [UIColor clearColor];
+        self.bgImageView.hidden = NO;
+    }
+}
+
+#pragma mark - JXPagerMainTableViewGestureDelegate
+
+- (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+    //禁止categoryView左右滑动的时候,上下和左右都可以滚动
+    if (otherGestureRecognizer == self.categoryView.collectionView.panGestureRecognizer) {
+        return NO;
+    }
+    return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
 }
 
-- (void)openSettingView {
-    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
+
+
+- (void)dealloc {
+   [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
 
 #pragma mark ----- lazying
-- (OnlineClassManager *)classManager {
-    if (!_classManager) {
-        _classManager = [[OnlineClassManager alloc] init];
+
+- (CourseGroupNavView *)navView {
+    if (!_navView) {
+        _navView = [CourseGroupNavView sharedInstance];
+        MJWeakSelf;
+        [_navView configWithNavTitle:@"VIP定制课设置" callback:^{
+            [weakSelf backAction];
+        }];
+    }
+    return _navView;
+}
+- (NSMutableArray *)listViewArray {
+    if (!_listViewArray) {
+        _listViewArray = [NSMutableArray arrayWithArray:@[@"",@""]];
+    }
+    return _listViewArray;
+}
+- (MusicRoomGroupHeadView *)infoView {
+    if (!_infoView) {
+        _infoView  =[MusicRoomGroupHeadView sharedInstance];
+        MJWeakSelf;
+        [_infoView programActionCallback:^{
+            [weakSelf showModifyPlanView];
+        }];
     }
-    return _classManager;
+    return _infoView;
 }
+
+- (void)showModifyPlanView {
+    CourseGroupPlanAlertView *alert = [CourseGroupPlanAlertView sharedInstance];
+    MJWeakSelf;
+    [alert configWithDesc:self.detailModel.coursePlan callback:^(NSString * _Nullable planString) {
+        [weakSelf submitAction:planString];
+    }];
+    [alert showInView:self.view];
+}
+
+- (void)submitAction:(NSString *)planString {
+    [LOADING_MANAGER showHUD];
+    [KSNetworkingManager updateCoursePlanRequset:KS_POST courseGroupId:self.courseGroupId coursePlan:planString success:^(NSDictionary * _Nonnull dic) {
+        [LOADING_MANAGER removeHUD];
+        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+            [self requestCourseInfo];
+        }
+        else {
+            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
+        }
+        
+    } faliure:^(NSError * _Nonnull error) {
+        [LOADING_MANAGER removeHUD];
+    }];
+}
+
 /*
 #pragma mark - Navigation
 

+ 19 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.h

@@ -0,0 +1,19 @@
+//
+//  MusicRoomCourseListCell.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2024/11/25.
+//
+
+#import <UIKit/UIKit.h>
+#import "ProgramCourseListCell.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicRoomCourseListCell : UITableViewCell
+
+- (void)configWithSource:(GroupCourseListModel *)model beforeTime:(NSInteger)beforeTime callback:(GroupListModelCallback)callback;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 135 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.m

@@ -0,0 +1,135 @@
+//
+//  MusicRoomCourseListCell.m
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2024/11/25.
+//
+
+#import "MusicRoomCourseListCell.h"
+
+@interface MusicRoomCourseListCell ()
+
+@property (weak, nonatomic) IBOutlet UIButton *enterButton;
+
+@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *courseGroupName;
+
+@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
+
+@property (weak, nonatomic) IBOutlet UIImageView *arriveStatus;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *arriveStatusWidth;
+
+@property (weak, nonatomic) IBOutlet UIView *subjectView;
+@property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
+
+@property (nonatomic, strong) GroupCourseListModel *sourceModel;
+
+@property (nonatomic, copy) GroupListModelCallback callback;
+
+@property (nonatomic, assign) NSInteger beforeTime;
+
+@end
+
+@implementation MusicRoomCourseListCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+}
+
+- (void)configWithSource:(GroupCourseListModel *)model beforeTime:(NSInteger)beforeTime callback:(GroupListModelCallback)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+    self.sourceModel = model;
+    NSDateFormatter *formatter = [NSObject getDateformatter];
+    [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *startDate = [formatter dateFromString:model.startTime];
+    NSDate *endDate = [formatter dateFromString:model.endTime];
+    [formatter setDateFormat:@"yyyy-MM-dd HH:mm"];
+    NSString *lessonBegin = [formatter stringFromDate:startDate];
+    [formatter setDateFormat:@"HH:mm"];
+    NSString *lessonEnd = [formatter stringFromDate:endDate];
+    self.timeLabel.text = [NSString stringWithFormat:@"%@~%@",[NSString returnNoNullStringWithString:lessonBegin],[NSString returnNoNullStringWithString:lessonEnd]];
+    self.courseGroupName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
+    CourseStudentVos *studentInfo = [model.courseStudentVos lastObject];
+    self.nameLabel.text = [NSString returnNoNullStringWithString:studentInfo.userName];
+    self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    if ([NSString isEmptyString:model.subjectName]) {
+        self.subjectView.hidden = YES;
+    }
+    else {
+        self.subjectView.hidden = NO;
+    }
+    [self evaluateWithSource:model];
+}
+
+- (void)evaluateWithSource:(GroupCourseListModel *)model {
+    NSString *imageName = model.attendanceStatus ? @"course_attendence" : @"course_noArrive";
+    if ([model.status isEqualToString:@"ING"]) {
+        self.statusLabel.text = @"进行中";
+        self.statusLabel.textColor = THEMECOLOR;
+        self.arriveStatus.hidden = YES;
+        self.arriveStatusWidth.constant = 0.0f;
+        self.enterButton.hidden = NO;
+        self.enterButton.userInteractionEnabled = YES;
+    }
+    else if ([model.status isEqualToString:@"NOT_START"]) {
+        self.statusLabel.text = @"未开始";
+        self.statusLabel.textColor = HexRGB(0xFF802C);
+        self.arriveStatus.hidden = YES;
+        self.arriveStatusWidth.constant = 0.0f;
+        
+        // 判断按钮显示调课还是进入教室
+        NSDate *currentDate = [NSDate date];
+        NSDate *beginDate = [self getCourseBeginDate:model.startTime];
+        NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
+        BOOL canChange = NO;
+        if (beginTimeInterval > self.beforeTime * 60) {
+            canChange = YES;
+        }
+        if (canChange) {
+            self.enterButton.hidden = YES;
+            self.enterButton.userInteractionEnabled = NO;
+        }
+        else {
+            self.enterButton.hidden = NO;
+            self.enterButton.userInteractionEnabled = YES;
+        }
+    }
+    else if ([model.status isEqualToString:@"COMPLETE"]) {
+        self.statusLabel.text = @"已结束";
+        self.statusLabel.textColor = HexRGB(0x999999);
+        self.arriveStatus.hidden = NO;
+        self.arriveStatusWidth.constant = 36.0f;
+        self.enterButton.hidden = YES;
+        self.enterButton.userInteractionEnabled = NO;
+    }
+    [self.arriveStatus setImage:[UIImage imageNamed:imageName]];
+}
+
+
+
+- (IBAction)enterClassRoom:(id)sender {
+    if (self.callback) {
+        self.callback(self.sourceModel);
+    }
+}
+
+- (NSDate *)getCourseBeginDate:(NSString *)beginTime {
+    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *beginDate = [dateFormatter dateFromString:beginTime];
+    return beginDate;
+}
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 202 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseListCell.xib

@@ -0,0 +1,202 @@
+<?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" useSafeAreas="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="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="139" id="KGk-i7-Jjw" customClass="MusicRoomCourseListCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="123"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="123"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UCx-jd-4fG">
+                        <rect key="frame" x="14" y="0.0" width="292" height="111"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wSI-4q-PqD">
+                                <rect key="frame" x="10" y="46" width="272" height="1"/>
+                                <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="1" id="BEk-Zg-MOG"/>
+                                </constraints>
+                            </view>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" image="course_time" translatesAutoresizingMaskIntoConstraints="NO" id="2QC-c9-Pmm">
+                                <rect key="frame" x="12" y="15" width="16" height="16"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="16" id="Esz-zU-sRi"/>
+                                    <constraint firstAttribute="height" constant="16" id="KDp-1L-bfs"/>
+                                </constraints>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pFx-1U-bC2">
+                                <rect key="frame" x="35" y="14" width="0.0" height="18"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="m4H-2O-wjn"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="进行中" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hi3-os-toX">
+                                <rect key="frame" x="238" y="12" width="42" height="22"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="22" id="MfS-RY-uQp"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                                <color key="textColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_musicRoom" translatesAutoresizingMaskIntoConstraints="NO" id="Cfn-74-up3">
+                                <rect key="frame" x="12" y="59" width="40" height="40"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="40" id="5S7-Nw-2Df"/>
+                                    <constraint firstAttribute="height" constant="40" id="xpC-QY-5lU"/>
+                                </constraints>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sbq-HP-naE">
+                                <rect key="frame" x="62" y="58" width="0.0" height="21"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="21" id="ofX-6m-b9A"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <color key="textColor" red="0.074509803920000006" green="0.078431372550000003" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" image="merge_next" translatesAutoresizingMaskIntoConstraints="NO" id="pqJ-ev-XlA">
+                                <rect key="frame" x="268" y="73" width="12" height="12"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="12" id="XkL-ks-Igl"/>
+                                    <constraint firstAttribute="width" constant="12" id="reb-TO-yHH"/>
+                                </constraints>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i7t-Y9-RL8">
+                                <rect key="frame" x="62" y="83" width="0.0" height="17"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="17" id="mmW-vx-FKw"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="tlE-FT-sOf">
+                                <rect key="frame" x="67" y="83" width="8" height="17"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jCh-h5-1dV">
+                                        <rect key="frame" x="4" y="8.6666666666666714" width="0.0" height="0.0"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                                        <color key="textColor" red="1" green="0.54901960780000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="1" green="0.94509803920000002" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <constraints>
+                                    <constraint firstItem="jCh-h5-1dV" firstAttribute="leading" secondItem="tlE-FT-sOf" secondAttribute="leading" constant="4" id="H7D-CG-joD"/>
+                                    <constraint firstAttribute="height" constant="17" id="cgU-4C-gZV"/>
+                                    <constraint firstItem="jCh-h5-1dV" firstAttribute="centerY" secondItem="tlE-FT-sOf" secondAttribute="centerY" id="gGf-QI-BSs"/>
+                                    <constraint firstAttribute="trailing" secondItem="jCh-h5-1dV" secondAttribute="trailing" constant="4" id="z8p-5d-mGH"/>
+                                </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                        <real key="value" value="4"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                            </view>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="OUr-fR-uAC">
+                                <rect key="frame" x="67" y="59.666666666666657" width="36" height="18"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="18" id="KRv-2A-H0z"/>
+                                    <constraint firstAttribute="width" constant="36" id="h94-gF-Hxx"/>
+                                </constraints>
+                            </imageView>
+                            <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DLH-WQ-IQA">
+                                <rect key="frame" x="215" y="12" width="62" height="22"/>
+                                <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="62" id="TwZ-4I-UWI"/>
+                                    <constraint firstAttribute="height" constant="22" id="g5J-Eg-HIe"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
+                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                <state key="normal" title="开始上课"/>
+                                <connections>
+                                    <action selector="enterClassRoom:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="1OP-dY-Yk7"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="tlE-FT-sOf" firstAttribute="centerY" secondItem="i7t-Y9-RL8" secondAttribute="centerY" id="1Rl-6t-Ho9"/>
+                            <constraint firstAttribute="bottom" secondItem="pqJ-ev-XlA" secondAttribute="bottom" constant="26" id="26r-Q1-e2T"/>
+                            <constraint firstItem="i7t-Y9-RL8" firstAttribute="leading" secondItem="sbq-HP-naE" secondAttribute="leading" id="28i-bD-EFt"/>
+                            <constraint firstItem="2QC-c9-Pmm" firstAttribute="leading" secondItem="UCx-jd-4fG" secondAttribute="leading" constant="12" id="2Es-v7-Hme"/>
+                            <constraint firstItem="sbq-HP-naE" firstAttribute="leading" secondItem="Cfn-74-up3" secondAttribute="trailing" constant="10" id="56v-Wb-J1M"/>
+                            <constraint firstItem="Cfn-74-up3" firstAttribute="leading" secondItem="UCx-jd-4fG" secondAttribute="leading" constant="12" id="A7Y-2f-Wxs"/>
+                            <constraint firstAttribute="trailing" secondItem="DLH-WQ-IQA" secondAttribute="trailing" constant="15" id="Bbi-Hk-Zf6"/>
+                            <constraint firstItem="sbq-HP-naE" firstAttribute="top" secondItem="Cfn-74-up3" secondAttribute="top" constant="-1" id="MOU-7t-oGQ"/>
+                            <constraint firstItem="OUr-fR-uAC" firstAttribute="leading" secondItem="sbq-HP-naE" secondAttribute="trailing" constant="5" id="PSn-pS-jsz"/>
+                            <constraint firstItem="pFx-1U-bC2" firstAttribute="leading" secondItem="2QC-c9-Pmm" secondAttribute="trailing" constant="7" id="Rnv-VC-xcw"/>
+                            <constraint firstItem="tlE-FT-sOf" firstAttribute="leading" secondItem="i7t-Y9-RL8" secondAttribute="trailing" constant="5" id="Six-5U-sPb"/>
+                            <constraint firstAttribute="trailing" secondItem="pqJ-ev-XlA" secondAttribute="trailing" constant="12" id="SrF-k1-2Kr"/>
+                            <constraint firstItem="Hi3-os-toX" firstAttribute="centerY" secondItem="pFx-1U-bC2" secondAttribute="centerY" id="T33-VN-QLp"/>
+                            <constraint firstItem="OUr-fR-uAC" firstAttribute="centerY" secondItem="sbq-HP-naE" secondAttribute="centerY" id="WDq-Zc-A8U"/>
+                            <constraint firstItem="2QC-c9-Pmm" firstAttribute="top" secondItem="UCx-jd-4fG" secondAttribute="top" constant="15" id="WbI-jt-uMO"/>
+                            <constraint firstItem="Cfn-74-up3" firstAttribute="top" secondItem="wSI-4q-PqD" secondAttribute="bottom" constant="12" id="XoF-TM-IIo"/>
+                            <constraint firstItem="pFx-1U-bC2" firstAttribute="centerY" secondItem="2QC-c9-Pmm" secondAttribute="centerY" id="YvQ-zv-Q5K"/>
+                            <constraint firstAttribute="trailing" secondItem="wSI-4q-PqD" secondAttribute="trailing" constant="10" id="aoN-oW-rCe"/>
+                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="tlE-FT-sOf" secondAttribute="trailing" constant="12" id="be7-Y7-37N"/>
+                            <constraint firstItem="wSI-4q-PqD" firstAttribute="top" secondItem="2QC-c9-Pmm" secondAttribute="bottom" constant="15" id="dad-ZX-ymX"/>
+                            <constraint firstItem="pqJ-ev-XlA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="tlE-FT-sOf" secondAttribute="trailing" constant="5" id="eJ7-KQ-0Rj"/>
+                            <constraint firstItem="DLH-WQ-IQA" firstAttribute="top" secondItem="UCx-jd-4fG" secondAttribute="top" constant="12" id="gA7-G3-AY4"/>
+                            <constraint firstItem="wSI-4q-PqD" firstAttribute="leading" secondItem="UCx-jd-4fG" secondAttribute="leading" constant="10" id="gc5-t3-KUr"/>
+                            <constraint firstItem="DLH-WQ-IQA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="pFx-1U-bC2" secondAttribute="trailing" constant="5" id="nme-SH-evT"/>
+                            <constraint firstAttribute="trailing" secondItem="Hi3-os-toX" secondAttribute="trailing" constant="12" id="t87-j4-eGi"/>
+                            <constraint firstAttribute="bottom" secondItem="Cfn-74-up3" secondAttribute="bottom" constant="12" id="tJn-Iq-51U"/>
+                            <constraint firstItem="pqJ-ev-XlA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="OUr-fR-uAC" secondAttribute="trailing" constant="5" id="xdj-d5-Aop"/>
+                            <constraint firstItem="i7t-Y9-RL8" firstAttribute="top" secondItem="sbq-HP-naE" secondAttribute="bottom" constant="4" id="zE3-A5-S75"/>
+                        </constraints>
+                        <userDefinedRuntimeAttributes>
+                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                <real key="value" value="10"/>
+                            </userDefinedRuntimeAttribute>
+                        </userDefinedRuntimeAttributes>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="UCx-jd-4fG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="8gh-fF-uJW"/>
+                    <constraint firstAttribute="trailing" secondItem="UCx-jd-4fG" secondAttribute="trailing" constant="14" id="iAE-3F-UUb"/>
+                    <constraint firstAttribute="bottom" secondItem="UCx-jd-4fG" secondAttribute="bottom" constant="12" id="llf-js-h9S"/>
+                    <constraint firstItem="UCx-jd-4fG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="14" id="mHn-g6-TAX"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <connections>
+                <outlet property="arriveStatus" destination="OUr-fR-uAC" id="K75-NM-Vzl"/>
+                <outlet property="arriveStatusWidth" destination="h94-gF-Hxx" id="Mkl-jT-o8q"/>
+                <outlet property="courseGroupName" destination="sbq-HP-naE" id="5bC-oh-W68"/>
+                <outlet property="enterButton" destination="DLH-WQ-IQA" id="P61-7Z-K2S"/>
+                <outlet property="nameLabel" destination="i7t-Y9-RL8" id="Btv-eF-ts8"/>
+                <outlet property="statusLabel" destination="Hi3-os-toX" id="9Zi-HP-fRg"/>
+                <outlet property="subjectLabel" destination="jCh-h5-1dV" id="ynG-tc-A9m"/>
+                <outlet property="subjectView" destination="tlE-FT-sOf" id="PQa-L1-WKc"/>
+                <outlet property="timeLabel" destination="pFx-1U-bC2" id="xBC-G1-PeH"/>
+            </connections>
+            <point key="canvasLocation" x="51.908396946564885" y="53.169014084507047"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <image name="course_musicRoom" width="40" height="40"/>
+        <image name="course_time" width="16" height="16"/>
+        <image name="merge_next" width="14" height="14"/>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 25 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.h

@@ -0,0 +1,25 @@
+//
+//  MusicRoomGroupHeadView.h
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/11/25.
+//
+
+#import <UIKit/UIKit.h>
+#import "ProgramCourseInfoView.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicRoomGroupHeadView : UIView
+
++ (instancetype)sharedInstance;
+
+- (void)configWithSource:(CourseGroupDetailModel *)model;
+
+- (void)programActionCallback:(ProgramPlanAction)callback;
+
++ (CGFloat)getViewHeightWithPlanString:(NSString *)planString;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 163 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.m

@@ -0,0 +1,163 @@
+//
+//  MusicRoomGroupHeadView.m
+//  KulexiuForStudent
+//
+//  Created by 王智 on 2024/11/25.
+//
+
+#import "MusicRoomGroupHeadView.h"
+#import "CourseGroupPlanAddView.h"
+#import "CourseGroupPlanDescView.h"
+
+@interface MusicRoomGroupHeadView ()
+
+@property (weak, nonatomic) IBOutlet UIView *bgView;
+
+@property (weak, nonatomic) IBOutlet UILabel *courseGroupTitle;
+
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
+
+@property (weak, nonatomic) IBOutlet UIView *subjectView;
+
+@property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
+
+@property (weak, nonatomic) IBOutlet UILabel *courseDesc;
+
+@property (weak, nonatomic) IBOutlet UIView *planContainer;
+
+@property (nonatomic, strong) CourseGroupPlanAddView *addView;
+
+@property (nonatomic, strong) CourseGroupPlanDescView *planDescView;
+
+@property (nonatomic, copy) ProgramPlanAction callback;
+
+
+@end
+
+@implementation MusicRoomGroupHeadView
+
++ (instancetype)sharedInstance {
+    MusicRoomGroupHeadView *view = [[[NSBundle mainBundle] loadNibNamed:@"MusicRoomGroupHeadView" owner:nil options:nil] firstObject];
+    return view;
+}
+
+
+- (void)configWithSource:(CourseGroupDetailModel *)model {
+    [self.planContainer removeAllSubViews];
+    if ([NSString isEmptyString:model.coursePlan]) {
+        [self.planContainer addSubview:self.addView];
+        CGFloat addViewHeight = [CourseGroupPlanAddView getViewHeight];
+        [self.addView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.bottom.right.left.mas_equalTo(self.planContainer);
+            make.height.mas_equalTo(addViewHeight);
+        }];
+        self.bgView.backgroundColor = [UIColor whiteColor];
+    }
+    else {
+        CGFloat planHeight = [CourseGroupPlanDescView getViewHeight:model.coursePlan];
+        self.bgView.backgroundColor = [UIColor clearColor];
+        [self.planContainer addSubview:self.planDescView];
+        [self.planDescView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.top.bottom.mas_equalTo(self.planContainer);
+            make.height.mas_equalTo(planHeight);
+        }];
+        [self.planDescView configWithPlanDesc:model.coursePlan];
+    }
+    self.courseGroupTitle.text = [NSString returnNoNullStringWithString:model.courseGroupName];
+    /// 状态
+    [self evaluateGroupStatus:model.status];
+    
+    self.nameLabel.text = [NSString returnNoNullStringWithString:model.studentName];
+    self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    if ([NSString isEmptyString:model.subjectName]) {
+        self.subjectView.hidden = YES;
+    }
+    else {
+        self.subjectView.hidden = NO;
+    }
+    // 课程描述
+    NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:@"已上课时 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+    NSAttributedString *finishNumAttr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%.0f", model.completeCourseNum] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightSemibold],NSForegroundColorAttributeName:THEMECOLOR}];
+    [attrs appendAttributedString:finishNumAttr];
+    
+    NSAttributedString *totalDescAttr = [[NSAttributedString alloc] initWithString:@" /总课时 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular],NSForegroundColorAttributeName:HexRGB(0x999999)}];
+    [attrs appendAttributedString:totalDescAttr];
+    NSAttributedString *totalNumAttr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%.0f", model.courseNum] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightSemibold],NSForegroundColorAttributeName:THEMECOLOR}];
+    [attrs appendAttributedString:totalNumAttr];
+    self.courseDesc.attributedText = attrs;
+}
+
+- (void)evaluateGroupStatus:(NSString *)status {
+    if ([status isEqualToString:@"ING"]) {
+        self.statusLabel.text = @"已开课";
+        self.statusLabel.textColor = THEMECOLOR;
+    }
+    else if ([status isEqualToString:@"NOT_START"]) {
+        self.statusLabel.text = @"未开课";
+        self.statusLabel.textColor = HexRGB(0xFF802C);
+    }
+    else if ([status isEqualToString:@"COMPLETE"]) {
+        self.statusLabel.text = @"已结课";
+        self.statusLabel.textColor = HexRGB(0x999999);
+    }
+    else if ([status isEqualToString:@"CANCEL"]) {
+        self.statusLabel.text = @"已取消";
+        self.statusLabel.textColor = HexRGB(0x999999);
+    }
+}
+
+
+- (void)programActionCallback:(ProgramPlanAction)callback {
+    if (callback) {
+        self.callback = callback;
+    }
+    
+}
+
++ (CGFloat)getViewHeightWithPlanString:(NSString *)planString {
+    if ([NSString isEmptyString:planString]) {
+        return 106.0f + [CourseGroupPlanAddView getViewHeight];
+    }
+    else {
+        return 106.0f + [CourseGroupPlanDescView getViewHeight:planString];
+    }
+}
+
+- (CourseGroupPlanAddView *)addView {
+    if (!_addView) {
+        _addView = [CourseGroupPlanAddView sharedInstance];
+        MJWeakSelf;
+        [_addView addPlanAction:^{
+            [weakSelf showPlanView];
+        }];
+    }
+    return _addView;
+}
+
+- (CourseGroupPlanDescView *)planDescView {
+    if (!_planDescView) {
+        _planDescView = [CourseGroupPlanDescView sharedInstance];
+        MJWeakSelf;
+        [_planDescView modifyPlanAction:^{
+            [weakSelf showPlanView];
+        }];
+    }
+    return _planDescView;
+}
+
+- (void)showPlanView {
+    if (self.callback) {
+        self.callback();
+    }
+}
+/*
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect {
+    // Drawing code
+}
+*/
+
+@end

+ 161 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomGroupHeadView.xib

@@ -0,0 +1,161 @@
+<?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="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="MusicRoomGroupHeadView">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="165"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wrx-dE-SgG">
+                    <rect key="frame" x="14" y="12" width="365" height="153"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0tb-gl-GAm">
+                    <rect key="frame" x="14" y="106" width="365" height="59"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3kP-Ps-23r">
+                    <rect key="frame" x="14" y="12" width="365" height="94"/>
+                    <subviews>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vQS-vg-LHr">
+                            <rect key="frame" x="12" y="12" width="0.0" height="22"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="22" id="Obf-xa-0v4"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
+                            <color key="textColor" red="0.074509803920000006" green="0.078431372550000003" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GSb-pn-BPN">
+                            <rect key="frame" x="353" y="12" width="0.0" height="0.0"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                            <color key="textColor" red="1" green="0.50196078430000002" blue="0.17254901959999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" image="course_musicRoom" translatesAutoresizingMaskIntoConstraints="NO" id="Npd-J5-fnH">
+                            <rect key="frame" x="12" y="42" width="40" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="M3f-FW-yji"/>
+                                <constraint firstAttribute="width" constant="40" id="rXG-3a-sd7"/>
+                            </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="iST-OW-7X3">
+                            <rect key="frame" x="62" y="43" width="0.0" height="17"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="17" id="Ycj-jK-sgP"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                            <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrange_course_icon" translatesAutoresizingMaskIntoConstraints="NO" id="fIc-0h-KFj">
+                            <rect key="frame" x="63" y="68" width="12" height="14"/>
+                        </imageView>
+                        <view contentMode="scaleToFill" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="QDz-cd-OLe">
+                            <rect key="frame" x="67" y="43" width="8" height="17"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9c5-M6-iVP">
+                                    <rect key="frame" x="4" y="8.6666666666666643" width="0.0" height="0.0"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                                    <color key="textColor" red="1" green="0.54901960780000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" red="1" green="0.94509803920000002" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="9c5-M6-iVP" secondAttribute="trailing" constant="4" id="C0X-oI-Cfv"/>
+                                <constraint firstItem="9c5-M6-iVP" firstAttribute="centerY" secondItem="QDz-cd-OLe" secondAttribute="centerY" id="itq-W9-oo1"/>
+                                <constraint firstAttribute="height" constant="17" id="ncg-NH-lmM"/>
+                                <constraint firstItem="9c5-M6-iVP" firstAttribute="leading" secondItem="QDz-cd-OLe" secondAttribute="leading" constant="4" id="w2V-js-HDd"/>
+                            </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                    <real key="value" value="4"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
+                        </view>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xdo-Ff-H8E">
+                            <rect key="frame" x="79" y="67" width="0.0" height="16"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="16" id="04a-1z-wWI"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                            <nil key="highlightedColor"/>
+                        </label>
+                    </subviews>
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <constraints>
+                        <constraint firstItem="Xdo-Ff-H8E" firstAttribute="centerY" secondItem="fIc-0h-KFj" secondAttribute="centerY" id="7n6-YD-bYN"/>
+                        <constraint firstItem="QDz-cd-OLe" firstAttribute="leading" secondItem="iST-OW-7X3" secondAttribute="trailing" constant="5" id="8Rb-GF-gev"/>
+                        <constraint firstItem="iST-OW-7X3" firstAttribute="leading" secondItem="Npd-J5-fnH" secondAttribute="trailing" constant="10" id="Awe-Nm-Pwv"/>
+                        <constraint firstItem="fIc-0h-KFj" firstAttribute="top" secondItem="iST-OW-7X3" secondAttribute="bottom" constant="8" id="Ewa-Lc-2zy"/>
+                        <constraint firstItem="Xdo-Ff-H8E" firstAttribute="leading" secondItem="fIc-0h-KFj" secondAttribute="trailing" constant="4" id="IEg-tz-Q5W"/>
+                        <constraint firstItem="Npd-J5-fnH" firstAttribute="leading" secondItem="3kP-Ps-23r" secondAttribute="leading" constant="12" id="IcQ-Fs-PtO"/>
+                        <constraint firstAttribute="trailing" secondItem="GSb-pn-BPN" secondAttribute="trailing" constant="12" id="K7Y-Hn-eff"/>
+                        <constraint firstItem="iST-OW-7X3" firstAttribute="top" secondItem="vQS-vg-LHr" secondAttribute="bottom" constant="9" id="Rwq-nQ-WqA"/>
+                        <constraint firstItem="GSb-pn-BPN" firstAttribute="top" secondItem="3kP-Ps-23r" secondAttribute="top" constant="12" id="X7Z-ED-naC"/>
+                        <constraint firstItem="GSb-pn-BPN" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vQS-vg-LHr" secondAttribute="trailing" constant="10" id="ayq-8w-4xI"/>
+                        <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Xdo-Ff-H8E" secondAttribute="trailing" constant="12" id="b9M-Wn-ZNN"/>
+                        <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="QDz-cd-OLe" secondAttribute="trailing" constant="12" id="lAQ-oJ-xG1"/>
+                        <constraint firstItem="fIc-0h-KFj" firstAttribute="leading" secondItem="Npd-J5-fnH" secondAttribute="trailing" constant="11" id="mzz-xu-2YN"/>
+                        <constraint firstItem="QDz-cd-OLe" firstAttribute="centerY" secondItem="iST-OW-7X3" secondAttribute="centerY" id="oFQ-49-a57"/>
+                        <constraint firstItem="vQS-vg-LHr" firstAttribute="top" secondItem="3kP-Ps-23r" secondAttribute="top" constant="12" id="ou3-Mg-jMS"/>
+                        <constraint firstItem="Npd-J5-fnH" firstAttribute="top" secondItem="vQS-vg-LHr" secondAttribute="bottom" constant="8" id="vVT-dy-T2x"/>
+                        <constraint firstItem="vQS-vg-LHr" firstAttribute="leading" secondItem="3kP-Ps-23r" secondAttribute="leading" constant="12" id="w7s-8y-Rf8"/>
+                        <constraint firstAttribute="height" constant="94" id="y9Q-93-MmA"/>
+                    </constraints>
+                    <userDefinedRuntimeAttributes>
+                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                            <real key="value" value="10"/>
+                        </userDefinedRuntimeAttribute>
+                    </userDefinedRuntimeAttributes>
+                </view>
+            </subviews>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="3kP-Ps-23r" secondAttribute="trailing" constant="14" id="4Gh-jb-yAi"/>
+                <constraint firstItem="3kP-Ps-23r" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="7Z1-ip-D1N"/>
+                <constraint firstItem="3kP-Ps-23r" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="9e9-i7-Jgm"/>
+                <constraint firstItem="wrx-dE-SgG" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="Al5-Rm-C0Z"/>
+                <constraint firstAttribute="trailing" secondItem="wrx-dE-SgG" secondAttribute="trailing" constant="14" id="DTK-zx-sfz"/>
+                <constraint firstItem="0tb-gl-GAm" firstAttribute="top" secondItem="3kP-Ps-23r" secondAttribute="bottom" id="OTH-gW-AXS"/>
+                <constraint firstAttribute="bottom" secondItem="0tb-gl-GAm" secondAttribute="bottom" id="UEV-bo-0Tb"/>
+                <constraint firstItem="0tb-gl-GAm" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="Z9F-sm-8PK"/>
+                <constraint firstAttribute="trailing" secondItem="0tb-gl-GAm" secondAttribute="trailing" constant="14" id="cv8-dL-9Gc"/>
+                <constraint firstItem="wrx-dE-SgG" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="fw1-kS-Z7J"/>
+                <constraint firstAttribute="bottom" secondItem="wrx-dE-SgG" secondAttribute="bottom" id="o5w-t8-08c"/>
+            </constraints>
+            <nil key="simulatedTopBarMetrics"/>
+            <nil key="simulatedBottomBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <connections>
+                <outlet property="bgView" destination="wrx-dE-SgG" id="vqH-3S-COv"/>
+                <outlet property="courseDesc" destination="Xdo-Ff-H8E" id="6SI-WO-Xnh"/>
+                <outlet property="courseGroupTitle" destination="vQS-vg-LHr" id="CXK-hg-2hy"/>
+                <outlet property="nameLabel" destination="iST-OW-7X3" id="B1a-Jb-X70"/>
+                <outlet property="planContainer" destination="0tb-gl-GAm" id="n6L-Bo-VCM"/>
+                <outlet property="statusLabel" destination="GSb-pn-BPN" id="VE3-Bk-L0q"/>
+                <outlet property="subjectLabel" destination="9c5-M6-iVP" id="R3p-Ed-rYK"/>
+                <outlet property="subjectView" destination="QDz-cd-OLe" id="w4g-KL-8CK"/>
+            </connections>
+            <point key="canvasLocation" x="46.564885496183201" y="51.760563380281695"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="arrange_course_icon" width="12" height="14"/>
+        <image name="course_musicRoom" width="40" height="40"/>
+    </resources>
+</document>

+ 18 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentPageView.h

@@ -0,0 +1,18 @@
+//
+//  MusicRoomStudentPageView.h
+//  KulexiuForTeacher
+//
+//  Created by 王智 on 2024/11/25.
+//
+
+#import "KSJXBodyView.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface MusicRoomStudentPageView : KSJXBodyView
+
+@property (nonatomic, strong) NSString *courseGroupId;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomStudentPageView.m

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

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/Controller/VIPCourseGroupViewController.m

@@ -186,7 +186,7 @@
     listView.naviController = self.navigationController;
     listView.selectIndex = index;
     listView.courseGroupId = self.courseGroupId;
-    listView.isVipCourse = YES;
+    listView.courseType = COURSE_GROUP_TYPE_VIP;
     [self.listViewArray replaceObjectAtIndex:index withObject:listView];
     self.listViewArray[index] = listView;
     [listView beginFirstRefresh];

+ 7 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.h

@@ -7,13 +7,19 @@
 
 #import "KSJXBodyView.h"
 
+typedef NS_ENUM(NSInteger, COURSE_GROUP_TYPE) {
+    COURSE_GROUP_TYPE_VIP,
+    COURSE_GROUP_TYPE_ACCOMPANY,
+    COURSE_GROUP_TYPE_MUSICROOM,
+};
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface ProgramCourseGroupBodyView : KSJXBodyView
 
 @property (nonatomic, strong) NSString *courseGroupId;
 
-@property (nonatomic, assign) BOOL isVipCourse;
+@property (nonatomic, assign) COURSE_GROUP_TYPE courseType;
 
 @property (nonatomic, assign) NSInteger enterStartTime;  // 开课前可进入时间配置(分钟)
 

+ 34 - 9
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.m

@@ -10,8 +10,10 @@
 #import "StateView.h"
 #import "Reachability.h"
 #import "ProgramCourseListCell.h"
+#import "MusicRoomCourseListCell.h"
 #import "AccompanyDetailViewController.h"
 #import "VipCouseDetailViewController.h"
+#import "MusicRoomViewController.h"
 #import "GroupCourseListModel.h"
 #import "OnlineClassManager.h"
 #import "KSPremissionAlert.h"
@@ -70,6 +72,7 @@
         [self addSubview:self.tableView];
         self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
         [self.tableView registerNib:[UINib nibWithNibName:@"ProgramCourseListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ProgramCourseListCell"];
+        [self.tableView registerNib:[UINib nibWithNibName:@"MusicRoomCourseListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MusicRoomCourseListCell"];
         
         UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, iPhoneXSafeBottomMargin)];
         bottomView.backgroundColor = [UIColor clearColor];
@@ -219,12 +222,22 @@
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     GroupCourseListModel *model = self.dataArray[indexPath.row];
-    ProgramCourseListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ProgramCourseListCell"];
-    MJWeakSelf;
-    [cell configWithSource:model beforeTime:self.enterStartTime callback:^(GroupCourseListModel * _Nonnull model) {
-        [weakSelf enterClassRoom:model];
-    }];
-    return cell;
+    if (self.courseType == COURSE_GROUP_TYPE_VIP || self.courseType == COURSE_GROUP_TYPE_ACCOMPANY) {
+        ProgramCourseListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ProgramCourseListCell"];
+        MJWeakSelf;
+        [cell configWithSource:model beforeTime:self.enterStartTime callback:^(GroupCourseListModel * _Nonnull model) {
+            [weakSelf enterClassRoom:model];
+        }];
+        return cell;
+    }
+    else {
+        MusicRoomCourseListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseListCell"];
+        MJWeakSelf;
+        [cell configWithSource:model beforeTime:self.enterStartTime callback:^(GroupCourseListModel * _Nonnull model) {
+            [weakSelf enterClassRoom:model];
+        }];
+        return cell;
+    }
 }
 
 - (void)enterClassRoom:(GroupCourseListModel *)model {
@@ -254,20 +267,26 @@
     // 课程详情
     GroupCourseListModel *courseModel = self.dataArray[indexPath.row];
     CourseStudentVos *studentModel = [courseModel.courseStudentVos lastObject];
-    if (self.isVipCourse) {
+    if (self.courseType == COURSE_GROUP_TYPE_VIP) {
         VipCouseDetailViewController *detailVC = [[VipCouseDetailViewController alloc] init];
         detailVC.courseId = courseModel.courseId;
         detailVC.courseGroupId = courseModel.courseGoupId;
         detailVC.studentId = studentModel.userId;
         [self.naviController pushViewController:detailVC animated:YES];
     }
-    else {
+    else if (self.courseType == COURSE_GROUP_TYPE_ACCOMPANY) {
         AccompanyDetailViewController *detailVC = [[AccompanyDetailViewController alloc] init];
         detailVC.courseId = courseModel.courseId;
         detailVC.courseGroupId = courseModel.courseGoupId;
         detailVC.studentId = studentModel.userId;
         [self.naviController pushViewController:detailVC animated:YES];
     }
+    else if (self.courseType == COURSE_GROUP_TYPE_MUSICROOM) {
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseId = courseModel.courseId;
+        ctrl.courseGroupId = courseModel.courseGoupId;
+        [self.naviController pushViewController:ctrl animated:YES];
+    }
 }
 
 #pragma mark ---- lazying
@@ -520,7 +539,13 @@
 }
 
 - (void)showPickerView {
-    KSFullDatePicker *picker = [[KSFullDatePicker alloc] initWithTitle:@"" date:[NSDate date] pickMode:KSDATEPICKER_MODE_YEAR_MONTH sureButtonColor:THEMECOLOR selectDateBlock:^(NSString *date) {
+    [self.dateFormatter setDateFormat:@"yyyy-MM"];
+    NSDate *preDate = [NSDate date];
+    if (![NSString isEmptyString:self.classDate]) {
+        preDate = [self.dateFormatter dateFromString:self.classDate];
+    }
+    
+    KSFullDatePicker *picker = [[KSFullDatePicker alloc] initWithTitle:@"" date:preDate pickMode:KSDATEPICKER_MODE_YEAR_MONTH sureButtonColor:THEMECOLOR selectDateBlock:^(NSString *date) {
 
         self.classDate = date;
         NSString *displayTime = [self getTimeDisplay:date];

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseInfoView.m

@@ -21,6 +21,8 @@
 
 @property (weak, nonatomic) IBOutlet UILabel *nameLabel;
 
+@property (weak, nonatomic) IBOutlet UIView *subjectView;
+
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 @property (weak, nonatomic) IBOutlet UILabel *courseDesc;
@@ -71,6 +73,12 @@
     [self.avatar sd_setImageWithURL:[NSURL URLWithString:[model.studentAvatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:STUDENT_AVATAR]];
     self.nameLabel.text = [NSString returnNoNullStringWithString:model.studentName];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    if ([NSString isEmptyString:model.subjectName]) {
+        self.subjectView.hidden = YES;
+    }
+    else {
+        self.subjectView.hidden = NO;
+    }
     // 课程描述
     NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:@"已上课时 " attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightRegular],NSForegroundColorAttributeName:HexRGB(0x999999)}];
     NSAttributedString *finishNumAttr = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%.0f", model.completeCourseNum] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12.0f weight:UIFontWeightSemibold],NSForegroundColorAttributeName:THEMECOLOR}];

+ 12 - 11
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseInfoView.xib

@@ -25,8 +25,8 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TTp-sQ-B0k">
                     <rect key="frame" x="14" y="12" width="365" height="94"/>
                     <subviews>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="VIP定制课-张涵宇" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qdk-Iv-HHj">
-                            <rect key="frame" x="12" y="12" width="130.33333333333334" height="22"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qdk-Iv-HHj">
+                            <rect key="frame" x="12" y="12" width="0.0" height="22"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="22" id="Kha-MR-xBB"/>
                             </constraints>
@@ -34,8 +34,8 @@
                             <color key="textColor" red="0.074509803920000006" green="0.078431372550000003" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="未开课" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CAz-5b-toA">
-                            <rect key="frame" x="311" y="12" width="42" height="17"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CAz-5b-toA">
+                            <rect key="frame" x="353" y="12" width="0.0" height="0.0"/>
                             <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                             <color key="textColor" red="1" green="0.50196078430000002" blue="0.17254901959999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
@@ -52,8 +52,8 @@
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </imageView>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="向冰冰" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J5P-Tl-Nui">
-                            <rect key="frame" x="62" y="43" width="39" height="17"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J5P-Tl-Nui">
+                            <rect key="frame" x="62" y="43" width="0.0" height="17"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="17" id="bRJ-dW-7MW"/>
                             </constraints>
@@ -65,10 +65,10 @@
                             <rect key="frame" x="63" y="68" width="12" height="14"/>
                         </imageView>
                         <view contentMode="scaleToFill" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="ERt-aV-DBH">
-                            <rect key="frame" x="106" y="43" width="38" height="17"/>
+                            <rect key="frame" x="67" y="43" width="8" height="17"/>
                             <subviews>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单簧管" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mAJ-jN-D5e">
-                                    <rect key="frame" x="4" y="2.6666666666666643" width="30" height="12"/>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mAJ-jN-D5e">
+                                    <rect key="frame" x="4" y="8.6666666666666643" width="0.0" height="0.0"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                     <color key="textColor" red="1" green="0.54901960780000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     <nil key="highlightedColor"/>
@@ -87,8 +87,8 @@
                                 </userDefinedRuntimeAttribute>
                             </userDefinedRuntimeAttributes>
                         </view>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="已上课时 34 /总课时 20" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Oly-2P-Xkc">
-                            <rect key="frame" x="79" y="67" width="129" height="16"/>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Oly-2P-Xkc">
+                            <rect key="frame" x="79" y="67" width="0.0" height="16"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="16" id="eDB-zy-wct"/>
                             </constraints>
@@ -155,6 +155,7 @@
                 <outlet property="planContainer" destination="gsx-fa-Tcd" id="Ife-Bl-L6a"/>
                 <outlet property="statusLabel" destination="CAz-5b-toA" id="LEe-vR-eoP"/>
                 <outlet property="subjectLabel" destination="mAJ-jN-D5e" id="yUP-Mv-1nr"/>
+                <outlet property="subjectView" destination="ERt-aV-DBH" id="oN3-N8-u1a"/>
             </connections>
             <point key="canvasLocation" x="41.984732824427482" y="-138.73239436619718"/>
         </view>

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseListCell.m

@@ -24,6 +24,7 @@
 @property (weak, nonatomic) IBOutlet UIImageView *arriveStatus;
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *arriveStatusWidth;
 
+@property (weak, nonatomic) IBOutlet UIView *subjectView;
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 @property (nonatomic, strong) GroupCourseListModel *sourceModel;
@@ -61,6 +62,12 @@
     [self.avatar sd_setImageWithURL:[NSURL URLWithString:[studentInfo.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:STUDENT_AVATAR]];
     self.nameLabel.text = [NSString returnNoNullStringWithString:studentInfo.userName];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    if ([NSString isEmptyString:model.subjectName]) {
+        self.subjectView.hidden = YES;
+    }
+    else {
+        self.subjectView.hidden = NO;
+    }
     [self evaluateWithSource:model];
 }
 

+ 17 - 16
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseListCell.xib

@@ -35,8 +35,8 @@
                                     <constraint firstAttribute="height" constant="16" id="um2-KO-HvN"/>
                                 </constraints>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="2024-10-30 15:00~15:45" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IZA-Ec-v3k">
-                                <rect key="frame" x="35" y="14" width="162" height="18"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IZA-Ec-v3k">
+                                <rect key="frame" x="35" y="14" width="0.0" height="18"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="18" id="efI-vt-L5E"/>
                                 </constraints>
@@ -45,7 +45,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="进行中" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2NK-NE-SfV">
-                                <rect key="frame" x="224" y="12" width="42" height="22"/>
+                                <rect key="frame" x="238" y="12" width="42" height="22"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="22" id="Jye-K4-VKj"/>
                                 </constraints>
@@ -65,8 +65,8 @@
                                     </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="VIP定制课-张涵宇" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n5o-cB-ZAV">
-                                <rect key="frame" x="62" y="58" width="121" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n5o-cB-ZAV">
+                                <rect key="frame" x="62" y="58" width="0.0" height="21"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="21" id="ohl-08-mEU"/>
                                 </constraints>
@@ -75,14 +75,14 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" image="merge_next" translatesAutoresizingMaskIntoConstraints="NO" id="qS2-Zu-yal">
-                                <rect key="frame" x="268" y="17" width="12" height="12"/>
+                                <rect key="frame" x="268" y="73" width="12" height="12"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="12" id="G2z-Hu-GQl"/>
                                     <constraint firstAttribute="height" constant="12" id="fMg-wX-e8L"/>
                                 </constraints>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="张涵宇" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VwE-ev-4NJ">
-                                <rect key="frame" x="62" y="83" width="39" height="17"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VwE-ev-4NJ">
+                                <rect key="frame" x="62" y="83" width="0.0" height="17"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="17" id="Vmz-gh-Vrv"/>
                                 </constraints>
@@ -91,10 +91,10 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <view contentMode="scaleToFill" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="IN8-fl-KKM">
-                                <rect key="frame" x="106" y="83" width="38" height="17"/>
+                                <rect key="frame" x="67" y="83" width="8" height="17"/>
                                 <subviews>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单簧管" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uk4-i9-HBZ">
-                                        <rect key="frame" x="4" y="2.6666666666666714" width="30" height="12"/>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uk4-i9-HBZ">
+                                        <rect key="frame" x="4" y="8.6666666666666714" width="0.0" height="0.0"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                         <color key="textColor" red="1" green="0.54901960780000003" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <nil key="highlightedColor"/>
@@ -114,7 +114,7 @@
                                 </userDefinedRuntimeAttributes>
                             </view>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nM7-0u-1Vp">
-                                <rect key="frame" x="188" y="59.666666666666657" width="36" height="18"/>
+                                <rect key="frame" x="67" y="59.666666666666657" width="36" height="18"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="18" id="JoD-PD-ToL"/>
                                     <constraint firstAttribute="width" constant="36" id="gMd-pw-6Q3"/>
@@ -137,11 +137,11 @@
                         </subviews>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
+                            <constraint firstAttribute="bottom" secondItem="qS2-Zu-yal" secondAttribute="bottom" constant="26" id="1mi-w0-eDU"/>
                             <constraint firstItem="n5o-cB-ZAV" firstAttribute="leading" secondItem="fC0-s3-zGf" secondAttribute="trailing" constant="10" id="7Hn-gP-Gfh"/>
                             <constraint firstItem="Dqu-Jf-1D9" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="IZA-Ec-v3k" secondAttribute="trailing" constant="5" id="9SA-Em-VRf"/>
                             <constraint firstAttribute="trailing" secondItem="cms-Uu-AjN" secondAttribute="trailing" constant="10" id="9bT-Vd-f8p"/>
                             <constraint firstAttribute="bottom" secondItem="fC0-s3-zGf" secondAttribute="bottom" constant="12" id="Ah1-VO-xwc"/>
-                            <constraint firstItem="qS2-Zu-yal" firstAttribute="leading" secondItem="2NK-NE-SfV" secondAttribute="trailing" constant="2" id="Cct-nq-47C"/>
                             <constraint firstItem="2NK-NE-SfV" firstAttribute="centerY" secondItem="IZA-Ec-v3k" secondAttribute="centerY" id="EMl-9N-RG5"/>
                             <constraint firstAttribute="trailing" secondItem="qS2-Zu-yal" secondAttribute="trailing" constant="12" id="EVJ-Qc-kNM"/>
                             <constraint firstItem="VwE-ev-4NJ" firstAttribute="leading" secondItem="n5o-cB-ZAV" secondAttribute="leading" id="Ehn-EO-ici"/>
@@ -154,15 +154,15 @@
                             <constraint firstAttribute="trailing" secondItem="Dqu-Jf-1D9" secondAttribute="trailing" constant="15" id="Uu6-A8-Gya"/>
                             <constraint firstItem="VwE-ev-4NJ" firstAttribute="top" secondItem="n5o-cB-ZAV" secondAttribute="bottom" constant="4" id="VY7-N5-kOX"/>
                             <constraint firstItem="IN8-fl-KKM" firstAttribute="centerY" secondItem="VwE-ev-4NJ" secondAttribute="centerY" id="Xfo-bh-3Dl"/>
+                            <constraint firstAttribute="trailing" secondItem="2NK-NE-SfV" secondAttribute="trailing" constant="12" id="YbB-Iw-Wws"/>
                             <constraint firstItem="n5o-cB-ZAV" firstAttribute="top" secondItem="fC0-s3-zGf" secondAttribute="top" constant="-1" id="Zf7-e6-HR1"/>
-                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="nM7-0u-1Vp" secondAttribute="trailing" constant="12" id="hZM-Q4-zRW"/>
                             <constraint firstItem="nM7-0u-1Vp" firstAttribute="centerY" secondItem="n5o-cB-ZAV" secondAttribute="centerY" id="iKM-Qu-8QT"/>
                             <constraint firstItem="zF6-bQ-6kl" firstAttribute="top" secondItem="DbI-ca-fVq" secondAttribute="top" constant="15" id="k8n-KT-orp"/>
+                            <constraint firstItem="qS2-Zu-yal" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="nM7-0u-1Vp" secondAttribute="trailing" constant="5" id="klr-PU-0yf"/>
                             <constraint firstItem="IZA-Ec-v3k" firstAttribute="centerY" secondItem="zF6-bQ-6kl" secondAttribute="centerY" id="nL8-bs-J29"/>
                             <constraint firstItem="zF6-bQ-6kl" firstAttribute="leading" secondItem="DbI-ca-fVq" secondAttribute="leading" constant="12" id="nNW-ef-6OP"/>
                             <constraint firstItem="cms-Uu-AjN" firstAttribute="leading" secondItem="DbI-ca-fVq" secondAttribute="leading" constant="10" id="pGW-8N-GaP"/>
-                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="IN8-fl-KKM" secondAttribute="trailing" constant="12" id="pXV-tJ-Mtf"/>
-                            <constraint firstItem="qS2-Zu-yal" firstAttribute="top" secondItem="DbI-ca-fVq" secondAttribute="top" constant="17" id="vPT-HL-Lfs"/>
+                            <constraint firstItem="qS2-Zu-yal" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="IN8-fl-KKM" secondAttribute="trailing" constant="5" id="xy4-vl-cX0"/>
                             <constraint firstItem="IZA-Ec-v3k" firstAttribute="leading" secondItem="zF6-bQ-6kl" secondAttribute="trailing" constant="7" id="z5j-XG-UJ1"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>
@@ -190,6 +190,7 @@
                 <outlet property="nameLabel" destination="VwE-ev-4NJ" id="MOV-h8-dpI"/>
                 <outlet property="statusLabel" destination="2NK-NE-SfV" id="uu3-nS-teP"/>
                 <outlet property="subjectLabel" destination="Uk4-i9-HBZ" id="xbf-8n-kcl"/>
+                <outlet property="subjectView" destination="IN8-fl-KKM" id="vm7-LO-lCn"/>
                 <outlet property="timeLabel" destination="IZA-Ec-v3k" id="oiu-tG-ipj"/>
             </connections>
             <point key="canvasLocation" x="39.694656488549619" y="49.647887323943664"/>

+ 6 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/MusicRoomCourseGroup/MyMusicRoomCourseGroupView.m

@@ -12,6 +12,7 @@
 #import "Reachability.h"
 #import "ProgramCourseGroupModel.h"
 #import "MyCourseRankSortView.h"
+#import "MusicRoomGroupViewController.h"
 
 @interface MyMusicRoomCourseGroupView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -196,7 +197,11 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     // 课程组详情
-    
+    // 课程详情
+    ProgramCourseGroupModel *model = self.dataArray[indexPath.row];
+    MusicRoomGroupViewController *ctrl = [[MusicRoomGroupViewController alloc] init];
+    ctrl.courseGroupId = [NSString stringWithFormat:@"%.0f",model.courseGroupId];
+    [self.naviController pushViewController:ctrl animated:YES];
 }
 
 #pragma mark ------ lazying

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/configuration/Config-dev.xcconfig

@@ -23,6 +23,6 @@ TXOfflinePushCertificateIDForAPNS = 39559
 APP_NAME = 酷乐秀学院-dev
 APP_BUNDLE_ID = com.Colexiu.KulexiuForTeacher-dev
 CONFIG_FLAG = DEV
-SSL_AUTH = YES
+SSL_AUTH = NO
 
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) REQUEST_DOMAIN='${REQUEST_DOMAIN}' ACCOMPANY_DOMAIN='${ACCOMPANY_DOMAIN}' SOCKET_DOMAIN='${SOCKET_DOMAIN}' WHITE_BOARD='${WHITE_BOARD}' OPEN_DOMAIN='${OPEN_DOMAIN}' JSPUSH_ENVIRONMENT='${JSPUSH_ENVIRONMENT}' SUBMIT_UUID='${SUBMIT_UUID}' CONFIG_TXSDKAPPID='${CONFIG_TXSDKAPPID}' TXOfflinePushCertificateIDForAPNS='${TXOfflinePushCertificateIDForAPNS}' APP_NAME='${APP_NAME}' APP_BUNDLE_ID='${APP_BUNDLE_ID}' SSL_AUTH='${SSL_AUTH}'