Steven 3 年之前
父節點
當前提交
7a34523648

二進制
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 16
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -100,21 +100,5 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "F0C0C1F0-E7FC-4E41-9722-34EE53BFCF96"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Module/Login/Controller/SubjectChooseViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "257"
-            endingLineNumber = "257"
-            landmarkName = "-sureChooseSubject"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 46 - 28
KulexiuForStudent/KulexiuForStudent/Module/Course/View/AccompanyCourseCell.m

@@ -52,43 +52,46 @@
     // time
     [self evaluateTimeLabelWithBeginTime:model.startTime endTime:model.endTime];
     
+    self.opreationButton.userInteractionEnabled = NO;
+    self.opreationButton.hidden = YES;
+    
     if ([model.status isEqualToString:@"NOT_START"]) { // 未开始
         self.courseStatus.text = @"未开始";
         self.courseStatus.textColor = HexRGB(0xff802C);
         
         self.type = ACCOMPANY_DETAIL;
-        self.opreationButton.userInteractionEnabled = YES;
-        [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
-        [self.opreationButton setBackgroundColor:THEMECOLOR];
+        
+//        [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
+//        [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
+//        [self.opreationButton setBackgroundColor:THEMECOLOR];
     }
     else if ([model.status isEqualToString:@"ING"]) { // 进行中
         self.courseStatus.text = @"进行中";
         self.courseStatus.textColor = THEMECOLOR;
         self.type = ACCOMPANY_DETAIL;
-        self.opreationButton.userInteractionEnabled = YES;
-        [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
-        [self.opreationButton setBackgroundColor:THEMECOLOR];
+//        self.opreationButton.userInteractionEnabled = YES;
+//        [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
+//        [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
+//        [self.opreationButton setBackgroundColor:THEMECOLOR];
     }
     else if ([model.status isEqualToString:@"COMPLETE"]) { // 已结束
         self.courseStatus.text = @"已结束";
         self.courseStatus.textColor = HexRGB(0x999999);
-        // 判断显示评价还是已评价
-        BOOL hasEvaluate = NO;
-        if (hasEvaluate) {
-            self.type = ACCOMPANY_DETAIL;
-            self.opreationButton.userInteractionEnabled = YES;
-            [self.opreationButton setTitle:@"评价" forState:UIControlStateNormal];
-            [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
-            [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
-        }
-        else {
-            self.opreationButton.userInteractionEnabled = NO;
-            [self.opreationButton setTitle:@"已评价" forState:UIControlStateNormal];
-            [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
-            [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
-        }
+//        // 判断显示评价还是已评价
+//        BOOL hasEvaluate = NO;
+//        if (hasEvaluate) {
+//            self.type = ACCOMPANY_DETAIL;
+//            self.opreationButton.userInteractionEnabled = YES;
+//            [self.opreationButton setTitle:@"评价" forState:UIControlStateNormal];
+//            [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
+//            [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
+//        }
+//        else {
+//            self.opreationButton.userInteractionEnabled = NO;
+//            [self.opreationButton setTitle:@"已评价" forState:UIControlStateNormal];
+//            [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
+//            [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
+//        }
     }
 }
 
@@ -110,17 +113,30 @@
         self.courseStatus.text = @"未开始";
         self.courseStatus.textColor = HexRGB(0xff802C);
         
-        self.type = ACCOMPANY_DETAIL;
-        self.opreationButton.userInteractionEnabled = YES;
-        [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
-        [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
-        [self.opreationButton setBackgroundColor:THEMECOLOR];
+        // 判断按钮显示调课还是进入教室
+        NSDate *currentDate = [NSDate date];
+        NSDate *beginDate = [self getCourseBeginDate:model.startTime];
+        NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
+        
+        if (beginTimeInterval < beforeTime * 60) {
+            self.type = ACCOMPANY_DETAIL;
+            self.opreationButton.userInteractionEnabled = YES;
+            self.opreationButton.hidden = NO;
+            [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
+            [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
+            [self.opreationButton setBackgroundColor:THEMECOLOR];
+        }
+        else {
+            self.opreationButton.userInteractionEnabled = NO;
+            self.opreationButton.hidden = YES;
+        }
     }
     else if ([model.status isEqualToString:@"ING"]) { // 进行中
         self.courseStatus.text = @"进行中";
         self.courseStatus.textColor = THEMECOLOR;
         self.type = ACCOMPANY_DETAIL;
         self.opreationButton.userInteractionEnabled = YES;
+        self.opreationButton.hidden = NO;
         [self.opreationButton setTitle:@"进入教室" forState:UIControlStateNormal];
         [self.opreationButton setTitleColor:HexRGB(0xffffff) forState:UIControlStateNormal];
         [self.opreationButton setBackgroundColor:THEMECOLOR];
@@ -133,12 +149,14 @@
         if (hasEvaluate) {
             self.type = ACCOMPANY_DETAIL;
             self.opreationButton.userInteractionEnabled = YES;
+            self.opreationButton.hidden = NO;
             [self.opreationButton setTitle:@"评价" forState:UIControlStateNormal];
             [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
             [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];
         }
         else {
             self.opreationButton.userInteractionEnabled = NO;
+            self.opreationButton.hidden = NO;
             [self.opreationButton setTitle:@"已评价" forState:UIControlStateNormal];
             [self.opreationButton setTitleColor:THEMECOLOR forState:UIControlStateNormal];
             [self.opreationButton setBackgroundColor:HexRGB(0xffffff)];

+ 23 - 2
KulexiuForStudent/KulexiuForStudent/Module/Course/View/CourseForLiveCell.m

@@ -46,20 +46,41 @@
     if ([model.status isEqualToString:@"NOT_START"]) { // 未开始
         self.courseStatusLabel.text = @"未开始";
         self.courseStatusLabel.textColor = HexRGB(0xff802C);
-        
+        // 判断按钮显示调课还是进入教室
+        NSDate *currentDate = [NSDate date];
+        NSDate *beginDate = [self getCourseBeginDate:model.startTime];
+        NSTimeInterval beginTimeInterval = [beginDate timeIntervalSinceDate:currentDate];
+        if (beginTimeInterval < beforeTime * 60) {
+            self.operationButton.userInteractionEnabled = YES;
+            self.operationButton.hidden = NO;
+        }
+        else {
+            self.operationButton.userInteractionEnabled = NO;
+            self.operationButton.hidden = YES;
+        }
     }
     else if ([model.status isEqualToString:@"ING"]) { // 进行中
         self.courseStatusLabel.text = @"进行中";
         self.courseStatusLabel.textColor = THEMECOLOR;
+        self.operationButton.userInteractionEnabled = YES;
+        self.operationButton.hidden = NO;
         
     }
     else if ([model.status isEqualToString:@"COMPLETE"]) { // 已结束
         self.courseStatusLabel.text = @"已结束";
         self.courseStatusLabel.textColor = HexRGB(0x999999);
-        
+        self.operationButton.userInteractionEnabled = NO;
+        self.operationButton.hidden = YES;
     }
 }
 
+- (NSDate *)getCourseBeginDate:(NSString *)beginTime {
+    NSDateFormatter *dateFormatter = [NSObject getDateformatter];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
+    NSDate *beginDate = [dateFormatter dateFromString:beginTime];
+    return beginDate;
+}
+
 - (void)evaluateTimeLabelWithBeginTime:(NSString *)beginTime endTime:(NSString *)endTime {
     // 时间
     NSDateFormatter *dateFormatter = [NSObject getDateformatter];

+ 4 - 1
KulexiuForStudent/KulexiuForStudent/Module/Login/View/FirstSettingBodyView.m

@@ -27,7 +27,10 @@
         self.firstField.textContentType = UITextContentTypeName;
         self.secondField.textContentType = UITextContentTypeName;
     }
-    
+    if (@available(iOS 12.0, *)) {
+        self.firstField.textContentType = UITextContentTypeOneTimeCode;
+        self.secondField.textContentType = UITextContentTypeOneTimeCode;
+    }
 }
 + (instancetype)shareInstance {
     FirstSettingBodyView *view = [[[NSBundle mainBundle] loadNibNamed:@"FirstSettingBodyView" owner:nil options:nil] firstObject];

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Login/View/PasswordBodyView.m

@@ -26,6 +26,9 @@
     if (@available(iOS 10.0, *)) {
         _passwordField.textContentType = UITextContentTypeName;
     }
+    if (@available(iOS 12.0, *)) {
+        _passwordField.textContentType = UITextContentTypeOneTimeCode;
+    }
 }
 
 + (instancetype)shareInstance {

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/ModifyBodyView.m

@@ -26,6 +26,9 @@
     if (@available(iOS 10.0, *)) {
         _pwdField.textContentType = UITextContentTypeName;
     }
+    if (@available(iOS 12.0, *)) {
+        _pwdField.textContentType = UITextContentTypeOneTimeCode;
+    }
     self.pwdField.delegate = self;
     self.codeField.delegate = self;
     NSString *phoneStr = UserDefault(PHONEKEY);

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/PhoneCheckBodyView.m

@@ -21,6 +21,9 @@
     if (@available(iOS 10.0, *)) {
         _passwordField.textContentType = UITextContentTypeName;
     }
+    if (@available(iOS 12.0, *)) {
+        _passwordField.textContentType = UITextContentTypeOneTimeCode;
+    }
     self.phoneField.delegate = self;
     self.passwordField.delegate = self;
 }

二進制
KulexiuForStudent/build/XCBuildData/build.db