Steven 2 rokov pred
rodič
commit
f187fe55df

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


+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/racking_course.imageset/Contents.json

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/racking_course.imageset/racking_course@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/racking_course.imageset/racking_course@3x.png


+ 22 - 0
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/unshelve_course.imageset/Contents.json

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

BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/unshelve_course.imageset/unshelve_course@2x.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Assets.xcassets/Home/unshelve_course.imageset/unshelve_course@3x.png


+ 24 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/LiveCourse/View/MyLiveCourseBodyView.m

@@ -41,7 +41,7 @@
         self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
         self.tableView.backgroundColor = HexRGB(0xf6f8f9);
         self.tableView.showsVerticalScrollIndicator = NO;
-        self.tableView.rowHeight = 150.0f;
+        self.tableView.rowHeight = 182.0f;
         self.tableView.dataSource = self;
         self.tableView.delegate = self;
         self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
@@ -215,11 +215,32 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     LiveCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LiveCourseCell"];
     LiveCourseModel *model = self.dataArray[indexPath.row];
-    BOOL hiddenInfo = self.selectIndex == 1 ? YES : NO;
-    [cell configCellWithSource:model hideStudentInfo:hiddenInfo];
+    COURSERSTATUS status = [self getCourseStatus:self.selectIndex];
+    [cell configCellWithSource:model groupStatus:status];
     return cell;
 }
 
+- (COURSERSTATUS)getCourseStatus:(NSInteger)index {
+    COURSERSTATUS status;
+    if (index == 0) {
+        status = COURSERSTATUS_ING;
+    }
+    else if (index == 1) {
+        status = COURSERSTATUS_NOTSALE;
+    }
+    else if (index == 2) {
+        status = COURSERSTATUS_APPLY;
+    }
+    else if (index == 3) {
+        status = COURSERSTATUS_COMPLETE;
+    }
+    else {
+        status = COURSERSTATUS_OUTSALE;
+    }
+    return status;
+}
+
+
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     // 直播课程组详情
     LiveCourseModel *model = self.dataArray[indexPath.row];

+ 9 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.h

@@ -8,11 +8,19 @@
 #import <UIKit/UIKit.h>
 #import "LiveCourseModel.h"
 
+typedef NS_ENUM(NSInteger, COURSERSTATUS) {
+    COURSERSTATUS_ING,        // 进行中
+    COURSERSTATUS_NOTSALE,    // 未上架
+    COURSERSTATUS_APPLY,      // 报名中
+    COURSERSTATUS_COMPLETE,   // 已完成
+    COURSERSTATUS_OUTSALE,    // 已下架
+};
+
 NS_ASSUME_NONNULL_BEGIN
 
 @interface LiveCourseCell : UITableViewCell
 
-- (void)configCellWithSource:(LiveCourseModel *)model hideStudentInfo:(BOOL)hiddenInfo;
+- (void)configCellWithSource:(LiveCourseModel *)model groupStatus:(COURSERSTATUS)status;
 
 @end
 

+ 85 - 23
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.m

@@ -9,14 +9,21 @@
 
 @interface LiveCourseCell ()
 
+@property (weak, nonatomic) IBOutlet UIView *statusView;
+@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
+
+@property (weak, nonatomic) IBOutlet UIView *actionView;
+@property (weak, nonatomic) IBOutlet UIImageView *actionImage;
+@property (weak, nonatomic) IBOutlet UILabel *actionLabel;
+@property (weak, nonatomic) IBOutlet NSLayoutConstraint *actionViewWidth;
+
 @property (weak, nonatomic) IBOutlet UIImageView *coverImage;
 @property (weak, nonatomic) IBOutlet UILabel *courseName;
-@property (weak, nonatomic) IBOutlet UIImageView *teacherAvatar;
-@property (weak, nonatomic) IBOutlet UILabel *teacherName;
+
 @property (weak, nonatomic) IBOutlet UILabel *orderUser;
 @property (weak, nonatomic) IBOutlet UILabel *courseTime;
 @property (weak, nonatomic) IBOutlet UILabel *priceLabel;
-@property (weak, nonatomic) IBOutlet UIView *orderView;
+@property (weak, nonatomic) IBOutlet UILabel *courseCount;
 @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
 
 
@@ -28,39 +35,34 @@
     [super awakeFromNib];
     // Initialization code
     self.selectionStyle = UITableViewCellSelectionStyleNone;
+    [self setupRadius];
+}
+
+- (void)setupRadius {
+    _statusView.layer.cornerRadius = 10.0f;
+    _statusView.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMinXMinYCorner;
 }
 
-- (void)configCellWithSource:(LiveCourseModel *)model hideStudentInfo:(BOOL)hiddenInfo {
+- (void)configCellWithSource:(LiveCourseModel *)model groupStatus:(COURSERSTATUS)status {
     [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.backgroundPic getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
     self.courseName.text = [NSString returnNoNullStringWithString:model.courseGroupName];
-    if ([NSString isEmptyString:model.teacherName]) {
-        self.teacherName.text = [NSString stringWithFormat:@"游客%@",model.teacherId];
+        
+    if (model.coursePrice > 0) {
+        self.orderUser.text = [NSString stringWithFormat:@"%.0f人已购买",model.studentCount];
     }
     else {
-        self.teacherName.text = model.teacherName;
+        self.orderUser.text = [NSString stringWithFormat:@"%.0f人已领取",model.studentCount];
     }
-    [self.teacherAvatar sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:USERDEFAULT_LOGO]];
     
-    if (hiddenInfo) {
-        self.orderView.hidden = YES;
-        self.orderUser.text = @"";
-    }
-    else {
-        self.orderView.hidden = NO;
-        if (model.coursePrice > 0) {
-            self.orderUser.text = [NSString stringWithFormat:@"%.0f人已购买",model.studentCount];
-        }
-        else {
-            self.orderUser.text = [NSString stringWithFormat:@"%.0f人已领取",model.studentCount];
-        }
-    }
     if (model.coursePrice > 0) {
-        self.priceLabel.text = [NSString  stringWithFormat:@"¥%.2f/%.0f课时",model.coursePrice,model.courseNum];
+        self.priceLabel.text = [NSString  stringWithFormat:@"¥%.2f",model.coursePrice];
+        
     }
     else {
-        self.priceLabel.text = [NSString  stringWithFormat:@"免费/%.0f课时",model.courseNum];
+        self.priceLabel.text = [NSString  stringWithFormat:@"免费"];
     }
     
+    self.courseCount.text = [NSString stringWithFormat:@"/%.0f课时",model.courseNum];
     // time
     NSDateFormatter *formatter = [NSObject getDateformatter];
     [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
@@ -69,6 +71,66 @@
     NSString *courseBegin = [formatter stringFromDate:startDate];
     self.courseTime.text = [NSString returnNoNullStringWithString:courseBegin];
     self.subjectLabel.text = [NSString returnNoNullStringWithString:model.subjectName];
+    self.actionViewWidth.constant = 0.0f;
+    switch (status) {
+        case COURSERSTATUS_ING:
+        {
+            self.statusView.backgroundColor = HexRGB(0xd5fff7);
+            self.statusLabel.textColor = HexRGB(0x2dc7aa);
+            self.statusLabel.text = @"进行中";
+            self.actionView.hidden = YES;
+            self.orderUser.hidden = NO;
+        }
+            break;
+        case COURSERSTATUS_NOTSALE:
+        {
+            self.statusView.backgroundColor = HexRGB(0xFFEEE3);
+            self.statusLabel.textColor = HexRGB(0xFF4E19);
+            self.statusLabel.text = @"未上架";
+            self.actionView.hidden = YES;
+            self.orderUser.hidden = YES;
+        }
+            break;
+        case COURSERSTATUS_APPLY:
+        {
+            self.statusView.backgroundColor = HexRGB(0xFFE7E7);
+            self.statusLabel.textColor = HexRGB(0xFF1919);
+            self.statusLabel.text = @"销售中";
+            self.actionView.hidden = NO;
+            self.actionViewWidth.constant = 70.0f;
+            self.actionLabel.textColor = HexRGB(0xFF1919);
+            self.actionLabel.text = @"下架课程";
+            self.actionLabel.textColor = HexRGB(0x008AE0);
+            [self.actionImage setImage:[UIImage imageNamed:@"unshelve_course"]];
+            self.orderUser.hidden = NO;
+        }
+            break;
+        case COURSERSTATUS_COMPLETE:
+        {
+            self.statusView.backgroundColor = HexRGB(0xDEF2FF);
+            self.statusLabel.textColor = HexRGB(0x008AE0);
+            self.statusLabel.text = @"已完成";
+            self.actionView.hidden = YES;
+            self.orderUser.hidden = NO;
+            
+        }
+            break;
+        case COURSERSTATUS_OUTSALE:
+        {
+            self.statusView.backgroundColor = HexRGB(0xF0F0F0);
+            self.statusLabel.textColor = HexRGB(0x666666);
+            self.statusLabel.text = @"已取消";
+            self.actionView.hidden = NO;
+            self.actionViewWidth.constant = 70.0f;
+            self.actionLabel.text = @"重新上架";
+            self.actionLabel.textColor = HexRGB(0xFF1919);
+            [self.actionImage setImage:[UIImage imageNamed:@"racking_course"]];
+            self.orderUser.hidden = NO;
+        }
+            break;
+        default:
+            break;
+    }
 }
 
 

+ 109 - 93
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/LiveCourseCell.xib

@@ -11,18 +11,18 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="LiveCourseCell">
-            <rect key="frame" x="0.0" y="0.0" width="414" height="153"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="182" id="KGk-i7-Jjw" customClass="LiveCourseCell">
+            <rect key="frame" x="0.0" y="0.0" width="414" height="182"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
-                <rect key="frame" x="0.0" y="0.0" width="414" height="153"/>
+                <rect key="frame" x="0.0" y="0.0" width="414" height="182"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mvt-WC-c3g">
-                        <rect key="frame" x="14" y="0.0" width="386" height="141"/>
+                        <rect key="frame" x="14" y="0.0" width="386" height="170"/>
                         <subviews>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="video_placeholder" translatesAutoresizingMaskIntoConstraints="NO" id="xxS-NZ-g2N">
-                                <rect key="frame" x="11" y="16" width="105" height="71"/>
+                                <rect key="frame" x="11" y="40" width="105" height="71"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="71" id="4W8-zD-2Qz"/>
                                     <constraint firstAttribute="width" constant="105" id="WVS-We-aZW"/>
@@ -34,14 +34,14 @@
                                 </userDefinedRuntimeAttributes>
                             </imageView>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ubJ-4G-VNk">
-                                <rect key="frame" x="10" y="102" width="366" height="1"/>
+                                <rect key="frame" x="10" y="126" width="366" height="1"/>
                                 <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="1" id="Cz6-mp-tqs"/>
                                 </constraints>
                             </view>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从零开始学竖笛直播课" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fS2-h4-cBg">
-                                <rect key="frame" x="128" y="17" width="248" height="20"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从零开始学竖笛直播课" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fS2-h4-cBg">
+                                <rect key="frame" x="128" y="41" width="248" height="20"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="20" id="cuo-ww-100"/>
                                 </constraints>
@@ -49,76 +49,14 @@
                                 <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥120/4课时" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pom-27-xPp">
-                                <rect key="frame" x="294" y="111" width="81" height="20"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="20" id="PkK-Ar-40O"/>
-                                </constraints>
-                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
-                                <color key="textColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_default_avatal" translatesAutoresizingMaskIntoConstraints="NO" id="BL0-yX-dfU">
-                                <rect key="frame" x="130" y="66" width="20" height="20"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="20" id="dr1-Zf-der"/>
-                                    <constraint firstAttribute="height" constant="20" id="qhN-5d-oHo"/>
-                                </constraints>
-                                <userDefinedRuntimeAttributes>
-                                    <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
-                                        <real key="value" value="10"/>
-                                    </userDefinedRuntimeAttribute>
-                                </userDefinedRuntimeAttributes>
-                            </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张老师" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MXm-cL-DLC">
-                                <rect key="frame" x="155" y="68" width="40" height="16"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1P8-Tt-vJy">
-                                <rect key="frame" x="201" y="66" width="173" height="20"/>
-                                <subviews>
-                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JgQ-vo-sMT">
-                                        <rect key="frame" x="0.0" y="4.5" width="1" height="11"/>
-                                        <color key="backgroundColor" red="0.82745098039999998" green="0.82745098039999998" blue="0.82745098039999998" alpha="1" colorSpace="calibratedRGB"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="1" id="8Hx-cG-KCI"/>
-                                            <constraint firstAttribute="height" constant="11" id="rIv-7J-HCi"/>
-                                        </constraints>
-                                    </view>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="6人已购买" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="alu-CI-VLe">
-                                        <rect key="frame" x="7" y="2" width="61.5" height="16"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                        <color key="textColor" red="1" green="0.50196078430000002" blue="0.17254901959999999" alpha="1" colorSpace="calibratedRGB"/>
-                                        <nil key="highlightedColor"/>
-                                    </label>
-                                </subviews>
-                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                                <constraints>
-                                    <constraint firstItem="JgQ-vo-sMT" firstAttribute="leading" secondItem="1P8-Tt-vJy" secondAttribute="leading" id="4HF-8s-wMC"/>
-                                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="alu-CI-VLe" secondAttribute="trailing" constant="2" id="7Uh-ca-kl6"/>
-                                    <constraint firstItem="alu-CI-VLe" firstAttribute="leading" secondItem="JgQ-vo-sMT" secondAttribute="trailing" constant="6" id="9qV-gl-OsT"/>
-                                    <constraint firstItem="JgQ-vo-sMT" firstAttribute="centerY" secondItem="1P8-Tt-vJy" secondAttribute="centerY" id="HPg-Ld-Lbj"/>
-                                    <constraint firstAttribute="height" constant="20" id="V7b-7h-JH6"/>
-                                    <constraint firstItem="alu-CI-VLe" firstAttribute="centerY" secondItem="1P8-Tt-vJy" secondAttribute="centerY" id="bIf-kK-SVI"/>
-                                </constraints>
-                            </view>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_time" translatesAutoresizingMaskIntoConstraints="NO" id="61W-Je-OUA">
-                                <rect key="frame" x="11" y="114" width="16" height="16"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="16" id="Yzw-mW-EhA"/>
-                                    <constraint firstAttribute="width" constant="16" id="kZw-k1-310"/>
-                                </constraints>
-                            </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2021/09/17 14:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dnA-By-ThI">
-                                <rect key="frame" x="34" y="114" width="105" height="16"/>
+                                <rect key="frame" x="14" y="137" width="105" height="24"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                 <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZsQ-DL-KCn">
-                                <rect key="frame" x="15" y="74" width="24.5" height="13"/>
+                                <rect key="frame" x="15" y="94" width="24.5" height="13"/>
                                 <subviews>
                                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="长笛" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="86M-c7-rTW">
                                         <rect key="frame" x="3" y="0.0" width="18.5" height="13"/>
@@ -143,32 +81,107 @@
                                     </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                             </view>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="6人已购买" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="alu-CI-VLe">
+                                <rect key="frame" x="310.5" y="141" width="61.5" height="16"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
+                                <color key="textColor" red="1" green="0.50196078430000002" blue="0.17254901959999999" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥120" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pom-27-xPp">
+                                <rect key="frame" x="130" y="85" width="48.5" height="25"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="25" id="PVU-B7-gPE"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
+                                <color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="课程状态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IJp-7D-01q">
+                                <rect key="frame" x="15" y="9" width="58" height="17"/>
+                                <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
+                                <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tFR-9q-Bap">
+                                <rect key="frame" x="331" y="7" width="55" height="20"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="进行中" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zIh-lI-PfC">
+                                        <rect key="frame" x="12" y="4" width="31" height="12"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="10"/>
+                                        <color key="textColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" red="0.83529411764705885" green="1" blue="0.96862745098039216" alpha="1" colorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="20" id="MgG-T2-5LC"/>
+                                    <constraint firstAttribute="trailing" secondItem="zIh-lI-PfC" secondAttribute="trailing" constant="12" id="RFq-Je-afx"/>
+                                    <constraint firstItem="zIh-lI-PfC" firstAttribute="leading" secondItem="tFR-9q-Bap" secondAttribute="leading" constant="12" id="n1k-mM-uck"/>
+                                    <constraint firstItem="zIh-lI-PfC" firstAttribute="centerY" secondItem="tFR-9q-Bap" secondAttribute="centerY" id="oye-ZM-XX4"/>
+                                </constraints>
+                            </view>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="/4课时" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d65-nw-cWo">
+                                <rect key="frame" x="186.5" y="89" width="42" height="17"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iFV-Gd-TqC">
+                                <rect key="frame" x="302" y="87.5" width="70" height="20"/>
+                                <subviews>
+                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="unshelve_course" translatesAutoresizingMaskIntoConstraints="NO" id="C06-l4-KGT">
+                                        <rect key="frame" x="65" y="6.5" width="5" height="7"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="5" id="5vX-qe-KWR"/>
+                                            <constraint firstAttribute="height" constant="7" id="Axu-h4-rMr"/>
+                                        </constraints>
+                                    </imageView>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下架课程" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tjC-1s-zlM">
+                                        <rect key="frame" x="0.0" y="1.5" width="58" height="17"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                        <color key="textColor" red="0.0" green="0.54117647058823526" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                <constraints>
+                                    <constraint firstItem="tjC-1s-zlM" firstAttribute="centerY" secondItem="iFV-Gd-TqC" secondAttribute="centerY" id="3lP-XI-mmL"/>
+                                    <constraint firstAttribute="height" constant="20" id="Qxx-Nl-EW4"/>
+                                    <constraint firstItem="tjC-1s-zlM" firstAttribute="leading" secondItem="iFV-Gd-TqC" secondAttribute="leading" id="WAU-Vc-axE"/>
+                                    <constraint firstAttribute="width" constant="70" id="Wuo-rZ-Fax"/>
+                                    <constraint firstAttribute="trailing" secondItem="C06-l4-KGT" secondAttribute="trailing" id="er7-J6-LI2"/>
+                                    <constraint firstItem="C06-l4-KGT" firstAttribute="centerY" secondItem="iFV-Gd-TqC" secondAttribute="centerY" id="olT-Ns-Ufm"/>
+                                </constraints>
+                            </view>
                         </subviews>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="xxS-NZ-g2N" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="11" id="1sN-cR-l8Q"/>
+                            <constraint firstItem="iFV-Gd-TqC" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="d65-nw-cWo" secondAttribute="trailing" constant="4" id="2kW-eg-TON"/>
+                            <constraint firstItem="d65-nw-cWo" firstAttribute="centerY" secondItem="pom-27-xPp" secondAttribute="centerY" id="3HT-10-mx6"/>
+                            <constraint firstItem="d65-nw-cWo" firstAttribute="leading" secondItem="pom-27-xPp" secondAttribute="trailing" constant="8" id="4pL-Qt-Aey"/>
                             <constraint firstAttribute="trailing" secondItem="fS2-h4-cBg" secondAttribute="trailing" constant="10" id="6Cp-qd-kCN"/>
-                            <constraint firstItem="BL0-yX-dfU" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="trailing" constant="14" id="Gbd-BG-sia"/>
-                            <constraint firstItem="MXm-cL-DLC" firstAttribute="centerY" secondItem="BL0-yX-dfU" secondAttribute="centerY" id="Kgo-4i-c9Z"/>
-                            <constraint firstItem="dnA-By-ThI" firstAttribute="centerY" secondItem="61W-Je-OUA" secondAttribute="centerY" id="OvF-75-Nfb"/>
+                            <constraint firstAttribute="trailing" secondItem="iFV-Gd-TqC" secondAttribute="trailing" constant="14" id="8IO-R5-DWS"/>
+                            <constraint firstItem="tFR-9q-Bap" firstAttribute="top" secondItem="Mvt-WC-c3g" secondAttribute="top" constant="7" id="A0n-bX-Wxi"/>
+                            <constraint firstAttribute="trailing" secondItem="alu-CI-VLe" secondAttribute="trailing" constant="14" id="BgX-xP-Agg"/>
+                            <constraint firstItem="IJp-7D-01q" firstAttribute="top" secondItem="Mvt-WC-c3g" secondAttribute="top" constant="9" id="Iwm-wH-hr5"/>
+                            <constraint firstAttribute="bottom" secondItem="dnA-By-ThI" secondAttribute="bottom" constant="9" id="NsY-a6-RXW"/>
                             <constraint firstItem="ubJ-4G-VNk" firstAttribute="top" secondItem="xxS-NZ-g2N" secondAttribute="bottom" constant="15" id="QQH-1A-wcB"/>
-                            <constraint firstAttribute="trailing" secondItem="1P8-Tt-vJy" secondAttribute="trailing" constant="12" id="UNf-bn-NGG"/>
+                            <constraint firstItem="dnA-By-ThI" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="14" id="Qdo-8c-acB"/>
                             <constraint firstItem="fS2-h4-cBg" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="trailing" constant="12" id="W9V-Py-L3p"/>
                             <constraint firstItem="ubJ-4G-VNk" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="10" id="XPT-f9-5Pb"/>
                             <constraint firstItem="ZsQ-DL-KCn" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="leading" constant="4" id="YQP-hP-shh"/>
-                            <constraint firstAttribute="trailing" secondItem="pom-27-xPp" secondAttribute="trailing" constant="11" id="apX-z2-tWj"/>
-                            <constraint firstItem="BL0-yX-dfU" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" constant="-1" id="btl-DG-Sfp"/>
-                            <constraint firstItem="xxS-NZ-g2N" firstAttribute="top" secondItem="Mvt-WC-c3g" secondAttribute="top" constant="16" id="jSd-RY-pLM"/>
-                            <constraint firstItem="61W-Je-OUA" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="11" id="kPQ-yR-Otc"/>
-                            <constraint firstItem="1P8-Tt-vJy" firstAttribute="leading" secondItem="MXm-cL-DLC" secondAttribute="trailing" constant="6" id="kde-1c-4bz"/>
-                            <constraint firstItem="MXm-cL-DLC" firstAttribute="leading" secondItem="BL0-yX-dfU" secondAttribute="trailing" constant="5" id="kf6-VF-jse"/>
-                            <constraint firstItem="ZsQ-DL-KCn" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" id="pFj-uP-SFQ"/>
-                            <constraint firstItem="pom-27-xPp" firstAttribute="top" secondItem="ubJ-4G-VNk" secondAttribute="bottom" constant="8" id="pi1-8d-yCC"/>
+                            <constraint firstItem="alu-CI-VLe" firstAttribute="centerY" secondItem="dnA-By-ThI" secondAttribute="centerY" id="ZsX-YZ-KjT"/>
+                            <constraint firstItem="pom-27-xPp" firstAttribute="leading" secondItem="xxS-NZ-g2N" secondAttribute="trailing" constant="14" id="cg6-cR-qTo"/>
+                            <constraint firstItem="IJp-7D-01q" firstAttribute="leading" secondItem="Mvt-WC-c3g" secondAttribute="leading" constant="15" id="gNW-qS-yUt"/>
+                            <constraint firstItem="iFV-Gd-TqC" firstAttribute="centerY" secondItem="d65-nw-cWo" secondAttribute="centerY" id="j3e-Dr-eqM"/>
+                            <constraint firstItem="pom-27-xPp" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" constant="-1" id="j9u-RC-StY"/>
+                            <constraint firstItem="xxS-NZ-g2N" firstAttribute="top" secondItem="Mvt-WC-c3g" secondAttribute="top" constant="40" id="jSd-RY-pLM"/>
+                            <constraint firstAttribute="trailing" secondItem="tFR-9q-Bap" secondAttribute="trailing" id="jsW-bq-EDp"/>
+                            <constraint firstItem="ZsQ-DL-KCn" firstAttribute="bottom" secondItem="xxS-NZ-g2N" secondAttribute="bottom" constant="-4" id="pFj-uP-SFQ"/>
                             <constraint firstItem="fS2-h4-cBg" firstAttribute="top" secondItem="xxS-NZ-g2N" secondAttribute="top" constant="1" id="png-nh-Js2"/>
-                            <constraint firstItem="61W-Je-OUA" firstAttribute="top" secondItem="ubJ-4G-VNk" secondAttribute="bottom" constant="11" id="tNX-e1-ZuP"/>
+                            <constraint firstItem="dnA-By-ThI" firstAttribute="top" secondItem="ubJ-4G-VNk" secondAttribute="bottom" constant="10" id="tvo-bN-ZH6"/>
                             <constraint firstAttribute="trailing" secondItem="ubJ-4G-VNk" secondAttribute="trailing" constant="10" id="uXN-wS-lsC"/>
-                            <constraint firstItem="1P8-Tt-vJy" firstAttribute="centerY" secondItem="MXm-cL-DLC" secondAttribute="centerY" id="w51-XM-Mq4"/>
-                            <constraint firstItem="dnA-By-ThI" firstAttribute="leading" secondItem="61W-Je-OUA" secondAttribute="trailing" constant="7" id="xvB-M5-qln"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
@@ -187,22 +200,25 @@
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <connections>
+                <outlet property="actionImage" destination="C06-l4-KGT" id="KG3-0S-vOC"/>
+                <outlet property="actionLabel" destination="tjC-1s-zlM" id="oWY-hq-LST"/>
+                <outlet property="actionView" destination="iFV-Gd-TqC" id="T8l-Hd-gnz"/>
+                <outlet property="actionViewWidth" destination="Wuo-rZ-Fax" id="wlU-kj-jce"/>
+                <outlet property="courseCount" destination="d65-nw-cWo" id="4ke-74-1PS"/>
                 <outlet property="courseName" destination="fS2-h4-cBg" id="MBL-3f-0NB"/>
                 <outlet property="courseTime" destination="dnA-By-ThI" id="zYH-8K-CD9"/>
                 <outlet property="coverImage" destination="xxS-NZ-g2N" id="AVE-vD-hDf"/>
                 <outlet property="orderUser" destination="alu-CI-VLe" id="g7W-md-Ny2"/>
-                <outlet property="orderView" destination="1P8-Tt-vJy" id="sV7-bt-dlE"/>
                 <outlet property="priceLabel" destination="pom-27-xPp" id="YX9-DU-Cu6"/>
+                <outlet property="statusLabel" destination="zIh-lI-PfC" id="Mzz-Nj-3Cd"/>
+                <outlet property="statusView" destination="tFR-9q-Bap" id="83z-gf-mxU"/>
                 <outlet property="subjectLabel" destination="86M-c7-rTW" id="zvd-kH-qDI"/>
-                <outlet property="teacherAvatar" destination="BL0-yX-dfU" id="lqv-h8-ALv"/>
-                <outlet property="teacherName" destination="MXm-cL-DLC" id="fmJ-YR-WPh"/>
             </connections>
-            <point key="canvasLocation" x="131.8840579710145" y="104.12946428571428"/>
+            <point key="canvasLocation" x="131.8840579710145" y="113.83928571428571"/>
         </tableViewCell>
     </objects>
     <resources>
-        <image name="course_time" width="16" height="16"/>
-        <image name="user_default_avatal" width="52" height="52"/>
+        <image name="unshelve_course" width="5" height="7"/>
         <image name="video_placeholder" width="103" height="72"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 2 - 3
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageCourseView.m

@@ -288,7 +288,7 @@
         return 147.0f;
     }
     else if (self.selectIndex == 2) {
-        return 150.0f;
+        return 182.0f;
     }
     else {
         return 110.0f;;
@@ -308,8 +308,7 @@
     else if (self.selectIndex == 2) {
         LiveCourseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LiveCourseCell"];
         LiveCourseModel *model = self.dataArray[indexPath.row];
-        BOOL hiddenInfo = NO;
-        [cell configCellWithSource:model hideStudentInfo:hiddenInfo];
+        [cell configCellWithSource:model groupStatus:COURSERSTATUS_ING];
         return cell;
     }
     else {