Commit 1bb1ac58 authored by 曹云霄's avatar 曹云霄

进入主题后,增加一个界面,包含该主题下的:课程分类。每个分类下的:课程列表。课程列表包含课程名称、课程学习进度,考试状态,考试得分信息

parent 54fe9a26
...@@ -161,7 +161,8 @@ ...@@ -161,7 +161,8 @@
commentCell.bestView.delegate = self; commentCell.bestView.delegate = self;
commentCell.indexPath = indexPath; commentCell.indexPath = indexPath;
commentCell.replyEntity = self.commentsArray[indexPath.row]; commentCell.replyEntity = self.commentsArray[indexPath.row];
commentCell.optionButton.hidden = ![self.topicDetail.posterId isEqualToString:[Shoppersmanager manager].Shoppers.employee.fid]; BOOL boolValue = ([self.topicDetail.posterId isEqualToString:[Shoppersmanager manager].Shoppers.employee.fid] || [self.topicDetail.category isEqualToString:OPPLE_ASK]);
commentCell.optionButton.hidden = boolValue;
return commentCell; return commentCell;
} }
......
...@@ -72,6 +72,10 @@ ...@@ -72,6 +72,10 @@
videoWindow.delegate = self; videoWindow.delegate = self;
[self addChildViewController:videoWindow]; [self addChildViewController:videoWindow];
[self.view addSubview:videoWindow.view]; [self.view addSubview:videoWindow.view];
//播放简介
VideoDetailViewController *playDetail = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoDetailViewController"];
[self addChildViewController:playDetail];
[self.view addSubview:playDetail.view];
//播放列表 //播放列表
VideoListViewController *playList = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"]; VideoListViewController *playList = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"];
playList.studyItemTitle = self.studyTypeEntity.name; playList.studyItemTitle = self.studyTypeEntity.name;
...@@ -79,10 +83,6 @@ ...@@ -79,10 +83,6 @@
videoWindow.progressDelegate = playList; videoWindow.progressDelegate = playList;
[self addChildViewController:playList]; [self addChildViewController:playList];
[self.view addSubview:playList.view]; [self.view addSubview:playList.view];
//播放简介
VideoDetailViewController *playDetail = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoDetailViewController"];
[self addChildViewController:playDetail];
[self.view addSubview:playDetail.view];
__weak typeof(videoWindow) weakVideWindow = videoWindow; __weak typeof(videoWindow) weakVideWindow = videoWindow;
//全屏 //全屏
WS(weakSelf); WS(weakSelf);
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
} }
}]; }];
videoWindow.view.frame = CGRectMake(0,NavigationHeight, ScreenWidth*2/3, ScreenHeight/2); videoWindow.view.frame = CGRectMake(0,NavigationHeight, ScreenWidth*2/3, ScreenHeight/2);
playList.view.frame = CGRectMake(ScreenWidth*2/3 + 5, NavigationHeight,ScreenWidth/3-5, ScreenHeight-64); playList.view.frame = CGRectMake(0, 64,ScreenWidth, ScreenHeight-64);
playDetail.view.frame = CGRectMake(0, ScreenHeight/2+NavigationHeight, ScreenWidth*2/3, ScreenHeight/2-NavigationHeight); playDetail.view.frame = CGRectMake(0, ScreenHeight/2+NavigationHeight, ScreenWidth*2/3, ScreenHeight/2-NavigationHeight);
} }
...@@ -165,17 +165,19 @@ ...@@ -165,17 +165,19 @@
#pragma mark - 选中学习项 #pragma mark - 选中学习项
- (void)seleStudyItemCellIndex:(NSIndexPath *)indexPath - (void)seleStudyItemCellIndex:(NSIndexPath *)indexPath
{ {
VideoDetailViewController *studyDetailVc = [self.childViewControllers lastObject]; //判断学习列表是否处于全屏状态,第一次选中是需要取消全屏状态
VideoListViewController *studyListVC = self.childViewControllers[2];
if (studyListVC.view.width == ScreenWidth) {
[studyListVC narrowAnimation];
}
VideoDetailViewController *studyDetailVc = self.childViewControllers[1];
studyDetailVc.indexPath = indexPath; studyDetailVc.indexPath = indexPath;
WS(weakSelf); WS(weakSelf);
VideoHelperViewController *videoVc = [self.childViewControllers firstObject]; VideoHelperViewController *videoVc = [self.childViewControllers firstObject];
RsStudyTask *studyEntity = self.studyResult.studyEntity[indexPath.section]; RsStudyTask *studyEntity = self.studyResult.studyEntity[indexPath.section];
CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row]; CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row];
videoVc.indexPath = indexPath; videoVc.indexPath = indexPath;
//学习列表
VideoListViewController *studyListVC = self.childViewControllers[1];
[studyListVC selectedIndexPath:indexPath withIsQualified:[studyList.examResult boolValue]]; [studyListVC selectedIndexPath:indexPath withIsQualified:[studyList.examResult boolValue]];
if ([studyList.attachment.fileUrl rangeOfString:@".mp4"].location != NSNotFound) { if ([studyList.attachment.fileUrl rangeOfString:@".mp4"].location != NSNotFound) {
//判断是否是第一次播放 //判断是否是第一次播放
if (videoVc.learningItem) { if (videoVc.learningItem) {
...@@ -347,9 +349,9 @@ ...@@ -347,9 +349,9 @@
if (result.studyEntity.count == 0) { if (result.studyEntity.count == 0) {
[XBLoadingView showHUDViewWithText:@"学习内容为空"];return; [XBLoadingView showHUDViewWithText:@"学习内容为空"];return;
} }
VideoListViewController *studyListVC = self.childViewControllers[1]; VideoListViewController *studyListVC = self.childViewControllers[2];
studyListVC.datasArray = [NSMutableArray arrayWithArray:result.studyEntity]; studyListVC.datasArray = [NSMutableArray arrayWithArray:result.studyEntity];
VideoDetailViewController *studyDetailsVC = self.childViewControllers[2]; VideoDetailViewController *studyDetailsVC = self.childViewControllers[1];
studyDetailsVC.datasArray = result.studyEntity; studyDetailsVC.datasArray = result.studyEntity;
studyDetailsVC.indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; studyDetailsVC.indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
} }
......
...@@ -59,4 +59,8 @@ ...@@ -59,4 +59,8 @@
*/ */
- (void)selectedIndexPath:(NSIndexPath *)indexPath withIsQualified:(BOOL)boolValue; - (void)selectedIndexPath:(NSIndexPath *)indexPath withIsQualified:(BOOL)boolValue;
/**
缩小
*/
- (void)narrowAnimation;
@end @end
...@@ -140,5 +140,14 @@ ...@@ -140,5 +140,14 @@
NSLog(@"%ld",proportion); NSLog(@"%ld",proportion);
} }
#pragma mark -缩小动画
- (void)narrowAnimation
{
[UIView animateWithDuration:0.3 animations:^{
self.view.frame = CGRectMake(ScreenWidth*2/3 + 5, NavigationHeight,ScreenWidth/3-5, ScreenHeight-64);
}];
}
@end @end
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) { if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) {
[XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return; [XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return;
} }
if ([self.inputRebateTextField.text floatValue] < 10 && [self.billType isEqualToString:redPackage]) { if ([self.inputRebateTextField.text floatValue] < 10 && [self.billType isEqualToString:REDPACKAGE]) {
[XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return; [XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return;
} }
if ([self includeChinese:self.inputRebateTextField.text]) { if ([self includeChinese:self.inputRebateTextField.text]) {
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
WS(weakSelf); WS(weakSelf);
RebateDetailsViewController *rebateDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"RebateDetailsViewController"]; RebateDetailsViewController *rebateDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"RebateDetailsViewController"];
rebateDetails.rebateAmount = (sender.tag == 100)?[self.resultEntity.accountTotal floatValue]:[self.resultEntity.redPackageAccountTotal floatValue]; rebateDetails.rebateAmount = (sender.tag == 100)?[self.resultEntity.accountTotal floatValue]:[self.resultEntity.redPackageAccountTotal floatValue];
rebateDetails.billType = (sender.tag == 100)?commission:redPackage; rebateDetails.billType = (sender.tag == 100)?COMMISSION:REDPACKAGE;
rebateDetails.bankCardNumber = [[self.resultEntity.bankCards firstObject] bankAccount]; rebateDetails.bankCardNumber = [[self.resultEntity.bankCards firstObject] bankAccount];
[rebateDetails setShowApplyDetails:^(TOApplyBillEntity *entity) { [rebateDetails setShowApplyDetails:^(TOApplyBillEntity *entity) {
WithdrawalTableViewController *detailVC = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"WithdrawalTableViewController"]; WithdrawalTableViewController *detailVC = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"WithdrawalTableViewController"];
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -608,9 +608,12 @@ extern NSString *const RECRUITTHROUGH; ...@@ -608,9 +608,12 @@ extern NSString *const RECRUITTHROUGH;
/** /**
* 返利 * 返利
*/ */
extern NSString *const commission; extern NSString *const COMMISSION;
/** /**
* 红包 * 红包
*/ */
extern NSString *const redPackage; extern NSString *const REDPACKAGE;
/**
* 欧普问问
*/
extern NSString *const OPPLE_ASK;
...@@ -606,13 +606,15 @@ NSString *const RECRUITTHROUGH = @"7"; ...@@ -606,13 +606,15 @@ NSString *const RECRUITTHROUGH = @"7";
/** /**
* 返利 * 返利
*/ */
NSString *const commission = @"commission"; NSString *const COMMISSION = @"commission";
/** /**
* 红包 * 红包
*/ */
NSString *const redPackage = @"redPackage"; NSString *const REDPACKAGE = @"redPackage";
/**
* 欧普问问
*/
NSString *const OPPLE_ASK = @"欧普问问";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment