浏览代码

直播课、视频课课程组

Steven 8 月之前
父节点
当前提交
3a77287ffc

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineVideoCourse/MinePageVideoCourseView.m

@@ -227,7 +227,7 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     MinePageVideoGroupCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MinePageVideoGroupCell"];
     MinePageVideoGroupCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MinePageVideoGroupCell"];
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
-    [cell configSourceModel:model];
+    [cell configSourceModel:model groupStatus:VIDEOGRROUP_STATUS_ING hideBottomView:NO];
     return cell;
     return cell;
 }
 }
 
 

+ 8 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineVideoCourse/MinePageVideoGroupCell.h

@@ -8,11 +8,18 @@
 #import <UIKit/UIKit.h>
 #import <UIKit/UIKit.h>
 #import "VideoCourseModel.h"
 #import "VideoCourseModel.h"
 
 
+typedef NS_ENUM(NSInteger, VIDEOGRROUP_STATUS) {
+    VIDEOGRROUP_STATUS_ING,             // 进行中
+    VIDEOGRROUP_STATUS_CHECK,           // 审核中
+    VIDEOGRROUP_STATUS_CHECKFAILED,     // 审核失败
+    VIDEOGRROUP_STATUS_OUTSALE,         // 已下架
+};
+
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
 @interface MinePageVideoGroupCell : UITableViewCell
 @interface MinePageVideoGroupCell : UITableViewCell
 
 
-- (void)configSourceModel:(VideoCourseModel *)model;
+- (void)configSourceModel:(VideoCourseModel *)model groupStatus:(VIDEOGRROUP_STATUS)status hideBottomView:(BOOL)hideBottomView;
 
 
 
 
 @end
 @end

+ 67 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineVideoCourse/MinePageVideoGroupCell.m

@@ -13,18 +13,28 @@
 
 
 @property (weak, nonatomic) IBOutlet UILabel *courseTitle;
 @property (weak, nonatomic) IBOutlet UILabel *courseTitle;
 
 
+@property (weak, nonatomic) IBOutlet UIView *descView;
 @property (weak, nonatomic) IBOutlet UILabel *descLabel;
 @property (weak, nonatomic) IBOutlet UILabel *descLabel;
 
 
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 
 @property (weak, nonatomic) IBOutlet UIView *statusView;
 @property (weak, nonatomic) IBOutlet UIView *statusView;
 
 
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
+
 @property (weak, nonatomic) IBOutlet UILabel *courseTag;
 @property (weak, nonatomic) IBOutlet UILabel *courseTag;
 
 
 @property (weak, nonatomic) IBOutlet UILabel *courseMessage;
 @property (weak, nonatomic) IBOutlet UILabel *courseMessage;
 
 
 @property (weak, nonatomic) IBOutlet UILabel *courseCount;
 @property (weak, nonatomic) IBOutlet UILabel *courseCount;
 
 
+@property (weak, nonatomic) IBOutlet UIView *musicView;
+
+@property (weak, nonatomic) IBOutlet UILabel *musicLabel;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *musicRight;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *musicLabelLeft;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *musicLabelRight;
+
 @end
 @end
 
 
 @implementation MinePageVideoGroupCell
 @implementation MinePageVideoGroupCell
@@ -41,7 +51,7 @@
     _statusView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
     _statusView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
 }
 }
 
 
-- (void)configSourceModel:(VideoCourseModel *)model {
+- (void)configSourceModel:(VideoCourseModel *)model groupStatus:(VIDEOGRROUP_STATUS)status hideBottomView:(BOOL)hideBottomView {
     
     
     [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.lessonCoverUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.lessonCoverUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseTitle.text = [NSString returnNoNullStringWithString:model.lessonName];
     self.courseTitle.text = [NSString returnNoNullStringWithString:model.lessonName];
@@ -75,7 +85,62 @@
 
 
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
     // 曲目
     // 曲目
-    
+    if (model.musicNum > 0) {
+        self.musicLabel.text = [NSString stringWithFormat:@"%zd首曲目", model.musicNum];
+        self.musicRight.constant = 4.0f;
+        self.musicLabelLeft.constant = 6.0f;
+        self.musicLabelRight.constant = 6.0f;
+    }
+    else {
+        self.musicView.hidden = YES;
+        self.musicLabel.text = @"";
+        self.musicRight.constant = 0.0f;
+        self.musicLabelLeft.constant = 0.0f;
+        self.musicLabelRight.constant = 0.0f;
+    }
+    switch (status) {
+        case VIDEOGRROUP_STATUS_ING:
+        {
+            self.statusView.backgroundColor = HexRGB(0xd5fff7);
+            self.statusLabel.textColor = HexRGB(0x2dc7aa);
+            self.statusLabel.text = @"已上架";
+            if (hideBottomView) {
+                self.statusView.hidden = NO;
+            }
+            else {
+                self.descView.hidden = NO;
+                self.statusView.hidden = NO;
+            }
+            
+        }
+            break;
+        case VIDEOGRROUP_STATUS_CHECK:
+        {
+            self.statusView.backgroundColor = HexRGB(0xDEF2FF);
+            self.statusLabel.textColor = HexRGB(0x008AE0);
+            self.statusLabel.text = @"审核中";
+            self.descView.hidden = YES;
+        }
+            break;
+        case VIDEOGRROUP_STATUS_CHECKFAILED:
+        {
+            self.statusView.backgroundColor = HexRGB(0xFFE7E7);
+            self.statusLabel.textColor = HexRGB(0xFF1919);
+            self.statusLabel.text = @"失败";
+            self.descView.hidden = NO;
+        }
+            break;
+        case VIDEOGRROUP_STATUS_OUTSALE:
+        {
+            self.statusView.backgroundColor = HexRGB(0xF0F0F0);
+            self.statusLabel.textColor = HexRGB(0x666666);
+            self.statusLabel.text = @"已下架";
+            self.descView.hidden = NO;
+        }
+            break;
+        default:
+            break;
+    }
 }
 }
 
 
 
 

+ 17 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MineVideoCourse/MinePageVideoGroupCell.xib

@@ -54,14 +54,14 @@
                                 </constraints>
                                 </constraints>
                             </view>
                             </view>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RcF-yJ-tJm">
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RcF-yJ-tJm">
-                                <rect key="frame" x="128" y="73" width="26" height="14"/>
+                                <rect key="frame" x="126" y="73" width="28" height="14"/>
                                 <subviews>
                                 <subviews>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kR8-BM-hQh">
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kR8-BM-hQh">
-                                        <rect key="frame" x="4" y="1" width="18" height="12"/>
+                                        <rect key="frame" x="4" y="1" width="20" height="12"/>
                                         <constraints>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="12" id="0TK-PC-z5s"/>
                                             <constraint firstAttribute="height" constant="12" id="0TK-PC-z5s"/>
                                         </constraints>
                                         </constraints>
-                                        <fontDescription key="fontDescription" type="system" pointSize="9"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                         <nil key="highlightedColor"/>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     </label>
@@ -89,11 +89,11 @@
                                 <nil key="highlightedColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             </label>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LNr-YI-NbI">
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LNr-YI-NbI">
-                                <rect key="frame" x="238.99999999999997" y="43" width="50.666666666666657" height="18"/>
+                                <rect key="frame" x="227.33333333333334" y="43" width="42.666666666666657" height="18"/>
                                 <subviews>
                                 <subviews>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4课时" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Ba-1k-4et">
-                                        <rect key="frame" x="6" y="0.0" width="38.666666666666664" height="18"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4课时" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Ba-1k-4et">
+                                        <rect key="frame" x="6.0000000000000018" y="0.0" width="30.666666666666671" height="18"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                         <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <nil key="highlightedColor"/>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     </label>
@@ -113,11 +113,11 @@
                                 </userDefinedRuntimeAttributes>
                                 </userDefinedRuntimeAttributes>
                             </view>
                             </view>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R6O-Fy-ndS">
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R6O-Fy-ndS">
-                                <rect key="frame" x="170" y="43" width="65" height="18"/>
+                                <rect key="frame" x="170" y="43" width="53.333333333333343" height="18"/>
                                 <subviews>
                                 <subviews>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3首曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1oP-Xc-XQe">
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3首曲目" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1oP-Xc-XQe">
-                                        <rect key="frame" x="6" y="0.0" width="53" height="18"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <rect key="frame" x="6" y="0.0" width="41.333333333333336" height="18"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                         <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <color key="textColor" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         <nil key="highlightedColor"/>
                                         <nil key="highlightedColor"/>
                                     </label>
                                     </label>
@@ -221,6 +221,13 @@
                 <outlet property="courseTitle" destination="QJe-I1-Sdq" id="8X2-dW-fGS"/>
                 <outlet property="courseTitle" destination="QJe-I1-Sdq" id="8X2-dW-fGS"/>
                 <outlet property="coverImage" destination="Urc-7X-bjd" id="ZuA-2q-9s2"/>
                 <outlet property="coverImage" destination="Urc-7X-bjd" id="ZuA-2q-9s2"/>
                 <outlet property="descLabel" destination="TBF-PK-cBD" id="sG4-tA-K3O"/>
                 <outlet property="descLabel" destination="TBF-PK-cBD" id="sG4-tA-K3O"/>
+                <outlet property="descView" destination="Yph-bo-BEh" id="epk-u9-ETg"/>
+                <outlet property="musicLabel" destination="1oP-Xc-XQe" id="PcX-nv-LV7"/>
+                <outlet property="musicLabelLeft" destination="18G-Tw-TeR" id="5J2-WV-3oZ"/>
+                <outlet property="musicLabelRight" destination="PcF-No-4JI" id="IO5-vU-jUR"/>
+                <outlet property="musicRight" destination="h21-BN-v7A" id="NuY-5O-c22"/>
+                <outlet property="musicView" destination="R6O-Fy-ndS" id="UjD-wC-c0a"/>
+                <outlet property="statusLabel" destination="5pt-pW-NIS" id="Gri-F2-AQL"/>
                 <outlet property="statusView" destination="9i1-fb-rxX" id="zSD-L7-Tcw"/>
                 <outlet property="statusView" destination="9i1-fb-rxX" id="zSD-L7-Tcw"/>
                 <outlet property="subjectLabel" destination="kR8-BM-hQh" id="P9f-CX-r06"/>
                 <outlet property="subjectLabel" destination="kR8-BM-hQh" id="P9f-CX-r06"/>
             </connections>
             </connections>

+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.h

@@ -31,6 +31,7 @@
 @property (nonatomic, strong) NSString *updateTime;
 @property (nonatomic, strong) NSString *updateTime;
 @property (nonatomic, strong) NSString *lessonSubjectName;
 @property (nonatomic, strong) NSString *lessonSubjectName;
 @property (nonatomic, strong) NSString *payType;
 @property (nonatomic, strong) NSString *payType;
+@property (nonatomic, assign) NSInteger musicNum;
 
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;
 - (instancetype)initWithDictionary:(NSDictionary *)dict;

+ 7 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/Model/VideoCourseModel.m

@@ -28,6 +28,7 @@ NSString *const kVideoCourseModelTopFlag = @"topFlag";
 NSString *const kVideoCourseModelUpdateTime = @"updateTime";
 NSString *const kVideoCourseModelUpdateTime = @"updateTime";
 NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
 NSString *const kVideoCourseModelLessonSubjectName = @"lessonSubjectName";
 NSString *const kVideoCourseModelPayType = @"payType";
 NSString *const kVideoCourseModelPayType = @"payType";
+NSString *const kVideoCourseModelMusicNum = @"musicNum";
 
 
 @interface VideoCourseModel ()
 @interface VideoCourseModel ()
 
 
@@ -57,6 +58,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
 @synthesize updateTime = _updateTime;
 @synthesize updateTime = _updateTime;
 @synthesize lessonSubjectName = _lessonSubjectName;
 @synthesize lessonSubjectName = _lessonSubjectName;
 @synthesize payType = _payType;
 @synthesize payType = _payType;
+@synthesize musicNum = _musicNum;
 
 
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
 {
 {
@@ -90,6 +92,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
             self.updateTime = [self objectOrNilForKey:kVideoCourseModelUpdateTime fromDictionary:dict];
             self.updateTime = [self objectOrNilForKey:kVideoCourseModelUpdateTime fromDictionary:dict];
         self.lessonSubjectName = [self objectOrNilForKey:kVideoCourseModelLessonSubjectName fromDictionary:dict];
         self.lessonSubjectName = [self objectOrNilForKey:kVideoCourseModelLessonSubjectName fromDictionary:dict];
         self.payType = [self objectOrNilForKey:kVideoCourseModelPayType fromDictionary:dict];
         self.payType = [self objectOrNilForKey:kVideoCourseModelPayType fromDictionary:dict];
+        self.musicNum = [[self objectOrNilForKey:kVideoCourseModelMusicNum fromDictionary:dict] integerValue];
     }
     }
     
     
     return self;
     return self;
@@ -119,6 +122,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
     [mutableDict setValue:self.updateTime forKey:kVideoCourseModelUpdateTime];
     [mutableDict setValue:self.updateTime forKey:kVideoCourseModelUpdateTime];
     [mutableDict setValue:self.lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
     [mutableDict setValue:self.lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
     [mutableDict setValue:self.payType forKey:kVideoCourseModelPayType];
     [mutableDict setValue:self.payType forKey:kVideoCourseModelPayType];
+    [mutableDict setValue:[NSNumber numberWithInteger:self.musicNum] forKey:kVideoCourseModelMusicNum];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
     return [NSDictionary dictionaryWithDictionary:mutableDict];
 }
 }
 
 
@@ -165,6 +169,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
     self.updateTime = [aDecoder decodeObjectForKey:kVideoCourseModelUpdateTime];
     self.updateTime = [aDecoder decodeObjectForKey:kVideoCourseModelUpdateTime];
     self.lessonSubjectName = [aDecoder decodeObjectForKey:kVideoCourseModelLessonSubjectName];
     self.lessonSubjectName = [aDecoder decodeObjectForKey:kVideoCourseModelLessonSubjectName];
     self.payType = [aDecoder decodeObjectForKey:kVideoCourseModelPayType];
     self.payType = [aDecoder decodeObjectForKey:kVideoCourseModelPayType];
+    self.musicNum = [aDecoder decodeIntegerForKey:kVideoCourseModelMusicNum];
     
     
     return self;
     return self;
 }
 }
@@ -192,6 +197,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
     [aCoder encodeObject:_updateTime forKey:kVideoCourseModelUpdateTime];
     [aCoder encodeObject:_updateTime forKey:kVideoCourseModelUpdateTime];
     [aCoder encodeObject:_lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
     [aCoder encodeObject:_lessonSubjectName forKey:kVideoCourseModelLessonSubjectName];
     [aCoder encodeObject:_payType forKey:kVideoCourseModelPayType];
     [aCoder encodeObject:_payType forKey:kVideoCourseModelPayType];
+    [aCoder encodeInteger:_musicNum forKey:kVideoCourseModelMusicNum];
 }
 }
 
 
 - (id)copyWithZone:(NSZone *)zone
 - (id)copyWithZone:(NSZone *)zone
@@ -220,6 +226,7 @@ NSString *const kVideoCourseModelPayType = @"payType";
         copy.updateTime = [self.updateTime copyWithZone:zone];
         copy.updateTime = [self.updateTime copyWithZone:zone];
         copy.lessonSubjectName = [self.lessonSubjectName copyWithZone:zone];
         copy.lessonSubjectName = [self.lessonSubjectName copyWithZone:zone];
         copy.payType = [self.payType copyWithZone:zone];
         copy.payType = [self.payType copyWithZone:zone];
+        copy.musicNum = self.musicNum;
     }
     }
     
     
     return copy;
     return copy;

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

@@ -5,14 +5,14 @@
 //  Created by Kyle on 2022/3/29.
 //  Created by Kyle on 2022/3/29.
 //
 //
 
 
-#import <kSJXCollectionView.h>
+#import <KSJXBodyView.h>
 #import "KSButtonStatusView.h"
 #import "KSButtonStatusView.h"
 #import "Reachability.h"
 #import "Reachability.h"
 
 
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
-@interface VideoListBodyView : kSJXCollectionView
+@interface VideoListBodyView : KSJXBodyView
 
 
 @property (nonatomic, strong) NSString *teaherStatus;
 @property (nonatomic, strong) NSString *teaherStatus;
 
 

+ 43 - 45
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/VideoCourse/View/VideoListBodyView.m

@@ -6,12 +6,12 @@
 //
 //
 
 
 #import "VideoListBodyView.h"
 #import "VideoListBodyView.h"
-#import "VideoCourseCell.h"
+#import "MinePageVideoGroupCell.h"
 #import "VideoCourseModel.h"
 #import "VideoCourseModel.h"
 #import "KSBaseWKWebViewController.h"
 #import "KSBaseWKWebViewController.h"
 #import "AuthDisplayView.h"
 #import "AuthDisplayView.h"
 
 
-@interface VideoListBodyView ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
+@interface VideoListBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
 
 @property (nonatomic, strong) NSMutableArray *dataArray;
 @property (nonatomic, strong) NSMutableArray *dataArray;
 
 
@@ -38,33 +38,34 @@
     self = [super initWithFrame:frame];
     self = [super initWithFrame:frame];
     if (self) {
     if (self) {
         self.backgroundColor = HexRGB(0xf8f9fc);
         self.backgroundColor = HexRGB(0xf8f9fc);
-        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-        layout.sectionInset = UIEdgeInsetsMake(12, 14, 12, 14);
-        
-        self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
-        self.collectionView.backgroundColor = HexRGB(0xf8f9fc);
-        self.collectionView.delegate = self;
-        self.collectionView.dataSource = self;
-        self.collectionView.showsVerticalScrollIndicator = NO;
-        self.collectionView.showsHorizontalScrollIndicator = NO;
-        [self.collectionView registerNib:[UINib nibWithNibName:@"VideoCourseCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"VideoCourseCell"];
-        [self addSubview:self.collectionView];
-        [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
-            make.left.right.bottom.top.mas_equalTo(self);
+        self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) style:UITableViewStylePlain];
+        self.tableView.backgroundColor = HexRGB(0xf8f9fc);
+        self.tableView.showsVerticalScrollIndicator = NO;
+        self.tableView.dataSource = self;
+        self.tableView.delegate = self;
+        self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        [self addSubview:self.tableView];
+        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+        [self.tableView registerNib:[UINib nibWithNibName:@"MinePageVideoGroupCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MinePageVideoGroupCell"];
+        [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.right.top.bottom.mas_equalTo(self);
         }];
         }];
+        UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 10)];
+        bottomView.backgroundColor = HexRGB(0xf8f9fc);
+        self.tableView.tableFooterView = bottomView;
         
         
         MJWeakSelf;
         MJWeakSelf;
-        self.collectionView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
+        self.tableView.mj_header = [KSGifRefreshHeader headerWithRefreshingBlock:^{
             [weakSelf resetParamenter];
             [weakSelf resetParamenter];
             [weakSelf requestData];
             [weakSelf requestData];
         }];
         }];
-        self.collectionView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
+        self.tableView.mj_footer = [KSGifRefreshFooter footerWithRefreshingBlock:^{
             if (weakSelf.isLoadMore) {
             if (weakSelf.isLoadMore) {
                 weakSelf.pages += 1;
                 weakSelf.pages += 1;
                 [weakSelf requestData];
                 [weakSelf requestData];
             }
             }
             else {
             else {
-                [weakSelf.collectionView.mj_footer endRefreshingWithNoMoreData];
+                [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
             }
             }
         }];
         }];
     }
     }
@@ -75,8 +76,8 @@
     @weakObj(self);
     @weakObj(self);
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         @strongObj(self);
         @strongObj(self);
-        [self.collectionView.mj_header endRefreshing];
-        [self.collectionView.mj_footer endRefreshing];
+        [self.tableView.mj_header endRefreshing];
+        [self.tableView.mj_footer endRefreshing];
     });
     });
 }
 }
 
 
@@ -102,9 +103,9 @@
         self.audioStatus = @"OUT_SALE";
         self.audioStatus = @"OUT_SALE";
     }
     }
     self.dataArray = [NSMutableArray array];
     self.dataArray = [NSMutableArray array];
-    [self.collectionView.mj_footer resetNoMoreData];
-    [self setPromptString:[self getEmptyMessage] imageName:@"empty_videoCourse" buttonTitle:@"立即创建" inView:self.collectionView];
-    [self.collectionView reloadData];
+    [self.tableView.mj_footer resetNoMoreData];
+    [self setPromptString:[self getEmptyMessage] imageName:@"empty_videoCourse" buttonTitle:@"立即创建" inView:self.tableView];
+    [self.tableView reloadData];
 }
 }
 
 
 - (NSString *)getEmptyMessage {
 - (NSString *)getEmptyMessage {
@@ -139,21 +140,21 @@
         else {
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
         }
         }
-        [self.collectionView reloadData];
+        [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];
         [self changePromptLabelStateWithArray:self.dataArray];
     } faliure:^(NSError * _Nonnull error) {
     } faliure:^(NSError * _Nonnull error) {
         [self endRefresh];
         [self endRefresh];
         if (self.networkAvaiable == NO) {
         if (self.networkAvaiable == NO) {
-            [self setPromptString:@"暂无网络" imageName:@"no_networking" buttonTitle:@"" inView:self.collectionView];
+            [self setPromptString:@"暂无网络" imageName:@"no_networking" buttonTitle:@"" inView:self.tableView];
         }
         }
         [self.dataArray removeAllObjects];
         [self.dataArray removeAllObjects];
-        [self.collectionView reloadData];
+        [self.tableView reloadData];
         [self changePromptLabelStateWithArray:self.dataArray];
         [self changePromptLabelStateWithArray:self.dataArray];
     }];
     }];
 }
 }
 
 
 - (void)beginRefreshImmediately {
 - (void)beginRefreshImmediately {
-    [self.collectionView.mj_header beginRefreshing];
+    [self.tableView.mj_header beginRefreshing];
 }
 }
 
 
 - (void)selectCellAtIndexPath:(NSIndexPath *)indexPath {
 - (void)selectCellAtIndexPath:(NSIndexPath *)indexPath {
@@ -162,11 +163,11 @@
         return;
         return;
     }
     }
     if (self.lastSelectedIndexPath != nil) {
     if (self.lastSelectedIndexPath != nil) {
-        UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:self.lastSelectedIndexPath];
-        [cell setSelected:NO];
+        UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:self.lastSelectedIndexPath];
+        [cell setSelected:NO animated:NO];
     }
     }
-    UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:indexPath];
-    [cell setSelected:YES];
+    UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
+    [cell setSelected:YES animated:NO];
     self.lastSelectedIndexPath = indexPath;
     self.lastSelectedIndexPath = indexPath;
 }
 }
 
 
@@ -186,23 +187,24 @@
     }
     }
 }
 }
 
 
-#pragma mark ----- collection view
-- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
-    return 1;
-}
-- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+#pragma mark - UITableViewDataSource
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     return self.dataArray.count;
     return self.dataArray.count;
 }
 }
 
 
-- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
-    VideoCourseCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"VideoCourseCell" forIndexPath:indexPath];
-    
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 115.0f;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    MinePageVideoGroupCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MinePageVideoGroupCell"];
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
     VIDEOGRROUP_STATUS status = [self getCourseStatus:self.selectIndex];
     VIDEOGRROUP_STATUS status = [self getCourseStatus:self.selectIndex];
     [cell configSourceModel:model groupStatus:status hideBottomView:NO];
     [cell configSourceModel:model groupStatus:status hideBottomView:NO];
     return cell;
     return cell;
 }
 }
 
 
+
 - (VIDEOGRROUP_STATUS)getCourseStatus:(NSInteger)cellIndex {
 - (VIDEOGRROUP_STATUS)getCourseStatus:(NSInteger)cellIndex {
     VIDEOGRROUP_STATUS status;
     VIDEOGRROUP_STATUS status;
     if (cellIndex == 0) {
     if (cellIndex == 0) {
@@ -220,7 +222,7 @@
     return status;
     return status;
 }
 }
 
 
-- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
     VideoCourseModel *model = [self.dataArray objectAtIndex:indexPath.row];
     NSString *url = @"";
     NSString *url = @"";
     if (self.selectIndex == 2 || self.selectIndex == 3) {
     if (self.selectIndex == 2 || self.selectIndex == 3) {
@@ -234,10 +236,6 @@
     [self.naviController pushViewController:ctrl animated:YES];
     [self.naviController pushViewController:ctrl animated:YES];
 }
 }
 
 
-- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
-    CGFloat height = self.selectIndex == 1 ? 200 : 210;
-    return CGSizeMake((kScreenWidth - 28 - 11) / 2.0f, height);
-}
 
 
 /**
 /**
  设置没有数据时的显示
  设置没有数据时的显示
@@ -266,7 +264,7 @@
     [view addSubview:self.promptView];
     [view addSubview:self.promptView];
     [self.promptView mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.promptView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.right.mas_equalTo(self);
         make.left.right.mas_equalTo(self);
-        make.top.mas_equalTo(self.collectionView);
+        make.top.mas_equalTo(self.tableView);
         make.height.mas_equalTo(self);
         make.height.mas_equalTo(self);
     }];
     }];
 }
 }