|
@@ -105,12 +105,26 @@
|
|
|
else {
|
|
|
[LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
|
|
|
}
|
|
|
+ [self evaluateViewDisplay];
|
|
|
[self.tableView reloadData];
|
|
|
} faliure:^(NSError * _Nonnull error) {
|
|
|
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
+- (void)evaluateViewDisplay {
|
|
|
+ if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
|
|
|
+ self.tableView.tableFooterView = [UIView new];
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.tableView.tableFooterView = self.bottomView;
|
|
|
+ self.bottomView.sureButton.userInteractionEnabled = YES;
|
|
|
+ [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
|
|
|
+ [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
|
|
|
+ [self.bottomView.sureButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
- (void)requestEvaluateMessage {
|
|
|
[KSNetworkingManager selectRepliedRequest:KS_POST courseGroupId:self.courseGroupId courseScheduleId:self.courseId studentId:self.studentId success:^(NSDictionary * _Nonnull dic) {
|
|
|
if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
|
|
@@ -145,20 +159,14 @@
|
|
|
if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
|
|
|
statusLabel.text = @"已结束";
|
|
|
statusLabel.textColor = HexRGB(0x999999);
|
|
|
- [self.bottomView.sureButton setTitle:@"已结束" forState:UIControlStateNormal];
|
|
|
- [self.bottomView.sureButton setBackgroundColor:HexRGB(0xd5d5d5)];
|
|
|
}
|
|
|
else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
|
|
|
statusLabel.text = @"进行中";
|
|
|
statusLabel.textColor = THEMECOLOR;
|
|
|
- [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
|
|
|
- [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
|
|
|
}
|
|
|
else {
|
|
|
statusLabel.text = @"未开始";
|
|
|
statusLabel.textColor = HexRGB(0xff802c);
|
|
|
- [self.bottomView.sureButton setTitle:@"进入教室" forState:UIControlStateNormal];
|
|
|
- [self.bottomView.sureButton setBackgroundColor:THEMECOLOR];
|
|
|
}
|
|
|
}
|
|
|
|