Commit 2015f1e0 authored by 曹云霄's avatar 曹云霄

Merge branch 'master' of https://git.oschina.net/gomore/Opple-iOS

parents ceaa02d1 b5bec041
...@@ -32,6 +32,15 @@ ...@@ -32,6 +32,15 @@
*/ */
@property (weak, nonatomic) IBOutlet UILabel *contentLabel; @property (weak, nonatomic) IBOutlet UILabel *contentLabel;
/**
赞数量
*/
@property (weak, nonatomic) IBOutlet UILabel *praiseNumberLabel;
/**
评论数量
*/
@property (weak, nonatomic) IBOutlet UILabel *commentsNumberLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topLayoutConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topLayoutConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *essenceLayoutConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *essenceLayoutConstraint;
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
self.managerLayoutConstraint.constant = topicModel.backEnd?5:0; self.managerLayoutConstraint.constant = topicModel.backEnd?5:0;
self.contentLabel.text = topicModel.title; self.contentLabel.text = topicModel.title;
self.contentLabel.textColor = topicModel.isRead?[UIColor grayColor]:[UIColor blackColor]; self.contentLabel.textColor = topicModel.isRead?[UIColor grayColor]:[UIColor blackColor];
self.commentsNumberLabel.text = [NSString stringWithFormat:@"%ld",topicModel.replyCount];
self.praiseNumberLabel.text = [NSString stringWithFormat:@"%ld",topicModel.likeCount];
} }
@end @end
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
TOForumCategoryEntity *category = self.result.list[indexPath.row]; TOForumCategoryEntity *category = self.result.list[indexPath.row];
category.typeId = self.result.forumType.fid; category.typeId = self.result.forumType.fid;
itemListVc.category = category; itemListVc.category = category;
itemListVc.isPosting = 2; itemListVc.isPosting = [category.name isEqualToString:@"欧普问问"]?0:1;
[self.navigationController pushViewController:itemListVc animated:YES]; [self.navigationController pushViewController:itemListVc animated:YES];
} }
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
#pragma mark - 设置评论个数 #pragma mark - 设置评论个数
- (void)setUpCommentNumber - (void)setUpCommentNumber
{ {
self.commentNumberLabel.text = [NSString stringWithFormat:@"已有%ld条评论",(unsigned long)self.commentsArray.count]; self.commentNumberLabel.text = [NSString stringWithFormat:@"已有%ld条评论",(unsigned long)self.commentsArray.count - 2];
self.praiseButton.selected = !self.topicDetail.canLike; self.praiseButton.selected = !self.topicDetail.canLike;
WkWebViewViewController *webView = [self.childViewControllers firstObject]; WkWebViewViewController *webView = [self.childViewControllers firstObject];
webView.htmlString = self.topicDetail.content; webView.htmlString = self.topicDetail.content;
......
...@@ -150,7 +150,9 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell"; ...@@ -150,7 +150,9 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
CustomTOForumTopicEntity *entity = self.datasArray[indexPath.row]; CustomTOForumTopicEntity *entity = self.datasArray[indexPath.row];
if (entity.backEnd || entity.bestTopic || ![[self class] isBlankString:entity.top]) { if (entity.backEnd ||
entity.bestTopic ||
![[self class] isBlankString:entity.top]) {
CommentTagTableViewCell *tagCell = [tableView dequeueReusableCellWithIdentifier:TAGCELL_IDENTIFIER forIndexPath:indexPath]; CommentTagTableViewCell *tagCell = [tableView dequeueReusableCellWithIdentifier:TAGCELL_IDENTIFIER forIndexPath:indexPath];
[self configTagCellAction:tagCell withIndexPath:indexPath]; [self configTagCellAction:tagCell withIndexPath:indexPath];
return tagCell; return tagCell;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
三次重考机会 三次重考机会
*/ */
@property (nonatomic,assign) NSInteger retakeCount; @property (nonatomic,assign) NSInteger retakeCount;
@property (strong, nonatomic) TOStudyResultEntity *studyResult;
@end @end
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
self.retakeCount = 3; self.retakeCount = 3;
[self getExaminationQuestions]; [self getExaminationQuestions];
[self httpGetAnswerId];
} }
#pragma mark - 获取考题 #pragma mark - 获取考题
...@@ -156,9 +158,9 @@ ...@@ -156,9 +158,9 @@
#pragma mark - 提交考核结果 #pragma mark - 提交考核结果
- (void)submitAnswer - (void)submitAnswer
{ {
TOStudyResultEntity *studyResult = [[TOStudyResultEntity alloc]init]; TOStudyResultEntity *studyResult = self.studyResult;
studyResult.taskId = self.taskId; // studyResult.taskId = self.taskId;
studyResult.employeeId = [Shoppersmanager manager].shoppers.employee.fid; // studyResult.employeeId = [Shoppersmanager manager].shoppers.employee.fid;
studyResult.submitTime = [[NSDate date] httpParameterString]; studyResult.submitTime = [[NSDate date] httpParameterString];
NSArray *answerArray = self.taskDetails.topics; NSArray *answerArray = self.taskDetails.topics;
NSMutableArray *submitAnswerArray = [NSMutableArray array]; NSMutableArray *submitAnswerArray = [NSMutableArray array];
...@@ -244,6 +246,17 @@ ...@@ -244,6 +246,17 @@
}]; }];
} }
- (void)httpGetAnswerId {
WS(weakSelf);
NSString *url = [NSString stringWithFormat:@"/study/startExam/%@/%@", self.taskId, [Shoppersmanager manager].shoppers.employee.fid];
[HTTP networkRequestWithURL:SERVERREQUESTURL(url) withRequestType:(GET) withParameter:nil withReturnValueBlock:^(id returnValue) {
NSLog(@"%@", returnValue);
weakSelf.studyResult = [[TOStudyResultEntity alloc] initWithDictionary:RESPONSE(returnValue) error:nil];
} withFailureBlock:^(NSError *error) {
}];
}
#pragma mark - 判断得分是否及格 #pragma mark - 判断得分是否及格
- (void)determineIsQualified:(NSInteger)allScore - (void)determineIsQualified:(NSInteger)allScore
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
#import "BaseViewController.h" #import "BaseViewController.h"
#import "VideoListViewController.h"
@interface OnlineLearningDetailViewController : BaseViewController @interface OnlineLearningDetailViewController : BaseViewController
...@@ -17,6 +18,10 @@ ...@@ -17,6 +18,10 @@
*/ */
@property (nonatomic,copy) TOStudyTypeEntity *studyTypeEntity; @property (nonatomic,copy) TOStudyTypeEntity *studyTypeEntity;
/**
学习数据
*/
@property (nonatomic,strong) StudyTaskResponse *studyResult;
@property (strong, nonatomic) NSIndexPath *interIndex;
@end @end
...@@ -8,20 +8,15 @@ ...@@ -8,20 +8,15 @@
#import "OnlineLearningDetailViewController.h" #import "OnlineLearningDetailViewController.h"
#import "VideoHelperViewController.h" #import "VideoHelperViewController.h"
#import "VideoListViewController.h"
#import "VideoDetailViewController.h" #import "VideoDetailViewController.h"
#import "CustomWKWebViewController.h" #import "CustomWKWebViewController.h"
#import "LearningCompleteViewController.h" #import "LearningCompleteViewController.h"
#import "AssessmentViewController.h" #import "AssessmentViewController.h"
@interface OnlineLearningDetailViewController ()<SelectStudyItemDelegate,VideoPlayerDelegate,BeginAssessmentDelegate,InspectionStateDelegate> @interface OnlineLearningDetailViewController ()<SelectStudyItemDelegate,VideoPlayerDelegate,BeginAssessmentDelegate,InspectionStateDelegate>
/**
学习数据
*/
@property (nonatomic,strong) StudyTaskResponse *studyResult;
@property (nonatomic,strong) WYPopoverController *settingsPopoverController; @property (nonatomic,strong) WYPopoverController *settingsPopoverController;
@property (nonatomic, assign) BOOL isNotFirstIn;
@end @end
...@@ -32,10 +27,15 @@ ...@@ -32,10 +27,15 @@
- (void)viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated
{ {
[super viewDidAppear:animated]; [super viewDidAppear:animated];
self.navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO; // self.navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO; self.navigationController.interactivePopGestureRecognizer.enabled = NO;
} }
if (!self.isNotFirstIn) {
//播放进入选中的视频
self.isNotFirstIn = YES;
[self seleStudyItemCellIndex:self.interIndex];
}
} }
#pragma mark -视图即将消失 #pragma mark -视图即将消失
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
[self addChildViewController]; [self addChildViewController];
[self listeningHomeButton]; [self listeningHomeButton];
[self getStudyItemDetailAction];
[self transferData:self.studyResult];
} }
#pragma mark - 添加子控制器 #pragma mark - 添加子控制器
...@@ -79,10 +80,12 @@ ...@@ -79,10 +80,12 @@
//播放列表 //播放列表
VideoListViewController *playList = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"]; VideoListViewController *playList = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"];
playList.studyItemTitle = self.studyTypeEntity.name; playList.studyItemTitle = self.studyTypeEntity.name;
playList.type = VideoViewTypeDetail;
playList.delegate = self; playList.delegate = self;
videoWindow.progressDelegate = playList; videoWindow.progressDelegate = playList;
[self addChildViewController:playList]; [self addChildViewController:playList];
[self.view addSubview:playList.view]; [self.view addSubview:playList.view];
__weak typeof(videoWindow) weakVideWindow = videoWindow; __weak typeof(videoWindow) weakVideWindow = videoWindow;
//全屏 //全屏
WS(weakSelf); WS(weakSelf);
...@@ -102,7 +105,7 @@ ...@@ -102,7 +105,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(0, 64,ScreenWidth, ScreenHeight-64); playList.view.frame = CGRectMake(ScreenWidth*2/3 + 5, NavigationHeight,ScreenWidth/3-5, 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);
} }
...@@ -177,6 +180,7 @@ ...@@ -177,6 +180,7 @@
CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row]; CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row];
videoVc.indexPath = indexPath; videoVc.indexPath = indexPath;
[studyListVC selectedIndexPath:indexPath withIsQualified:[studyList.examResult boolValue]]; [studyListVC selectedIndexPath:indexPath withIsQualified:[studyList.examResult boolValue]];
// [self.superListVC 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) {
...@@ -193,6 +197,7 @@ ...@@ -193,6 +197,7 @@
pptVc.type = Study; pptVc.type = Study;
pptVc.indexPath = indexPath; pptVc.indexPath = indexPath;
videoVc.learningItem = nil; videoVc.learningItem = nil;
pptVc.studyId = studyList.fid;
[pptVc setScrollViewEndBottomBlock:^(NSIndexPath *indexPath){ [pptVc setScrollViewEndBottomBlock:^(NSIndexPath *indexPath){
[weakSelf dismissViewControllerAnimated:YES completion:^{ [weakSelf dismissViewControllerAnimated:YES completion:^{
[weakSelf videoPlayFinish:studyList withIndexPath:indexPath]; [weakSelf videoPlayFinish:studyList withIndexPath:indexPath];
...@@ -224,10 +229,21 @@ ...@@ -224,10 +229,21 @@
}]; }];
} }
#pragma mark - 学习完成,告诉服务器学习完成
- (void)httpStudyCompleteTaskId:(NSString *)taskId {
NSString *url = [NSString stringWithFormat:@"/study/finishStudy/%@/%@", taskId, [Shoppersmanager manager].shoppers.employee.fid];
[HTTP networkRequestWithURL:SERVERREQUESTURL(url) withRequestType:(GET) withParameter:nil withReturnValueBlock:^(id returnValue) {
NSLog(@"%@", returnValue);
} withFailureBlock:^(NSError *error) {
}];
}
#pragma mark - 视频播放完成 #pragma mark - 视频播放完成
- (void)videoPlayFinish:(CustomStudyEntity *)studyEntity withIndexPath:(NSIndexPath *)indexPath - (void)videoPlayFinish:(CustomStudyEntity *)studyEntity withIndexPath:(NSIndexPath *)indexPath
{ {
[self httpStudyCompleteTaskId:studyEntity.fid];
WS(weakSelf); WS(weakSelf);
[self studyFinishGetIntegral:^(NSString *integral) { [self studyFinishGetIntegral:^(NSString *integral) {
LearningCompleteViewController *assessmentVc = [[[weakSelf class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"LearningCompleteViewController"]; LearningCompleteViewController *assessmentVc = [[[weakSelf class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"LearningCompleteViewController"];
...@@ -297,6 +313,7 @@ ...@@ -297,6 +313,7 @@
videoWindow.playerLayer.frame = CGRectMake(0, 0, ScreenWidth*2/3, ScreenHeight/2); videoWindow.playerLayer.frame = CGRectMake(0, 0, ScreenWidth*2/3, ScreenHeight/2);
}completion:^(BOOL finished) { }completion:^(BOOL finished) {
[weakSelf assessment:studyEntity.fid withIndexPath:indexPath]; [weakSelf assessment:studyEntity.fid withIndexPath:indexPath];
}]; }];
}else { }else {
[weakSelf assessment:studyEntity.fid withIndexPath:indexPath]; [weakSelf assessment:studyEntity.fid withIndexPath:indexPath];
...@@ -322,6 +339,7 @@ ...@@ -322,6 +339,7 @@
{ {
VideoListViewController *studyListVC = self.childViewControllers[2]; VideoListViewController *studyListVC = self.childViewControllers[2];
[studyListVC selectedIndexPath:indexPath withIsQualified:NO]; [studyListVC selectedIndexPath:indexPath withIsQualified:NO];
// [self.superListVC selectedIndexPath:indexPath withIsQualified:NO];
[self seleStudyItemCellIndex:indexPath]; [self seleStudyItemCellIndex:indexPath];
} }
...@@ -330,6 +348,7 @@ ...@@ -330,6 +348,7 @@
{ {
VideoListViewController *studyListVC = self.childViewControllers[2]; VideoListViewController *studyListVC = self.childViewControllers[2];
[studyListVC selectedIndexPath:indexPath withIsQualified:YES]; [studyListVC selectedIndexPath:indexPath withIsQualified:YES];
// [self.superListVC selectedIndexPath:indexPath withIsQualified:YES];
} }
#pragma mark - <VideoPlayerDelegate> #pragma mark - <VideoPlayerDelegate>
...@@ -348,6 +367,7 @@ ...@@ -348,6 +367,7 @@
} }
VideoListViewController *studyListVC = self.childViewControllers[2]; VideoListViewController *studyListVC = self.childViewControllers[2];
studyListVC.datasArray = [NSMutableArray arrayWithArray:result.studyEntity]; studyListVC.datasArray = [NSMutableArray arrayWithArray:result.studyEntity];
// self.superListVC.datasArray = studyListVC.datasArray;
VideoDetailViewController *studyDetailsVC = self.childViewControllers[1]; 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];
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
#import "OnlineLearningViewController.h" #import "OnlineLearningViewController.h"
#import "OnlineLearningTableViewCell.h" #import "OnlineLearningTableViewCell.h"
#import "VideoListViewController.h"
#import "OnlineLearningDetailViewController.h" #import "OnlineLearningDetailViewController.h"
@interface OnlineLearningViewController ()<UICollectionViewDelegate,UICollectionViewDataSource> @interface OnlineLearningViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
...@@ -74,9 +76,44 @@ ...@@ -74,9 +76,44 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{ {
OnlineLearningDetailViewController *studyDetail = [[[self class] getLearningCenterStoryboardClass]instantiateViewControllerWithIdentifier:@"OnlineLearningDetailViewController"]; TOStudyTaskEntity *studyType = self.studyTypeArray[indexPath.row];;
studyDetail.studyTypeEntity = self.studyTypeArray[indexPath.row];
[self.navigationController pushViewController:studyDetail animated:YES]; VideoListViewController *listView = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"];
listView.studyType = studyType;
[self.navigationController pushViewController:listView animated:YES];
// WS(weakSelf);
// StudyTaskCondition *studyListModel = [[StudyTaskCondition alloc]init];
// studyListModel.employeeIdEquals = [Shoppersmanager manager].shoppers.employee.fid;
// studyListModel.typeEquals = studyType.fid;
// DataPage *page = [[DataPage alloc] init];
// page.page = ONE;
// page.rows = 9999;
// studyListModel.page = page;
// [XBLoadingView showHUDViewWithDefault];
// [HTTP networkRequestWithURL:SERVERREQUESTURL(STUDYLIST) withRequestType:ZERO withParameter:studyListModel withReturnValueBlock:^(id returnValue) {
//
// [XBLoadingView hideHUDViewWithDefault];
// if (RESULT(returnValue)) {
// StudyTaskResponse *responeseEty = [[StudyTaskResponse alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
// if (responeseEty.studyEntity.count == 0) {
// [XBLoadingView showHUDViewWithText:@"学习内容为空!"];
// return;
// }
//
// VideoListViewController *listView = [[[weakSelf class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"VideoListViewController"];
// [listView view];
//
// listView.datasArray = [NSMutableArray arrayWithArray:responeseEty.studyEntity];
// listView.studyTypeEntity = responeseEty;
// [weakSelf.navigationController pushViewController:listView animated:YES];
// }else {
// [XBLoadingView showHUDViewWithText:MESSAGE(returnValue)];
// }
//
// }withFailureBlock:^(NSError *error) {
// [XBLoadingView showHUDViewWithText:error.localizedDescription];
// }];
} }
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
#import "BaseViewController.h" #import "BaseViewController.h"
#import "VideoHelperViewController.h" #import "VideoHelperViewController.h"
typedef NS_ENUM(NSInteger, VideoViewType) {
VideoViewTypeList,
VideoViewTypeDetail
};
/** /**
选中学习项 选中学习项
...@@ -50,6 +53,18 @@ ...@@ -50,6 +53,18 @@
*/ */
@property (nonatomic,strong) NSMutableArray *datasArray; @property (nonatomic,strong) NSMutableArray *datasArray;
/**
学习项
*/
@property (nonatomic,copy) StudyTaskResponse *studyTypeEntity;
/**
页面是纯列表还是在详情旁边
*/
@property (nonatomic, assign) VideoViewType type;
@property (strong, nonatomic) TOStudyTaskEntity *studyType;
/** /**
刷新选中项 刷新选中项
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#import "VideoListItemTableViewCell.h" #import "VideoListItemTableViewCell.h"
#import "VideoListSectionHeaderView.h" #import "VideoListSectionHeaderView.h"
#import "PPTListItemTableViewCell.h" #import "PPTListItemTableViewCell.h"
#import "OnlineLearningDetailViewController.h"
@interface VideoListViewController ()<UITableViewDelegate,UITableViewDataSource> @interface VideoListViewController ()<UITableViewDelegate,UITableViewDataSource>
...@@ -24,6 +24,14 @@ ...@@ -24,6 +24,14 @@
[super viewDidLoad]; [super viewDidLoad];
[self setUpTableView]; [self setUpTableView];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (self.type == VideoViewTypeList) {
[self httpRequest];
}
} }
#pragma mark - 刷新选中项 #pragma mark - 刷新选中项
...@@ -46,6 +54,36 @@ ...@@ -46,6 +54,36 @@
} }
} }
- (void)httpRequest {
WS(weakSelf);
StudyTaskCondition *studyListModel = [[StudyTaskCondition alloc]init];
studyListModel.employeeIdEquals = [Shoppersmanager manager].shoppers.employee.fid;
studyListModel.typeEquals = self.studyType.fid;
DataPage *page = [[DataPage alloc] init];
page.page = ONE;
page.rows = 9999;
studyListModel.page = page;
[XBLoadingView showHUDViewWithDefault];
[HTTP networkRequestWithURL:SERVERREQUESTURL(STUDYLIST) withRequestType:ZERO withParameter:studyListModel withReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
if (RESULT(returnValue)) {
StudyTaskResponse *responeseEty = [[StudyTaskResponse alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
if (responeseEty.studyEntity.count == 0) {
[XBLoadingView showHUDViewWithText:@"学习内容为空!"];
return;
}
weakSelf.datasArray = [NSMutableArray arrayWithArray:responeseEty.studyEntity];
weakSelf.studyTypeEntity = responeseEty;
}else {
[XBLoadingView showHUDViewWithText:MESSAGE(returnValue)];
}
}withFailureBlock:^(NSError *error) {
[XBLoadingView showHUDViewWithText:error.localizedDescription];
}];
}
#pragma mark - 数据源 #pragma mark - 数据源
- (void)setDatasArray:(NSMutableArray *)datasArray - (void)setDatasArray:(NSMutableArray *)datasArray
...@@ -100,6 +138,7 @@ ...@@ -100,6 +138,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (self.type == VideoViewTypeDetail) {
//如果已经选中再次点击无效 //如果已经选中再次点击无效
UITableViewCell *playCell = [tableView cellForRowAtIndexPath:indexPath]; UITableViewCell *playCell = [tableView cellForRowAtIndexPath:indexPath];
if ([playCell isKindOfClass:[PPTListItemTableViewCell class]]) { if ([playCell isKindOfClass:[PPTListItemTableViewCell class]]) {
...@@ -127,6 +166,13 @@ ...@@ -127,6 +166,13 @@
if ([self.delegate respondsToSelector:@selector(seleStudyItemCellIndex:)]) { if ([self.delegate respondsToSelector:@selector(seleStudyItemCellIndex:)]) {
[self.delegate seleStudyItemCellIndex:indexPath]; [self.delegate seleStudyItemCellIndex:indexPath];
} }
}else if (self.type == VideoViewTypeList){
OnlineLearningDetailViewController *studyDetail = [[[self class] getLearningCenterStoryboardClass]instantiateViewControllerWithIdentifier:@"OnlineLearningDetailViewController"];
studyDetail.studyResult = self.studyTypeEntity;
studyDetail.interIndex = indexPath;
[self.navigationController pushViewController:studyDetail animated:YES];
}
} }
#pragma mark - 视频播放百分比 #pragma mark - 视频播放百分比
...@@ -137,7 +183,7 @@ ...@@ -137,7 +183,7 @@
CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row]; CustomStudyEntity *studyList = studyEntity.studyTasks[indexPath.row];
studyList.attachment.playPercent = [NSString stringWithFormat:@"%ld",proportion]; studyList.attachment.playPercent = [NSString stringWithFormat:@"%ld",proportion];
[videoPlayCell.studyProgressView updateChartByCurrent:@(proportion)]; [videoPlayCell.studyProgressView updateChartByCurrent:@(proportion)];
NSLog(@"%ld",proportion); NSLog(@"----%ld",proportion);
} }
#pragma mark -缩小动画 #pragma mark -缩小动画
......
...@@ -36,4 +36,9 @@ ...@@ -36,4 +36,9 @@
*/ */
@property (nonatomic,strong) CustomStudyEntity *model; @property (nonatomic,strong) CustomStudyEntity *model;
/**
开始答题按钮
*/
@property (weak, nonatomic) IBOutlet UIButton *btnStartAnswer;
@end @end
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "PPTListItemTableViewCell.h" #import "PPTListItemTableViewCell.h"
#import "AssessmentViewController.h"
@implementation PPTListItemTableViewCell @implementation PPTListItemTableViewCell
- (void)awakeFromNib { - (void)awakeFromNib {
...@@ -20,11 +20,26 @@ ...@@ -20,11 +20,26 @@
{ {
_model = model; _model = model;
self.studyItemTitleLabel.text = _model.title; self.studyItemTitleLabel.text = _model.title;
//考核状态 //考核状态
if ([BaseViewController isBlankString:_model.examResult] || [_model.examResult isEqualToString:@"0"]) { if ([BaseViewController isBlankString:_model.examResult] || [_model.examResult isEqualToString:@"0"]) {
self.examResultImageView.hidden = YES; self.examResultImageView.hidden = YES;
if (model.studyComplete == nil || !model.hasStudyTopic) {
self.btnStartAnswer.hidden = YES;
}else{
self.btnStartAnswer.hidden = NO;
}
}else { }else {
self.examResultImageView.hidden = NO; self.examResultImageView.hidden = NO;
self.btnStartAnswer.hidden = YES;
} }
} }
- (IBAction)actionStartAnswer:(id)sender {
AssessmentViewController *assessmentVc = [[AssessmentViewController getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"AssessmentViewController"];
assessmentVc.taskId = _model.fid;
// assessmentVc.indexPath = indexPath;
// assessmentVc.delegate = weakSelf;
[self.viewController.navigationController pushViewController:assessmentVc animated:YES];
}
@end @end
...@@ -47,5 +47,9 @@ ...@@ -47,5 +47,9 @@
*/ */
@property (weak, nonatomic) IBOutlet UIImageView *examResultImageView; @property (weak, nonatomic) IBOutlet UIImageView *examResultImageView;
/**
开始答题按钮
*/
@property (weak, nonatomic) IBOutlet UIButton *btnStartAnswer;
@end @end
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "VideoListItemTableViewCell.h" #import "VideoListItemTableViewCell.h"
#import "AssessmentViewController.h"
@implementation VideoListItemTableViewCell @implementation VideoListItemTableViewCell
- (void)awakeFromNib { - (void)awakeFromNib {
...@@ -32,9 +32,23 @@ ...@@ -32,9 +32,23 @@
//考核状态 //考核状态
if ([BaseViewController isBlankString:_model.examResult] || [_model.examResult isEqualToString:@"0"]) { if ([BaseViewController isBlankString:_model.examResult] || [_model.examResult isEqualToString:@"0"]) {
self.examResultImageView.hidden = YES; self.examResultImageView.hidden = YES;
if (model.studyComplete == nil || !model.hasStudyTopic) {
self.btnStartAnswer.hidden = YES;
}else{
self.btnStartAnswer.hidden = NO;
}
}else { }else {
self.examResultImageView.hidden = NO; self.examResultImageView.hidden = NO;
self.btnStartAnswer.hidden = YES;
} }
} }
- (IBAction)actionStartAnswer:(id)sender {
AssessmentViewController *assessmentVc = [[AssessmentViewController getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"AssessmentViewController"];
assessmentVc.taskId = _model.fid;
// assessmentVc.indexPath = indexPath;
// assessmentVc.delegate = weakSelf;
[self.viewController.navigationController pushViewController:assessmentVc animated:YES];
}
@end @end
...@@ -29,25 +29,24 @@ ...@@ -29,25 +29,24 @@
#import "HomeViewController.h" #import "HomeViewController.h"
#import "CustomWKWebViewController.h" #import "CustomWKWebViewController.h"
@interface CustomTabbarController () <TabbarButtonClickdelegate, ChangpasswordDelegate, CancelButtondelegate, UITextFieldDelegate>
@interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate,UITextFieldDelegate> @property (nonatomic, strong) NSArray *identifierArray;
@property (nonatomic,strong) NSArray *identifierArray;
/** /**
* 保存按钮引用 * 保存按钮引用
*/ */
@property (nonatomic,strong) UIButton *Newbutton; @property (nonatomic, strong) UIButton *Newbutton;
/** /**
* 控制器数组 * 控制器数组
*/ */
@property (nonatomic,strong) NSMutableArray *vcArray; @property (nonatomic, strong) NSMutableArray *vcArray;
/** /**
* 工具栏 * 工具栏
*/ */
@property (nonatomic,strong) Toolview *toolview; @property (nonatomic, strong) Toolview *toolview;
@end @end
...@@ -58,44 +57,37 @@ ...@@ -58,44 +57,37 @@
* *
* @return NSArary * @return NSArary
*/ */
- (NSArray *)identifierArray - (NSArray *)identifierArray {
{
if (_identifierArray == nil) { if (_identifierArray == nil) {
_identifierArray = [NSArray arrayWithObjects:@"HomeViewController",@"SearchViewController",@"ShoppingViewController",@"ClientViewController",@"RebateViewController",@"GuideIntegralViewController",@"AnnouncementViewController",@"MessageViewController",@"SceneLibraryViewController",@"ProductLibraryViewController",@"AllCustomerViewController",@"CustomerOrderViewController",@"LearningCenterMainViewController",@"AboutViewController", nil]; _identifierArray = [NSArray arrayWithObjects:@"HomeViewController", @"SearchViewController", @"ShoppingViewController", @"ClientViewController", @"RebateViewController", @"GuideIntegralViewController", @"AnnouncementViewController", @"MessageViewController", @"SceneLibraryViewController", @"ProductLibraryViewController", @"AllCustomerViewController", @"CustomerOrderViewController", @"LearningCenterMainViewController", @"AboutViewController", nil];
} }
return _identifierArray; return _identifierArray;
} }
- (NSMutableArray *)vcArray - (NSMutableArray *)vcArray {
{
if (!_vcArray) { if (!_vcArray) {
_vcArray = [NSMutableArray array]; _vcArray = [NSMutableArray array];
} }
return _vcArray; return _vcArray;
} }
- (void)viewWillAppear:(BOOL)animated {
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.selectedViewController beginAppearanceTransition: YES animated: animated]; [self.selectedViewController beginAppearanceTransition:YES animated:animated];
} }
-(void) viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated {
{
[super viewDidAppear:animated]; [super viewDidAppear:animated];
[self.selectedViewController endAppearanceTransition]; [self.selectedViewController endAppearanceTransition];
} }
-(void) viewWillDisappear:(BOOL)animated - (void)viewWillDisappear:(BOOL)animated {
{
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
[self.selectedViewController beginAppearanceTransition: NO animated: animated]; [self.selectedViewController beginAppearanceTransition:NO animated:animated];
} }
-(void) viewDidDisappear:(BOOL)animated - (void)viewDidDisappear:(BOOL)animated {
{
[super viewDidDisappear:animated]; [super viewDidDisappear:animated];
[self.selectedViewController endAppearanceTransition]; [self.selectedViewController endAppearanceTransition];
} }
...@@ -109,10 +101,9 @@ ...@@ -109,10 +101,9 @@
} }
#pragma mark -UI #pragma mark -UI
- (void)uiConfigAction - (void)uiConfigAction {
{
self.tabBar.frame = CGRectMake(ZERO, ZERO, ScreenWidth, NavigationHeight); self.tabBar.frame = CGRectMake(ZERO, ZERO, ScreenWidth, NavigationHeight);
self.toolview = [[Toolview alloc]initWithFrame:CGRectMake(ZERO, ZERO, ScreenWidth, NavigationHeight)]; self.toolview = [[Toolview alloc] initWithFrame:CGRectMake(ZERO, ZERO, ScreenWidth, NavigationHeight)];
self.toolview.delegate = self; self.toolview.delegate = self;
self.toolview.inputField.delegate = self; self.toolview.inputField.delegate = self;
self.delegate = self; self.delegate = self;
...@@ -121,8 +112,7 @@ ...@@ -121,8 +112,7 @@
} }
#pragma mark -监听通知 #pragma mark -监听通知
- (void)addNSNotification - (void)addNSNotification {
{
//显示体验中心 //显示体验中心
[Notification addObserver:self selector:@selector(showFollowHeart:) name:OPENFOLLOWHEARTVC object:nil]; [Notification addObserver:self selector:@selector(showFollowHeart:) name:OPENFOLLOWHEARTVC object:nil];
//显示体验中心3D //显示体验中心3D
...@@ -139,33 +129,31 @@ ...@@ -139,33 +129,31 @@
} }
#pragma mark -显示消息界面 #pragma mark -显示消息界面
- (void)showMessageController:(NSNotification *)object - (void)showMessageController:(NSNotification *)object {
{
self.selectedIndex = 6; self.selectedIndex = 6;
} }
#pragma mark -添加controller到viewControllers #pragma mark -添加controller到viewControllers
- (void)addViewcontroller - (void)addViewcontroller {
{
NSMutableArray *controllerArray = [NSMutableArray array]; NSMutableArray *controllerArray = [NSMutableArray array];
UIStoryboard *storyboard = nil; UIStoryboard *storyboard = nil;
for (int i=0; i<self.identifierArray.count; i++) { for (int i = 0; i < self.identifierArray.count; i++) {
NSString *controllString = self.identifierArray[i]; NSString *controllString = self.identifierArray[i];
// 公告 // 公告
if ([controllString isEqualToString:@"AnnouncementViewController"] || [controllString isEqualToString:@"MessageViewController"]) { if ([controllString isEqualToString:@"AnnouncementViewController"] || [controllString isEqualToString:@"MessageViewController"]) {
storyboard = [BaseViewController getAnnouncementStoryboardClass]; storyboard = [BaseViewController getAnnouncementStoryboardClass];
}else if ([controllString isEqualToString:@"LearningCenterMainViewController"]) { } else if ([controllString isEqualToString:@"LearningCenterMainViewController"]) {
// 学习中心 // 学习中心
storyboard = [BaseViewController getLearningCenterStoryboardClass]; storyboard = [BaseViewController getLearningCenterStoryboardClass];
}else if ([controllString isEqualToString:@"GuideIntegralViewController"]) { } else if ([controllString isEqualToString:@"GuideIntegralViewController"]) {
// 积分 // 积分
storyboard = [BaseViewController getGuideIntegralStoryboardClass]; storyboard = [BaseViewController getGuideIntegralStoryboardClass];
}else { } else {
storyboard = [BaseViewController getMainStoryboardClass]; storyboard = [BaseViewController getMainStoryboardClass];
} }
BaseViewController *control = [storyboard instantiateViewControllerWithIdentifier:self.identifierArray[i]]; BaseViewController *control = [storyboard instantiateViewControllerWithIdentifier:self.identifierArray[i]];
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:control]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:control];
[self.vcArray addObject:nav]; [self.vcArray addObject:nav];
[controllerArray addObject:control]; [controllerArray addObject:control];
} }
...@@ -175,7 +163,6 @@ ...@@ -175,7 +163,6 @@
self.selectedIndex = 0; self.selectedIndex = 0;
} }
#pragma mark -移除系统自带的UITabBarButton #pragma mark -移除系统自带的UITabBarButton
- (void)viewWillLayoutSubviews { - (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews]; [super viewWillLayoutSubviews];
...@@ -186,10 +173,8 @@ ...@@ -186,10 +173,8 @@
} }
} }
#pragma amrk - TabbarButtonClickdelegate代理
#pragma amrk -TabbarButtonClickdelegate代理 - (void)buttonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button {
- (void)buttonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button
{
[self.toolview.inputField resignFirstResponder]; [self.toolview.inputField resignFirstResponder];
[self dismissViewControllerAnimated:NO completion:nil]; [self dismissViewControllerAnimated:NO completion:nil];
_Newbutton = button; _Newbutton = button;
...@@ -200,30 +185,25 @@ ...@@ -200,30 +185,25 @@
[SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil]; [SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil];
break; break;
case MESSAGE: case MESSAGE: {
{
self.selectedIndex = 7; self.selectedIndex = 7;
} } break;
break; case NOTICE: {
case NOTICE:
{
self.selectedIndex = 6; self.selectedIndex = 6;
} } break;
break;
case SHOPPING_GUIDE: case SHOPPING_GUIDE:
{ {
UserViewController *userVC = [[UserViewController alloc]init]; UserViewController *userVC = [[UserViewController alloc] init];
userVC.delegate = self; userVC.delegate = self;
userVC.preferredContentSize = CGSizeMake(260, 230); userVC.preferredContentSize = CGSizeMake(260, 230);
userVC.modalPresentationStyle = UIModalPresentationPopover; userVC.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = userVC.popoverPresentationController; UIPopoverPresentationController *pop = userVC.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = userVC.view; pop.sourceView = userVC.view;
pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button]; pop.barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
[self presentViewController:userVC animated:YES completion:nil]; [self presentViewController:userVC animated:YES completion:nil];
} } break;
break;
case CUSTOMER: case CUSTOMER:
self.selectedIndex = 3; self.selectedIndex = 3;
...@@ -234,7 +214,7 @@ ...@@ -234,7 +214,7 @@
if (![Shoppersmanager manager].currentCustomer) { if (![Shoppersmanager manager].currentCustomer) {
[XBLoadingView showHUDViewWithText:@"必须设置当前客户才能访问购物车"]; [XBLoadingView showHUDViewWithText:@"必须设置当前客户才能访问购物车"];
}else{ } else {
self.selectedIndex = 2; self.selectedIndex = 2;
} }
...@@ -247,48 +227,47 @@ ...@@ -247,48 +227,47 @@
} }
#pragma mark -修改密码点击 #pragma mark -修改密码点击
- (void)changPasswordButtonClick - (void)changPasswordButtonClick {
{ [self dismissViewControllerAnimated:NO
[self dismissViewControllerAnimated:NO completion:^{ completion:^{
ChangePasswordViewController *changpassword = [[ChangePasswordViewController alloc]init]; ChangePasswordViewController *changpassword = [[ChangePasswordViewController alloc] init];
changpassword.delegate = self; changpassword.delegate = self;
changpassword.preferredContentSize = CGSizeMake(260, 180); changpassword.preferredContentSize = CGSizeMake(260, 180);
changpassword.modalPresentationStyle = UIModalPresentationPopover; changpassword.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = changpassword.popoverPresentationController; UIPopoverPresentationController *pop = changpassword.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = changpassword.view; pop.sourceView = changpassword.view;
pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:_Newbutton]; pop.barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:_Newbutton];
[self presentViewController:changpassword animated:YES completion:nil]; [self presentViewController:changpassword animated:YES completion:nil];
}]; }];
} }
#pragma mark -取消按钮 #pragma mark -取消按钮
- (void)cancelButtonClick - (void)cancelButtonClick {
{ [self dismissViewControllerAnimated:NO
[self dismissViewControllerAnimated:NO completion:^{ completion:^{
UserViewController *userVC = [[UserViewController alloc]init]; UserViewController *userVC = [[UserViewController alloc] init];
userVC.delegate = self; userVC.delegate = self;
userVC.preferredContentSize = CGSizeMake(260, 230); userVC.preferredContentSize = CGSizeMake(260, 230);
userVC.modalPresentationStyle = UIModalPresentationPopover; userVC.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = userVC.popoverPresentationController; UIPopoverPresentationController *pop = userVC.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = userVC.view; pop.sourceView = userVC.view;
pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:_Newbutton]; pop.barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:_Newbutton];
[self presentViewController:userVC animated:YES completion:nil]; [self presentViewController:userVC animated:YES completion:nil];
}]; }];
} }
#pragma mark -二维码扫描 #pragma mark -二维码扫描
- (void)qrcodeButtonClick - (void)qrcodeButtonClick {
{
WS(weakSelf); WS(weakSelf);
// 判断应用是否有使用相机的权限 // 判断应用是否有使用相机的权限
if(![BaseViewController determineCameraPermissions]){ if (![BaseViewController determineCameraPermissions]) {
ShowAlertView(self, @"提示", @"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机", nil, @"知道了", UIAlertControllerStyleAlert, nil, nil); ShowAlertView(self, @"提示", @"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机", nil, @"知道了", UIAlertControllerStyleAlert, nil, nil);
}else { } else {
QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) { QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) {
[weakSelf dismissViewControllerAnimated:YES completion:^{ [weakSelf dismissViewControllerAnimated:YES
completion:^{
ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:8]; ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:8];
product.barcode = url; product.barcode = url;
SHARED_APPDELEGATE.lineView.hidden = YES; SHARED_APPDELEGATE.lineView.hidden = YES;
...@@ -301,17 +280,14 @@ ...@@ -301,17 +280,14 @@
} }
} }
#pragma mark -搜索框代理方法 #pragma mark -搜索框代理方法
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
{
self.selectedIndex = 1; self.selectedIndex = 1;
return YES; return YES;
} }
#pragma mark -Search按钮 #pragma mark -Search按钮
- (BOOL)textFieldShouldReturn:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField {
{
if (![BaseViewController isBlankString:textField.text]) { if (![BaseViewController isBlankString:textField.text]) {
[textField resignFirstResponder]; [textField resignFirstResponder];
[Notification postNotificationName:SEARCHSTRING object:textField.text]; [Notification postNotificationName:SEARCHSTRING object:textField.text];
...@@ -320,31 +296,27 @@ ...@@ -320,31 +296,27 @@
} }
#pragma mark -自定义选中 #pragma mark -自定义选中
- (void)setSelectedIndex:(NSUInteger)selectedIndex - (void)setSelectedIndex:(NSUInteger)selectedIndex {
{
[super setSelectedIndex:selectedIndex]; [super setSelectedIndex:selectedIndex];
[self didSelectNavigationController:[SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex]]; [self didSelectNavigationController:[SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:selectedIndex]];
} }
#pragma mark -返回根视图控制器 #pragma mark -返回根视图控制器
- (void)didSelectNavigationController:(UIViewController *)viewController - (void)didSelectNavigationController:(UIViewController *)viewController {
{ if ([[viewController.navigationController.viewControllers firstObject] isKindOfClass:NSClassFromString(@"UIMoreListController")]) {
if ([[viewController.navigationController.viewControllers firstObject] isKindOfClass:NSClassFromString(@"UIMoreListController")]){
[viewController.navigationController popToViewController:viewController.navigationController.viewControllers[1] animated:YES]; [viewController.navigationController popToViewController:viewController.navigationController.viewControllers[1] animated:YES];
}else{ } else {
[viewController.navigationController popToRootViewControllerAnimated:YES]; [viewController.navigationController popToRootViewControllerAnimated:YES];
} }
} }
#pragma mark - 切换tabbar selectedIndex #pragma mark - 切换tabbar selectedIndex
- (void)switchSelectedIndex:(NSInteger)selectedIndex - (void)switchSelectedIndex:(NSInteger)selectedIndex {
{ [self.toolview switchLineViewOrigin:selectedIndex - 100];
[self.toolview switchLineViewOrigin:selectedIndex-100];
} }
#pragma mark -推出体验中心控制器 #pragma mark -推出体验中心控制器
- (void)showFollowHeart:(NSNotification *)objc - (void)showFollowHeart:(NSNotification *)objc {
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"OppleMain" bundle:nil]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"OppleMain" bundle:nil];
ExperienceCentreViewController *ExperienceCenter = [storyboard instantiateViewControllerWithIdentifier:@"ExperienceCentre"]; ExperienceCentreViewController *ExperienceCenter = [storyboard instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen; ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
......
...@@ -740,7 +740,7 @@ ...@@ -740,7 +740,7 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</imageView> </imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="6" translatesAutoresizingMaskIntoConstraints="NO" id="IqG-JD-duE"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="6" translatesAutoresizingMaskIntoConstraints="NO" id="IqG-JD-duE">
<rect key="frame" x="11" y="11" width="49" height="49"/> <rect key="frame" x="0.5" y="0.5" width="70" height="70"/>
</imageView> </imageView>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
...@@ -749,10 +749,10 @@ ...@@ -749,10 +749,10 @@
<constraint firstItem="IqG-JD-duE" firstAttribute="centerY" secondItem="8EW-Uh-ADi" secondAttribute="centerY" id="AJ5-A1-TlC"/> <constraint firstItem="IqG-JD-duE" firstAttribute="centerY" secondItem="8EW-Uh-ADi" secondAttribute="centerY" id="AJ5-A1-TlC"/>
<constraint firstAttribute="width" constant="70" id="DcG-qZ-6ck"/> <constraint firstAttribute="width" constant="70" id="DcG-qZ-6ck"/>
<constraint firstItem="8RZ-lL-fYj" firstAttribute="top" secondItem="8EW-Uh-ADi" secondAttribute="top" id="GAw-gy-0dW"/> <constraint firstItem="8RZ-lL-fYj" firstAttribute="top" secondItem="8EW-Uh-ADi" secondAttribute="top" id="GAw-gy-0dW"/>
<constraint firstItem="IqG-JD-duE" firstAttribute="width" secondItem="8EW-Uh-ADi" secondAttribute="width" multiplier="0.7" id="Zws-Mt-aWP"/> <constraint firstItem="IqG-JD-duE" firstAttribute="width" secondItem="8EW-Uh-ADi" secondAttribute="width" id="Zws-Mt-aWP"/>
<constraint firstAttribute="bottom" secondItem="8RZ-lL-fYj" secondAttribute="bottom" id="brm-mS-2EF"/> <constraint firstAttribute="bottom" secondItem="8RZ-lL-fYj" secondAttribute="bottom" id="brm-mS-2EF"/>
<constraint firstItem="8RZ-lL-fYj" firstAttribute="leading" secondItem="8EW-Uh-ADi" secondAttribute="leading" id="enl-m6-GyB"/> <constraint firstItem="8RZ-lL-fYj" firstAttribute="leading" secondItem="8EW-Uh-ADi" secondAttribute="leading" id="enl-m6-GyB"/>
<constraint firstItem="IqG-JD-duE" firstAttribute="height" secondItem="8EW-Uh-ADi" secondAttribute="height" multiplier="0.7" id="ete-FU-849"/> <constraint firstItem="IqG-JD-duE" firstAttribute="height" secondItem="8EW-Uh-ADi" secondAttribute="height" id="ete-FU-849"/>
<constraint firstAttribute="height" constant="70" id="gy4-jc-uPa"/> <constraint firstAttribute="height" constant="70" id="gy4-jc-uPa"/>
<constraint firstAttribute="trailing" secondItem="8RZ-lL-fYj" secondAttribute="trailing" id="mzL-zl-urq"/> <constraint firstAttribute="trailing" secondItem="8RZ-lL-fYj" secondAttribute="trailing" id="mzL-zl-urq"/>
</constraints> </constraints>
...@@ -953,27 +953,63 @@ ...@@ -953,27 +953,63 @@
<constraint firstAttribute="height" constant="1" id="yuc-aw-rYR"/> <constraint firstAttribute="height" constant="1" id="yuc-aw-rYR"/>
</constraints> </constraints>
</view> </view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="comments" translatesAutoresizingMaskIntoConstraints="NO" id="AoV-WJ-RVy">
<rect key="frame" x="948" y="23" width="16" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="7x4-li-6XI"/>
<constraint firstAttribute="width" constant="16" id="rN3-fF-uCA"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="praise" translatesAutoresizingMaskIntoConstraints="NO" id="VjW-Gd-5ow">
<rect key="frame" x="872" y="23" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="7wm-8g-BL2"/>
<constraint firstAttribute="height" constant="16" id="loS-iC-kfq"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mfP-fo-Y85">
<rect key="frame" x="976" y="23" width="8" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.34509803919999998" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="96g-AX-Rc9">
<rect key="frame" x="900" y="23" width="8" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.34509803919999998" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="mfP-fo-Y85" firstAttribute="leading" secondItem="AoV-WJ-RVy" secondAttribute="trailing" constant="12" id="28c-eN-9up"/>
<constraint firstItem="VjW-Gd-5ow" firstAttribute="centerY" secondItem="96g-AX-Rc9" secondAttribute="centerY" id="7Rk-rf-5It"/>
<constraint firstItem="XzE-Dv-zTS" firstAttribute="leading" secondItem="qU3-0u-hUa" secondAttribute="trailing" constant="5" id="9tQ-Yy-82J"/> <constraint firstItem="XzE-Dv-zTS" firstAttribute="leading" secondItem="qU3-0u-hUa" secondAttribute="trailing" constant="5" id="9tQ-Yy-82J"/>
<constraint firstItem="qU3-0u-hUa" firstAttribute="leading" secondItem="bBg-hV-7Lb" secondAttribute="leading" constant="30" id="AfN-OP-TQ8"/> <constraint firstItem="qU3-0u-hUa" firstAttribute="leading" secondItem="bBg-hV-7Lb" secondAttribute="leading" constant="30" id="AfN-OP-TQ8"/>
<constraint firstAttribute="trailing" secondItem="0Cp-yb-MAi" secondAttribute="trailing" id="BlK-vc-Ugk"/> <constraint firstAttribute="trailing" secondItem="0Cp-yb-MAi" secondAttribute="trailing" id="BlK-vc-Ugk"/>
<constraint firstAttribute="trailing" secondItem="mfP-fo-Y85" secondAttribute="trailing" constant="40" id="FSH-Iq-NNW"/>
<constraint firstAttribute="bottom" secondItem="0Cp-yb-MAi" secondAttribute="bottom" id="QQ2-BD-4BF"/> <constraint firstAttribute="bottom" secondItem="0Cp-yb-MAi" secondAttribute="bottom" id="QQ2-BD-4BF"/>
<constraint firstItem="AoV-WJ-RVy" firstAttribute="leading" secondItem="96g-AX-Rc9" secondAttribute="trailing" constant="40" id="QzL-so-lJV"/>
<constraint firstItem="96g-AX-Rc9" firstAttribute="leading" secondItem="VjW-Gd-5ow" secondAttribute="trailing" constant="12" id="RC3-Hn-Qhq"/>
<constraint firstItem="Ld5-TG-qAF" firstAttribute="leading" secondItem="TTI-18-E2i" secondAttribute="trailing" constant="5" id="dEu-O2-ZDU"/> <constraint firstItem="Ld5-TG-qAF" firstAttribute="leading" secondItem="TTI-18-E2i" secondAttribute="trailing" constant="5" id="dEu-O2-ZDU"/>
<constraint firstItem="AoV-WJ-RVy" firstAttribute="centerY" secondItem="mfP-fo-Y85" secondAttribute="centerY" id="dyM-QN-Ax1"/>
<constraint firstItem="mfP-fo-Y85" firstAttribute="centerY" secondItem="bBg-hV-7Lb" secondAttribute="centerY" id="eGI-OF-kJi"/>
<constraint firstItem="XzE-Dv-zTS" firstAttribute="centerY" secondItem="qU3-0u-hUa" secondAttribute="centerY" id="fnF-V3-VsT"/> <constraint firstItem="XzE-Dv-zTS" firstAttribute="centerY" secondItem="qU3-0u-hUa" secondAttribute="centerY" id="fnF-V3-VsT"/>
<constraint firstItem="qU3-0u-hUa" firstAttribute="centerY" secondItem="bBg-hV-7Lb" secondAttribute="centerY" id="m2e-ni-acW"/> <constraint firstItem="qU3-0u-hUa" firstAttribute="centerY" secondItem="bBg-hV-7Lb" secondAttribute="centerY" id="m2e-ni-acW"/>
<constraint firstItem="0Cp-yb-MAi" firstAttribute="leading" secondItem="bBg-hV-7Lb" secondAttribute="leading" id="ntm-s2-9kd"/> <constraint firstItem="0Cp-yb-MAi" firstAttribute="leading" secondItem="bBg-hV-7Lb" secondAttribute="leading" id="ntm-s2-9kd"/>
<constraint firstItem="TTI-18-E2i" firstAttribute="centerY" secondItem="XzE-Dv-zTS" secondAttribute="centerY" id="psG-Il-Ggb"/> <constraint firstItem="TTI-18-E2i" firstAttribute="centerY" secondItem="XzE-Dv-zTS" secondAttribute="centerY" id="psG-Il-Ggb"/>
<constraint firstItem="96g-AX-Rc9" firstAttribute="centerY" secondItem="AoV-WJ-RVy" secondAttribute="centerY" id="vIG-NE-wHb"/>
<constraint firstItem="TTI-18-E2i" firstAttribute="leading" secondItem="XzE-Dv-zTS" secondAttribute="trailing" constant="5" id="vZt-6s-Qcn"/> <constraint firstItem="TTI-18-E2i" firstAttribute="leading" secondItem="XzE-Dv-zTS" secondAttribute="trailing" constant="5" id="vZt-6s-Qcn"/>
<constraint firstItem="Ld5-TG-qAF" firstAttribute="centerY" secondItem="TTI-18-E2i" secondAttribute="centerY" id="xCt-cZ-91v"/> <constraint firstItem="Ld5-TG-qAF" firstAttribute="centerY" secondItem="TTI-18-E2i" secondAttribute="centerY" id="xCt-cZ-91v"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<connections> <connections>
<outlet property="commentsNumberLabel" destination="mfP-fo-Y85" id="LEE-Ir-Cbg"/>
<outlet property="contentLabel" destination="Ld5-TG-qAF" id="dSm-97-Urq"/> <outlet property="contentLabel" destination="Ld5-TG-qAF" id="dSm-97-Urq"/>
<outlet property="essenceLabel" destination="XzE-Dv-zTS" id="QuW-8v-lK8"/> <outlet property="essenceLabel" destination="XzE-Dv-zTS" id="QuW-8v-lK8"/>
<outlet property="essenceLayoutConstraint" destination="vZt-6s-Qcn" id="jl8-yw-m7I"/> <outlet property="essenceLayoutConstraint" destination="vZt-6s-Qcn" id="jl8-yw-m7I"/>
<outlet property="managerLabel" destination="TTI-18-E2i" id="GRN-h4-Eca"/> <outlet property="managerLabel" destination="TTI-18-E2i" id="GRN-h4-Eca"/>
<outlet property="managerLayoutConstraint" destination="dEu-O2-ZDU" id="TgO-LU-Wmr"/> <outlet property="managerLayoutConstraint" destination="dEu-O2-ZDU" id="TgO-LU-Wmr"/>
<outlet property="praiseNumberLabel" destination="96g-AX-Rc9" id="gkW-cV-QM2"/>
<outlet property="topLabel" destination="qU3-0u-hUa" id="yiH-hc-wiN"/> <outlet property="topLabel" destination="qU3-0u-hUa" id="yiH-hc-wiN"/>
<outlet property="topLayoutConstraint" destination="9tQ-Yy-82J" id="2Wj-ia-9aa"/> <outlet property="topLayoutConstraint" destination="9tQ-Yy-82J" id="2Wj-ia-9aa"/>
</connections> </connections>
...@@ -2481,6 +2517,17 @@ ...@@ -2481,6 +2517,17 @@
<constraint firstAttribute="height" constant="1" id="wjU-cG-Cbi"/> <constraint firstAttribute="height" constant="1" id="wjU-cG-Cbi"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kEq-ur-qoX">
<rect key="frame" x="330" y="10" width="70" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="70" id="AyV-pl-VGJ"/>
<constraint firstAttribute="height" constant="30" id="oBJ-gK-mHg"/>
</constraints>
<state key="normal" title="开始答题"/>
<connections>
<action selector="actionStartAnswer:" destination="YXo-b3-NKo" eventType="touchUpInside" id="Bgd-Lu-ItT"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="Ast-eO-9V0" firstAttribute="centerY" secondItem="FNL-Q4-kdY" secondAttribute="centerY" id="4D8-Yl-tb5"/> <constraint firstItem="Ast-eO-9V0" firstAttribute="centerY" secondItem="FNL-Q4-kdY" secondAttribute="centerY" id="4D8-Yl-tb5"/>
...@@ -2490,6 +2537,7 @@ ...@@ -2490,6 +2537,7 @@
<constraint firstItem="BVg-HN-E2s" firstAttribute="leading" secondItem="cny-PA-JpH" secondAttribute="trailing" constant="10" id="FeY-kV-5zF"/> <constraint firstItem="BVg-HN-E2s" firstAttribute="leading" secondItem="cny-PA-JpH" secondAttribute="trailing" constant="10" id="FeY-kV-5zF"/>
<constraint firstAttribute="trailing" secondItem="fYk-7O-XdO" secondAttribute="trailing" id="Hs3-xl-h3f"/> <constraint firstAttribute="trailing" secondItem="fYk-7O-XdO" secondAttribute="trailing" id="Hs3-xl-h3f"/>
<constraint firstItem="FNL-Q4-kdY" firstAttribute="leading" secondItem="Zsh-Nm-SGv" secondAttribute="leading" constant="12" id="IKT-GZ-UfU"/> <constraint firstItem="FNL-Q4-kdY" firstAttribute="leading" secondItem="Zsh-Nm-SGv" secondAttribute="leading" constant="12" id="IKT-GZ-UfU"/>
<constraint firstItem="BVg-HN-E2s" firstAttribute="leading" secondItem="kEq-ur-qoX" secondAttribute="trailing" constant="9" id="Izj-z7-6cb"/>
<constraint firstItem="0QA-OC-BkN" firstAttribute="centerY" secondItem="FNL-Q4-kdY" secondAttribute="centerY" id="KVJ-bY-0gc"/> <constraint firstItem="0QA-OC-BkN" firstAttribute="centerY" secondItem="FNL-Q4-kdY" secondAttribute="centerY" id="KVJ-bY-0gc"/>
<constraint firstItem="cny-PA-JpH" firstAttribute="centerY" secondItem="BVg-HN-E2s" secondAttribute="centerY" id="Odt-ir-59j"/> <constraint firstItem="cny-PA-JpH" firstAttribute="centerY" secondItem="BVg-HN-E2s" secondAttribute="centerY" id="Odt-ir-59j"/>
<constraint firstItem="0QA-OC-BkN" firstAttribute="leading" secondItem="FNL-Q4-kdY" secondAttribute="trailing" constant="20" id="Qc4-J9-Joq"/> <constraint firstItem="0QA-OC-BkN" firstAttribute="leading" secondItem="FNL-Q4-kdY" secondAttribute="trailing" constant="20" id="Qc4-J9-Joq"/>
...@@ -2497,9 +2545,11 @@ ...@@ -2497,9 +2545,11 @@
<constraint firstAttribute="trailing" secondItem="Ast-eO-9V0" secondAttribute="trailing" constant="15" id="Xih-52-5hy"/> <constraint firstAttribute="trailing" secondItem="Ast-eO-9V0" secondAttribute="trailing" constant="15" id="Xih-52-5hy"/>
<constraint firstItem="Ast-eO-9V0" firstAttribute="leading" secondItem="BVg-HN-E2s" secondAttribute="trailing" constant="10" id="i3G-EM-h4h"/> <constraint firstItem="Ast-eO-9V0" firstAttribute="leading" secondItem="BVg-HN-E2s" secondAttribute="trailing" constant="10" id="i3G-EM-h4h"/>
<constraint firstItem="BVg-HN-E2s" firstAttribute="leading" secondItem="0QA-OC-BkN" secondAttribute="trailing" constant="20" id="igE-qL-tRe"/> <constraint firstItem="BVg-HN-E2s" firstAttribute="leading" secondItem="0QA-OC-BkN" secondAttribute="trailing" constant="20" id="igE-qL-tRe"/>
<constraint firstItem="kEq-ur-qoX" firstAttribute="centerY" secondItem="0QA-OC-BkN" secondAttribute="centerY" id="mXX-oH-lQ1"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<connections> <connections>
<outlet property="btnStartAnswer" destination="kEq-ur-qoX" id="Mfo-QQ-ha3"/>
<outlet property="examResultImageView" destination="cny-PA-JpH" id="R7t-ol-rAq"/> <outlet property="examResultImageView" destination="cny-PA-JpH" id="R7t-ol-rAq"/>
<outlet property="playButton" destination="FNL-Q4-kdY" id="Abd-Au-JQk"/> <outlet property="playButton" destination="FNL-Q4-kdY" id="Abd-Au-JQk"/>
<outlet property="seekbarView" destination="BVg-HN-E2s" id="Ngx-Ju-zff"/> <outlet property="seekbarView" destination="BVg-HN-E2s" id="Ngx-Ju-zff"/>
...@@ -2549,8 +2599,21 @@ ...@@ -2549,8 +2599,21 @@
<constraint firstAttribute="height" constant="1" id="sBH-lC-hCS"/> <constraint firstAttribute="height" constant="1" id="sBH-lC-hCS"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cSM-mJ-Ih8">
<rect key="frame" x="337" y="10" width="70" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="AhY-XM-AIa"/>
<constraint firstAttribute="width" constant="70" id="dZU-Xt-mQu"/>
</constraints>
<state key="normal" title="开始答题"/>
<connections>
<action selector="actionStartAnswer:" destination="OSF-93-RuO" eventType="touchUpInside" id="GlH-hr-1xT"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="cSM-mJ-Ih8" firstAttribute="centerY" secondItem="IQr-pV-6ZO" secondAttribute="centerY" id="1Dw-hQ-AZN"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="cSM-mJ-Ih8" secondAttribute="trailing" constant="50" id="9bb-a8-pJP"/>
<constraint firstItem="Gwb-yp-kzF" firstAttribute="centerY" secondItem="t1Q-41-RAj" secondAttribute="centerY" id="Lvf-ms-adf"/> <constraint firstItem="Gwb-yp-kzF" firstAttribute="centerY" secondItem="t1Q-41-RAj" secondAttribute="centerY" id="Lvf-ms-adf"/>
<constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="6O1-Dg-ELo" secondAttribute="trailing" constant="20" id="P2g-cX-AOe"/> <constraint firstItem="t1Q-41-RAj" firstAttribute="leading" secondItem="6O1-Dg-ELo" secondAttribute="trailing" constant="20" id="P2g-cX-AOe"/>
<constraint firstAttribute="bottom" secondItem="SCg-SR-kAg" secondAttribute="bottom" id="PQy-Zh-wy0"/> <constraint firstAttribute="bottom" secondItem="SCg-SR-kAg" secondAttribute="bottom" id="PQy-Zh-wy0"/>
...@@ -2566,6 +2629,7 @@ ...@@ -2566,6 +2629,7 @@
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<connections> <connections>
<outlet property="btnStartAnswer" destination="cSM-mJ-Ih8" id="phi-7Q-oZT"/>
<outlet property="examResultImageView" destination="Gwb-yp-kzF" id="Ftr-TR-W7i"/> <outlet property="examResultImageView" destination="Gwb-yp-kzF" id="Ftr-TR-W7i"/>
<outlet property="pptButton" destination="j7R-oP-wMP" id="m7u-ia-zmb"/> <outlet property="pptButton" destination="j7R-oP-wMP" id="m7u-ia-zmb"/>
<outlet property="studyItemLabel" destination="t1Q-41-RAj" id="jCw-CL-C3l"/> <outlet property="studyItemLabel" destination="t1Q-41-RAj" id="jCw-CL-C3l"/>
...@@ -2631,7 +2695,7 @@ ...@@ -2631,7 +2695,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="9lH-c2-zzY" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="9lH-c2-zzY" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="3254" y="-1528"/> <point key="canvasLocation" x="3177" y="-1611"/>
</scene> </scene>
<!--Assessment View Controller--> <!--Assessment View Controller-->
<scene sceneID="2bA-hi-BSu"> <scene sceneID="2bA-hi-BSu">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="ijs-ag-b7Y"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="ijs-ag-b7Y">
<device id="ipad9_7" orientation="landscape"> <device id="ipad9_7" orientation="landscape">
<adaptation id="fullscreen"/> <adaptation id="fullscreen"/>
</device> </device>
...@@ -1306,7 +1306,7 @@ ...@@ -1306,7 +1306,7 @@
<rect key="frame" x="0.0" y="55.5" width="1024" height="182"/> <rect key="frame" x="0.0" y="55.5" width="1024" height="182"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP">
<rect key="frame" x="0.0" y="0.0" width="1024" height="181"/> <rect key="frame" x="0.0" y="0.0" width="1024" height="181.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2bG-Ip-ptr" userLabel="View1"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2bG-Ip-ptr" userLabel="View1">
...@@ -7352,7 +7352,7 @@ ...@@ -7352,7 +7352,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="gQg-5p-Qhl" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="gQg-5p-Qhl" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="-763" y="2541"/> <point key="canvasLocation" x="288" y="2529"/>
</scene> </scene>
<!--促销选择--> <!--促销选择-->
<scene sceneID="PhL-ws-5UB"> <scene sceneID="PhL-ws-5UB">
...@@ -8000,7 +8000,7 @@ ...@@ -8000,7 +8000,7 @@
<rect key="frame" x="0.0" y="28" width="1024" height="70"/> <rect key="frame" x="0.0" y="28" width="1024" height="70"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="A8c-vp-keu" id="bor-pm-4wM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="A8c-vp-keu" id="bor-pm-4wM">
<rect key="frame" x="0.0" y="0.0" width="1024" height="69"/> <rect key="frame" x="0.0" y="0.0" width="1024" height="69.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单编号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="28E-AO-zbH"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单编号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="28E-AO-zbH">
...@@ -8046,7 +8046,7 @@ ...@@ -8046,7 +8046,7 @@
<rect key="frame" x="0.0" y="98" width="1024" height="70"/> <rect key="frame" x="0.0" y="98" width="1024" height="70"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aJ6-RS-988" id="q46-Um-hjN"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aJ6-RS-988" id="q46-Um-hjN">
<rect key="frame" x="0.0" y="0.0" width="1024" height="69"/> <rect key="frame" x="0.0" y="0.0" width="1024" height="69.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单编号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YRX-3g-DLM"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单编号:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YRX-3g-DLM">
......
...@@ -24,5 +24,10 @@ ...@@ -24,5 +24,10 @@
@param number 圆角系数 @param number 圆角系数
*/ */
- (void)setMyCorner:(CGFloat)number; - (void)setMyCorner:(CGFloat)number;
/**
* 获取view父视图的控制器
*
* @return 控制器
*/
- (UIViewController *)viewController;
@end @end
...@@ -73,5 +73,15 @@ ...@@ -73,5 +73,15 @@
self.layer.rasterizationScale = [UIScreen mainScreen].scale; self.layer.rasterizationScale = [UIScreen mainScreen].scale;
} }
- (UIViewController *)viewController
{
for (UIView *next = [self superview]; next; next = next.superview) {
UIResponder *nextResponder = [next nextResponder];
if ([nextResponder isKindOfClass:[UIViewController class]]) {
return (UIViewController *)nextResponder;
}
}
return nil;
}
@end @end
...@@ -4098,6 +4098,12 @@ extern NSString * const GRADEMETHOD_MANUL; ...@@ -4098,6 +4098,12 @@ extern NSString * const GRADEMETHOD_MANUL;
* *
*/ */
@property (nonatomic, copy) NSString *examResult; @property (nonatomic, copy) NSString *examResult;
/**
* 是否学习完成
*
*
*/
@property (nonatomic, copy) NSString *studyComplete;
/** /**
* 学习内容 * 学习内容
* *
...@@ -4170,6 +4176,12 @@ extern NSString * const GRADEMETHOD_MANUL; ...@@ -4170,6 +4176,12 @@ extern NSString * const GRADEMETHOD_MANUL;
* *
*/ */
@property (nonatomic, copy) NSString *studyCategory; @property (nonatomic, copy) NSString *studyCategory;
/**
* 分类id
*
*
*/
@property (nonatomic, assign) BOOL hasStudyTopic;
/** /**
* 分类标题 * 分类标题
* *
......
...@@ -1443,6 +1443,7 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -1443,6 +1443,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize title; @synthesize title;
@synthesize typeName; @synthesize typeName;
@synthesize examResult; @synthesize examResult;
@synthesize studyComplete;
@synthesize content; @synthesize content;
@synthesize teacher; @synthesize teacher;
@synthesize teacherIntro; @synthesize teacherIntro;
...@@ -1455,6 +1456,7 @@ NSString * const SORTDIRECTION_DESC = @"desc"; ...@@ -1455,6 +1456,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize topics; @synthesize topics;
@synthesize stateName; @synthesize stateName;
@synthesize studyCategory; @synthesize studyCategory;
@synthesize hasStudyTopic;
@synthesize categoryName; @synthesize categoryName;
+(BOOL)propertyIsOptional:(NSString*)propertyName +(BOOL)propertyIsOptional:(NSString*)propertyName
......
...@@ -54,6 +54,7 @@ typedef NS_ENUM(NSInteger,CALL_TYPE) { ...@@ -54,6 +54,7 @@ typedef NS_ENUM(NSInteger,CALL_TYPE) {
学习项下标 学习项下标
*/ */
@property (nonatomic,strong) NSIndexPath *indexPath; @property (nonatomic,strong) NSIndexPath *indexPath;
@property (strong, nonatomic) NSString *studyId;
@end @end
...@@ -189,11 +189,13 @@ ...@@ -189,11 +189,13 @@
#pragma mark - <UIScrollViewDelegate> #pragma mark - <UIScrollViewDelegate>
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{ {
CGFloat height = scrollView.frame.size.height; CGFloat height = scrollView.frame.size.height;
CGFloat contentYoffset = scrollView.contentOffset.y; CGFloat contentYoffset = scrollView.contentOffset.y;
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset; CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
WS(weakSelf); WS(weakSelf);
if (distanceFromBottom <= height && self.type == Study) { if (distanceFromBottom <= height && self.type == Study) {
[self httpStudyCompleteTaskId:self.studyId];
ShowDefaultAlertView(self, nil, @"学习完成,是否开始考核?", UIAlertControllerStyleAlert, ^{ ShowDefaultAlertView(self, nil, @"学习完成,是否开始考核?", UIAlertControllerStyleAlert, ^{
if (weakSelf.scrollViewEndBottomBlock) { if (weakSelf.scrollViewEndBottomBlock) {
weakSelf.scrollViewEndBottomBlock(weakSelf.indexPath); weakSelf.scrollViewEndBottomBlock(weakSelf.indexPath);
...@@ -202,7 +204,15 @@ ...@@ -202,7 +204,15 @@
} }
} }
#pragma mark - 学习完成,告诉服务器学习完成
- (void)httpStudyCompleteTaskId:(NSString *)taskId {
NSString *url = [NSString stringWithFormat:@"/study/finishStudy/%@/%@", taskId, [Shoppersmanager manager].shoppers.employee.fid];
[HTTP networkRequestWithURL:SERVERREQUESTURL(url) withRequestType:(GET) withParameter:nil withReturnValueBlock:^(id returnValue) {
NSLog(@"%@", returnValue);
} withFailureBlock:^(NSError *error) {
}];
}
......
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