فهرست منبع

课程详情进入教室按钮显示逻辑修改

Steven 7 ماه پیش
والد
کامیت
1a2de980c5

+ 8 - 30
KulexiuForStudent/KulexiuForStudent/Module/Course/AccompanyCourse/Controller/AccompanyDetailViewController.m

@@ -123,14 +123,18 @@
     // 老师布置过作业且没有点评 可以点击
     if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
         self.canModify = NO;
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        self.bottomView.actionButton.backgroundColor = HexRGB(0xe5e5e5);
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
     }
     else {
         self.canModify = YES;
+    }
+    if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
+        self.tableView.tableFooterView = [UIView new];
+    }
+    else {
+        self.tableView.tableFooterView = self.bottomView;
         self.bottomView.actionButton.userInteractionEnabled = YES;
-        self.bottomView.actionButton.backgroundColor = THEMECOLOR;
+        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
+        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
         [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
@@ -164,40 +168,14 @@
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
         statusLabel.text = @"已结束";
         statusLabel.textColor = HexRGB(0x999999);
-        
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        [self.bottomView.actionButton setTitle:@"已结束" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:HexRGB(0xe5e5e5)];
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
-//        // 老师已点评作业 或者老师未布置作业
-//        if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
-//            self.bottomView.actionButton.userInteractionEnabled = NO;
-//            [self.bottomView.actionButton setTitle:@"确认提交" forState:UIControlStateNormal];
-//            [self.bottomView.actionButton setBackgroundColor:HexRGB(0xe5e5e5)];
-//            [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
-//        }
-//        else {
-//            self.bottomView.actionButton.userInteractionEnabled = YES;
-//            [self.bottomView.actionButton setTitle:@"确认提交" forState:UIControlStateNormal];
-//            [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-//            [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
-//        }
     }
     else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
         statusLabel.text = @"进行中";
         statusLabel.textColor = THEMECOLOR;
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
     else {
         statusLabel.text = @"未开始";
         statusLabel.textColor = HexRGB(0xff802c);
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
 

+ 8 - 29
KulexiuForStudent/KulexiuForStudent/Module/Course/MusicRoom/Controller/MusicRoomDetailViewController.m

@@ -120,14 +120,18 @@
     // 老师布置过作业且没有点评 可以点击
     if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
         self.canModify = NO;
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        self.bottomView.actionButton.backgroundColor = HexRGB(0xe5e5e5);
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
     }
     else {
         self.canModify = YES;
+    }
+    if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
+        self.tableView.tableFooterView = [UIView new];
+    }
+    else {
+        self.tableView.tableFooterView = self.bottomView;
         self.bottomView.actionButton.userInteractionEnabled = YES;
-        self.bottomView.actionButton.backgroundColor = THEMECOLOR;
+        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
+        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
         [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
@@ -146,39 +150,14 @@
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
         statusLabel.text = @"已结束";
         statusLabel.textColor = HexRGB(0x999999);
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        [self.bottomView.actionButton setTitle:@"已结束" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:HexRGB(0xe5e5e5)];
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
-//        // 老师已点评作业 或者老师未布置作业
-//        if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
-//            self.bottomView.actionButton.userInteractionEnabled = NO;
-//            [self.bottomView.actionButton setTitle:@"确认提交" forState:UIControlStateNormal];
-//            [self.bottomView.actionButton setBackgroundColor:HexRGB(0xe5e5e5)];
-//            [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
-//        }
-//        else {
-//            self.bottomView.actionButton.userInteractionEnabled = YES;
-//            [self.bottomView.actionButton setTitle:@"确认提交" forState:UIControlStateNormal];
-//            [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-//            [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
-//        }
     }
     else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
         statusLabel.text = @"进行中";
         statusLabel.textColor = THEMECOLOR;
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
     else {
         statusLabel.text = @"未开始";
         statusLabel.textColor = HexRGB(0xff802c);
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
 

+ 9 - 17
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/Controller/VipCouseDetailViewController.m

@@ -124,14 +124,19 @@
     // 老师布置过作业且没有点评 可以点击
     if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
         self.canModify = NO;
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        self.bottomView.actionButton.backgroundColor = HexRGB(0xe5e5e5);
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
+        
     }
     else {
         self.canModify = YES;
+    }
+    if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
+        self.tableView.tableFooterView = [UIView new];
+    }
+    else {
+        self.tableView.tableFooterView = self.bottomView;
         self.bottomView.actionButton.userInteractionEnabled = YES;
-        self.bottomView.actionButton.backgroundColor = THEMECOLOR;
+        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
+        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
         [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
@@ -165,27 +170,14 @@
     if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
         statusLabel.text = @"已结束";
         statusLabel.textColor = HexRGB(0x999999);
-        
-        self.bottomView.actionButton.userInteractionEnabled = NO;
-        [self.bottomView.actionButton setTitle:@"已结束" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:HexRGB(0xe5e5e5)];
-        [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
     }
     else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
         statusLabel.text = @"进行中";
         statusLabel.textColor = THEMECOLOR;
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
     else {
         statusLabel.text = @"未开始";
         statusLabel.textColor = HexRGB(0xff802c);
-        self.bottomView.actionButton.userInteractionEnabled = YES;
-        [self.bottomView.actionButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.bottomView.actionButton setBackgroundColor:THEMECOLOR];
-        [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
     }
 }
 

+ 1 - 0
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/HomeArrangeSortView.m

@@ -23,6 +23,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     self.searchField.delegate = self;
+    self.searchField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"搜索你喜欢的老师" attributes:@{NSForegroundColorAttributeName:HexRGBAlpha(0x000000, 0.4f)}];
 }
 
 

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Module/Mine/View/MineBodyView.xib

@@ -306,7 +306,7 @@
                             </userDefinedRuntimeAttributes>
                         </imageView>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0Am-MA-eFO">
-                            <rect key="frame" x="338.5" y="57" width="43" height="18"/>
+                            <rect key="frame" x="338.5" y="53" width="43" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="18" id="3dC-Cs-145"/>
                                 <constraint firstAttribute="width" secondItem="0Am-MA-eFO" secondAttribute="height" multiplier="12:5" id="ems-ya-9Aq"/>
@@ -329,7 +329,7 @@
                         <constraint firstItem="QuV-vC-ohV" firstAttribute="trailing" secondItem="0Xj-Pq-GsW" secondAttribute="trailing" id="Jty-Vm-XW6"/>
                         <constraint firstItem="Kmw-KD-cZO" firstAttribute="top" secondItem="4LF-Bt-r8c" secondAttribute="top" constant="14" id="N5R-0g-Gha"/>
                         <constraint firstItem="0Am-MA-eFO" firstAttribute="centerX" secondItem="0Xj-Pq-GsW" secondAttribute="centerX" id="PGa-cU-aS8"/>
-                        <constraint firstItem="0Am-MA-eFO" firstAttribute="centerY" secondItem="0Xj-Pq-GsW" secondAttribute="bottom" id="QOh-vQ-CGU"/>
+                        <constraint firstItem="0Am-MA-eFO" firstAttribute="centerY" secondItem="0Xj-Pq-GsW" secondAttribute="bottom" constant="-4" id="QOh-vQ-CGU"/>
                         <constraint firstItem="XdJ-kZ-3mN" firstAttribute="top" secondItem="Kmw-KD-cZO" secondAttribute="bottom" constant="8" id="RvD-w9-U4v"/>
                         <constraint firstItem="XdJ-kZ-3mN" firstAttribute="leading" secondItem="Kmw-KD-cZO" secondAttribute="leading" id="YeN-cd-OHl"/>
                         <constraint firstItem="0Xj-Pq-GsW" firstAttribute="centerY" secondItem="4LF-Bt-r8c" secondAttribute="centerY" id="Yw6-be-zX3"/>