Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Opple-iOS
Commits
2015f1e0
Commit
2015f1e0
authored
Apr 18, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.oschina.net/gomore/Opple-iOS
parents
ceaa02d1
b5bec041
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
442 additions
and
179 deletions
+442
-179
CommentTagTableViewCell.h
...r/ComprehensiveDiscussion/Cells/CommentTagTableViewCell.h
+9
-0
CommentTagTableViewCell.m
...r/ComprehensiveDiscussion/Cells/CommentTagTableViewCell.m
+2
-0
DiscussModuleViewController.m
...nsiveDiscussion/Controllers/DiscussModuleViewController.m
+1
-1
ForumItemDetailViewController.m
...iveDiscussion/Controllers/ForumItemDetailViewController.m
+1
-1
ForumItemListViewController.m
...nsiveDiscussion/Controllers/ForumItemListViewController.m
+3
-1
ForumViewController.m
...ComprehensiveDiscussion/Controllers/ForumViewController.m
+1
-1
AssessmentViewController.m
...ter/OnlineLearning/Controllers/AssessmentViewController.m
+16
-3
OnlineLearningDetailViewController.h
...Learning/Controllers/OnlineLearningDetailViewController.h
+6
-1
OnlineLearningDetailViewController.m
...Learning/Controllers/OnlineLearningDetailViewController.m
+29
-9
OnlineLearningViewController.m
...OnlineLearning/Controllers/OnlineLearningViewController.m
+40
-3
VideoListViewController.h
...nter/OnlineLearning/Controllers/VideoListViewController.h
+16
-1
VideoListViewController.m
...nter/OnlineLearning/Controllers/VideoListViewController.m
+71
-25
PPTListItemTableViewCell.h
...ingCenter/OnlineLearning/Views/PPTListItemTableViewCell.h
+5
-0
PPTListItemTableViewCell.m
...ingCenter/OnlineLearning/Views/PPTListItemTableViewCell.m
+16
-1
VideoListItemTableViewCell.h
...gCenter/OnlineLearning/Views/VideoListItemTableViewCell.h
+4
-0
VideoListItemTableViewCell.m
...gCenter/OnlineLearning/Views/VideoListItemTableViewCell.m
+15
-1
CustomTabbarController.m
Class/Tabbar/CustomTabbar/CustomTabbarController.m
+92
-120
LearningCenter.storyboard
Lighting/LearningCenter.storyboard
+68
-4
OppleMain.storyboard
Lighting/OppleMain.storyboard
+5
-5
UIView+Frame.h
Tools/Category/UIView+Frame.h
+6
-1
UIView+Frame.m
Tools/Category/UIView+Frame.m
+10
-0
opple_objc_json_client.h
Tools/Jastor/opple_objc_json_client.h
+12
-0
opple_objc_json_client.m
Tools/Jastor/opple_objc_json_client.m
+2
-0
CustomWKWebViewController.h
Tools/PreviewPDF/CustomWKWebViewController.h
+1
-0
CustomWKWebViewController.m
Tools/PreviewPDF/CustomWKWebViewController.m
+11
-1
No files found.
Class/LearningCenter/ComprehensiveDiscussion/Cells/CommentTagTableViewCell.h
View file @
2015f1e0
...
...
@@ -32,6 +32,15 @@
*/
@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
*
essenceLayoutConstraint
;
...
...
Class/LearningCenter/ComprehensiveDiscussion/Cells/CommentTagTableViewCell.m
View file @
2015f1e0
...
...
@@ -25,6 +25,8 @@
self
.
managerLayoutConstraint
.
constant
=
topicModel
.
backEnd
?
5
:
0
;
self
.
contentLabel
.
text
=
topicModel
.
title
;
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
Class/LearningCenter/ComprehensiveDiscussion/Controllers/DiscussModuleViewController.m
View file @
2015f1e0
...
...
@@ -75,7 +75,7 @@
TOForumCategoryEntity
*
category
=
self
.
result
.
list
[
indexPath
.
row
];
category
.
typeId
=
self
.
result
.
forumType
.
fid
;
itemListVc
.
category
=
category
;
itemListVc
.
isPosting
=
2
;
itemListVc
.
isPosting
=
[
category
.
name
isEqualToString
:
@"欧普问问"
]?
0
:
1
;
[
self
.
navigationController
pushViewController
:
itemListVc
animated
:
YES
];
}
...
...
Class/LearningCenter/ComprehensiveDiscussion/Controllers/ForumItemDetailViewController.m
View file @
2015f1e0
...
...
@@ -188,7 +188,7 @@
#pragma mark - 设置评论个数
-
(
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
;
WkWebViewViewController
*
webView
=
[
self
.
childViewControllers
firstObject
];
webView
.
htmlString
=
self
.
topicDetail
.
content
;
...
...
Class/LearningCenter/ComprehensiveDiscussion/Controllers/ForumItemListViewController.m
View file @
2015f1e0
...
...
@@ -150,7 +150,9 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
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
];
[
self
configTagCellAction
:
tagCell
withIndexPath
:
indexPath
];
return
tagCell
;
...
...
Class/LearningCenter/ComprehensiveDiscussion/Controllers/ForumViewController.m
View file @
2015f1e0
...
...
@@ -91,7 +91,7 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ForumItemListViewController
*
itemListVc
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"ForumItemListViewController"
];
ForumItemListViewController
*
itemListVc
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"ForumItemListViewController"
];
TOForumCategoryEntity
*
category
=
self
.
category
.
categories
[
indexPath
.
row
];
category
.
typeId
=
self
.
typeId
;
itemListVc
.
category
=
category
;
...
...
Class/LearningCenter/OnlineLearning/Controllers/AssessmentViewController.m
View file @
2015f1e0
...
...
@@ -21,6 +21,7 @@
三次重考机会
*/
@property
(
nonatomic
,
assign
)
NSInteger
retakeCount
;
@property
(
strong
,
nonatomic
)
TOStudyResultEntity
*
studyResult
;
@end
...
...
@@ -52,6 +53,7 @@
self
.
retakeCount
=
3
;
[
self
getExaminationQuestions
];
[
self
httpGetAnswerId
];
}
#pragma mark - 获取考题
...
...
@@ -156,9 +158,9 @@
#pragma mark - 提交考核结果
-
(
void
)
submitAnswer
{
TOStudyResultEntity
*
studyResult
=
[[
TOStudyResultEntity
alloc
]
init
]
;
studyResult
.
taskId
=
self
.
taskId
;
studyResult
.
employeeId
=
[
Shoppersmanager
manager
].
shoppers
.
employee
.
fid
;
TOStudyResultEntity
*
studyResult
=
self
.
studyResult
;
//
studyResult.taskId = self.taskId;
//
studyResult.employeeId = [Shoppersmanager manager].shoppers.employee.fid;
studyResult
.
submitTime
=
[[
NSDate
date
]
httpParameterString
];
NSArray
*
answerArray
=
self
.
taskDetails
.
topics
;
NSMutableArray
*
submitAnswerArray
=
[
NSMutableArray
array
];
...
...
@@ -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 - 判断得分是否及格
-
(
void
)
determineIsQualified
:
(
NSInteger
)
allScore
...
...
Class/LearningCenter/OnlineLearning/Controllers/OnlineLearningDetailViewController.h
View file @
2015f1e0
...
...
@@ -7,6 +7,7 @@
//
#import "BaseViewController.h"
#import "VideoListViewController.h"
@interface
OnlineLearningDetailViewController
:
BaseViewController
...
...
@@ -17,6 +18,10 @@
*/
@property
(
nonatomic
,
copy
)
TOStudyTypeEntity
*
studyTypeEntity
;
/**
学习数据
*/
@property
(
nonatomic
,
strong
)
StudyTaskResponse
*
studyResult
;
@property
(
strong
,
nonatomic
)
NSIndexPath
*
interIndex
;
@end
Class/LearningCenter/OnlineLearning/Controllers/OnlineLearningDetailViewController.m
View file @
2015f1e0
...
...
@@ -8,20 +8,15 @@
#import "OnlineLearningDetailViewController.h"
#import "VideoHelperViewController.h"
#import "VideoListViewController.h"
#import "VideoDetailViewController.h"
#import "CustomWKWebViewController.h"
#import "LearningCompleteViewController.h"
#import "AssessmentViewController.h"
@interface
OnlineLearningDetailViewController
()
<
SelectStudyItemDelegate
,
VideoPlayerDelegate
,
BeginAssessmentDelegate
,
InspectionStateDelegate
>
/**
学习数据
*/
@property
(
nonatomic
,
strong
)
StudyTaskResponse
*
studyResult
;
@property
(
nonatomic
,
strong
)
WYPopoverController
*
settingsPopoverController
;
@property
(
nonatomic
,
assign
)
BOOL
isNotFirstIn
;
@end
...
...
@@ -32,10 +27,15 @@
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
self
.
navigationController
.
fd_fullscreenPopGestureRecognizer
.
enabled
=
NO
;
//
self.navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
if
(
!
self
.
isNotFirstIn
)
{
//播放进入选中的视频
self
.
isNotFirstIn
=
YES
;
[
self
seleStudyItemCellIndex
:
self
.
interIndex
];
}
}
#pragma mark -视图即将消失
...
...
@@ -61,7 +61,8 @@
[
self
addChildViewController
];
[
self
listeningHomeButton
];
[
self
getStudyItemDetailAction
];
[
self
transferData
:
self
.
studyResult
];
}
#pragma mark - 添加子控制器
...
...
@@ -79,10 +80,12 @@
//播放列表
VideoListViewController
*
playList
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"VideoListViewController"
];
playList
.
studyItemTitle
=
self
.
studyTypeEntity
.
name
;
playList
.
type
=
VideoViewTypeDetail
;
playList
.
delegate
=
self
;
videoWindow
.
progressDelegate
=
playList
;
[
self
addChildViewController
:
playList
];
[
self
.
view
addSubview
:
playList
.
view
];
__weak
typeof
(
videoWindow
)
weakVideWindow
=
videoWindow
;
//全屏
WS
(
weakSelf
);
...
...
@@ -102,7 +105,7 @@
}
}];
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
);
}
...
...
@@ -177,6 +180,7 @@
CustomStudyEntity
*
studyList
=
studyEntity
.
studyTasks
[
indexPath
.
row
];
videoVc
.
indexPath
=
indexPath
;
[
studyListVC
selectedIndexPath
:
indexPath
withIsQualified
:[
studyList
.
examResult
boolValue
]];
// [self.superListVC selectedIndexPath:indexPath withIsQualified:[studyList.examResult boolValue]];
if
([
studyList
.
attachment
.
fileUrl
rangeOfString
:
@".mp4"
].
location
!=
NSNotFound
)
{
//判断是否是第一次播放
if
(
videoVc
.
learningItem
)
{
...
...
@@ -193,6 +197,7 @@
pptVc
.
type
=
Study
;
pptVc
.
indexPath
=
indexPath
;
videoVc
.
learningItem
=
nil
;
pptVc
.
studyId
=
studyList
.
fid
;
[
pptVc
setScrollViewEndBottomBlock
:
^
(
NSIndexPath
*
indexPath
){
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
^
{
[
weakSelf
videoPlayFinish
:
studyList
withIndexPath
:
indexPath
];
...
...
@@ -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 - 视频播放完成
-
(
void
)
videoPlayFinish
:
(
CustomStudyEntity
*
)
studyEntity
withIndexPath
:
(
NSIndexPath
*
)
indexPath
{
[
self
httpStudyCompleteTaskId
:
studyEntity
.
fid
];
WS
(
weakSelf
);
[
self
studyFinishGetIntegral
:
^
(
NSString
*
integral
)
{
LearningCompleteViewController
*
assessmentVc
=
[[[
weakSelf
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"LearningCompleteViewController"
];
...
...
@@ -297,6 +313,7 @@
videoWindow
.
playerLayer
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
);
}
completion
:^
(
BOOL
finished
)
{
[
weakSelf
assessment
:
studyEntity
.
fid
withIndexPath
:
indexPath
];
}];
}
else
{
[
weakSelf
assessment
:
studyEntity
.
fid
withIndexPath
:
indexPath
];
...
...
@@ -322,6 +339,7 @@
{
VideoListViewController
*
studyListVC
=
self
.
childViewControllers
[
2
];
[
studyListVC
selectedIndexPath
:
indexPath
withIsQualified
:
NO
];
// [self.superListVC selectedIndexPath:indexPath withIsQualified:NO];
[
self
seleStudyItemCellIndex
:
indexPath
];
}
...
...
@@ -330,6 +348,7 @@
{
VideoListViewController
*
studyListVC
=
self
.
childViewControllers
[
2
];
[
studyListVC
selectedIndexPath
:
indexPath
withIsQualified
:
YES
];
// [self.superListVC selectedIndexPath:indexPath withIsQualified:YES];
}
#pragma mark - <VideoPlayerDelegate>
...
...
@@ -348,6 +367,7 @@
}
VideoListViewController
*
studyListVC
=
self
.
childViewControllers
[
2
];
studyListVC
.
datasArray
=
[
NSMutableArray
arrayWithArray
:
result
.
studyEntity
];
// self.superListVC.datasArray = studyListVC.datasArray;
VideoDetailViewController
*
studyDetailsVC
=
self
.
childViewControllers
[
1
];
studyDetailsVC
.
datasArray
=
result
.
studyEntity
;
studyDetailsVC
.
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
...
...
Class/LearningCenter/OnlineLearning/Controllers/OnlineLearningViewController.m
View file @
2015f1e0
...
...
@@ -8,7 +8,9 @@
#import "OnlineLearningViewController.h"
#import "OnlineLearningTableViewCell.h"
#import "VideoListViewController.h"
#import "OnlineLearningDetailViewController.h"
@interface
OnlineLearningViewController
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
>
...
...
@@ -74,9 +76,44 @@
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
OnlineLearningDetailViewController
*
studyDetail
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"OnlineLearningDetailViewController"
];
studyDetail
.
studyTypeEntity
=
self
.
studyTypeArray
[
indexPath
.
row
];
[
self
.
navigationController
pushViewController
:
studyDetail
animated
:
YES
];
TOStudyTaskEntity
*
studyType
=
self
.
studyTypeArray
[
indexPath
.
row
];;
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];
// }];
}
...
...
Class/LearningCenter/OnlineLearning/Controllers/VideoListViewController.h
View file @
2015f1e0
...
...
@@ -9,7 +9,10 @@
#import "BaseViewController.h"
#import "VideoHelperViewController.h"
typedef
NS_ENUM
(
NSInteger
,
VideoViewType
)
{
VideoViewTypeList
,
VideoViewTypeDetail
};
/**
选中学习项
...
...
@@ -50,6 +53,18 @@
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
/**
学习项
*/
@property
(
nonatomic
,
copy
)
StudyTaskResponse
*
studyTypeEntity
;
/**
页面是纯列表还是在详情旁边
*/
@property
(
nonatomic
,
assign
)
VideoViewType
type
;
@property
(
strong
,
nonatomic
)
TOStudyTaskEntity
*
studyType
;
/**
刷新选中项
...
...
Class/LearningCenter/OnlineLearning/Controllers/VideoListViewController.m
View file @
2015f1e0
...
...
@@ -10,7 +10,7 @@
#import "VideoListItemTableViewCell.h"
#import "VideoListSectionHeaderView.h"
#import "PPTListItemTableViewCell.h"
#import "OnlineLearningDetailViewController.h"
@interface
VideoListViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -24,6 +24,14 @@
[
super
viewDidLoad
];
[
self
setUpTableView
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
if
(
self
.
type
==
VideoViewTypeList
)
{
[
self
httpRequest
];
}
}
#pragma mark - 刷新选中项
...
...
@@ -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 - 数据源
-
(
void
)
setDatasArray
:
(
NSMutableArray
*
)
datasArray
...
...
@@ -100,33 +138,41 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//如果已经选中再次点击无效
UITableViewCell
*
playCell
=
[
tableView
cellForRowAtIndexPath
:
indexPath
];
if
([
playCell
isKindOfClass
:[
PPTListItemTableViewCell
class
]])
{
PPTListItemTableViewCell
*
pptCell
=
(
PPTListItemTableViewCell
*
)
playCell
;
if
(
pptCell
.
pptButton
.
selected
)
{
return
;
}
}
else
if
([
playCell
isKindOfClass
:[
VideoListItemTableViewCell
class
]])
{
VideoListItemTableViewCell
*
videoCell
=
(
VideoListItemTableViewCell
*
)
playCell
;
if
(
videoCell
.
playButton
.
selected
)
{
return
;
if
(
self
.
type
==
VideoViewTypeDetail
)
{
//如果已经选中再次点击无效
UITableViewCell
*
playCell
=
[
tableView
cellForRowAtIndexPath
:
indexPath
];
if
([
playCell
isKindOfClass
:[
PPTListItemTableViewCell
class
]])
{
PPTListItemTableViewCell
*
pptCell
=
(
PPTListItemTableViewCell
*
)
playCell
;
if
(
pptCell
.
pptButton
.
selected
)
{
return
;
}
}
else
if
([
playCell
isKindOfClass
:[
VideoListItemTableViewCell
class
]])
{
VideoListItemTableViewCell
*
videoCell
=
(
VideoListItemTableViewCell
*
)
playCell
;
if
(
videoCell
.
playButton
.
selected
)
{
return
;
}
}
}
//取消所有选中状态
for
(
UITableViewCell
*
cell
in
self
.
studyListTableView
.
visibleCells
)
{
if
([
cell
isKindOfClass
:[
PPTListItemTableViewCell
class
]])
{
PPTListItemTableViewCell
*
pptCell
=
(
PPTListItemTableViewCell
*
)
cell
;
pptCell
.
pptButton
.
selected
=
NO
;
//取消所有选中状态
for
(
UITableViewCell
*
cell
in
self
.
studyListTableView
.
visibleCells
)
{
if
([
cell
isKindOfClass
:[
PPTListItemTableViewCell
class
]])
{
PPTListItemTableViewCell
*
pptCell
=
(
PPTListItemTableViewCell
*
)
cell
;
pptCell
.
pptButton
.
selected
=
NO
;
}
if
([
cell
isKindOfClass
:[
VideoListItemTableViewCell
class
]])
{
VideoListItemTableViewCell
*
videoCell
=
(
VideoListItemTableViewCell
*
)
cell
;
videoCell
.
playButton
.
selected
=
NO
;
}
}
if
([
cell
isKindOfClass
:[
VideoListItemTableViewCell
class
]])
{
VideoListItemTableViewCell
*
videoCell
=
(
VideoListItemTableViewCell
*
)
cell
;
videoCell
.
playButton
.
selected
=
NO
;
if
([
self
.
delegate
respondsToSelector
:
@selector
(
seleStudyItemCellIndex
:)])
{
[
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
];
}
if
([
self
.
delegate
respondsToSelector
:
@selector
(
seleStudyItemCellIndex
:)])
{
[
self
.
delegate
seleStudyItemCellIndex
:
indexPath
];
}
}
#pragma mark - 视频播放百分比
...
...
@@ -137,7 +183,7 @@
CustomStudyEntity
*
studyList
=
studyEntity
.
studyTasks
[
indexPath
.
row
];
studyList
.
attachment
.
playPercent
=
[
NSString
stringWithFormat
:
@"%ld"
,
proportion
];
[
videoPlayCell
.
studyProgressView
updateChartByCurrent
:
@
(
proportion
)];
NSLog
(
@"%ld"
,
proportion
);
NSLog
(
@"
----
%ld"
,
proportion
);
}
#pragma mark -缩小动画
...
...
Class/LearningCenter/OnlineLearning/Views/PPTListItemTableViewCell.h
View file @
2015f1e0
...
...
@@ -36,4 +36,9 @@
*/
@property
(
nonatomic
,
strong
)
CustomStudyEntity
*
model
;
/**
开始答题按钮
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnStartAnswer
;
@end
Class/LearningCenter/OnlineLearning/Views/PPTListItemTableViewCell.m
View file @
2015f1e0
...
...
@@ -7,7 +7,7 @@
//
#import "PPTListItemTableViewCell.h"
#import "AssessmentViewController.h"
@implementation
PPTListItemTableViewCell
-
(
void
)
awakeFromNib
{
...
...
@@ -20,11 +20,26 @@
{
_model
=
model
;
self
.
studyItemTitleLabel
.
text
=
_model
.
title
;
//考核状态
if
([
BaseViewController
isBlankString
:
_model
.
examResult
]
||
[
_model
.
examResult
isEqualToString
:
@"0"
])
{
self
.
examResultImageView
.
hidden
=
YES
;
if
(
model
.
studyComplete
==
nil
||
!
model
.
hasStudyTopic
)
{
self
.
btnStartAnswer
.
hidden
=
YES
;
}
else
{
self
.
btnStartAnswer
.
hidden
=
NO
;
}
}
else
{
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
Class/LearningCenter/OnlineLearning/Views/VideoListItemTableViewCell.h
View file @
2015f1e0
...
...
@@ -47,5 +47,9 @@
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
examResultImageView
;
/**
开始答题按钮
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnStartAnswer
;
@end
Class/LearningCenter/OnlineLearning/Views/VideoListItemTableViewCell.m
View file @
2015f1e0
...
...
@@ -7,7 +7,7 @@
//
#import "VideoListItemTableViewCell.h"
#import "AssessmentViewController.h"
@implementation
VideoListItemTableViewCell
-
(
void
)
awakeFromNib
{
...
...
@@ -32,9 +32,23 @@
//考核状态
if
([
BaseViewController
isBlankString
:
_model
.
examResult
]
||
[
_model
.
examResult
isEqualToString
:
@"0"
])
{
self
.
examResultImageView
.
hidden
=
YES
;
if
(
model
.
studyComplete
==
nil
||
!
model
.
hasStudyTopic
)
{
self
.
btnStartAnswer
.
hidden
=
YES
;
}
else
{
self
.
btnStartAnswer
.
hidden
=
NO
;
}
}
else
{
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
Class/Tabbar/CustomTabbar/CustomTabbarController.m
View file @
2015f1e0
This diff is collapsed.
Click to expand it.
Lighting/LearningCenter.storyboard
View file @
2015f1e0
This diff is collapsed.
Click to expand it.
Lighting/OppleMain.storyboard
View file @
2015f1e0
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"11762"
systemVersion=
"16
D32
"
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=
"16
E195
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
useAutolayout=
"YES"
colorMatched=
"YES"
initialViewController=
"ijs-ag-b7Y"
>
<device
id=
"ipad9_7"
orientation=
"landscape"
>
<adaptation
id=
"fullscreen"
/>
</device>
...
...
@@ -1306,7 +1306,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"55.5"
width=
"1024"
height=
"182"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<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"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"2bG-Ip-ptr"
userLabel=
"View1"
>
...
...
@@ -7352,7 +7352,7 @@
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"gQg-5p-Qhl"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"
-763"
y=
"2541
"
/>
<point
key=
"canvasLocation"
x=
"
288"
y=
"2529
"
/>
</scene>
<!--促销选择-->
<scene
sceneID=
"PhL-ws-5UB"
>
...
...
@@ -8000,7 +8000,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"1024"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<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"
/>
<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"
>
...
...
@@ -8046,7 +8046,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"98"
width=
"1024"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<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"
/>
<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"
>
...
...
Tools/Category/UIView+Frame.h
View file @
2015f1e0
...
...
@@ -24,5 +24,10 @@
@param number 圆角系数
*/
-
(
void
)
setMyCorner
:(
CGFloat
)
number
;
/**
* 获取view父视图的控制器
*
* @return 控制器
*/
-
(
UIViewController
*
)
viewController
;
@end
Tools/Category/UIView+Frame.m
View file @
2015f1e0
...
...
@@ -73,5 +73,15 @@
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
Tools/Jastor/opple_objc_json_client.h
View file @
2015f1e0
...
...
@@ -4098,6 +4098,12 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
examResult
;
/**
* 是否学习完成
*
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
studyComplete
;
/**
* 学习内容
*
...
...
@@ -4170,6 +4176,12 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
studyCategory
;
/**
* 分类id
*
*
*/
@property
(
nonatomic
,
assign
)
BOOL
hasStudyTopic
;
/**
* 分类标题
*
...
...
Tools/Jastor/opple_objc_json_client.m
View file @
2015f1e0
...
...
@@ -1443,6 +1443,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize
title
;
@synthesize
typeName
;
@synthesize
examResult
;
@synthesize
studyComplete
;
@synthesize
content
;
@synthesize
teacher
;
@synthesize
teacherIntro
;
...
...
@@ -1455,6 +1456,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize
topics
;
@synthesize
stateName
;
@synthesize
studyCategory
;
@synthesize
hasStudyTopic
;
@synthesize
categoryName
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
...
...
Tools/PreviewPDF/CustomWKWebViewController.h
View file @
2015f1e0
...
...
@@ -54,6 +54,7 @@ typedef NS_ENUM(NSInteger,CALL_TYPE) {
学习项下标
*/
@property
(
nonatomic
,
strong
)
NSIndexPath
*
indexPath
;
@property
(
strong
,
nonatomic
)
NSString
*
studyId
;
@end
Tools/PreviewPDF/CustomWKWebViewController.m
View file @
2015f1e0
...
...
@@ -189,11 +189,13 @@
#pragma mark - <UIScrollViewDelegate>
-
(
void
)
scrollViewDidEndDecelerating
:
(
UIScrollView
*
)
scrollView
{
CGFloat
height
=
scrollView
.
frame
.
size
.
height
;
CGFloat
contentYoffset
=
scrollView
.
contentOffset
.
y
;
CGFloat
distanceFromBottom
=
scrollView
.
contentSize
.
height
-
contentYoffset
;
WS
(
weakSelf
);
if
(
distanceFromBottom
<=
height
&&
self
.
type
==
Study
)
{
[
self
httpStudyCompleteTaskId
:
self
.
studyId
];
ShowDefaultAlertView
(
self
,
nil
,
@"学习完成,是否开始考核?"
,
UIAlertControllerStyleAlert
,
^
{
if
(
weakSelf
.
scrollViewEndBottomBlock
)
{
weakSelf
.
scrollViewEndBottomBlock
(
weakSelf
.
indexPath
);
...
...
@@ -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
)
{
}];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment