|
@@ -22,7 +22,8 @@
|
|
#import "OnlineClassManager.h"
|
|
#import "OnlineClassManager.h"
|
|
#import "HomeworkDetailViewController.h"
|
|
#import "HomeworkDetailViewController.h"
|
|
#import "KSChatConversationViewController.h"
|
|
#import "KSChatConversationViewController.h"
|
|
-
|
|
|
|
|
|
+#import "OnlineClassManager.h"
|
|
|
|
+#import "AccompanyDetailBottomView.h"
|
|
|
|
|
|
@interface VipCouseDetailViewController ()<UITableViewDelegate,UITableViewDataSource,WMPlayerDelegate>
|
|
@interface VipCouseDetailViewController ()<UITableViewDelegate,UITableViewDataSource,WMPlayerDelegate>
|
|
{
|
|
{
|
|
@@ -47,6 +48,7 @@
|
|
|
|
|
|
@property (strong, nonatomic) MBProgressHUD *HUD;
|
|
@property (strong, nonatomic) MBProgressHUD *HUD;
|
|
|
|
|
|
|
|
+@property (nonatomic, strong) AccompanyDetailBottomView *bottomView;
|
|
|
|
|
|
@property (nonatomic, strong) OnlineClassManager *classManager;
|
|
@property (nonatomic, strong) OnlineClassManager *classManager;
|
|
|
|
|
|
@@ -122,10 +124,15 @@
|
|
// 老师布置过作业且没有点评 可以点击
|
|
// 老师布置过作业且没有点评 可以点击
|
|
if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
|
|
if (self.homeworkModel.reviewHomework == 1 || self.homeworkModel.decorateHomework == 0) {
|
|
self.canModify = NO;
|
|
self.canModify = NO;
|
|
-
|
|
|
|
|
|
+ self.bottomView.actionButton.userInteractionEnabled = NO;
|
|
|
|
+ self.bottomView.actionButton.backgroundColor = HexRGB(0xe5e5e5);
|
|
|
|
+ [self.bottomView.actionButton setTitleColor:HexRGB(0x666666) forState:UIControlStateNormal];
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
self.canModify = YES;
|
|
self.canModify = YES;
|
|
|
|
+ self.bottomView.actionButton.userInteractionEnabled = YES;
|
|
|
|
+ self.bottomView.actionButton.backgroundColor = THEMECOLOR;
|
|
|
|
+ [self.bottomView.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -158,14 +165,27 @@
|
|
if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
|
|
if ([self.homeworkModel.courseStatus isEqualToString:@"COMPLETE"]) {
|
|
statusLabel.text = @"已结束";
|
|
statusLabel.text = @"已结束";
|
|
statusLabel.textColor = HexRGB(0x999999);
|
|
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"]) {
|
|
else if ([self.homeworkModel.courseStatus isEqualToString:@"ING"]) {
|
|
statusLabel.text = @"进行中";
|
|
statusLabel.text = @"进行中";
|
|
statusLabel.textColor = THEMECOLOR;
|
|
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 {
|
|
else {
|
|
statusLabel.text = @"未开始";
|
|
statusLabel.text = @"未开始";
|
|
statusLabel.textColor = HexRGB(0xff802c);
|
|
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];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -480,6 +500,18 @@
|
|
return _classManager;
|
|
return _classManager;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (AccompanyDetailBottomView *)bottomView {
|
|
|
|
+ if (!_bottomView) {
|
|
|
|
+ _bottomView = [AccompanyDetailBottomView shareInstance];
|
|
|
|
+ _bottomView.frame = CGRectMake(0, 0, kScreenWidth, 70);
|
|
|
|
+ MJWeakSelf;
|
|
|
|
+ [_bottomView sureAction:^{
|
|
|
|
+ [weakSelf bottomButtonAction];
|
|
|
|
+ }];
|
|
|
|
+ }
|
|
|
|
+ return _bottomView;
|
|
|
|
+}
|
|
|
|
+
|
|
- (UITableView *)tableView {
|
|
- (UITableView *)tableView {
|
|
if (!_tableView) {
|
|
if (!_tableView) {
|
|
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
|
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
|
@@ -497,6 +529,7 @@
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyArrangeCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyArrangeCell"];
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyArrangeCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyArrangeCell"];
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyHomeworkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyHomeworkCell"];
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyHomeworkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyHomeworkCell"];
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyRemarkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyRemarkCell"];
|
|
[_tableView registerNib:[UINib nibWithNibName:@"AccompanyRemarkCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"AccompanyRemarkCell"];
|
|
|
|
+ _tableView.tableFooterView = self.bottomView;
|
|
}
|
|
}
|
|
return _tableView;
|
|
return _tableView;
|
|
}
|
|
}
|