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
b5bec041
Commit
b5bec041
authored
Apr 13, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.学习完成增加是否学习完成接口。2.列表页增加答题按钮
parent
6bbcfab2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
160 additions
and
26 deletions
+160
-26
AssessmentViewController.m
...ter/OnlineLearning/Controllers/AssessmentViewController.m
+16
-3
OnlineLearningDetailViewController.m
...Learning/Controllers/OnlineLearningDetailViewController.m
+19
-4
VideoListViewController.m
...nter/OnlineLearning/Controllers/VideoListViewController.m
+1
-1
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
LearningCenter.storyboard
Lighting/LearningCenter.storyboard
+40
-12
CYConstManager.h
Tools/CYConst/CYConstManager.h
+2
-2
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/OnlineLearning/Controllers/AssessmentViewController.m
View file @
b5bec041
...
@@ -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
...
...
Class/LearningCenter/OnlineLearning/Controllers/OnlineLearningDetailViewController.m
View file @
b5bec041
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
#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
)
WYPopoverController
*
settingsPopoverController
;
@property
(
nonatomic
,
strong
)
WYPopoverController
*
settingsPopoverController
;
@property
(
nonatomic
,
assign
)
BOOL
isNotFirstIn
;
@end
@end
...
@@ -31,9 +31,11 @@
...
@@ -31,9 +31,11 @@
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
seleStudyItemCellIndex
:
self
.
interIndex
];
self
.
isNotFirstIn
=
YES
;
[
self
seleStudyItemCellIndex
:
self
.
interIndex
];
}
}
}
#pragma mark -视图即将消失
#pragma mark -视图即将消失
...
@@ -195,6 +197,7 @@
...
@@ -195,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
];
...
@@ -226,10 +229,21 @@
...
@@ -226,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"
];
...
@@ -299,6 +313,7 @@
...
@@ -299,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
];
...
...
Class/LearningCenter/OnlineLearning/Controllers/VideoListViewController.m
View file @
b5bec041
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
}
else
if
(
self
.
type
==
VideoViewTypeList
){
}
else
if
(
self
.
type
==
VideoViewTypeList
){
OnlineLearningDetailViewController
*
studyDetail
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"OnlineLearningDetailViewController"
];
OnlineLearningDetailViewController
*
studyDetail
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"OnlineLearningDetailViewController"
];
studyDetail
.
studyResult
=
self
.
studyTypeEntity
;
studyDetail
.
studyResult
=
self
.
studyTypeEntity
;
studyDetail
.
interIndex
=
indexPath
;
studyDetail
.
interIndex
=
indexPath
;
[
self
.
navigationController
pushViewController
:
studyDetail
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
studyDetail
animated
:
YES
];
}
}
...
...
Class/LearningCenter/OnlineLearning/Views/PPTListItemTableViewCell.h
View file @
b5bec041
...
@@ -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
Class/LearningCenter/OnlineLearning/Views/PPTListItemTableViewCell.m
View file @
b5bec041
...
@@ -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
Class/LearningCenter/OnlineLearning/Views/VideoListItemTableViewCell.h
View file @
b5bec041
...
@@ -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
Class/LearningCenter/OnlineLearning/Views/VideoListItemTableViewCell.m
View file @
b5bec041
...
@@ -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
Lighting/LearningCenter.storyboard
View file @
b5bec041
This diff is collapsed.
Click to expand it.
Tools/CYConst/CYConstManager.h
View file @
b5bec041
...
@@ -96,7 +96,7 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
...
@@ -96,7 +96,7 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
/**
/**
* 服务器开发地址
* 服务器开发地址
*/
*/
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
//外网http://debenson.picp.io/opple-web/
//外网http://debenson.picp.io/opple-web/
...
@@ -108,7 +108,7 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
...
@@ -108,7 +108,7 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
//**
//**
// * 服务器正式地址
// * 服务器正式地址
// */
// */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
/*****************************************接口地址*****************************************/
/*****************************************接口地址*****************************************/
...
...
Tools/Category/UIView+Frame.h
View file @
b5bec041
...
@@ -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
Tools/Category/UIView+Frame.m
View file @
b5bec041
...
@@ -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
Tools/Jastor/opple_objc_json_client.h
View file @
b5bec041
...
@@ -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
;
/**
/**
* 分类标题
* 分类标题
*
*
...
...
Tools/Jastor/opple_objc_json_client.m
View file @
b5bec041
...
@@ -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
...
...
Tools/PreviewPDF/CustomWKWebViewController.h
View file @
b5bec041
...
@@ -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
Tools/PreviewPDF/CustomWKWebViewController.m
View file @
b5bec041
...
@@ -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
)
{
}];
}
...
...
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