Просмотр исходного кода

小组课课程详情和课程组搜索条件修改

Steven 2 дней назад
Родитель
Сommit
bfe3e6c5c2
27 измененных файлов с 171 добавлено и 270 удалено
  1. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_group.imageset/course_group@2x.png
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_group.imageset/course_group@3x.png
  3. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_musicRoom.imageset/course_musicRoom@2x.png
  4. BIN
      KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_musicRoom.imageset/course_musicRoom@3x.png
  5. 10 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m
  6. 8 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.h
  7. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m
  8. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.h
  9. 5 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.m
  10. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.xib
  11. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/Controller/GroupCourseGroupViewController.m
  12. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.m
  13. 2 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupNavView.xib
  14. 0 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseListCell.m
  15. 6 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseListCell.xib
  16. 14 58
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.m
  17. 0 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.h
  18. 9 30
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.m
  19. 74 136
      KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.xib
  20. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  21. 8 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m
  22. 1 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/PopView/MusicRoomCourseCell.h
  23. 4 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/PopView/MusicRoomCourseCell.m
  24. 2 1
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/PopView/MusicRoomCourseCell.xib
  25. 1 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.h
  26. 2 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CroupCourse/Controller/MyGroupCourseViewController.m
  27. 9 17
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CroupCourse/View/MyGroupCourseBodyView.m

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_group.imageset/course_group@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_group.imageset/course_group@3x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_musicRoom.imageset/course_musicRoom@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Course/course_musicRoom.imageset/course_musicRoom@3x.png


+ 10 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/Controller/CourseViewController.m

@@ -467,9 +467,10 @@
     }
     else { // 琴房课 PIANO_ROOM_CLASS
         
+        BOOL isGroup = [model.courseType isEqualToString:@"GROUP"] ? YES : NO;
         MusicRoomCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseCell"];
         MJWeakSelf;
-        [cell configWithSource:model beforeTime:self.pianoStartTime callback:^(NSString * _Nonnull targetId) {
+        [cell configWithSource:model isGroup:isGroup beforeTime:self.pianoStartTime callback:^(NSString * _Nonnull targetId) {
             [weakSelf chatAction:targetId groupName:@"" isGroup:YES];
         }];
         return cell;
@@ -489,8 +490,16 @@
     else if ([model.courseType isEqualToString:@"LIVE"]) { // 直播课详情
         [self liveCourseDetail:model.courseId courseGroupId:model.courseGoupId];
     }
+    else if ([model.courseType isEqualToString:@"GROUP"]) {
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_GROUP;
+        ctrl.courseId = model.courseId;
+        ctrl.courseGroupId = model.courseGoupId;
+        [self.navigationController pushViewController:ctrl animated:YES];
+    }
     else {
         MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_MUSIC;
         ctrl.courseId = model.courseId;
         ctrl.courseGroupId = model.courseGoupId;
         [self.navigationController pushViewController:ctrl animated:YES];

+ 8 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.h

@@ -7,11 +7,18 @@
 
 #import "KSBaseViewController.h"
 
-// 云酷琴房详情页
+typedef NS_ENUM(NSInteger, MUTIL_COURSE_TYPE) {
+    MUTIL_COURSE_TYPE_MUSIC,
+    MUTIL_COURSE_TYPE_GROUP
+};
+
+// 云酷琴房详情页 | 小组课详情
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MusicRoomViewController : KSBaseViewController
 
+@property (nonatomic, assign) MUTIL_COURSE_TYPE courseType;
+
 @property (nonatomic, strong) NSString *courseId;
 
 @property (nonatomic, strong) NSString *courseGroupId;

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/Controller/MusicRoomViewController.m

@@ -172,7 +172,8 @@
     if (indexPath.section == 0) {
         MusicRoomCourseInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MusicRoomCourseInfoCell"];
         MJWeakSelf;
-        [cell configWithSource:self.detailModel chatAction:^(NSString * _Nonnull targetId) {
+        BOOL isGroup = self.courseType == MUTIL_COURSE_TYPE_GROUP ? YES : NO;
+        [cell configWithSource:self.detailModel isGroup:isGroup chatAction:^(NSString * _Nonnull targetId) {
             [weakSelf chatAction:targetId];
         }];
         return cell;

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.h

@@ -14,7 +14,7 @@ typedef void(^MusicRoomGroupChatAction)(NSString *targetId);
 
 @interface MusicRoomCourseInfoCell : UITableViewCell
 
-- (void)configWithSource:(MusicRoomDetailModel *)model chatAction:(MusicRoomGroupChatAction)callback;
+- (void)configWithSource:(MusicRoomDetailModel *)model isGroup:(BOOL)isGroup chatAction:(MusicRoomGroupChatAction)callback;
 
 @end
 

+ 5 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.m

@@ -9,6 +9,8 @@
 
 @interface MusicRoomCourseInfoCell ()
 
+@property (weak, nonatomic) IBOutlet UIImageView *courseImage;
+
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *attendenceImgLeft;
 
 @property (weak, nonatomic) IBOutlet NSLayoutConstraint *attendenceImgWidth;
@@ -38,10 +40,12 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
 }
 
-- (void)configWithSource:(MusicRoomDetailModel *)model chatAction:(MusicRoomGroupChatAction)callback {
+- (void)configWithSource:(MusicRoomDetailModel *)model isGroup:(BOOL)isGroup chatAction:(MusicRoomGroupChatAction)callback {
     if (callback) {
         self.callback = callback;
     }
+    NSString *imgName = isGroup ? @"course_group" : @"course_musicRoom";
+    [self.courseImage setImage:[UIImage imageNamed:imgName]];
     // time
     [self evaluateTimeLabelWithBeginTime:model.startTime endTime:model.endTime];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];

+ 2 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MusicRoom/View/MusicRoomCourseInfoCell.xib

@@ -158,6 +158,7 @@
                 <outlet property="attendenceImgLeft" destination="52P-5m-1Ln" id="HS7-tc-fCQ"/>
                 <outlet property="attendenceImgWidth" destination="zAo-te-zhg" id="D2x-ng-asT"/>
                 <outlet property="attendentStatusImage" destination="cdq-YL-Hxn" id="9dg-9J-xEg"/>
+                <outlet property="courseImage" destination="MPJ-dm-TQx" id="YX2-6u-Za6"/>
                 <outlet property="courseName" destination="QUb-lq-pUv" id="jT1-d5-C3p"/>
                 <outlet property="courseTimeLabel" destination="xGN-fD-6g8" id="Sme-fy-pag"/>
                 <outlet property="statusLabel" destination="1JB-RE-CPf" id="Dx1-ae-yhb"/>
@@ -167,7 +168,7 @@
         </tableViewCell>
     </objects>
     <resources>
-        <image name="course_musicRoom" width="40" height="40"/>
+        <image name="course_musicRoom" width="56" height="56"/>
         <image name="course_time" width="16" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/Controller/GroupCourseGroupViewController.m

@@ -181,6 +181,7 @@
 - (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
     if (index == 0) {
         ProgramCourseGroupBodyView *listView = [[ProgramCourseGroupBodyView alloc] init];
+        listView.courseType = COURSE_GROUP_TYPE_GROUP;
         listView.naviController = self.navigationController;
         listView.selectIndex = index;
         listView.courseGroupId = self.courseGroupId;

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupHeadView.m

@@ -99,7 +99,7 @@
     else {
         introduce = @"暂无介绍";
     }
-    CGFloat imageHeight = KLandscapeWidth / 16 * 9;
+    CGFloat imageHeight = KPortraitWidth / 16 * 9;
     CGFloat planHeight = 79 + [GroupCourseGroupHeadView getViewRealHeight:introduce];
     return 135 + imageHeight + planHeight;
 }
@@ -119,7 +119,7 @@
 + (CGFloat)getViewRealHeight:(NSString *)planString {
     NSMutableParagraphStyle *paragraphStyle = [self getParagraphStyleWithFont:[UIFont systemFontOfSize:13.0f] lineHeight:22.0f];
     CGFloat baselineOffset = [self getBaseOffline:[UIFont systemFontOfSize:13.0f] lineHeight:22.0f];
-    CGFloat height = [planString boundingRectWithSize:CGSizeMake(KPortraitWidth - 26, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSParagraphStyleAttributeName:paragraphStyle, NSBaselineOffsetAttributeName:@(baselineOffset),NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} context:nil].size.height + 1 + 42 + 10 + 12;
+    CGFloat height = [planString boundingRectWithSize:CGSizeMake(KPortraitWidth - 26, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSParagraphStyleAttributeName:paragraphStyle, NSBaselineOffsetAttributeName:@(baselineOffset),NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} context:nil].size.height + 1;
     return height;
 }
 

+ 2 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseGroupNavView.xib

@@ -1,10 +1,9 @@
 <?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">
+<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="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -53,8 +52,7 @@
                     </constraints>
                 </view>
             </subviews>
-            <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
-            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstAttribute="trailing" secondItem="Twy-FB-6kP" secondAttribute="trailing" id="M2m-0F-MjX"/>
                 <constraint firstAttribute="bottom" secondItem="Twy-FB-6kP" secondAttribute="bottom" id="hke-Ti-OVP"/>

+ 0 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseListCell.m

@@ -175,11 +175,5 @@
     return paragraphStyle;
 }
 
-+ (CGFloat)getViewRealHeight:(NSString *)planString {
-    NSMutableParagraphStyle *paragraphStyle = [self getParagraphStyleWithFont:[UIFont systemFontOfSize:13.0f] lineHeight:22.0f];
-    CGFloat baselineOffset = [self getBaseOffline:[UIFont systemFontOfSize:13.0f] lineHeight:22.0f];
-    CGFloat height = [planString boundingRectWithSize:CGSizeMake(KPortraitWidth - 26, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSParagraphStyleAttributeName:paragraphStyle, NSBaselineOffsetAttributeName:@(baselineOffset),NSFontAttributeName:[UIFont systemFontOfSize:13.0f]} context:nil].size.height + 1 + 42 + 10 + 12;
-    return height;
-}
 
 @end

+ 6 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Course/MyGroupCourse/View/GroupCourseListCell.xib

@@ -62,6 +62,11 @@
                                             <constraint firstAttribute="height" constant="40" id="ahR-zj-ifd"/>
                                             <constraint firstAttribute="width" constant="40" id="qep-w8-8cv"/>
                                         </constraints>
+                                        <userDefinedRuntimeAttributes>
+                                            <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
+                                                <real key="value" value="20"/>
+                                            </userDefinedRuntimeAttribute>
+                                        </userDefinedRuntimeAttributes>
                                     </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="gRy-bX-ROl">
                                         <rect key="frame" x="62" y="58" width="0.0" height="21"/>
@@ -233,7 +238,7 @@
         </tableViewCell>
     </objects>
     <resources>
-        <image name="course_group" width="40" height="40"/>
+        <image name="course_group" width="56" height="56"/>
         <image name="course_time" width="16" height="16"/>
         <image name="merge_next" width="14" height="14"/>
         <systemColor name="systemBackgroundColor">

+ 14 - 58
KulexiuForTeacher/KulexiuForTeacher/Module/Course/VIPCourse/View/ProgramCourseGroupBodyView.m

@@ -24,8 +24,6 @@
 
 @interface ProgramCourseGroupBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
-@property (nonatomic, strong) NSDateFormatter *dateFormatter;
-
 @property (nonatomic, strong) NSMutableArray *dataArray;
 
 @property (nonatomic, strong) StateView *promptView;
@@ -75,6 +73,8 @@
         [self.tableView registerNib:[UINib nibWithNibName:@"ProgramCourseListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"ProgramCourseListCell"];
         [self.tableView registerNib:[UINib nibWithNibName:@"MusicRoomCourseListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MusicRoomCourseListCell"];
         [self.tableView registerNib:[UINib nibWithNibName:@"GroupCourseListCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"GroupCourseListCell"];
+        self.tableView.estimatedRowHeight = 123.0f;
+        self.tableView.rowHeight = UITableViewAutomaticDimension;
         
         UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KPortraitWidth, iPhoneXSafeBottomMargin)];
         bottomView.backgroundColor = [UIColor clearColor];
@@ -95,9 +95,6 @@
 - (void)configDefault {
     self.secondChooseIndex = 1;
     self.thirdChooseIndex = 1;
-    [self.dateFormatter setDateFormat:@"yyyy-MM"];
-    NSDate *currentDate = [NSDate date];
-    self.classDate = [self.dateFormatter stringFromDate:currentDate];
 }
 
 - (void)forceScroll {
@@ -130,7 +127,8 @@
 }
 
 - (void)requestData {
-    [KSNetworkingManager courseScheduleListRequest:KS_POST courseGroupId:self.courseGroupId classMonth:self.classDate attendanceStatus:self.attendanceStatus courseStatus:self.courseStatus success:^(NSDictionary * _Nonnull dic) {
+    NSString *classDate = nil;
+    [KSNetworkingManager courseScheduleListRequest:KS_POST courseGroupId:self.courseGroupId classMonth:classDate attendanceStatus:self.attendanceStatus courseStatus:self.courseStatus success:^(NSDictionary * _Nonnull dic) {
         [self endRefresh];
         if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
             NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
@@ -192,9 +190,6 @@
             make.left.right.top.mas_equalTo(self);
             make.height.mas_equalTo(sortViewHeight);
         }];
-        [self.dateFormatter setDateFormat:@"yyyy年MM月"];
-        NSDate *currentDate = [NSDate date];
-        [self.sortView.firstLabel setText:[self.dateFormatter stringFromDate:currentDate]];
     }
 
     [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
@@ -208,10 +203,6 @@
     return self.dataArray.count;
 }
 
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    return 123.0f;
-}
-
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     GroupCourseListModel *model = self.dataArray[indexPath.row];
     if (self.courseType == COURSE_GROUP_TYPE_VIP || self.courseType == COURSE_GROUP_TYPE_ACCOMPANY) {
@@ -279,8 +270,16 @@
         detailVC.studentId = studentModel.userId;
         [self.naviController pushViewController:detailVC animated:YES];
     }
+    else if (self.courseType == COURSE_GROUP_TYPE_GROUP) {
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_GROUP;
+        ctrl.courseId = courseModel.courseId;
+        ctrl.courseGroupId = courseModel.courseGoupId;
+        [self.naviController pushViewController:ctrl animated:YES];
+    }
     else if (self.courseType == COURSE_GROUP_TYPE_MUSICROOM) {
         MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_MUSIC;
         ctrl.courseId = courseModel.courseId;
         ctrl.courseGroupId = courseModel.courseGoupId;
         [self.naviController pushViewController:ctrl animated:YES];
@@ -427,19 +426,9 @@
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
 
-
-- (NSDateFormatter *)dateFormatter {
-    if (!_dateFormatter) {
-        _dateFormatter = [NSObject getDateformatter];
-    }
-    return _dateFormatter;
-}
 - (void)sortWithType:(SORT_TYPE)type {
     
-    if (type == SORT_TYPE_TIME) { // time
-        [self showPickerView];
-    }
-    else if (type == SORT_TYPE_STATUS) { // 状态
+     if (type == SORT_TYPE_STATUS) { // 状态
         MJWeakSelf;
         KSSmallChoosePicker *picker = [[KSSmallChoosePicker alloc] initWithTitle:@"" sourceData:@[@"全部",@"未开始",@"进行中",@"已结束"] lastChoose:self.secondChooseIndex chooseColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
             weakSelf.secondChooseIndex = chooseIndex;
@@ -536,46 +525,13 @@
     }
 }
 
-- (void)showPickerView {
-    [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];
-        [self.sortView.firstLabel setText:displayTime];
-        [self resetPickerStatus];
-        // 请求数据
-        [self refreshAndRequestData];
-    } cancleBlock:^{
-        [self resetPickerStatus];
-    }];
-    [picker show];
-}
+
 
 - (void)hiddenPopView {
-    self.sortView.firstArrowUp = NO;
     self.sortView.secondArrowUp = NO;
     self.sortView.thirdArrowUp = NO;
 }
 
-
-- (NSString *)getTimeDisplay:(NSString *)chooseMonth {
-    [self.dateFormatter setDateFormat:@"yyyy-MM"];
-    NSDate *chooseDate = [self.dateFormatter dateFromString:chooseMonth];
-    [self.dateFormatter setDateFormat:@"yyyy年MM月"];
-    NSString *displayTime = [self.dateFormatter stringFromDate:chooseDate];
-    return displayTime;
-}
-
-- (void)resetPickerStatus {
-    self.sortView.firstArrowUp = NO;
-}
-
 - (void)setSortBgColor:(UIColor *)sortBgColor {
     _sortBgColor = sortBgColor;
     self.sortView.backgroundColor = sortBgColor;

+ 0 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.h

@@ -8,7 +8,6 @@
 #import <UIKit/UIKit.h>
 
 typedef NS_ENUM(NSInteger, SORT_TYPE) {
-    SORT_TYPE_TIME = 1,   // 课程时间
     SORT_TYPE_STATUS = 2, // 课程状态
     SORT_TYPE_ATTENDENCE = 3,  // 考勤筛选
     SORT_TYPE_HIDDEN = 4, // 隐藏
@@ -22,12 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL showWhiteBg;
 
-@property (weak, nonatomic) IBOutlet UILabel *firstLabel;
 @property (weak, nonatomic) IBOutlet UILabel *secondLabel;
 @property (weak, nonatomic) IBOutlet UILabel *thirdLabel;
 
-@property (nonatomic, assign) BOOL firstArrowUp;
-
 @property (nonatomic, assign) BOOL secondArrowUp;
 
 @property (nonatomic, assign) BOOL thirdArrowUp;

+ 9 - 30
KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.m

@@ -10,11 +10,9 @@
 @interface GroupCourseSortView ()
 
 @property (nonatomic, copy) SortActionBlock block;
-@property (weak, nonatomic) IBOutlet UIView *firstWihteView;
 @property (weak, nonatomic) IBOutlet UIView *secondWhiteView;
 @property (weak, nonatomic) IBOutlet UIView *thirdWihteView;
 
-@property (weak, nonatomic) IBOutlet UIImageView *firstArrow;
 @property (weak, nonatomic) IBOutlet UIImageView *secondArrow;
 @property (weak, nonatomic) IBOutlet UIImageView *thirdArrow;
 
@@ -24,7 +22,6 @@
 @implementation GroupCourseSortView
 - (void)awakeFromNib {
     [super awakeFromNib];
-    self.firstArrowUp = NO;
     self.secondArrowUp = NO;
     self.thirdArrowUp = NO;
 }
@@ -43,21 +40,13 @@
 - (IBAction)buttonClickAction:(UIButton *)sender {
     NSInteger index = sender.tag - 1000;
     BOOL isHidden;
-    if (index == 1) {
-        self.firstArrowUp = !self.firstArrowUp;
-        self.secondArrowUp = NO;
-        self.thirdArrowUp = NO;
-        isHidden = !self.firstArrowUp;
-    }
-    else if (index == 2) {
+    if (index == 2) {
         self.secondArrowUp = !self.secondArrowUp;
-        self.firstArrowUp = NO;
         self.thirdArrowUp = NO;
         isHidden = !self.secondArrowUp;
     }
     else {
         self.thirdArrowUp = !self.thirdArrowUp;
-        self.firstArrowUp = NO;
         self.secondArrowUp = NO;
         isHidden = !self.thirdArrowUp;
     }
@@ -70,19 +59,6 @@
     }
 }
 
-- (void)setFirstArrowUp:(BOOL)firstArrowUp {
-    _firstArrowUp = firstArrowUp;
-    NSString *imageName = firstArrowUp ? @"sort_up_blue" : @"sort_down_grey";
-    [_firstArrow setImage:[UIImage imageNamed:imageName]];
-    UIColor *titleColor = nil;
-    if (firstArrowUp) {
-        titleColor = THEMECOLOR;
-    }
-    else {
-        titleColor = HexRGB(0x131415);
-    }
-    _firstLabel.textColor = titleColor;
-}
 
 - (void)setSecondArrowUp:(BOOL)secondArrowUp {
     _secondArrowUp = secondArrowUp;
@@ -115,11 +91,14 @@
 
 - (void)setShowWhiteBg:(BOOL)showWhiteBg {
     _showWhiteBg = showWhiteBg;
-    if (showWhiteBg) {
-        self.firstWihteView.hidden = NO;
-        self.secondWhiteView.hidden = NO;
-        self.thirdWihteView.hidden = NO;
-    }
+//    if (showWhiteBg) {
+//        self.secondWhiteView.backgroundColor = [UIColor whiteColor];
+//        self.thirdWihteView.backgroundColor = [UIColor whiteColor];
+//    }
+//    else {
+//        self.secondWhiteView.backgroundColor = [UIColor clearColor];
+//        self.thirdWihteView.backgroundColor = [UIColor clearColor];
+//    }
 }
 + (CGFloat)getViewHeight {
     return 50.0f;

+ 74 - 136
KulexiuForTeacher/KulexiuForTeacher/Module/Course/View/CourseGroupView/GroupCourseSortView.xib

@@ -10,96 +10,44 @@
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
         <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="GroupCourseSortView">
-            <rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
+            <rect key="frame" x="0.0" y="0.0" width="375" height="38"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nUQ-28-ciH">
-                    <rect key="frame" x="14" y="0.0" width="347" height="55"/>
+                    <rect key="frame" x="14" y="0.0" width="347" height="38"/>
                     <subviews>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3ud-K6-gBw">
-                            <rect key="frame" x="0.0" y="0.0" width="109" height="55"/>
-                            <subviews>
-                                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aMc-qL-Urw">
-                                    <rect key="frame" x="4.9999999999999929" y="16.666666666666668" width="127.33333333333331" height="22.000000000000004"/>
-                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="22" id="0KX-Sp-gSa"/>
-                                    </constraints>
-                                    <userDefinedRuntimeAttributes>
-                                        <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                            <real key="value" value="11"/>
-                                        </userDefinedRuntimeAttribute>
-                                    </userDefinedRuntimeAttributes>
-                                </view>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="XXXX年XX月" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cfT-LB-SNv">
-                                    <rect key="frame" x="17" y="19" width="89.333333333333329" height="17"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                    <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down_grey" translatesAutoresizingMaskIntoConstraints="NO" id="aFu-Ok-mVy">
-                                    <rect key="frame" x="111.33333333333333" y="25" width="9" height="5"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="5" id="f2v-0M-H3l"/>
-                                        <constraint firstAttribute="width" constant="9" id="zTE-EP-L2e"/>
-                                    </constraints>
-                                </imageView>
-                                <button opaque="NO" tag="1001" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ac9-lB-T0k">
-                                    <rect key="frame" x="0.0" y="0.0" width="109" height="55"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                    <state key="normal">
-                                        <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
-                                    </state>
-                                    <connections>
-                                        <action selector="buttonClickAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="IiH-Q8-iJf"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                            <constraints>
-                                <constraint firstItem="aMc-qL-Urw" firstAttribute="leading" secondItem="cfT-LB-SNv" secondAttribute="leading" constant="-12" id="0wS-wv-cqh"/>
-                                <constraint firstItem="cfT-LB-SNv" firstAttribute="centerX" secondItem="3ud-K6-gBw" secondAttribute="centerX" constant="7" id="6fu-Rx-39P"/>
-                                <constraint firstItem="aFu-Ok-mVy" firstAttribute="trailing" secondItem="aMc-qL-Urw" secondAttribute="trailing" constant="-12" id="F1D-4S-yAe"/>
-                                <constraint firstAttribute="bottom" secondItem="Ac9-lB-T0k" secondAttribute="bottom" id="FjI-Y5-7yE"/>
-                                <constraint firstItem="cfT-LB-SNv" firstAttribute="centerY" secondItem="3ud-K6-gBw" secondAttribute="centerY" id="J0t-LD-eL1"/>
-                                <constraint firstItem="Ac9-lB-T0k" firstAttribute="leading" secondItem="3ud-K6-gBw" secondAttribute="leading" id="g1O-Id-15a"/>
-                                <constraint firstItem="aFu-Ok-mVy" firstAttribute="centerY" secondItem="3ud-K6-gBw" secondAttribute="centerY" id="gDl-5L-mjU"/>
-                                <constraint firstItem="aFu-Ok-mVy" firstAttribute="leading" secondItem="cfT-LB-SNv" secondAttribute="trailing" constant="5" id="llT-OJ-w6i"/>
-                                <constraint firstItem="Ac9-lB-T0k" firstAttribute="top" secondItem="3ud-K6-gBw" secondAttribute="top" id="ofj-Sg-mn8"/>
-                                <constraint firstItem="aMc-qL-Urw" firstAttribute="centerY" secondItem="cfT-LB-SNv" secondAttribute="centerY" id="s31-wv-m1e"/>
-                                <constraint firstAttribute="trailing" secondItem="Ac9-lB-T0k" secondAttribute="trailing" id="tlR-cR-LCw"/>
-                            </constraints>
-                        </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z8Q-fT-2Vr">
-                            <rect key="frame" x="119" y="0.0" width="109" height="55"/>
+                            <rect key="frame" x="0.0" y="0.0" width="168" height="38"/>
                             <subviews>
-                                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FvZ-Cn-UvC">
-                                    <rect key="frame" x="21.666666666666657" y="16.666666666666668" width="94" height="22.000000000000004"/>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FvZ-Cn-UvC">
+                                    <rect key="frame" x="0.0" y="6" width="168" height="26"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部状态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vxK-r7-9sg">
+                                            <rect key="frame" x="49.666666666666657" y="4.6666666666666661" width="56" height="17"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down_grey" translatesAutoresizingMaskIntoConstraints="NO" id="idf-14-rMz">
+                                            <rect key="frame" x="109.66666666666667" y="10.666666666666668" width="9" height="5"/>
+                                        </imageView>
+                                    </subviews>
                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
-                                        <constraint firstAttribute="height" constant="22" id="uMS-WH-w0m"/>
+                                        <constraint firstItem="idf-14-rMz" firstAttribute="centerY" secondItem="vxK-r7-9sg" secondAttribute="centerY" id="7ri-Ir-YWv"/>
+                                        <constraint firstItem="idf-14-rMz" firstAttribute="leading" secondItem="vxK-r7-9sg" secondAttribute="trailing" constant="4" id="MQe-TX-qmZ"/>
+                                        <constraint firstAttribute="height" constant="26" id="fcA-qG-XNs"/>
+                                        <constraint firstItem="vxK-r7-9sg" firstAttribute="centerY" secondItem="FvZ-Cn-UvC" secondAttribute="centerY" id="iKB-ub-tAI"/>
+                                        <constraint firstItem="vxK-r7-9sg" firstAttribute="centerX" secondItem="FvZ-Cn-UvC" secondAttribute="centerX" constant="-6.5" id="ziM-I9-SVE"/>
                                     </constraints>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                            <real key="value" value="11"/>
+                                            <real key="value" value="4"/>
                                         </userDefinedRuntimeAttribute>
                                     </userDefinedRuntimeAttributes>
                                 </view>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部状态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vxK-r7-9sg">
-                                    <rect key="frame" x="33.666666666666657" y="19" width="56" height="17"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                    <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down_grey" translatesAutoresizingMaskIntoConstraints="NO" id="idf-14-rMz">
-                                    <rect key="frame" x="94.666666666666657" y="25" width="9" height="5"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" constant="9" id="2rB-eK-C35"/>
-                                        <constraint firstAttribute="height" constant="5" id="PIL-WN-xkd"/>
-                                    </constraints>
-                                </imageView>
                                 <button opaque="NO" tag="1002" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j1t-mT-XyA">
-                                    <rect key="frame" x="0.0" y="0.0" width="109" height="55"/>
+                                    <rect key="frame" x="0.0" y="6" width="168" height="26"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                     <state key="normal">
                                         <color key="titleColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
@@ -111,49 +59,48 @@
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
-                                <constraint firstItem="j1t-mT-XyA" firstAttribute="leading" secondItem="Z8Q-fT-2Vr" secondAttribute="leading" id="0ib-n1-ca3"/>
-                                <constraint firstItem="idf-14-rMz" firstAttribute="trailing" secondItem="FvZ-Cn-UvC" secondAttribute="trailing" constant="-12" id="52B-YO-Bif"/>
-                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="leading" secondItem="vxK-r7-9sg" secondAttribute="leading" constant="-12" id="8gm-W4-scE"/>
-                                <constraint firstAttribute="bottom" secondItem="j1t-mT-XyA" secondAttribute="bottom" id="FZL-fn-2Dt"/>
-                                <constraint firstItem="vxK-r7-9sg" firstAttribute="centerX" secondItem="Z8Q-fT-2Vr" secondAttribute="centerX" constant="7" id="MaH-dZ-7ix"/>
-                                <constraint firstItem="vxK-r7-9sg" firstAttribute="centerY" secondItem="Z8Q-fT-2Vr" secondAttribute="centerY" id="VqG-LO-GJj"/>
-                                <constraint firstAttribute="trailing" secondItem="j1t-mT-XyA" secondAttribute="trailing" id="VxY-bB-unG"/>
-                                <constraint firstItem="j1t-mT-XyA" firstAttribute="top" secondItem="Z8Q-fT-2Vr" secondAttribute="top" id="cMc-ie-YnM"/>
-                                <constraint firstItem="idf-14-rMz" firstAttribute="leading" secondItem="vxK-r7-9sg" secondAttribute="trailing" constant="5" id="dLB-Vt-NCZ"/>
-                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="centerY" secondItem="vxK-r7-9sg" secondAttribute="centerY" id="hWh-Qq-GIs"/>
-                                <constraint firstItem="idf-14-rMz" firstAttribute="centerY" secondItem="Z8Q-fT-2Vr" secondAttribute="centerY" id="yDm-pc-vUp"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="trailing" secondItem="j1t-mT-XyA" secondAttribute="trailing" id="BJQ-kF-pKn"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="centerY" secondItem="Z8Q-fT-2Vr" secondAttribute="centerY" id="Lnn-d6-Snd"/>
+                                <constraint firstAttribute="trailing" secondItem="FvZ-Cn-UvC" secondAttribute="trailing" id="W76-jq-bzh"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="leading" secondItem="Z8Q-fT-2Vr" secondAttribute="leading" id="YU8-rx-anV"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="bottom" secondItem="j1t-mT-XyA" secondAttribute="bottom" id="ZOr-cc-3da"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="leading" secondItem="j1t-mT-XyA" secondAttribute="leading" id="cxj-3g-uAd"/>
+                                <constraint firstItem="FvZ-Cn-UvC" firstAttribute="top" secondItem="j1t-mT-XyA" secondAttribute="top" id="dKu-EM-1rX"/>
                             </constraints>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yMy-1B-zxV">
-                            <rect key="frame" x="238" y="0.0" width="109" height="55"/>
+                            <rect key="frame" x="179" y="0.0" width="168" height="38"/>
                             <subviews>
-                                <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s7M-qE-XDr">
-                                    <rect key="frame" x="7.6666666666666856" y="16.666666666666668" width="94" height="22.000000000000004"/>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s7M-qE-XDr">
+                                    <rect key="frame" x="0.0" y="6" width="168" height="26"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部考勤" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Xc-2m-8mt">
+                                            <rect key="frame" x="49.666666666666657" y="4.6666666666666661" width="55.666666666666657" height="17"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down_grey" translatesAutoresizingMaskIntoConstraints="NO" id="grW-VA-qlz">
+                                            <rect key="frame" x="109.33333333333331" y="10.666666666666668" width="9" height="5"/>
+                                        </imageView>
+                                    </subviews>
                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                     <constraints>
-                                        <constraint firstAttribute="height" constant="22" id="mvo-Js-pra"/>
+                                        <constraint firstAttribute="height" constant="26" id="AXP-7R-f9G"/>
+                                        <constraint firstItem="9Xc-2m-8mt" firstAttribute="centerX" secondItem="s7M-qE-XDr" secondAttribute="centerX" constant="-6.5" id="GeR-yo-YKF"/>
+                                        <constraint firstItem="grW-VA-qlz" firstAttribute="leading" secondItem="9Xc-2m-8mt" secondAttribute="trailing" constant="4" id="LXD-UI-o4a"/>
+                                        <constraint firstItem="grW-VA-qlz" firstAttribute="centerY" secondItem="s7M-qE-XDr" secondAttribute="centerY" id="Vkh-1O-BF8"/>
+                                        <constraint firstItem="9Xc-2m-8mt" firstAttribute="centerY" secondItem="s7M-qE-XDr" secondAttribute="centerY" id="aMU-h5-T5n"/>
+                                        <constraint firstItem="9Xc-2m-8mt" firstAttribute="centerY" secondItem="s7M-qE-XDr" secondAttribute="centerY" id="mrr-SQ-TiM"/>
                                     </constraints>
                                     <userDefinedRuntimeAttributes>
                                         <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                            <real key="value" value="11"/>
+                                            <real key="value" value="4"/>
                                         </userDefinedRuntimeAttribute>
                                     </userDefinedRuntimeAttributes>
                                 </view>
-                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部考勤" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Xc-2m-8mt">
-                                    <rect key="frame" x="19.666666666666686" y="19" width="56" height="17"/>
-                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                    <color key="textColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                    <nil key="highlightedColor"/>
-                                </label>
-                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sort_down_grey" translatesAutoresizingMaskIntoConstraints="NO" id="grW-VA-qlz">
-                                    <rect key="frame" x="80.666666666666686" y="25" width="9" height="5"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="5" id="hAG-sG-mv7"/>
-                                        <constraint firstAttribute="width" constant="9" id="sqn-jl-TbO"/>
-                                    </constraints>
-                                </imageView>
                                 <button opaque="NO" tag="1003" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5J6-Qp-5o7">
-                                    <rect key="frame" x="0.0" y="0.0" width="109" height="55"/>
+                                    <rect key="frame" x="0.0" y="6" width="168" height="26"/>
                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                     <state key="normal">
                                         <color key="titleColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
@@ -165,34 +112,28 @@
                             </subviews>
                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             <constraints>
-                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="leading" secondItem="yMy-1B-zxV" secondAttribute="leading" id="0pe-f0-slu"/>
-                                <constraint firstItem="grW-VA-qlz" firstAttribute="centerY" secondItem="yMy-1B-zxV" secondAttribute="centerY" id="47f-2b-PEp"/>
-                                <constraint firstItem="9Xc-2m-8mt" firstAttribute="centerX" secondItem="yMy-1B-zxV" secondAttribute="centerX" constant="-7" id="4bT-SA-PhH"/>
-                                <constraint firstItem="s7M-qE-XDr" firstAttribute="centerY" secondItem="9Xc-2m-8mt" secondAttribute="centerY" id="7PO-WH-aaV"/>
-                                <constraint firstAttribute="trailing" secondItem="5J6-Qp-5o7" secondAttribute="trailing" id="8jw-zM-6iK"/>
-                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="top" secondItem="yMy-1B-zxV" secondAttribute="top" id="HUX-nk-toA"/>
-                                <constraint firstAttribute="bottom" secondItem="5J6-Qp-5o7" secondAttribute="bottom" id="SLT-UZ-dPb"/>
-                                <constraint firstItem="9Xc-2m-8mt" firstAttribute="centerY" secondItem="yMy-1B-zxV" secondAttribute="centerY" id="jhO-f9-KY6"/>
-                                <constraint firstItem="grW-VA-qlz" firstAttribute="leading" secondItem="9Xc-2m-8mt" secondAttribute="trailing" constant="5" id="m1B-rA-bFZ"/>
-                                <constraint firstItem="grW-VA-qlz" firstAttribute="trailing" secondItem="s7M-qE-XDr" secondAttribute="trailing" constant="-12" id="mGV-zF-ekd"/>
-                                <constraint firstItem="s7M-qE-XDr" firstAttribute="leading" secondItem="9Xc-2m-8mt" secondAttribute="leading" constant="-12" id="vbs-hs-Ih7"/>
+                                <constraint firstAttribute="trailing" secondItem="s7M-qE-XDr" secondAttribute="trailing" id="1Dl-2B-iWo"/>
+                                <constraint firstItem="s7M-qE-XDr" firstAttribute="leading" secondItem="yMy-1B-zxV" secondAttribute="leading" id="HmD-ul-KMV"/>
+                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="trailing" secondItem="s7M-qE-XDr" secondAttribute="trailing" id="PMQ-Jm-RMR"/>
+                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="bottom" secondItem="s7M-qE-XDr" secondAttribute="bottom" id="bIh-7O-uq3"/>
+                                <constraint firstItem="s7M-qE-XDr" firstAttribute="centerY" secondItem="yMy-1B-zxV" secondAttribute="centerY" id="q9K-TX-wmm"/>
+                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="top" secondItem="s7M-qE-XDr" secondAttribute="top" id="wL7-3u-bf5"/>
+                                <constraint firstItem="5J6-Qp-5o7" firstAttribute="leading" secondItem="s7M-qE-XDr" secondAttribute="leading" id="yvj-A6-a5K"/>
                             </constraints>
                         </view>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
-                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="top" secondItem="3ud-K6-gBw" secondAttribute="top" id="7Vc-Lw-Cz5"/>
-                        <constraint firstItem="yMy-1B-zxV" firstAttribute="top" secondItem="3ud-K6-gBw" secondAttribute="top" id="7vF-v2-rbp"/>
-                        <constraint firstItem="3ud-K6-gBw" firstAttribute="top" secondItem="nUQ-28-ciH" secondAttribute="top" id="Kwb-PF-i4E"/>
-                        <constraint firstAttribute="trailing" secondItem="yMy-1B-zxV" secondAttribute="trailing" id="a8j-cM-Bk3"/>
-                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="width" secondItem="3ud-K6-gBw" secondAttribute="width" id="dvD-UR-61H"/>
-                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="leading" secondItem="3ud-K6-gBw" secondAttribute="trailing" constant="10" id="g49-fx-rbj"/>
-                        <constraint firstAttribute="bottom" secondItem="3ud-K6-gBw" secondAttribute="bottom" id="jS1-OF-iaY"/>
-                        <constraint firstItem="yMy-1B-zxV" firstAttribute="leading" secondItem="Z8Q-fT-2Vr" secondAttribute="trailing" constant="10" id="obg-cI-Ey6"/>
-                        <constraint firstItem="3ud-K6-gBw" firstAttribute="leading" secondItem="nUQ-28-ciH" secondAttribute="leading" id="pPn-cT-EMU"/>
-                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="bottom" secondItem="3ud-K6-gBw" secondAttribute="bottom" id="s1y-gn-zl5"/>
-                        <constraint firstItem="yMy-1B-zxV" firstAttribute="width" secondItem="3ud-K6-gBw" secondAttribute="width" id="uUy-6G-XIb"/>
-                        <constraint firstItem="yMy-1B-zxV" firstAttribute="bottom" secondItem="3ud-K6-gBw" secondAttribute="bottom" id="yBY-DV-CGv"/>
+                        <constraint firstItem="yMy-1B-zxV" firstAttribute="leading" secondItem="Z8Q-fT-2Vr" secondAttribute="trailing" constant="11" id="56q-qr-G9Z"/>
+                        <constraint firstItem="yMy-1B-zxV" firstAttribute="top" secondItem="nUQ-28-ciH" secondAttribute="top" id="8Ji-Nz-NFE"/>
+                        <constraint firstItem="yMy-1B-zxV" firstAttribute="width" secondItem="Z8Q-fT-2Vr" secondAttribute="width" id="FXX-NF-S5e"/>
+                        <constraint firstAttribute="bottom" secondItem="Z8Q-fT-2Vr" secondAttribute="bottom" id="TLq-uB-RdI"/>
+                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="leading" secondItem="nUQ-28-ciH" secondAttribute="leading" id="VqG-xa-vtm"/>
+                        <constraint firstItem="yMy-1B-zxV" firstAttribute="top" secondItem="nUQ-28-ciH" secondAttribute="top" id="Xa5-Ur-OCg"/>
+                        <constraint firstAttribute="bottom" secondItem="yMy-1B-zxV" secondAttribute="bottom" id="gjN-r5-iwd"/>
+                        <constraint firstItem="Z8Q-fT-2Vr" firstAttribute="top" secondItem="nUQ-28-ciH" secondAttribute="top" id="m3V-mQ-mFc"/>
+                        <constraint firstAttribute="trailing" secondItem="yMy-1B-zxV" secondAttribute="trailing" id="vTw-nM-zEb"/>
+                        <constraint firstAttribute="trailing" secondItem="yMy-1B-zxV" secondAttribute="trailing" id="wmh-zI-69h"/>
                     </constraints>
                     <userDefinedRuntimeAttributes>
                         <userDefinedRuntimeAttribute type="size" keyPath="shadowOffset">
@@ -203,18 +144,15 @@
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
-                <constraint firstAttribute="bottom" secondItem="nUQ-28-ciH" secondAttribute="bottom" id="8Ge-mS-YzV"/>
-                <constraint firstAttribute="trailing" secondItem="nUQ-28-ciH" secondAttribute="trailing" constant="14" id="9yc-y0-4fF"/>
-                <constraint firstItem="nUQ-28-ciH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="igM-Q3-fAI"/>
-                <constraint firstItem="nUQ-28-ciH" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="yVO-Aa-YHu"/>
+                <constraint firstAttribute="bottom" secondItem="nUQ-28-ciH" secondAttribute="bottom" id="B0N-at-Kzv"/>
+                <constraint firstAttribute="trailing" secondItem="nUQ-28-ciH" secondAttribute="trailing" constant="14" id="I85-K9-Dtr"/>
+                <constraint firstItem="nUQ-28-ciH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="idR-e7-slI"/>
+                <constraint firstItem="nUQ-28-ciH" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="qEH-dZ-aR2"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
-                <outlet property="firstArrow" destination="aFu-Ok-mVy" id="HfH-fU-Kon"/>
-                <outlet property="firstLabel" destination="cfT-LB-SNv" id="fxC-FN-FHH"/>
-                <outlet property="firstWihteView" destination="aMc-qL-Urw" id="TQr-no-EXT"/>
                 <outlet property="secondArrow" destination="idf-14-rMz" id="vtq-9G-6Dc"/>
                 <outlet property="secondLabel" destination="vxK-r7-9sg" id="fKB-7V-W3z"/>
                 <outlet property="secondWhiteView" destination="FvZ-Cn-UvC" id="PCo-eX-gaH"/>
@@ -222,7 +160,7 @@
                 <outlet property="thirdLabel" destination="9Xc-2m-8mt" id="1q0-e6-Dmr"/>
                 <outlet property="thirdWihteView" destination="s7M-qE-XDr" id="Nky-Dj-ksz"/>
             </connections>
-            <point key="canvasLocation" x="41.984732824427482" y="-148.94366197183101"/>
+            <point key="canvasLocation" x="41.984732824427482" y="-142.95774647887325"/>
         </view>
     </objects>
     <resources>

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

@@ -1108,6 +1108,7 @@
     }
     else if (type == RECENTCOURSE_TYPE_MUSICCLASS) { // 琴房课
         MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_MUSIC;
         ctrl.courseId = courseModel.courseId;
         ctrl.courseGroupId = courseModel.courseGroupId;
         [self.navigationController pushViewController:ctrl animated:YES];
@@ -1119,6 +1120,13 @@
         detailVC.studentId = courseModel.studentId;
         [self.navigationController pushViewController:detailVC animated:YES];
     }
+    else if (type == RECENTCOURSE_TYPE_GROUP) { // 小组课
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_GROUP;
+        ctrl.courseId = courseModel.courseId;
+        ctrl.courseGroupId = courseModel.courseGroupId;
+        [self.navigationController pushViewController:ctrl animated:YES];
+    }
     else {
         KSBaseWKWebViewController *ctrl = [[KSBaseWKWebViewController alloc] init];
         ctrl.url = [NSString stringWithFormat:@"%@/#/liveDetail?joinRoom=1&groupId=%@&classId=%@", WEBHOST, courseModel.courseGroupId,courseModel.courseId];

+ 8 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Homework/View/HomeworkBodyView.m

@@ -231,6 +231,14 @@
     HomeworkListModel *model = self.dataArray[indexPath.row];
     if ([model.type isEqualToString:@"PIANO_ROOM_CLASS"]) { // 琴房课详情
         MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_MUSIC;
+        ctrl.courseId = model.courseId;
+        ctrl.courseGroupId = model.courseGroupId;
+        [self.naviController pushViewController:ctrl animated:YES];
+    }
+    else if ([model.type isEqualToString:@"GROUP"]) {
+        MusicRoomViewController *ctrl = [[MusicRoomViewController alloc] init];
+        ctrl.courseType = MUTIL_COURSE_TYPE_GROUP;
         ctrl.courseId = model.courseId;
         ctrl.courseGroupId = model.courseGroupId;
         [self.naviController pushViewController:ctrl animated:YES];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/PopView/MusicRoomCourseCell.h

@@ -15,7 +15,7 @@ typedef void(^MusicRoomChatAction)(NSString *targetId);
 
 @interface MusicRoomCourseCell : UITableViewCell
 
-- (void)configWithSource:(id)source beforeTime:(NSInteger)beforeTime callback:(MusicRoomChatAction)callback;
+- (void)configWithSource:(id)source isGroup:(BOOL)isGroup beforeTime:(NSInteger)beforeTime callback:(MusicRoomChatAction)callback;
 
 @end
 

+ 4 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/MyCourse/View/PopView/MusicRoomCourseCell.m

@@ -11,6 +11,7 @@
 #import "UIButton+EnlargeEdge.h"
 
 @interface MusicRoomCourseCell ()
+@property (weak, nonatomic) IBOutlet UIImageView *courseImage;
 
 @property (weak, nonatomic) IBOutlet UIButton *chatButton;
 
@@ -41,11 +42,12 @@
     [self.chatButton setEnlargeEdgeWithTop:0 right:10 bottom:0 left:10];
 }
 
-- (void)configWithSource:(id)source beforeTime:(NSInteger)beforeTime callback:(MusicRoomChatAction)callback;
- {
+- (void)configWithSource:(id)source isGroup:(BOOL)isGroup beforeTime:(NSInteger)beforeTime callback:(MusicRoomChatAction)callback {
     if (callback) {
         self.callback = callback;
     }
+    NSString *courseImgName = isGroup ? @"course_group" : @"course_musicRoom";
+    [self.courseImage setImage:[UIImage imageNamed:courseImgName]];
     if ([source isKindOfClass:[MusicRoomListModel class]]) {
         self.operationButton.hidden = YES;
         self.buttonWidth.constant = 0.0f;

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

@@ -183,6 +183,7 @@
             <connections>
                 <outlet property="buttonWidth" destination="Bjh-bg-ieX" id="Gsx-iz-PLv"/>
                 <outlet property="chatButton" destination="t3h-kH-4md" id="Jk3-7j-O9z"/>
+                <outlet property="courseImage" destination="SU2-Qb-iP7" id="tyg-8a-VxP"/>
                 <outlet property="courseName" destination="l2B-EY-GWY" id="D00-Cj-zrr"/>
                 <outlet property="courseTimeLabel" destination="UxS-Xs-zTk" id="dkq-PI-dck"/>
                 <outlet property="memberCount" destination="IdU-Te-VFw" id="1Lu-Rg-nb5"/>
@@ -195,7 +196,7 @@
     </objects>
     <resources>
         <image name="course_chat" width="19" height="18"/>
-        <image name="course_musicRoom" width="40" height="40"/>
+        <image name="course_musicRoom" width="56" height="56"/>
         <image name="course_time" width="16" height="16"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.h

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

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CroupCourse/Controller/MyGroupCourseViewController.m

@@ -31,7 +31,7 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     [self allocTitle:@"小组课"];
-    _titles = @[@"进行中",@"未上架",@"销售中",@"已完成",@"已取消",@"已下架"];
+    _titles = @[@"进行中",@"未上架",@"销售中",@"已完成",@"已取消"];
     [self configUI];
     [self countUMEvent];
 }
@@ -157,7 +157,7 @@
 
 - (NSMutableArray *)listViewArray {
     if (!_listViewArray) {
-        _listViewArray = [NSMutableArray arrayWithArray:@[@"",@"",@"",@"",@"",@""]];
+        _listViewArray = [NSMutableArray arrayWithArray:@[@"",@"",@"",@"",@""]];
     }
     return _listViewArray;
 }

+ 9 - 17
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/CroupCourse/View/MyGroupCourseBodyView.m

@@ -9,7 +9,7 @@
 #import "MineGroupCourseCell.h"
 #import "LiveCourseModel.h"
 #import "KSBaseWKWebViewController.h"
-
+#import "GroupCourseGroupViewController.h"
 
 @interface MyGroupCourseBodyView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
 
@@ -78,11 +78,8 @@
     else if (self.selectIndex == 3) {
         self.groupStatus = @"COMPLETE";
     }
-    else if (self.selectIndex == 4) {
-        self.groupStatus = @"CANCEL";
-    }
     else {
-        self.groupStatus = @"OUT_SALE";
+        self.groupStatus = @"CANCEL";
     }
 }
 
@@ -125,12 +122,9 @@
     else if (self.selectIndex == 3) {
         return @"暂无已完成小组课课程";
     }
-    else if (self.selectIndex == 4) {
+    else  {
         return @"暂无已取消小组课课程";
     }
-    else {
-        return @"暂无已下架小组课课程";
-    }
 }
 
 - (void)requestData {
@@ -212,11 +206,12 @@
 }
 
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
-    // 直播课程组详情
+    // 小组课课程组详情
     LiveCourseModel *model = self.dataArray[indexPath.item];
-    if (self.selectIndex == 5) {
-        [self editLiveCourseWithGroupId:[NSString stringWithFormat:@"%.0f",model.courseGroupId]];
-        
+    if (self.selectIndex == 0 || self.selectIndex == 3) {
+        GroupCourseGroupViewController *ctrl = [[GroupCourseGroupViewController alloc] init];
+        ctrl.courseGroupId = [NSString stringWithFormat:@"%.0f",model.courseGroupId];
+        [self.naviController pushViewController:ctrl animated:YES];
     }
     else {
         [self displayLiveCourseDetailWithGroupId:[NSString stringWithFormat:@"%.0f",model.courseGroupId]];
@@ -247,11 +242,8 @@
     else if (index == 3) {
         status = COURSERSTATUS_COMPLETE;
     }
-    else if (index == 4) {
-        status = COURSERSTATUS_CANCLE;
-    }
     else {
-        status = COURSERSTATUS_OUTSALE;
+        status = COURSERSTATUS_CANCLE;
     }
     return status;
 }