Commit db498543 authored by 曹云霄's avatar 曹云霄

修改项说明:增加考核、闯关不通过时得分为0。升级OSS SDK,修复大视频时间控件适配

parent 7d0e83fc
...@@ -97,10 +97,12 @@ ...@@ -97,10 +97,12 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8m1-Qu-OSF"> <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8m1-Qu-OSF">
<frame key="frameInset" minX="147" minY="269" height="30" maxX="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.92941176470588238" green="0.93333333333333335" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="hCb-Iz-yZG"/>
<constraint firstAttribute="width" constant="200" id="vKW-91-IKS"/>
</constraints>
<nil key="textColor"/> <nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
...@@ -193,6 +195,7 @@ ...@@ -193,6 +195,7 @@
<constraint firstAttribute="bottom" secondItem="76b-hj-DSH" secondAttribute="bottom" constant="30" id="M5J-U3-4Ok"/> <constraint firstAttribute="bottom" secondItem="76b-hj-DSH" secondAttribute="bottom" constant="30" id="M5J-U3-4Ok"/>
<constraint firstItem="Skz-R9-9h7" firstAttribute="leading" secondItem="K2I-Hc-a9L" secondAttribute="leading" id="NG3-vR-U9M"/> <constraint firstItem="Skz-R9-9h7" firstAttribute="leading" secondItem="K2I-Hc-a9L" secondAttribute="leading" id="NG3-vR-U9M"/>
<constraint firstAttribute="bottom" secondItem="pMX-eO-SeV" secondAttribute="bottom" constant="30" id="O13-9y-3LB"/> <constraint firstAttribute="bottom" secondItem="pMX-eO-SeV" secondAttribute="bottom" constant="30" id="O13-9y-3LB"/>
<constraint firstItem="8m1-Qu-OSF" firstAttribute="leading" secondItem="DcO-2w-RMM" secondAttribute="leading" id="QNW-x3-v6t"/>
<constraint firstItem="KMQ-Qz-GfT" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="Sgz-5S-9KN"/> <constraint firstItem="KMQ-Qz-GfT" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="Sgz-5S-9KN"/>
<constraint firstItem="NP3-Lz-Htq" firstAttribute="leading" secondItem="olb-Md-I9g" secondAttribute="leading" id="Twd-vp-HdM"/> <constraint firstItem="NP3-Lz-Htq" firstAttribute="leading" secondItem="olb-Md-I9g" secondAttribute="leading" id="Twd-vp-HdM"/>
<constraint firstItem="KzL-Tc-cv5" firstAttribute="centerY" secondItem="DEM-JV-bdq" secondAttribute="centerY" id="Wg0-ek-fDD"/> <constraint firstItem="KzL-Tc-cv5" firstAttribute="centerY" secondItem="DEM-JV-bdq" secondAttribute="centerY" id="Wg0-ek-fDD"/>
...@@ -206,6 +209,7 @@ ...@@ -206,6 +209,7 @@
<constraint firstItem="K2I-Hc-a9L" firstAttribute="centerY" secondItem="peG-Ik-Seq" secondAttribute="centerY" id="g7V-ZT-Dxb"/> <constraint firstItem="K2I-Hc-a9L" firstAttribute="centerY" secondItem="peG-Ik-Seq" secondAttribute="centerY" id="g7V-ZT-Dxb"/>
<constraint firstAttribute="trailing" secondItem="pMX-eO-SeV" secondAttribute="trailing" constant="45" id="gG9-di-NcQ"/> <constraint firstAttribute="trailing" secondItem="pMX-eO-SeV" secondAttribute="trailing" constant="45" id="gG9-di-NcQ"/>
<constraint firstItem="KMQ-Qz-GfT" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="12" id="iiz-vf-wNg"/> <constraint firstItem="KMQ-Qz-GfT" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="12" id="iiz-vf-wNg"/>
<constraint firstItem="8m1-Qu-OSF" firstAttribute="centerY" secondItem="NP3-Lz-Htq" secondAttribute="centerY" id="nR5-EA-KdW"/>
<constraint firstItem="olb-Md-I9g" firstAttribute="top" secondItem="yiU-pj-dA2" secondAttribute="bottom" constant="27" id="nY3-Ud-pFW"/> <constraint firstItem="olb-Md-I9g" firstAttribute="top" secondItem="yiU-pj-dA2" secondAttribute="bottom" constant="27" id="nY3-Ud-pFW"/>
<constraint firstItem="QwZ-C7-zlx" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="tbq-4A-DQk"/> <constraint firstItem="QwZ-C7-zlx" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="tbq-4A-DQk"/>
<constraint firstItem="QwZ-C7-zlx" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="x0f-hS-kl2"/> <constraint firstItem="QwZ-C7-zlx" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="x0f-hS-kl2"/>
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
#pragma mark - 积分赋值 #pragma mark - 积分赋值
- (void)integralAssignment:(RsScoreDetails *)scoreModel - (void)integralAssignment:(RsScoreDetails *)scoreModel
{ {
if (scoreModel.currentScore == 0) {
scoreModel.quarterlyRanking = 0;
scoreModel.annualRanking = 0;
}
self.currentIntegralLabel.text = [NSString stringWithFormat:@"%.0lf",scoreModel.currentScore]; self.currentIntegralLabel.text = [NSString stringWithFormat:@"%.0lf",scoreModel.currentScore];
self.quarterIntegralLabel.text = [NSString stringWithFormat:@"%ld",scoreModel.quarterlyRanking]; self.quarterIntegralLabel.text = [NSString stringWithFormat:@"%ld",scoreModel.quarterlyRanking];
self.yearIntegralLabel.text = [NSString stringWithFormat:@"%ld",scoreModel.annualRanking]; self.yearIntegralLabel.text = [NSString stringWithFormat:@"%ld",scoreModel.annualRanking];
......
...@@ -17,7 +17,7 @@ typedef void(^DeletePostBlock)(NSString *topicId); ...@@ -17,7 +17,7 @@ typedef void(^DeletePostBlock)(NSString *topicId);
/** /**
刷新列表 刷新列表
*/ */
typedef void(^RefreshListBlock)(); typedef void(^RefreshListBlock)(NSInteger count,COMMENT_PRAISE type,NSIndexPath *indexPath);
@interface ForumItemDetailViewController : BaseViewController @interface ForumItemDetailViewController : BaseViewController
...@@ -46,6 +46,11 @@ typedef void(^RefreshListBlock)(); ...@@ -46,6 +46,11 @@ typedef void(^RefreshListBlock)();
*/ */
@property (weak, nonatomic) IBOutlet UITableView *forumDetailTableView; @property (weak, nonatomic) IBOutlet UITableView *forumDetailTableView;
/**
cell下标
*/
@property (nonatomic,strong) NSIndexPath *indexPath;
/** /**
删除帖子 删除帖子
*/ */
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
weakSelf.commentInputTextFieldView.text = nil; weakSelf.commentInputTextFieldView.text = nil;
[XBLoadingView showHUDViewWithSuccessText:@"评论成功" completeBlock:^{ [XBLoadingView showHUDViewWithSuccessText:@"评论成功" completeBlock:^{
if (weakSelf.refreshBlock) { if (weakSelf.refreshBlock) {
weakSelf.refreshBlock(); weakSelf.refreshBlock(ONE,Comment,weakSelf.indexPath);
} }
[weakSelf getPostDetailAction:YES]; [weakSelf getPostDetailAction:YES];
}]; }];
...@@ -303,10 +303,15 @@ ...@@ -303,10 +303,15 @@
[XBLoadingView showHUDViewWithDefault]; [XBLoadingView showHUDViewWithDefault];
NSString *url = [NSString stringWithFormat:SERVERREQUESTURL(PRAISE),self.topicDetail.fid,!sender.selected?@"true":@"false"]; NSString *url = [NSString stringWithFormat:SERVERREQUESTURL(PRAISE),self.topicDetail.fid,!sender.selected?@"true":@"false"];
WS(weakSelf);
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:ONE WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:ONE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault]; [XBLoadingView hideHUDViewWithDefault];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
sender.selected = !sender.selected; sender.selected = !sender.selected;
//刷新列表
if (weakSelf.refreshBlock) {
weakSelf.refreshBlock(sender.selected?ONE:-ONE,Praise,weakSelf.indexPath);
}
}else { }else {
[XBLoadingView showHUDViewWithText:returnValue[@"message"]]; [XBLoadingView showHUDViewWithText:returnValue[@"message"]];
} }
......
...@@ -161,10 +161,29 @@ ...@@ -161,10 +161,29 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
ForumItemDetailViewController *postDetail = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"ForumItemDetailViewController"]; ForumItemDetailViewController *postDetail = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"ForumItemDetailViewController"];
postDetail.topicDetail = self.datasArray[indexPath.row]; CustomTOForumTopicEntity *entity = self.datasArray[indexPath.row];
postDetail.topicDetail = entity;
postDetail.indexPath = indexPath;
WS(weakSelf); WS(weakSelf);
[postDetail setRefreshBlock:^{ //更新点赞数、评论数
[weakSelf.classificationListTableView.mj_header beginRefreshing]; [postDetail setRefreshBlock:^(NSInteger count,COMMENT_PRAISE type,NSIndexPath *indexPath){
switch (type) {
case Comment:
{
entity.replyCount += count;
}
break;
case Praise:
{
entity.likeCount += count;
entity.canLike = (count == 1)?NO:YES;
}
break;
default:
break;
}
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}]; }];
//删除帖子 //删除帖子
[postDetail setDelectBlock:^(NSString *topicId) { [postDetail setDelectBlock:^(NSString *topicId) {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO; self.navigationController.interactivePopGestureRecognizer.enabled = NO;
} }
[self queryIntegralDetails];
} }
#pragma mark -视图即将消失 #pragma mark -视图即将消失
...@@ -48,7 +49,6 @@ ...@@ -48,7 +49,6 @@
[super viewDidLoad]; [super viewDidLoad];
[self addGestureRecognizer]; [self addGestureRecognizer];
[self queryIntegralDetails];
} }
#pragma mark - 添加点击 #pragma mark - 添加点击
...@@ -85,6 +85,10 @@ ...@@ -85,6 +85,10 @@
#pragma mark - 积分信息 #pragma mark - 积分信息
- (void)setUpIntegral:(RsScoreDetails *)entity - (void)setUpIntegral:(RsScoreDetails *)entity
{ {
if (entity.currentScore == 0) {
entity.quarterlyRanking = 0;
entity.annualRanking = 0;
}
self.currentScoreLabel.text = [NSString stringWithFormat:@"%.0lf",entity.currentScore]; self.currentScoreLabel.text = [NSString stringWithFormat:@"%.0lf",entity.currentScore];
self.yearRankingLabel.text = [NSString stringWithFormat:@"%ld",(long)entity.annualRanking]; self.yearRankingLabel.text = [NSString stringWithFormat:@"%ld",(long)entity.annualRanking];
[self.guideHeadImageView sd_setImageWithURL:[NSURL URLWithString:[Shoppersmanager manager].Shoppers.employee.picture] placeholderImage:ReplaceImage]; [self.guideHeadImageView sd_setImageWithURL:[NSURL URLWithString:[Shoppersmanager manager].Shoppers.employee.picture] placeholderImage:ReplaceImage];
......
...@@ -190,6 +190,8 @@ ...@@ -190,6 +190,8 @@
if (answerNumber == answersArray.count) { if (answerNumber == answersArray.count) {
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
}else {
resultEntity.grade = @(ZERO);;
} }
} }
//判断 //判断
...@@ -200,6 +202,8 @@ ...@@ -200,6 +202,8 @@
if ([topicEntity.answer isEqualToString:entity.name]) { if ([topicEntity.answer isEqualToString:entity.name]) {
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
}else {
resultEntity.grade = @(ZERO);;
} }
} }
} }
...@@ -212,6 +216,8 @@ ...@@ -212,6 +216,8 @@
if ([topicEntity.answer isEqualToString:entity.value]) { if ([topicEntity.answer isEqualToString:entity.value]) {
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
}else {
resultEntity.grade = @(ZERO);;
} }
} }
} }
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
*/ */
@property (nonatomic,assign) CGFloat teacherIntroHeight; @property (nonatomic,assign) CGFloat teacherIntroHeight;
/**
针对人员高度
*/
@property (nonatomic,assign) CGFloat personHeight;
/** /**
视频长度 视频长度
*/ */
......
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
return _teacherIntroHeight; return _teacherIntroHeight;
} }
- (CGFloat)personHeight
{
if (!_personHeight) {
_personHeight = [self calculateStudyIntroductionHeight:self.suitabler]+74;
}
return _personHeight;
}
- (NSString *)videoLength - (NSString *)videoLength
{ {
if (!_videoLength) { if (!_videoLength) {
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO; self.navigationController.interactivePopGestureRecognizer.enabled = NO;
} }
[self getStudyItemDetailAction];
} }
#pragma mark -视图即将消失 #pragma mark -视图即将消失
...@@ -54,13 +55,13 @@ ...@@ -54,13 +55,13 @@
double totalTime = videoVc.playerItem.duration.value/videoVc.playerItem.duration.timescale; double totalTime = videoVc.playerItem.duration.value/videoVc.playerItem.duration.timescale;
[self switchVideoRecordPlayTime:videoVc.learningItem.attachment withPlayTime:currentTime withPlayPercent:currentTime/totalTime]; [self switchVideoRecordPlayTime:videoVc.learningItem.attachment withPlayTime:currentTime withPlayPercent:currentTime/totalTime];
} }
[videoVc resetPlayer];
} }
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
[self addChildViewController]; [self addChildViewController];
[self getStudyItemDetailAction];
[self listeningHomeButton]; [self listeningHomeButton];
} }
...@@ -203,11 +204,9 @@ ...@@ -203,11 +204,9 @@
playTimeEntity.employeeId = [Shoppersmanager manager].Shoppers.employee.fid; playTimeEntity.employeeId = [Shoppersmanager manager].Shoppers.employee.fid;
playTimeEntity.playTime = [NSString stringWithFormat:@"%.0lf",playTime]; playTimeEntity.playTime = [NSString stringWithFormat:@"%.0lf",playTime];
playTimeEntity.playPercent = [NSString stringWithFormat:@"%.2lf",percent]; playTimeEntity.playPercent = [NSString stringWithFormat:@"%.2lf",percent];
NSLog(@"%@",[playTimeEntity toDictionary]);
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ATTACHMENTPLAYTIME) WithRequestType:ZERO WithParameter:playTimeEntity WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ATTACHMENTPLAYTIME) WithRequestType:ZERO WithParameter:playTimeEntity WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"记录播放时间成功")
attachment.playTime = playTimeEntity.playTime; attachment.playTime = playTimeEntity.playTime;
attachment.playPercent = playTimeEntity.playPercent; attachment.playPercent = playTimeEntity.playPercent;
}else { }else {
......
...@@ -91,13 +91,13 @@ ...@@ -91,13 +91,13 @@
return study.teacherIntroHeight; return study.teacherIntroHeight;
break; break;
case ContraposePersonCell: case ContraposePersonCell:
return 100; return study.personHeight;
break; break;
default: default:
break; break;
} }
return 0; return ZERO;
} }
......
...@@ -110,17 +110,17 @@ ...@@ -110,17 +110,17 @@
self.playButton.selected = NO; self.playButton.selected = NO;
[XBLoadingView hideHUDViewWithDefaultWithView:self.view]; [XBLoadingView hideHUDViewWithDefaultWithView:self.view];
self.playItemTotalTimeLabel.text = [NSString stringWithFormat:@"/ %@",[self convertTime:CMTimeGetSeconds(self.playerItem.duration)]]; self.playItemTotalTimeLabel.text = [NSString stringWithFormat:@"/ %@",[self convertTime:CMTimeGetSeconds(self.playerItem.duration)]];
NSString *timeString = [self timeFormatted:[self.learningItem.attachment.playTime integerValue]]; NSInteger second = [self.learningItem.attachment.playTime integerValue];
if (![[self class] isBlankString:timeString]) { NSString *timeString = [self timeFormatted:second];
if (![[self class] isBlankString:timeString] && second < (NSInteger)CMTimeGetSeconds(self.playerItem.duration)) {
[self.customPlayer pause]; [self.customPlayer pause];
self.playButton.selected = YES; self.playButton.selected = YES;
[self promptBoxWithMessage:[NSString stringWithFormat:@"上次播放时间:%@,是否继续播放",timeString] cancelBlock:^{ [self promptBoxWithMessage:[NSString stringWithFormat:@"上次播放时间:%@,是否继续播放",timeString] cancelBlock:^{
[weakSelf.customPlayer play]; [weakSelf beginPlay];
weakSelf.playButton.selected = NO;
} sureBlock:^{ } sureBlock:^{
[weakSelf.customPlayer seekToTime:CMTimeMake([weakSelf.learningItem.attachment.playTime integerValue], ONE) toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero]; [weakSelf.customPlayer seekToTime:CMTimeMake([weakSelf.learningItem.attachment.playTime integerValue], ONE) toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero];
weakSelf.playButton.selected = NO; [weakSelf beginPlay];
}]; }];
} }
break; break;
...@@ -136,6 +136,13 @@ ...@@ -136,6 +136,13 @@
} }
} }
#pragma mark - 开始播放
- (void)beginPlay
{
[self.customPlayer play];
self.playButton.selected = NO;
}
#pragma mark - 返回当前视频播放时长 #pragma mark - 返回当前视频播放时长
- (double)getCurrentPlayingTime{ - (double)getCurrentPlayingTime{
return self.customPlayer.currentTime.value/self.customPlayer.currentTime.timescale; return self.customPlayer.currentTime.value/self.customPlayer.currentTime.timescale;
...@@ -165,9 +172,11 @@ ...@@ -165,9 +172,11 @@
//更新播放时间 //更新播放时间
CMTime ctime = weakSelf.customPlayer.currentTime; CMTime ctime = weakSelf.customPlayer.currentTime;
weakSelf.playingTimeLabel.text = [weakSelf convertTime:ctime.value/ctime.timescale]; weakSelf.playingTimeLabel.text = [weakSelf convertTime:ctime.value/ctime.timescale];
//更新播放百分比 if (progress) {
if ([weakSelf.progressDelegate respondsToSelector:@selector(videoPlayProportion:withIndexPath:)]) { //更新播放百分比
[weakSelf.progressDelegate videoPlayProportion:[weakSelf getCurrentPlayingTime]/CMTimeGetSeconds(weakSelf.playerItem.duration)*100 withIndexPath:weakSelf.indexPath]; if ([weakSelf.progressDelegate respondsToSelector:@selector(videoPlayProportion:withIndexPath:)]) {
[weakSelf.progressDelegate videoPlayProportion:[weakSelf getCurrentPlayingTime]/CMTimeGetSeconds(weakSelf.playerItem.duration)*100 withIndexPath:weakSelf.indexPath];
}
} }
}]; }];
} }
...@@ -190,22 +199,29 @@ ...@@ -190,22 +199,29 @@
} }
#pragma mark -计算时间 #pragma mark -计算时间
- (NSString *)convertTime:(CGFloat)second - (NSString *)convertTime:(NSInteger)interval
{ {
NSDate *date = [NSDate dateWithTimeIntervalSince1970:second]; NSUInteger secondPerDay = 24 * 60 * 60;
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; NSUInteger secondPerHour = 60 * 60;
if (second/3600 >= 1) { NSUInteger secondPerMinute = 60;
[formatter setDateFormat:@"HH:mm:ss"]; // 剩余小时不应该大于24小时,所以应该先除去满足一天的秒数,再计算还剩下多少小时
} else { NSInteger hour = interval % secondPerDay / secondPerHour;
[formatter setDateFormat:@"mm:ss"]; // 剩余分钟数与上面同理
NSInteger minute = interval % secondPerHour / secondPerMinute;
// 剩余秒数直接等于秒数对每分钟秒数所取的余数
NSInteger second = interval % secondPerMinute;
NSMutableString *string = [NSMutableString string];
if (hour) {
[string appendString:[NSString stringWithFormat:@"%02zd:",hour]];
} }
NSString *showtimeNew = [formatter stringFromDate:date]; [string appendString:[NSString stringWithFormat:@"%02zd:%02zd",minute,second]];
return showtimeNew; return string;
} }
#pragma mark - 播放完成 #pragma mark - 播放完成
- (void)playFinish - (void)playFinish
{ {
[self.customPlayer seekToTime:kCMTimeZero];
self.playButton.selected = YES; self.playButton.selected = YES;
if ([self.delegate respondsToSelector:@selector(videoPlayFinish:)]) { if ([self.delegate respondsToSelector:@selector(videoPlayFinish:)]) {
[self.delegate videoPlayFinish:self.learningItem]; [self.delegate videoPlayFinish:self.learningItem];
...@@ -268,18 +284,21 @@ ...@@ -268,18 +284,21 @@
[self.customPlayer seekToTime:kCMTimeZero]; [self.customPlayer seekToTime:kCMTimeZero];
[self customDealloc]; [self customDealloc];
self.playButton.selected = YES; self.playButton.selected = YES;
self.bufferProgressView.progress = 0;
[self.playerLayer removeFromSuperlayer]; [self.playerLayer removeFromSuperlayer];
self.playingTimeLabel.text = @"00:00";
} }
#pragma mark - 释放KVO #pragma mark - 释放KVO
- (void)customDealloc - (void)customDealloc
{ {
[self.playerItem removeObserver:self forKeyPath:@"status"]; //避免多次释放崩溃
[self.playerItem removeObserver:self forKeyPath:@"loadedTimeRanges"]; @try {
[self.customPlayer removeTimeObserver:self.avplayerServer]; [self.playerItem removeObserver:self forKeyPath:@"status"];
[[NSNotificationCenter defaultCenter] removeObserver:self]; [self.playerItem removeObserver:self forKeyPath:@"loadedTimeRanges"];
[self.customPlayer removeTimeObserver:self.avplayerServer];
[[NSNotificationCenter defaultCenter] removeObserver:self];
} @catch (NSException *exception) {
NSLog(@"多次释放")
}
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
*/ */
@property (nonatomic,strong) PNCircleChart *studyProgressView; @property (nonatomic,strong) PNCircleChart *studyProgressView;
/** /**
考核状态 考核状态
*/ */
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
[self.studyProgressView setStrokeColor:[UIColor colorWithHue:0.00 saturation:0.50 brightness:0.93 alpha:1.00]]; [self.studyProgressView setStrokeColor:[UIColor colorWithHue:0.00 saturation:0.50 brightness:0.93 alpha:1.00]];
[self.studyProgressView strokeChart]; [self.studyProgressView strokeChart];
self.studyProgressView.countingLabel.font = [UIFont systemFontOfSize:8]; self.studyProgressView.countingLabel.font = [UIFont systemFontOfSize:8];
self.studyProgressView.displayAnimated = NO;
[self.seekbarView addSubview:self.studyProgressView]; [self.seekbarView addSubview:self.studyProgressView];
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/** /**
取消 取消
*/ */
- (void)dismissController; - (void)dismissController:(BOOL)animationed;
/** /**
闯关完成 闯关完成
......
...@@ -151,8 +151,8 @@ ...@@ -151,8 +151,8 @@
#pragma mark - 提交答案 #pragma mark - 提交答案
- (void)submitAnswer - (void)submitAnswer
{ {
if ([self.delegate respondsToSelector:@selector(dismissController)]) { if ([self.delegate respondsToSelector:@selector(dismissController:)]) {
[self.delegate dismissController]; [self.delegate dismissController:NO];
} }
TOPassLevelResultEntity *studyResult = [[TOPassLevelResultEntity alloc]init]; TOPassLevelResultEntity *studyResult = [[TOPassLevelResultEntity alloc]init];
studyResult.passLevelId = self.passLevelId; studyResult.passLevelId = self.passLevelId;
...@@ -188,6 +188,8 @@ ...@@ -188,6 +188,8 @@
if (answerNumber == answersArray.count) { if (answerNumber == answersArray.count) {
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
}else {
resultEntity.grade = @(ZERO);
} }
} }
//判断 //判断
...@@ -198,6 +200,8 @@ ...@@ -198,6 +200,8 @@
if ([topicEntity.answer isEqualToString:entity.name]) { if ([topicEntity.answer isEqualToString:entity.name]) {
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
}else {
resultEntity.grade = @(ZERO);
} }
} }
} }
...@@ -210,6 +214,8 @@ ...@@ -210,6 +214,8 @@
if ([topicEntity.answer isEqualToString:entity.value]) { if ([topicEntity.answer isEqualToString:entity.value]) {
resultEntity.grade = topicEntity.grade; resultEntity.grade = topicEntity.grade;
allScore += [topicEntity.grade integerValue]; allScore += [topicEntity.grade integerValue];
}else {
resultEntity.grade = @(ZERO);
} }
} }
} }
...@@ -285,16 +291,22 @@ ...@@ -285,16 +291,22 @@
} }
#pragma mark - 完成 #pragma mark - 完成
- (void)finish - (void)finished
{ {
[self.popover dismissPopoverAnimated:YES]; [self.popover dismissPopoverAnimated:YES];
} }
#pragma mark - 取消闯关 #pragma mark - 取消闯关
- (IBAction)exitButtonClickAction:(UIButton *)sender { - (IBAction)exitButtonClickAction:(UIButton *)sender {
if ([self.delegate respondsToSelector:@selector(dismissController)]) {
[self.delegate dismissController]; WS(weakSelf);
} [self promptBoxWithMessage:@"是否退出闯关?" cancelBlock:^{
} sureBlock:^{
if ([weakSelf.delegate respondsToSelector:@selector(dismissController:)]) {
[weakSelf.delegate dismissController:YES];
}
}];
} }
#pragma mark - 弹出框 #pragma mark - 弹出框
......
...@@ -12,13 +12,17 @@ ...@@ -12,13 +12,17 @@
@protocol CompeteDelegate <NSObject> @protocol CompeteDelegate <NSObject>
@optional @optional
- (void)finish;
@end /**
完成
*/
- (void)finished;
@end
@interface EmigratedFinishViewController : BaseViewController @interface EmigratedFinishViewController : BaseViewController
@property (nonatomic,weak) id<CompeteDelegate>delegate; @property (nonatomic,weak) id<CompeteDelegate>delegate;
@property (nonatomic,assign) RESULT_STATE state; @property (nonatomic,assign) RESULT_STATE state;
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
#pragma mark - 完成 #pragma mark - 完成
- (IBAction)finishButtonClickAction:(UIButton *)sender { - (IBAction)finishButtonClickAction:(UIButton *)sender {
if ([self.delegate respondsToSelector:@selector(finish)]) { if ([self.delegate respondsToSelector:@selector(finished)]) {
[self.delegate finish]; [self.delegate finished];
} }
} }
......
...@@ -115,9 +115,9 @@ ...@@ -115,9 +115,9 @@
#pragma mark - <DismissDelegate> #pragma mark - <DismissDelegate>
#pragma mark - 做题完成 #pragma mark - 做题完成
- (void)dismissController - (void)dismissController:(BOOL)animationed
{ {
[self.popover dismissPopoverAnimated:NO]; [self.popover dismissPopoverAnimated:animationed];
} }
#pragma mark - 闯关完成 #pragma mark - 闯关完成
......
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
dispatch_group_t group = dispatch_group_create(); dispatch_group_t group = dispatch_group_create();
dispatch_group_enter(group); dispatch_group_enter(group);
//任务一 请求奖品列表 //任务一 请求奖品列表
NSLog(@"%@",[[self.queryPrizeModel toDictionary] JSONString]);
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(PRIZELIST) WithRequestType:ZERO WithParameter:self.queryPrizeModel WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(PRIZELIST) WithRequestType:ZERO WithParameter:self.queryPrizeModel WithReturnValueBlock:^(id returnValue) {
dispatch_group_leave(group); dispatch_group_leave(group);
[weakSelf endRefreshingForTableView:weakSelf.prizeListCollectionView]; [weakSelf endRefreshingForTableView:weakSelf.prizeListCollectionView];
......
...@@ -47,11 +47,17 @@ ...@@ -47,11 +47,17 @@
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="编号:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="usf-4V-c8q"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="编号:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="usf-4V-c8q">
<constraints>
<constraint firstAttribute="width" constant="43" id="7gz-4w-5B8"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="dqdqweq" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b7B-yI-JEC"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="dqdqweq" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b7B-yI-JEC">
<constraints>
<constraint firstAttribute="width" constant="160" id="D6a-bq-Whd"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="20"/> <fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -71,7 +77,7 @@ ...@@ -71,7 +77,7 @@
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="qweqwe" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hf9-WK-7u5"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="qweqwe" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hf9-WK-7u5">
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -157,12 +163,15 @@ ...@@ -157,12 +163,15 @@
<constraint firstItem="NBT-2d-V2o" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="5XH-Sq-yGA"/> <constraint firstItem="NBT-2d-V2o" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="5XH-Sq-yGA"/>
<constraint firstItem="tM7-hf-9rp" firstAttribute="top" secondItem="tsa-PY-0mz" secondAttribute="bottom" constant="5" id="5mL-Ps-nG4"/> <constraint firstItem="tM7-hf-9rp" firstAttribute="top" secondItem="tsa-PY-0mz" secondAttribute="bottom" constant="5" id="5mL-Ps-nG4"/>
<constraint firstItem="NBT-2d-V2o" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="7U3-6b-XLA"/> <constraint firstItem="NBT-2d-V2o" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="7U3-6b-XLA"/>
<constraint firstItem="zXN-Uh-XtZ" firstAttribute="trailing" secondItem="Rka-oV-nyM" secondAttribute="trailing" id="C3j-p9-SgN"/>
<constraint firstItem="hq9-lr-unI" firstAttribute="leading" secondItem="tsa-PY-0mz" secondAttribute="trailing" constant="20" id="Ed0-mH-bfP"/> <constraint firstItem="hq9-lr-unI" firstAttribute="leading" secondItem="tsa-PY-0mz" secondAttribute="trailing" constant="20" id="Ed0-mH-bfP"/>
<constraint firstItem="0ee-HS-ilS" firstAttribute="centerX" secondItem="tsa-PY-0mz" secondAttribute="centerX" id="EnR-bK-i8a"/> <constraint firstItem="0ee-HS-ilS" firstAttribute="centerX" secondItem="tsa-PY-0mz" secondAttribute="centerX" id="EnR-bK-i8a"/>
<constraint firstItem="Rka-oV-nyM" firstAttribute="trailing" secondItem="Hf9-WK-7u5" secondAttribute="trailing" id="FL5-Ci-JBQ"/>
<constraint firstItem="usf-4V-c8q" firstAttribute="leading" secondItem="hq9-lr-unI" secondAttribute="trailing" constant="30" id="Gij-3R-krt"/> <constraint firstItem="usf-4V-c8q" firstAttribute="leading" secondItem="hq9-lr-unI" secondAttribute="trailing" constant="30" id="Gij-3R-krt"/>
<constraint firstItem="NlJ-8b-gcl" firstAttribute="centerY" secondItem="5aK-6t-o1q" secondAttribute="centerY" id="KhH-dZ-dfe"/> <constraint firstItem="NlJ-8b-gcl" firstAttribute="centerY" secondItem="5aK-6t-o1q" secondAttribute="centerY" id="KhH-dZ-dfe"/>
<constraint firstItem="5aK-6t-o1q" firstAttribute="top" secondItem="usf-4V-c8q" secondAttribute="bottom" constant="15" id="KoP-If-HZN"/> <constraint firstItem="5aK-6t-o1q" firstAttribute="top" secondItem="usf-4V-c8q" secondAttribute="bottom" constant="15" id="KoP-If-HZN"/>
<constraint firstAttribute="trailing" secondItem="frs-v4-sgw" secondAttribute="trailing" constant="30" id="Nf2-UJ-eaq"/> <constraint firstAttribute="trailing" secondItem="frs-v4-sgw" secondAttribute="trailing" constant="30" id="Nf2-UJ-eaq"/>
<constraint firstItem="NlJ-8b-gcl" firstAttribute="trailing" secondItem="b7B-yI-JEC" secondAttribute="trailing" id="Nxf-EU-vho"/>
<constraint firstItem="5aK-6t-o1q" firstAttribute="leading" secondItem="usf-4V-c8q" secondAttribute="leading" id="OVq-qa-ifF"/> <constraint firstItem="5aK-6t-o1q" firstAttribute="leading" secondItem="usf-4V-c8q" secondAttribute="leading" id="OVq-qa-ifF"/>
<constraint firstAttribute="bottom" secondItem="NBT-2d-V2o" secondAttribute="bottom" constant="20" id="RAS-qC-JRU"/> <constraint firstAttribute="bottom" secondItem="NBT-2d-V2o" secondAttribute="bottom" constant="20" id="RAS-qC-JRU"/>
<constraint firstItem="NlJ-8b-gcl" firstAttribute="leading" secondItem="b7B-yI-JEC" secondAttribute="leading" id="U8e-bx-PBB"/> <constraint firstItem="NlJ-8b-gcl" firstAttribute="leading" secondItem="b7B-yI-JEC" secondAttribute="leading" id="U8e-bx-PBB"/>
...@@ -173,6 +182,7 @@ ...@@ -173,6 +182,7 @@
<constraint firstItem="Hf9-WK-7u5" firstAttribute="leading" secondItem="NlJ-8b-gcl" secondAttribute="leading" id="aKW-G2-tJy"/> <constraint firstItem="Hf9-WK-7u5" firstAttribute="leading" secondItem="NlJ-8b-gcl" secondAttribute="leading" id="aKW-G2-tJy"/>
<constraint firstItem="9XR-2D-r0I" firstAttribute="leading" secondItem="Vfu-v1-b5l" secondAttribute="leading" id="bFu-Xw-ePl"/> <constraint firstItem="9XR-2D-r0I" firstAttribute="leading" secondItem="Vfu-v1-b5l" secondAttribute="leading" id="bFu-Xw-ePl"/>
<constraint firstItem="tM7-hf-9rp" firstAttribute="centerX" secondItem="tsa-PY-0mz" secondAttribute="centerX" id="c1C-dK-vJF"/> <constraint firstItem="tM7-hf-9rp" firstAttribute="centerX" secondItem="tsa-PY-0mz" secondAttribute="centerX" id="c1C-dK-vJF"/>
<constraint firstItem="Hf9-WK-7u5" firstAttribute="trailing" secondItem="NlJ-8b-gcl" secondAttribute="trailing" id="cfF-TU-sT0"/>
<constraint firstItem="frs-v4-sgw" firstAttribute="leading" secondItem="9XR-2D-r0I" secondAttribute="leading" id="dEc-jV-nqD"/> <constraint firstItem="frs-v4-sgw" firstAttribute="leading" secondItem="9XR-2D-r0I" secondAttribute="leading" id="dEc-jV-nqD"/>
<constraint firstItem="Vfu-v1-b5l" firstAttribute="top" secondItem="ol6-U8-o5v" secondAttribute="bottom" constant="70" id="eXV-de-4sZ"/> <constraint firstItem="Vfu-v1-b5l" firstAttribute="top" secondItem="ol6-U8-o5v" secondAttribute="bottom" constant="70" id="eXV-de-4sZ"/>
<constraint firstItem="ol6-U8-o5v" firstAttribute="top" secondItem="hX3-Vg-O1n" secondAttribute="bottom" constant="25" id="feg-EY-Mee"/> <constraint firstItem="ol6-U8-o5v" firstAttribute="top" secondItem="hX3-Vg-O1n" secondAttribute="bottom" constant="25" id="feg-EY-Mee"/>
...@@ -186,6 +196,7 @@ ...@@ -186,6 +196,7 @@
<constraint firstItem="hq9-lr-unI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="tbd-LJ-wwY"/> <constraint firstItem="hq9-lr-unI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="tbd-LJ-wwY"/>
<constraint firstItem="b7B-yI-JEC" firstAttribute="leading" secondItem="usf-4V-c8q" secondAttribute="trailing" constant="20" id="toq-mo-eo4"/> <constraint firstItem="b7B-yI-JEC" firstAttribute="leading" secondItem="usf-4V-c8q" secondAttribute="trailing" constant="20" id="toq-mo-eo4"/>
<constraint firstItem="Rka-oV-nyM" firstAttribute="centerY" secondItem="ol6-U8-o5v" secondAttribute="centerY" id="uZm-9u-aBe"/> <constraint firstItem="Rka-oV-nyM" firstAttribute="centerY" secondItem="ol6-U8-o5v" secondAttribute="centerY" id="uZm-9u-aBe"/>
<constraint firstAttribute="trailing" secondItem="b7B-yI-JEC" secondAttribute="trailing" constant="15" id="vhW-Ax-8j5"/>
<constraint firstItem="tsa-PY-0mz" firstAttribute="top" secondItem="0ee-HS-ilS" secondAttribute="bottom" constant="5" id="wMr-oo-Rxb"/> <constraint firstItem="tsa-PY-0mz" firstAttribute="top" secondItem="0ee-HS-ilS" secondAttribute="bottom" constant="5" id="wMr-oo-Rxb"/>
<constraint firstItem="usf-4V-c8q" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="44" id="x6d-QI-PfE"/> <constraint firstItem="usf-4V-c8q" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="44" id="x6d-QI-PfE"/>
<constraint firstItem="hq9-lr-unI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" multiplier="1.3" id="xnk-Sz-ihg"/> <constraint firstItem="hq9-lr-unI" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" multiplier="1.3" id="xnk-Sz-ihg"/>
......
...@@ -208,10 +208,10 @@ NSString *const redPackage = @"redPackage"; ...@@ -208,10 +208,10 @@ NSString *const redPackage = @"redPackage";
if (!self.resultEntity.bankCards.count) { if (!self.resultEntity.bankCards.count) {
[self showUnboundedAlertView]; [self showUnboundedAlertView];
} }
// if (!self.resultEntity.isUsable) { if (!self.resultEntity.isUsable) {
// [self promptCustomerTitle:@"我知道了" withMessage:@"只能在周二和周五发起提现申请!" finish:nil]; [self promptCustomerTitle:@"我知道了" withMessage:@"只能在周二和周五发起提现申请!" finish:nil];
// return; return;
// } }
WS(weakSelf); WS(weakSelf);
RebateDetailsViewController *rebateDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"RebateDetailsViewController"]; RebateDetailsViewController *rebateDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"RebateDetailsViewController"];
rebateDetails.rebateAmount = (sender.tag == 100)?[self.resultEntity.accountTotal floatValue]:[self.resultEntity.redPackageAccountTotal floatValue]; rebateDetails.rebateAmount = (sender.tag == 100)?[self.resultEntity.accountTotal floatValue]:[self.resultEntity.redPackageAccountTotal floatValue];
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<rect key="frame" x="0.0" y="28" width="768" height="80"/> <rect key="frame" x="0.0" y="28" width="768" height="80"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JBe-hh-kVA" id="xVc-uc-PDl"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JBe-hh-kVA" id="xVc-uc-PDl">
<frame key="frameInset" width="702" height="79"/> <frame key="frameInset" width="702" height="79.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="品牌咨询" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uFh-Bz-DRu" customClass="CustomBorderLabel"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="品牌咨询" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uFh-Bz-DRu" customClass="CustomBorderLabel">
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<rect key="frame" x="0.0" y="0.0" width="536" height="80"/> <rect key="frame" x="0.0" y="0.0" width="536" height="80"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="啊实打实的啊实打实的啊实" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t4k-fa-t7j"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t4k-fa-t7j">
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="但是" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gDl-gb-obg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gDl-gb-obg">
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ARf-Lp-SSe"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ARf-Lp-SSe">
<frame key="frameInset" minX="26.5" height="1" maxX="-228"/> <frame key="frameInset" minX="26.5" height="0.5" maxX="-227.5" maxY="0.5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.92941176469999998" green="0.93333333330000001" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.92941176469999998" green="0.93333333330000001" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view> </view>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundleName</key> <key>CFBundleName</key>
<string>欧立方</string> <string>欧立方</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.2.9</string> <string>2.0.0</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,7 +14,7 @@ PODS: ...@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0) - AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- AliyunOSSiOS (2.5.4) - AliyunOSSiOS (2.6.0)
- Bugly (2.4.2) - Bugly (2.4.2)
- DACircularProgress (2.3.1) - DACircularProgress (2.3.1)
- DZNEmptyDataSet (1.8.1) - DZNEmptyDataSet (1.8.1)
...@@ -53,7 +53,7 @@ PODS: ...@@ -53,7 +53,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- AFNetworking (~> 3.1.0) - AFNetworking (~> 3.1.0)
- AliyunOSSiOS (~> 2.5.1) - AliyunOSSiOS (~> 2.6.0)
- Bugly - Bugly
- DZNEmptyDataSet - DZNEmptyDataSet
- FDFullscreenPopGesture - FDFullscreenPopGesture
...@@ -73,7 +73,7 @@ DEPENDENCIES: ...@@ -73,7 +73,7 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
AliyunOSSiOS: 2bd80cd234763b5cf3948d7eb51769cd1ae694a0 AliyunOSSiOS: 058b038cc82000dadb8f8e3893a97243124f2898
Bugly: b09cd3c7e54048a0e079be88a7a99610f14eab8f Bugly: b09cd3c7e54048a0e079be88a7a99610f14eab8f
DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71 DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7 DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
...@@ -93,6 +93,6 @@ SPEC CHECKSUMS: ...@@ -93,6 +93,6 @@ SPEC CHECKSUMS:
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1 UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4 WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
PODFILE CHECKSUM: b9506980b071315afdb6f8ae15c1e65c84ff99fc PODFILE CHECKSUM: 27d8a893f456fdfcd27760bc0cd46a4c638ea689
COCOAPODS: 1.1.1 COCOAPODS: 1.1.1
...@@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
/** /**
初始化OSSClient,使用默认的本地设置 初始化OSSClient,使用默认的本地设置
@endpoint 指明Bucket所在的Region域名 @endpoint 指明Bucket所在的Region域名,2017年以后苹果要求APP符合ATS政策,这里要写https的endpoint,如 "https://oss-cn-hangzhou.aliyuncs.com"
@credentialProvider 需要实现的签名器 @credentialProvider 需要实现的签名器
*/ */
- (instancetype)initWithEndpoint:(NSString *)endpoint - (instancetype)initWithEndpoint:(NSString *)endpoint
...@@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
/** /**
初始化OSSClient,使用自定义设置 初始化OSSClient,使用自定义设置
@endpoint 指明Bucket所在的Region域名 @endpoint 指明Bucket所在的Region域名,2017年以后苹果要求APP符合ATS政策,这里要写https的endpoint,如 "https://oss-cn-hangzhou.aliyuncs.com"
@credentialProvider 需要实现的签名器 @credentialProvider 需要实现的签名器
@conf 可以设置一些本地参数如重试次数、超时时间等 @conf 可以设置一些本地参数如重试次数、超时时间等
*/ */
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
queue.maxConcurrentOperationCount = 3; queue.maxConcurrentOperationCount = 3;
_ossOperationExecutor = [OSSExecutor executorWithOperationQueue:queue]; _ossOperationExecutor = [OSSExecutor executorWithOperationQueue:queue];
if ([endpoint rangeOfString:@"://"].location == NSNotFound) { if ([endpoint rangeOfString:@"://"].location == NSNotFound) {
endpoint = [@"http://" stringByAppendingString:endpoint]; endpoint = [@"https://" stringByAppendingString:endpoint];
} }
self.endpoint = [endpoint oss_trim]; self.endpoint = [endpoint oss_trim];
self.credentialProvider = credentialProvider; self.credentialProvider = credentialProvider;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#define OSSDefine_h #define OSSDefine_h
#define OSSUAPrefix @"aliyun-sdk-ios" #define OSSUAPrefix @"aliyun-sdk-ios"
#define OSSSDKVersion @"2.5.4" #define OSSSDKVersion @"2.6.0"
#define OSSListBucketResultXMLTOKEN @"ListBucketResult" #define OSSListBucketResultXMLTOKEN @"ListBucketResult"
#define OSSNameXMLTOKEN @"Name" #define OSSNameXMLTOKEN @"Name"
......
...@@ -98,7 +98,7 @@ NSTimeInterval const PRERESOLVE_IN_ADVANCE_IN_SECOND = 10; // 如果发现距离 ...@@ -98,7 +98,7 @@ NSTimeInterval const PRERESOLVE_IN_ADVANCE_IN_SECOND = 10; // 如果发现距离
} }
} }
NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@/%@/d?host=%@", [[OSSIPv6Adapter getInstance] handleIpv4Address:HTTPDNS_SERVER_IP], ACCOUNT_ID, host]]; NSURL * url = [NSURL URLWithString:[NSString stringWithFormat:@"https://%@/%@/d?host=%@", [[OSSIPv6Adapter getInstance] handleIpv4Address:HTTPDNS_SERVER_IP], ACCOUNT_ID, host]];
NSURLSession * session = [NSURLSession sharedSession]; NSURLSession * session = [NSURLSession sharedSession];
NSURLSessionDataTask * dataTask = [session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSURLSessionDataTask * dataTask = [session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* terms of an Apple operating system software license agreement. * terms of an Apple operating system software license agreement.
* *
* Please obtain a copy of the License at * Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file. * https://www.opensource.apple.com/apsl/ and read it before using this file.
* *
* The Original Code and all software distributed under the License are * The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
......
...@@ -136,6 +136,10 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -136,6 +136,10 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
@interface OSSCustomSignerCredentialProvider : NSObject <OSSCredentialProvider> @interface OSSCustomSignerCredentialProvider : NSObject <OSSCredentialProvider>
@property (nonatomic, copy) NSString * (^signContent)(NSString *, NSError **); @property (nonatomic, copy) NSString * (^signContent)(NSString *, NSError **);
/**
任务执行时,这个方法会被调用,进行加签
会在任务执行的后台线程被调用,而非UI线程
*/
- (instancetype)initWithImplementedSigner:(OSSCustomSignContentBlock)signContent; - (instancetype)initWithImplementedSigner:(OSSCustomSignContentBlock)signContent;
@end @end
...@@ -146,6 +150,10 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -146,6 +150,10 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
@property (nonatomic, strong) OSSFederationToken * cachedToken; @property (nonatomic, strong) OSSFederationToken * cachedToken;
@property (nonatomic, copy) OSSFederationToken * (^federationTokenGetter)(); @property (nonatomic, copy) OSSFederationToken * (^federationTokenGetter)();
/**
任务执行时,这个方法会被调用,获取新的ststoken
会在任务执行的后台线程被调用,而非UI线程
*/
- (instancetype)initWithFederationTokenGetter:(OSSGetFederationTokenBlock)federationTokenGetter; - (instancetype)initWithFederationTokenGetter:(OSSGetFederationTokenBlock)federationTokenGetter;
- (OSSFederationToken *)getToken:(NSError **)error; - (OSSFederationToken *)getToken:(NSError **)error;
@end @end
...@@ -595,11 +603,13 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -595,11 +603,13 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
/** /**
回调下载进度 回调下载进度
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingDownloadProgressBlock downloadProgress; @property (nonatomic, copy) OSSNetworkingDownloadProgressBlock downloadProgress;
/** /**
Object下载过程中,会在接收每一段数据后回调这个Block Object下载过程中,会在接收每一段数据后回调这个Block
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingOnRecieveDataBlock onRecieveData; @property (nonatomic, copy) OSSNetworkingOnRecieveDataBlock onRecieveData;
@end @end
...@@ -720,7 +730,8 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -720,7 +730,8 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
@property (nonatomic, strong) NSDictionary * objectMeta; @property (nonatomic, strong) NSDictionary * objectMeta;
/** /**
上传进度回调 上传进度回调,
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress; @property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress;
@end @end
...@@ -814,6 +825,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -814,6 +825,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
/** /**
上传进度回调 上传进度回调
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress; @property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress;
@end @end
...@@ -1014,6 +1026,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -1014,6 +1026,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
/** /**
上传进度回调 上传进度回调
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadPartProgress; @property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadPartProgress;
@end @end
...@@ -1235,6 +1248,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) (); ...@@ -1235,6 +1248,7 @@ typedef OSSFederationToken * (^OSSGetFederationTokenBlock) ();
/** /**
上传进度 上传进度
会在任务执行的后台线程被回调,而非UI线程
*/ */
@property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress; @property (nonatomic, copy) OSSNetworkingUploadProgressBlock uploadProgress;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#define OSS_IOS_SDK_VERSION 2.5.4 #define OSS_IOS_SDK_VERSION OSSSDKVersion
#import "OSSDefine.h" #import "OSSDefine.h"
#import "OSSNetworking.h" #import "OSSNetworking.h"
......
...@@ -152,20 +152,17 @@ int32_t const CHUNK_SIZE = 8 * 1024; ...@@ -152,20 +152,17 @@ int32_t const CHUNK_SIZE = 8 * 1024;
return ip ? [[OSSIPv6Adapter getInstance] handleIpv4Address:ip] : host; return ip ? [[OSSIPv6Adapter getInstance] handleIpv4Address:ip] : host;
} }
+ (BOOL)isNetworkDelegateState + (BOOL)isNetworkDelegateState {
{ NSURL* URL = [[NSURL alloc] initWithString:@"https://m.aliyun.com"];
NSURL* URL = [[NSURL alloc] initWithString:@"http://www.taobao.com"];
NSDictionary *proxySettings = CFBridgingRelease(CFNetworkCopySystemProxySettings()); NSDictionary *proxySettings = CFBridgingRelease(CFNetworkCopySystemProxySettings());
NSArray *proxies = nil; NSArray *proxies = nil;
proxies = CFBridgingRelease(CFNetworkCopyProxiesForURL((__bridge CFURLRef)URL, proxies = CFBridgingRelease(CFNetworkCopyProxiesForURL((__bridge CFURLRef)URL,
(__bridge CFDictionaryRef)proxySettings)); (__bridge CFDictionaryRef)proxySettings));
if (proxies.count) if (proxies.count) {
{
NSDictionary *settings = [proxies objectAtIndex:0]; NSDictionary *settings = [proxies objectAtIndex:0];
NSString* host = [settings objectForKey:(NSString *)kCFProxyHostNameKey]; NSString* host = [settings objectForKey:(NSString *)kCFProxyHostNameKey];
NSNumber* port = [settings objectForKey:(NSString *)kCFProxyPortNumberKey]; NSNumber* port = [settings objectForKey:(NSString *)kCFProxyPortNumberKey];
if (host && port) if (host && port) {
{
return YES; return YES;
} }
} }
...@@ -981,4 +978,4 @@ int32_t const CHUNK_SIZE = 8 * 1024; ...@@ -981,4 +978,4 @@ int32_t const CHUNK_SIZE = 8 * 1024;
return mimeType ? mimeType : @"application/octet-stream"; return mimeType ? mimeType : @"application/octet-stream";
} }
@end @end
\ No newline at end of file
...@@ -36,7 +36,7 @@ $ cd Products && ls ...@@ -36,7 +36,7 @@ $ cd Products && ls
如果工程是通过pod管理依赖,那么在Podfile中加入以下依赖即可,不需要再导入framework: 如果工程是通过pod管理依赖,那么在Podfile中加入以下依赖即可,不需要再导入framework:
``` ```
pod 'AliyunOSSiOS', '~> 2.5.3' pod 'AliyunOSSiOS', '~> 2.5.4'
``` ```
CocoaPods是一个非常优秀的依赖管理工具,推荐参考官方文档: [CocoaPods安装和使用教程](http://code4app.com/article/cocoapods-install-usage) CocoaPods是一个非常优秀的依赖管理工具,推荐参考官方文档: [CocoaPods安装和使用教程](http://code4app.com/article/cocoapods-install-usage)
......
...@@ -14,7 +14,7 @@ PODS: ...@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0) - AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- AliyunOSSiOS (2.5.4) - AliyunOSSiOS (2.6.0)
- Bugly (2.4.2) - Bugly (2.4.2)
- DACircularProgress (2.3.1) - DACircularProgress (2.3.1)
- DZNEmptyDataSet (1.8.1) - DZNEmptyDataSet (1.8.1)
...@@ -53,7 +53,7 @@ PODS: ...@@ -53,7 +53,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- AFNetworking (~> 3.1.0) - AFNetworking (~> 3.1.0)
- AliyunOSSiOS (~> 2.5.1) - AliyunOSSiOS (~> 2.6.0)
- Bugly - Bugly
- DZNEmptyDataSet - DZNEmptyDataSet
- FDFullscreenPopGesture - FDFullscreenPopGesture
...@@ -73,7 +73,7 @@ DEPENDENCIES: ...@@ -73,7 +73,7 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
AliyunOSSiOS: 2bd80cd234763b5cf3948d7eb51769cd1ae694a0 AliyunOSSiOS: 058b038cc82000dadb8f8e3893a97243124f2898
Bugly: b09cd3c7e54048a0e079be88a7a99610f14eab8f Bugly: b09cd3c7e54048a0e079be88a7a99610f14eab8f
DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71 DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7 DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
...@@ -93,6 +93,6 @@ SPEC CHECKSUMS: ...@@ -93,6 +93,6 @@ SPEC CHECKSUMS:
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1 UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4 WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
PODFILE CHECKSUM: b9506980b071315afdb6f8ae15c1e65c84ff99fc PODFILE CHECKSUM: 27d8a893f456fdfcd27760bc0cd46a4c638ea689
COCOAPODS: 1.1.1 COCOAPODS: 1.1.1
...@@ -206,8 +206,10 @@ ...@@ -206,8 +206,10 @@
NSDictionary *dict; NSDictionary *dict;
if ([stateCode isEqualToString:@"requested"]) { if ([stateCode isEqualToString:@"requested"]) {
dict = @{@"title":@"已申请",@"color":RGB(127, 192, 62, 1)}; dict = @{@"title":@"已申请",@"color":RGB(127, 192, 62, 1)};
}else if ([stateCode isEqualToString:@"requested"]) { }else if ([stateCode isEqualToString:@"shipped"]) {
dict = @{@"title":@"已发货",@"color":RGB(245, 185, 74, 1)}; dict = @{@"title":@"已发货",@"color":RGB(245, 185, 74, 1)};
}else if ([stateCode isEqualToString:@"done"]) {
dict = @{@"title":@"已完成",@"color":kMainBlueColor};
} }
return dict; return dict;
} }
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
- (void)uiConfigAction - (void)uiConfigAction
{ {
//场景 //场景
self.sceneLayout.itemSize = CGSizeMake(133, 100); self.sceneLayout.itemSize = CGSizeMake(130, 100);
self.sceneLayout.minimumLineSpacing = 10; self.sceneLayout.minimumLineSpacing = 10;
self.sceneLayout.sectionInset = UIEdgeInsetsMake(0, 10, 0, 10); self.sceneLayout.sectionInset = UIEdgeInsetsMake(0, 10, 0, 10);
self.sceneScrollview.delegate = self; self.sceneScrollview.delegate = self;
...@@ -210,7 +210,6 @@ ...@@ -210,7 +210,6 @@
model.isSelectedState = NO; model.isSelectedState = NO;
} }
model.isSelectedState = YES; model.isSelectedState = YES;
//判断选中的商品是否已经存在 //判断选中的商品是否已经存在
if ([self.shareGoodsArray containsObject:model]) { if ([self.shareGoodsArray containsObject:model]) {
for (TOGoodsEntityModel *newModel in self.shareGoodsArray) { for (TOGoodsEntityModel *newModel in self.shareGoodsArray) {
......
...@@ -176,13 +176,13 @@ ...@@ -176,13 +176,13 @@
/** /**
* 服务器开发地址 * 服务器开发地址
*/ */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL] //#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/** /**
* 服务器测试地址 * 服务器测试地址
*/ */
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL] #define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
//** //**
// * 服务器正式地址 // * 服务器正式地址
...@@ -273,6 +273,16 @@ typedef NS_ENUM(NSInteger,RESULT_STATE){ ...@@ -273,6 +273,16 @@ typedef NS_ENUM(NSInteger,RESULT_STATE){
}; };
/**
点赞或评论
- Comment: 评论
- Praise: 点赞
*/
typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
Comment = 0,
Praise
};
#endif /* PrefixHeader_pch */ #endif /* PrefixHeader_pch */
...@@ -744,7 +744,7 @@ ...@@ -744,7 +744,7 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{ {
__weak typeof(self)weakSelf = self; WS(weakSelf);
[self emptyModel]; [self emptyModel];
if (self.isScene) { if (self.isScene) {
ScreeningCollectionViewCell *cell = (ScreeningCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath]; ScreeningCollectionViewCell *cell = (ScreeningCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
...@@ -834,7 +834,6 @@ ...@@ -834,7 +834,6 @@
animGroup.delegate = self; animGroup.delegate = self;
[imageView.layer addAnimation:animGroup forKey:nil]; [imageView.layer addAnimation:animGroup forKey:nil];
[self performSelector:@selector(removeFromLayer:) withObject:imageView.layer afterDelay:1]; [self performSelector:@selector(removeFromLayer:) withObject:imageView.layer afterDelay:1];
} }
#pragma mark -移除 #pragma mark -移除
...@@ -852,21 +851,17 @@ ...@@ -852,21 +851,17 @@
} }
} }
#pragma mark -友好界面 #pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{ {
return kNoDataImage; return kNoDataImage;
} }
- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
{ {
return [[NSAttributedString alloc]initWithString:@"暂无数据" attributes:nil]; return [[NSAttributedString alloc]initWithString:@"暂无数据" attributes:nil];
} }
#pragma mark -筛选条件 #pragma mark -筛选条件
- (IBAction)ScreeningConditionsSelectedButtonClick:(UIButton *)sender { - (IBAction)ScreeningConditionsSelectedButtonClick:(UIButton *)sender {
......
...@@ -20,7 +20,7 @@ target 'Lighting' do ...@@ -20,7 +20,7 @@ target 'Lighting' do
pod 'Bugly' pod 'Bugly'
pod 'UMengAnalytics', '~> 4.1.2' pod 'UMengAnalytics', '~> 4.1.2'
pod 'PNChart', '~> 0.8.9' pod 'PNChart', '~> 0.8.9'
pod 'AliyunOSSiOS', '~> 2.5.1' pod 'AliyunOSSiOS', '~> 2.6.0'
pod 'PNChart', '~> 0.8.9' pod 'PNChart', '~> 0.8.9'
end end
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