Quellcode durchsuchen

筛选样式修改

Steven vor 4 Monaten
Ursprung
Commit
420201de2d

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Course/View/VIPCourseCell.m

@@ -85,6 +85,7 @@
         self.courseStatus.text = @"进行中";
         self.courseStatus.textColor = THEMECOLOR;
         self.type = ACCOMPANY_DETAIL;
+        self.opreationButton.hidden = NO;
         self.opreationButton.userInteractionEnabled = YES;
         [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
@@ -97,12 +98,14 @@
         BOOL hasEvaluate = [model.teacherReplied isEqualToString:@"1"] ? YES : NO;
         if (hasEvaluate == NO) {
             self.type = ACCOMPANY_DETAIL;
+            self.opreationButton.hidden = NO;
             self.opreationButton.userInteractionEnabled = YES;
             [self.opreationButton setTitle:@"评价" forState:UIControlStateNormal];
             [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
             [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
         }
         else {
+            self.opreationButton.hidden = NO;
             self.opreationButton.userInteractionEnabled = NO;
             [self.opreationButton setTitle:@"已评价" forState:UIControlStateNormal];
             [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];

+ 13 - 11
KulexiuForStudent/KulexiuForStudent/Module/Course/VipCourse/View/ProgramCourseGroupBodyView.m

@@ -18,8 +18,8 @@
 #import "OnlineClassManager.h"
 #import "KSPremissionAlert.h"
 #import "RecordCheckManager.h"
-#import <KSChoosePicker.h>
 #import <KSFullDatePicker.h>
+#import "KSSmallChoosePicker.h"
 
 @interface ProgramCourseGroupBodyView ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -91,6 +91,8 @@
 }
 
 - (void)configDefault {
+    self.secondChooseIndex = 1;
+    self.thirdChooseIndex = 1;
     [self.dateFormatter setDateFormat:@"yyyy-MM"];
     NSDate *currentDate = [NSDate date];
     self.classDate = [self.dateFormatter stringFromDate:currentDate];
@@ -440,40 +442,40 @@
     }
     else if (type == SORT_TYPE_STATUS) { // 状态
         MJWeakSelf;
-        KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"课程状态" sourceData:@[@"全部",@"未开始",@"进行中",@"已结束"]  lastChooseIndex:self.secondChooseIndex sureButtonColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
+        KSSmallChoosePicker *picker = [[KSSmallChoosePicker alloc] initWithTitle:@"" sourceData:@[@"全部",@"未开始",@"进行中",@"已结束"] lastChoose:self.secondChooseIndex chooseColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
             weakSelf.secondChooseIndex = chooseIndex;
-            if (chooseIndex == 0) {
+            if (chooseIndex == 1) {
                 [weakSelf.sortView.secondLabel setText:@"全部状态"];
                 weakSelf.courseStatus = nil;
             }
             else {
                 [weakSelf.sortView.secondLabel setText:returnValue];
-                [weakSelf evaluateStatusWithIndex:chooseIndex isCourseStatus:YES];
+                [weakSelf evaluateStatusWithIndex:chooseIndex-1 isCourseStatus:YES];
             }
-            self.sortView.secondArrowUp = NO;
+            weakSelf.sortView.secondArrowUp = NO;
             [weakSelf refreshAndRequestData];
         } cancel:^{
-            self.sortView.secondArrowUp = NO;
+            weakSelf.sortView.secondArrowUp = NO;
         }];
         [picker showPicker];
     }
     else if (type == SORT_TYPE_ATTENDENCE) {
         
         MJWeakSelf;
-        KSChoosePicker *picker = [[KSChoosePicker alloc] initWithTitle:@"考勤" sourceData:@[@"全部",@"到课",@"旷课"]  lastChooseIndex:self.secondChooseIndex sureButtonColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
+        KSSmallChoosePicker *picker = [[KSSmallChoosePicker alloc] initWithTitle:@"" sourceData:@[@"全部考勤",@"到课",@"旷课"] lastChoose:self.thirdChooseIndex chooseColor:THEMECOLOR chooseReturnWithBlock:^(NSString * _Nonnull returnValue, NSInteger chooseIndex) {
             weakSelf.thirdChooseIndex = chooseIndex;
-            if (chooseIndex == 0) {
+            if (chooseIndex == 1) {
                 [weakSelf.sortView.thirdLabel setText:@"全部考勤"];
                 weakSelf.attendanceStatus = nil;
             }
             else {
                 [weakSelf.sortView.thirdLabel setText:returnValue];
-                [weakSelf evaluateStatusWithIndex:chooseIndex isCourseStatus:NO];
+                [weakSelf evaluateStatusWithIndex:chooseIndex-1 isCourseStatus:NO];
             }
-            self.sortView.thirdArrowUp = NO;
+            weakSelf.sortView.thirdArrowUp = NO;
             [weakSelf refreshAndRequestData];
         } cancel:^{
-            self.sortView.thirdArrowUp = NO;
+            weakSelf.sortView.thirdArrowUp = NO;
         }];
         [picker showPicker];
     }