Commit 2739ee41 authored by 曹云霄's avatar 曹云霄

修改项说明:jenkins测试

parent aa4e0c0f
......@@ -258,7 +258,7 @@
_afficheModel.page = page;
_afficheModel.dayCountEquals = 20;
_afficheModel.sort = @"createDate";
_afficheModel.order = SORTDIRECTION_ASC;
_afficheModel.order = SORTDIRECTION_DESC;
_afficheModel.departIdEquals = [Shoppersmanager manager].Shoppers.employee.departid;
_afficheModel.employeeId = [Shoppersmanager manager].Shoppers.employee.fid;
}
......
......@@ -16,7 +16,7 @@
/**
公告
*/
@property (nonatomic,strong) TOAfficheEntity *announcementEntity;
@property (nonatomic,strong) CustomTOAfficheEntity *announcementEntity;
/**
已读
......
......@@ -48,7 +48,7 @@
/**
公告数据源
*/
@property (nonatomic,strong) TOAfficheEntity *afficheResult;
@property (nonatomic,strong) CustomTOAfficheEntity *afficheResult;
......@@ -73,9 +73,10 @@
}
#pragma mark - 设置HeaderView
- (void)setUpTableViewHeaderView:(TOAfficheEntity *)entity
- (void)setUpTableViewHeaderView:(CustomTOAfficheEntity *)entity
{
self.annountcementTitleLabel.text = entity.title;
self.announcementHeaderView.height = entity.titleHeight + 44;
self.annountcementTimeLabel.text = entity.createDate;
self.annountcementTypeLabel.customText = entity.afficheType;
self.annountcementReadCountLabel.text = [NSString stringWithFormat:@"%ld",entity.attachmentUrls.count];
......@@ -104,7 +105,7 @@
[XBLoadingView hideHUDViewWithDefault];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
weakSelf.afficheResult = [[TOAfficheEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
weakSelf.afficheResult = [[CustomTOAfficheEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
WkWebViewViewController *webView = [weakSelf.childViewControllers firstObject];
webView.htmlString = weakSelf.afficheResult.content;
[weakSelf setUpTableViewHeaderView:weakSelf.afficheResult];
......
//
// CustomTOAfficheEntity.h
// Lighting
//
// Created by 曹云霄 on 2016/12/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "opple_objc_json_client.h"
@interface CustomTOAfficheEntity : TOAfficheEntity
/**
公告标题高度
*/
@property (nonatomic,assign) CGFloat titleHeight;
@end
//
// CustomTOAfficheEntity.m
// Lighting
//
// Created by 曹云霄 on 2016/12/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CustomTOAfficheEntity.h"
@implementation CustomTOAfficheEntity
- (CGFloat)titleHeight
{
if (!_titleHeight) {
_titleHeight = [self.title heightWithFontSize:17 width:ScreenWidth-28*2];
}
return _titleHeight;
}
@end
......@@ -55,6 +55,6 @@ typedef NS_ENUM(NSInteger,ItemIndex){
/**
内容
*/
@property (weak, nonatomic) IBOutlet UITextView *contentTextView;
@property (weak, nonatomic) IBOutlet ICRPlaceholderTextView *contentTextView;
@end
......@@ -23,6 +23,7 @@
KeyBoardAccessoryView *toolView = [[KeyBoardAccessoryView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 44)];
toolView.delegate = self;
self.contentTextView.inputAccessoryView = toolView;
self.contentTextView.m_placeHolder = @"请输入内容";
}
#pragma mark - Click
......@@ -74,8 +75,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth-40, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size;
return s.height+20;
return [content heightWithFontSize:14 width:ScreenWidth-40]+20;
}
......
......@@ -22,8 +22,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth-20*2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size;
return s.height;
return [content heightWithFontSize:13 width:ScreenWidth-40];
}
@end
......@@ -22,8 +22,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth-28*2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size;
return s.height;
return [content heightWithFontSize:13 width:ScreenWidth-28*2];
}
@end
......@@ -249,24 +249,28 @@
#pragma mark - 删除帖子
- (IBAction)delecteClickPostAction:(UIButton *)sender
{
[XBLoadingView showHUDViewWithDefault];
WS(weakSelf);
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:SERVERREQUESTURL(DELETEPOST),self.topicDetail.fid] WithRequestType:NetworkRequestWithDELETE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[XBLoadingView showHUDViewWithSuccessText:@"删除成功" completeBlock:^{
if (weakSelf.delectBlock) {
weakSelf.delectBlock(weakSelf.topicDetail.fid);
}
[weakSelf.navigationController popViewControllerAnimated:YES];
}];
}else {
[XBLoadingView showHUDViewWithText:returnValue[@"message"]];
}
} WithFailureBlock:^(NSError *error) {
[XBLoadingView hideHUDViewWithDefault];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
[self promptBoxWithMessage:@"确认删除此贴吗?" cancelBlock:^{
NSLog(@"取消");
} sureBlock:^{
[XBLoadingView showHUDViewWithDefault];
WS(weakSelf);
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:SERVERREQUESTURL(DELETEPOST),self.topicDetail.fid] WithRequestType:NetworkRequestWithDELETE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[XBLoadingView showHUDViewWithSuccessText:@"删除成功" completeBlock:^{
if (weakSelf.delectBlock) {
weakSelf.delectBlock(weakSelf.topicDetail.fid);
}
[weakSelf.navigationController popViewControllerAnimated:YES];
}];
}else {
[XBLoadingView showHUDViewWithText:returnValue[@"message"]];
}
} WithFailureBlock:^(NSError *error) {
[XBLoadingView hideHUDViewWithDefault];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
}];
}];
}
......
......@@ -360,22 +360,27 @@
- (IBAction)publishButtonClickAction:(UIButton *)sender {
[self.view endEditing:YES];
HeadlineTableViewCell *titleCell = [self.publishTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
ContentTableViewCell *contentCell = [self.publishTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
if ([[self class] isBlankString:titleCell.titleTextField.text]) {
[XBLoadingView showHUDViewWithText:@"标题不能为空"];return;
}
if ([[self class] isBlankString:contentCell.contentTextView.text]) {
[XBLoadingView showHUDViewWithText:@"内容不能为空"];return;
}
WS(weakSelf);
if (self.selectedImageArray.count) {
[self uploadAttachments:^(NSArray *OSSKeys) {
[weakSelf submitPost:titleCell.titleTextField.text withContent:contentCell.contentTextView.text withAttachments:OSSKeys];
}];
}else {
[self submitPost:titleCell.titleTextField.text withContent:contentCell.contentTextView.text withAttachments:nil];
}
[self promptBoxWithMessage:@"确认发表吗?" cancelBlock:^{
NSLog(@"取消");
} sureBlock:^{
HeadlineTableViewCell *titleCell = [weakSelf.publishTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
ContentTableViewCell *contentCell = [weakSelf.publishTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
if ([[weakSelf class] isBlankString:titleCell.titleTextField.text]) {
[XBLoadingView showHUDViewWithText:@"标题不能为空"];return;
}
if ([[weakSelf class] isBlankString:contentCell.contentTextView.text]) {
[XBLoadingView showHUDViewWithText:@"内容不能为空"];return;
}
WS(weakSelf);
if (weakSelf.selectedImageArray.count) {
[weakSelf uploadAttachments:^(NSArray *OSSKeys) {
[weakSelf submitPost:titleCell.titleTextField.text withContent:contentCell.contentTextView.text withAttachments:OSSKeys];
}];
}else {
[weakSelf submitPost:titleCell.titleTextField.text withContent:contentCell.contentTextView.text withAttachments:nil];
}
}];
}
#pragma mark - 上传图片附件
......
......@@ -220,6 +220,10 @@
}
studyResult.details = (NSArray<TOStudyResultDetailEntity>*)submitAnswerArray;
studyResult.grade = [NSNumber numberWithInteger:allScore];
//判断考核是否合格
if (self.taskDetails.passGrade < allScore) {
studyResult.examResult = @"1";
}
[XBLoadingView showHUDViewWithDefault];
WS(weakSelf);
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SUBMITANSWER) WithRequestType:ZERO WithParameter:studyResult WithReturnValueBlock:^(id returnValue) {
......
......@@ -54,7 +54,12 @@
NSInteger minute = interval % secondPerHour / secondPerMinute;
// 剩余秒数直接等于秒数对每分钟秒数所取的余数
NSInteger second = interval % secondPerMinute;
return [NSString stringWithFormat:@"%02zd:%02zd:%02zd", hour, minute, second];
NSMutableString *string = [NSMutableString string];
if (hour) {
[string appendString:[NSString stringWithFormat:@"%02zd:",hour]];
}
[string appendString:[NSString stringWithFormat:@"%02zd:%02zd",minute,second]];
return string;
}
return nil;
}
......@@ -63,8 +68,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth*2/3-28*2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size;
return s.height;
return [content heightWithFontSize:13 width:ScreenWidth*2/3-28*2];
}
......
......@@ -24,8 +24,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(437, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size;
return s.height;
return [content heightWithFontSize:15 width:437];
}
@end
......@@ -23,8 +23,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(437, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size;
return s.height;
return [content heightWithFontSize:15 width:437];
}
@end
......@@ -24,8 +24,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth*2/3-28*2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size;
return s.height;
return [content heightWithFontSize:13 width:ScreenWidth*2/3-28*2];
}
@end
......@@ -22,8 +22,7 @@
#pragma mark - 计算高度
- (CGFloat)calculateStudyIntroductionHeight:(NSString *)content
{
CGSize s = [content boundingRectWithSize:CGSizeMake(ScreenWidth*2/3-28*2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size;
return s.height;
return [content heightWithFontSize:13 width:ScreenWidth*2/3-28*2];
}
@end
......@@ -35,6 +35,7 @@
self.onlineLearningFlowLayout.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
self.onlineLearningFlowLayout.minimumLineSpacing = 20;
self.onlineLearningFlowLayout.minimumInteritemSpacing = 20;
}
#pragma mark - 学习模块数据
......
......@@ -21,10 +21,6 @@
*/
@property (weak, nonatomic) IBOutlet UILabel *studyItemTitleLabel;
/**
PPT播放进度
*/
@property (weak, nonatomic) IBOutlet PNCircleChart *seekbarView;
/**
学习时间
......
......@@ -8,6 +8,7 @@
#import "BaseViewController.h"
#import <AVFoundation/AVFoundation.h>
#import <MediaPlayer/MediaPlayer.h>
#import "VIMediaCache.h"
@protocol VideoPlayerDelegate <NSObject>
......
......@@ -8,9 +8,12 @@
#import "VideoHelperViewController.h"
@interface VideoHelperViewController ()<UIDocumentInteractionControllerDelegate>
{
UISlider* volumeViewSlider;//保存需要改变的量
float systemVolume;//系统音量值
CGPoint startPoint;//起始位置
}
/**
......@@ -34,6 +37,17 @@
self.videoNavigationView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
self.videoToolView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideOrShowNavigationBarAndToolBar)]];
//获取系统音量
MPVolumeView *volumeView = [[MPVolumeView alloc] init];
volumeViewSlider = nil;
for (UIView *view in [volumeView subviews]){
if ([view.class.description isEqualToString:@"MPVolumeSlider"]){
volumeViewSlider = (UISlider *)view;
break;
}
}
systemVolume = volumeViewSlider.value;
}
......@@ -216,6 +230,7 @@
#pragma mark - 页面消失后释放播放器
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
[self.customPlayer pause];
[self.customPlayer.currentItem cancelPendingSeeks];
[self.customPlayer.currentItem.asset cancelLoading];
......@@ -241,6 +256,66 @@
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark -开始滑动时
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
if(event.allTouches.count == 1){
//保存当前触摸的位置
CGPoint point = [[touches anyObject] locationInView:self.view];
startPoint = point;
}
}
#pragma mark -手势滑动的距离
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
if(event.allTouches.count == 1){
//计算位移
CGPoint point = [[touches anyObject] locationInView:self.view];
float dy = point.y - startPoint.y;
int index = (int)dy;
//20是因为排除横向滑动时的偏差
if(index > 20){
if(index%5==0){//每10个像素声音减一格
if(systemVolume > 0.1){
systemVolume = systemVolume-0.05;
[volumeViewSlider setValue:systemVolume animated:YES];
[volumeViewSlider sendActionsForControlEvents:UIControlEventTouchUpInside];
}
}
}else if (index < -20){
if(index%5==0){//每10个像素声音增加一格
if(systemVolume>=0 && systemVolume<1){
systemVolume = systemVolume+0.05;
[volumeViewSlider setValue:systemVolume animated:YES];
[volumeViewSlider sendActionsForControlEvents:UIControlEventTouchUpInside];
}
}
}
//音量调节
[self volumeSet:volumeViewSlider];
}
}
#pragma mark -调节音量
- (void)volumeSet:(UISlider *)slider
{
NSArray *audioTracks = [self.playerItem.asset tracksWithMediaType:AVMediaTypeAudio];
NSMutableArray *allAudioParams = [NSMutableArray array];
for (AVAssetTrack *track in audioTracks) {
AVMutableAudioMixInputParameters *audioInputParams =
[AVMutableAudioMixInputParameters audioMixInputParameters];
[audioInputParams setVolume:slider.value atTime:kCMTimeZero];
[audioInputParams setTrackID:[track trackID]];
[allAudioParams addObject:audioInputParams];
}
AVMutableAudioMix *audioMix = [AVMutableAudioMix audioMix];
[audioMix setInputParameters:allAudioParams];
[self.playerItem setAudioMix:audioMix];
}
- (void)dealloc
{
[self customDealloc];
......
......@@ -24,7 +24,7 @@
/**
播放进度
*/
@property (weak, nonatomic) IBOutlet PNCircleChart *seekbarView;
@property (weak, nonatomic) IBOutlet UIView *seekbarView;
/**
学习时间
......@@ -36,4 +36,9 @@
*/
@property (nonatomic,strong) CustomStudyEntity *model;
/**
* 学习进度
*/
@property (nonatomic,strong) PNCircleChart *studyProgressView;
@end
......@@ -13,6 +13,12 @@
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.studyProgressView = [[PNCircleChart alloc]initWithFrame:CGRectMake(0, 0, 30, 30) total:@100 current:@0 clockwise:YES shadow:YES shadowColor:[UIColor lightGrayColor] displayCountingLabel:YES overrideLineWidth:@2];
[self.studyProgressView setStrokeColor:[UIColor colorWithHue:0.00 saturation:0.50 brightness:0.93 alpha:1.00]];
[self.studyProgressView strokeChart];
self.studyProgressView.countingLabel.font = [UIFont systemFontOfSize:8];
[self.seekbarView addSubview:self.studyProgressView];
}
......@@ -21,6 +27,7 @@
_model = model;
self.studyItemTitleLabel.text = _model.title;
self.studyItemTimeLabel.text = _model.videoLength;
[self.studyProgressView updateChartByCurrent:@50];
}
@end
......@@ -96,6 +96,8 @@
- (void)selectApplicableAction:(UITapGestureRecognizer *)sender
{
TOPassLevelEntity *entity = self.emigratedResponse.passLevelEntity[sender.view.tag];
AnswerViewController *answer = [[[self class] getLearningCenterStoryboardClass] instantiateViewControllerWithIdentifier:@"AnswerViewController"];
answer.delegate = self;
answer.passLevelId = entity.fid;
......
......@@ -59,9 +59,9 @@
{
if (_dataArray == nil) {
_dataArray = [NSMutableArray arrayWithObjects:@"体验中心",@"场景库",@"产品库",@"客户管理",@"学习中心",@"关于", nil];
// if (![[Shoppersmanager manager].Shoppers.employee.userKey isEqualToString:@"学习人员"]) {
// [_dataArray removeObject:@"学习中心"];
// }
if (![[Shoppersmanager manager].Shoppers.employee.userKey isEqualToString:@"学习人员"]) {
[_dataArray removeObject:@"学习中心"];
}
}
return _dataArray;
}
......
This diff is collapsed.
This diff is collapsed.
{
"images" : [
{
"orientation" : "portrait",
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "00启动页iPadLandscapeWOSBiOS56_1024x748pt.png",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "00启动页iPadLandscapeiOS56_1024x768pt.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "00启动页iPadLandscapeWOSBiOS56_1024x748pt@2x.png",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "00启动页iPadLandscapeiOS56_1024x768pt@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "00启动页iPhoneLandscapeiOS89_736x414pt@3x.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "00启动页iPadLandscapeiOS789_1024x768pt.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"filename" : "00启动页iPadLandscapeiOS789_1024x768pt@2x.png",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="00启动页" translatesAutoresizingMaskIntoConstraints="NO" id="xXC-mz-iPM">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="xXC-mz-iPM" secondAttribute="trailing" constant="-20" id="L0G-Ig-b2y"/>
<constraint firstItem="xXC-mz-iPM" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="-20" id="qH8-9x-qeD"/>
<constraint firstItem="xXC-mz-iPM" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="topMargin" id="rSq-mE-Nly"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="xXC-mz-iPM" secondAttribute="bottom" id="yv0-m0-dDV"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="520" y="307"/>
</scene>
</scenes>
<resources>
<image name="00启动页" width="1500" height="1125"/>
</resources>
</document>
......@@ -30,7 +30,7 @@
<color key="textColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="luv-aV-HGH">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="luv-aV-HGH">
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.98039215690000003" green="0.32156862749999998" blue="0.050980392159999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -67,11 +67,11 @@
<constraint firstAttribute="height" constant="50" id="PcL-VR-NJS"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YJy-KV-6XP">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YJy-KV-6XP">
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Eh-Eu-GWV">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Eh-Eu-GWV">
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
......
Lighting/Images.xcassets/00启动页.imageset/00启动页.jpg

145 KB

......@@ -2,15 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "00启动页.jpg",
"filename" : "通过.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "通过@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "通过@3x.png",
"scale" : "3x"
}
],
......
Lighting/Images.xcassets/通过.imageset/通过.png

1.91 KB

Lighting/Images.xcassets/通过.imageset/通过@2x.png

3.74 KB

Lighting/Images.xcassets/通过.imageset/通过@3x.png

6.74 KB

......@@ -72,8 +72,6 @@
<string>App需要您的同意,才能访问相机</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>OppleMain</string>
<key>UIMainStoryboardFile~ipad</key>
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
<string>Lighting.xcdatamodel</string>
</dict>
<dict/>
</plist>
#配置以下三项
# 工程名
APP_NAME="Lighting"
# 电脑用户名
USER_NAME="caoyunxiao"
# 证书
CODE_SIGN_DISTRIBUTION="iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd"
# info.plist路径
project_infoplist_path="./${APP_NAME}/Info.plist"
#取版本号
bundleShortVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" "${project_infoplist_path}")
#取build值
bundleVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion" "${project_infoplist_path}")
#日期
DATE="$(date +%Y%m%d %H:%M:%S)"
#ipa文件名字
IPANAME="${APP_NAME}_V${bundleShortVersion}_${DATE}"
#xcarchive路径
archivePath="/Users/${USER_NAME}/Desktop/App_IOS/archive/${APP_NAME}.xcarchive"
#IPA路径
ipa_path="/Users/${USER_NAME}/Desktop/App_IOS/archive/${IPANAME}"
#要上传的ipa文件路径
echo ${ipa_path}/"${APP_NAME}.ipa"> text.txt
echo "=================clean================="
xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" -configuration 'Release' clean
echo "+++++++++++++++++build+++++++++++++++++"
xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" -sdk iphoneos -configuration 'Release' CODE_SIGN_IDENTITY="${CODE_SIGN_DISTRIBUTION}" SYMROOT='$(PWD)'
#打包
xcodebuild -archivePath ${archivePath} -workspace "${APP_NAME}.xcworkspace" -sdk iphoneos -scheme "${APP_NAME}" -configuration "Release" archive
#生成IPA
xcodebuild -exportArchive -archivePath ${archivePath} -exportPath ${ipa_path} -exportOptionsPlist "${project_infoplist_path}"
......@@ -60,7 +60,7 @@ DEPENDENCIES:
- IQKeyboardManager (~> 4.0.7)
- JSONModel (~> 1.2.0)
- Masonry
- MBProgressHUD (~> 0.9)
- MBProgressHUD (~> 0.9.2)
- MJRefresh (~> 3.1.12)
- MMDrawerController (~> 0.6.0)
- MWPhotoBrowser (~> 2.1.2)
......@@ -93,6 +93,6 @@ SPEC CHECKSUMS:
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
PODFILE CHECKSUM: 13102f3a6f79974ee3f0d4933cafc5f034442b18
PODFILE CHECKSUM: b9506980b071315afdb6f8ae15c1e65c84ff99fc
COCOAPODS: 1.1.1
......@@ -60,7 +60,7 @@ DEPENDENCIES:
- IQKeyboardManager (~> 4.0.7)
- JSONModel (~> 1.2.0)
- Masonry
- MBProgressHUD (~> 0.9)
- MBProgressHUD (~> 0.9.2)
- MJRefresh (~> 3.1.12)
- MMDrawerController (~> 0.6.0)
- MWPhotoBrowser (~> 2.1.2)
......@@ -93,6 +93,6 @@ SPEC CHECKSUMS:
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
PODFILE CHECKSUM: 13102f3a6f79974ee3f0d4933cafc5f034442b18
PODFILE CHECKSUM: b9506980b071315afdb6f8ae15c1e65c84ff99fc
COCOAPODS: 1.1.1
......@@ -158,4 +158,18 @@
*/
+ (void)deleteAccountAndPassWord;
/**
比较时间大小
@param dateString 时间字符串
@return 是否比当前时间大
*/
+ (BOOL)compareDateString:(NSString *)dateString;
@end
......@@ -566,6 +566,23 @@
}
/**
比较时间大小
@param dateString 时间字符串
@return 是否比当前时间大
*/
//+ (BOOL)compareDateString:(NSString *)dateString
//{
// NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
// [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
// NSDate *endDate = [dateFormatter dateFromString:end];
// if ([endDate compare:[NSDate date]] == NSOrderedAscending) {
//
// }
//}
- (void)dealloc
{
......
......@@ -20,4 +20,5 @@
- (NSString *)monthString;
- (NSString *)dayString;
@end
//
// NSString+Category.h
// Lighting
//
// Created by 曹云霄 on 2016/12/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Category)
/**
* 计算文字高度
*
* @param fontSize 字体大小
* @param width 宽度
*
* @return 高度
*/
- (CGFloat)heightWithFontSize:(CGFloat)fontSize width:(CGFloat)width;
/**
* 计算文字宽度度
*
* @param fontSize 字体大小
* @param height 高度
*
* @return 宽度
*/
- (CGFloat)widthWithFontSize:(CGFloat)fontSize height:(CGFloat)height;
@end
//
// NSString+Category.m
// Lighting
//
// Created by 曹云霄 on 2016/12/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "NSString+Category.h"
@implementation NSString (Category)
-(CGFloat)heightWithFontSize:(CGFloat)fontSize width:(CGFloat)width
{
NSDictionary *attrs = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]};
return [self boundingRectWithSize:CGSizeMake(width, 0) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attrs context:nil].size.height;
}
-(CGFloat)widthWithFontSize:(CGFloat)fontSize height:(CGFloat)height
{
NSDictionary *attrs = @{NSFontAttributeName:[UIFont systemFontOfSize:fontSize]};
return [self boundingRectWithSize:CGSizeMake(0, height) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:attrs context:nil].size.width;
}
@end
......@@ -51,6 +51,7 @@
#pragma mark - 停止播放
-(void) viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]];
}
......
......@@ -105,8 +105,7 @@
#pragma mark -计算字符串长度
- (CGFloat)calculateStringLength:(NSString *)string
{
CGSize s = [string boundingRectWithSize:CGSizeMake(999999, 50) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size;
return s.width+100;
return [string widthWithFontSize:15 height:50]+100;
}
......
......@@ -52,7 +52,10 @@
#import "CustomTOForumTopicEntity.h"
#import "CustomTOForumReplyEntity.h"
#import "SAMKeychain.h"
#import "PNCircleChart.h"
#import "NSString+Category.h"
#import "CustomTOAfficheEntity.h"
#import "ICRPlaceholderTextView.h"
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
......
//
// ICRPlaceholderTextView.h
// Cruiser
//
// Created by Lili Wang on 15/4/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ICRPlaceholderTextView : UITextView
@property (strong, nonatomic) NSString *m_placeHolder;
@property (strong, nonatomic) UIColor *m_realTextColor UI_APPEARANCE_SELECTOR;
@property (strong, nonatomic) UIColor *m_placeholderColor UI_APPEARANCE_SELECTOR;
@end
//
// ICRPlaceholderTextView.m
// Cruiser
//
// Created by Lili Wang on 15/4/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRPlaceholderTextView.h"
@interface ICRPlaceholderTextView ()
@property (unsafe_unretained, nonatomic, readonly) NSString* realText;
- (void) beginEditing:(NSNotification*) notification;
- (void) endEditing:(NSNotification*) notification;
@end
@implementation ICRPlaceholderTextView
@synthesize m_placeholderColor;
@synthesize m_placeHolder;
@synthesize m_realTextColor;
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initObserver];
}
return self;
}
- (void)awakeFromNib {
[super awakeFromNib];
[self initObserver];
}
- (void)initObserver {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(beginEditing:)
name:UITextViewTextDidBeginEditingNotification
object:self];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(endEditing:)
name:UITextViewTextDidEndEditingNotification
object:self];
self.m_realTextColor = self.textColor;
self.m_placeholderColor = [UIColor lightGrayColor];
}
#pragma mark -
#pragma mark Setter/Getters
- (NSString *)realText {
return [super text];
}
- (void)setTextColor:(UIColor *)textColor {
if ([self.realText isEqualToString:self.m_placeHolder]) {
if ([textColor isEqual:self.m_placeholderColor]){
[super setTextColor:textColor];
} else {
self.m_realTextColor = textColor;
}
}
else {
self.m_realTextColor = textColor;
[super setTextColor:textColor];
}
}
- (void)setM_placeHolder:(NSString *)am_placeHolder {
if ([self.realText isEqualToString:self.m_placeHolder] && ![self isFirstResponder]) {
self.text = am_placeHolder;
}
if (am_placeHolder != self.m_placeHolder) {
m_placeHolder = am_placeHolder;
}
[self endEditing:nil];
}
- (void)setM_placeholderColor:(UIColor *)am_placeholderColor {
m_placeholderColor = am_placeholderColor;
if ([super.text isEqualToString:self.m_placeHolder]) {
self.textColor = self.m_placeholderColor;
}
}
- (NSString *)text {
NSString* text = [super text];
if ([text isEqualToString:self.m_placeHolder]) return @"";
return text;
}
- (void) setText:(NSString *)text {
if (([text isEqualToString:@""] || text == nil) && ![self isFirstResponder]) {
super.text = self.m_placeHolder;
}
else {
super.text = text;
}
if ([text isEqualToString:self.m_placeHolder] || text == nil) {
self.textColor = self.m_placeholderColor;
}
else {
self.textColor = self.m_realTextColor;
}
}
#pragma mark -
#pragma mark - Observer Actions
- (void) beginEditing:(NSNotification*) notification {
if ([self.realText isEqualToString:self.m_placeHolder]) {
super.text = nil;
self.textColor = self.m_realTextColor;
}
}
- (void) endEditing:(NSNotification*) notification {
if ([self.realText isEqualToString:@""] || self.realText == nil) {
super.text = self.m_placeHolder;
self.textColor = self.m_placeholderColor;
}
}
#pragma mark -
#pragma mark Dealloc
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
......@@ -210,6 +210,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@class RsScoreDetails;
@class RsActionResult;
@class RsPrizeBill;
@class CustomTOAfficheEntity;
@class OrderFilter;
@class Draw;
@class HotFilter;
......@@ -290,6 +291,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@protocol TOBankBindEntity @end
@protocol RsPrizeBillResponse @end
@protocol SceneCondition @end
@protocol CustomTOAfficheEntity @end
@protocol SceneFilter @end
@protocol RsShippingAddrEntity @end
@protocol SaveShoppingCartRequest @end
......@@ -3271,7 +3273,7 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*
*/
@property (nonatomic, assign) NSInteger examResult;
@property (nonatomic, copy) NSString *examResult;
/**
* 考核结果明细
* @see TOStudyResultDetailEntity
......@@ -6428,7 +6430,7 @@ extern NSString * const GRADEMETHOD_MANUL;
* @see TOAfficheEntity
*
*/
@property (nonatomic, strong) NSArray<TOAfficheEntity> *afficheEntity;
@property (nonatomic, strong) NSArray<CustomTOAfficheEntity> *afficheEntity;
@end /* interface AfficheResponse */
......
#蒲公英上的User Key
uKey="a6283ec42bbaf9efc5b6f01a750299f3"
#蒲公英上的API Key
apiKey="f9aefb343ecc7959f8e216ed08db1c83"
#要上传的ipa文件路径
IPA_PATH=$(cat text.txt)
rm -rf text.txt
#执行上传至蒲公英的命令
echo "++++++++++++++upload+++++++++++++"
curl -F "file=@${IPA_PATH}" -F "uKey=${uKey}" -F "_api_key=${apiKey}" http://www.pgyer.com/apiv1/app/upload
......@@ -21,5 +21,6 @@ target 'Lighting' do
pod 'UMengAnalytics', '~> 4.1.2'
pod 'PNChart', '~> 0.8.9'
pod 'AliyunOSSiOS', '~> 2.5.1'
pod 'PNChart', '~> 0.8.9'
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