Commit f1a4358f authored by Sandy's avatar Sandy

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

parents 9c2c2f54 3a1564f5
......@@ -109,6 +109,7 @@
#pragma mark - 调用分享
- (void)callSharePlatform:(NSString *)shareWeb withPlatformTag:(UIButton *)sender
{
[UMSocialGlobal shareInstance].isUsingHttpsWhenShareContent = NO;
//创建分享消息对象
UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
//设置文本
......
......@@ -10,4 +10,13 @@
@implementation PhotoManagerCollectionViewCell
- (void)awakeFromNib
{
[super awakeFromNib];
self.photoImageView.contentMode=UIViewContentModeScaleAspectFill;
self.photoImageView.clipsToBounds=YES;
}
@end
......@@ -129,8 +129,6 @@
[self.forumDetailTableView registerClass:[ForumDetailPhotoTableViewCell class] forCellReuseIdentifier:@"ForumDetailPhotoTableViewCell"];
[self setUpHeaderView];
self.forumDetailTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.commentInputTextFieldView.inputAccessoryView = self.bottomView.toolView;
if (![[self class] determinePhotosPermissions]) {
......@@ -444,7 +442,7 @@
#pragma mark - 删除帖子
- (void)delecteClickPostAction
{
ShowDefaultAlertView(self, nil, @"确认删除此贴吗?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"确认删除此贴吗?", UIAlertControllerStyleAlert, ^{
[XBLoadingView showHUDViewWithDefault];
WS(weakSelf);
[HTTP networkWithDictionaryRequestWithURL:[NSString stringWithFormat:SERVERREQUESTURL(DELETEPOST),self.topicDetail.fid] withRequestType:NetworkRequestWithDELETE withParameter:nil withReturnValueBlock:^(id returnValue) {
......
......@@ -21,6 +21,15 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
@interface ForumItemListViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource,DZNEmptyDataSetDelegate,TapClickImageViewDelegate,MWPhotoBrowserDelegate>
/**
结果
*/
@property (nonatomic,strong) ForumTopicResponse *forumResult;
/**
查询
*/
@property (nonatomic,strong) ForumTopicCondition *condition;
@property (nonatomic,strong) NSMutableArray *datasArray;
......@@ -38,7 +47,7 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
if (!_condition) {
_condition = [[ForumTopicCondition alloc] init];
DataPage *page = [[DataPage alloc] init];
page.page = ZERO;
page.page = ONE;
page.rows = KROWS;
_condition.categoryEquals = self.category.fid;
_condition.page = page;
......@@ -83,7 +92,7 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
self.classificationListTableView.mj_header =headerRefresh;
[self.classificationListTableView.mj_header beginRefreshing];
self.classificationListTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ weakSelf.condition.page.page > weakSelf.condition.page.total) {
if (++ weakSelf.condition.page.page > weakSelf.forumResult.totalpages) {
[weakSelf.classificationListTableView.mj_footer endRefreshingWithNoMoreData];
}else
{
......@@ -124,6 +133,7 @@ static NSString *TAGCELL_IDENTIFIER = @"CommentTagTableViewCell";
[weakSelf.datasArray removeAllObjects];
}
ForumTopicResponse *result = [[ForumTopicResponse alloc] initWithDictionary:RESPONSE(returnValue) error:nil];
weakSelf.forumResult = result;
[weakSelf.datasArray addObjectsFromArray:result.forumTopicEntity];
weakSelf.classifyListCountLabel.text = [NSString stringWithFormat:@"%ld",result.total];
}else {
......
......@@ -113,7 +113,7 @@
- (void)longPressClickAction:(UILongPressGestureRecognizer *)sender
{
WS(weakSelf);
ShowDefaultAlertView(self, nil, @"是否删除此项?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"是否删除此项?", UIAlertControllerStyleAlert, ^{
NSInteger index = sender.view.tag;
[weakSelf.imageArray removeObjectAtIndex:index];
[weakSelf.photoManagerCollectionView reloadData];
......
......@@ -361,7 +361,7 @@
[self.view endEditing:YES];
WS(weakSelf);
ShowDefaultAlertView(self, nil, @"确认发表吗?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"确认发表吗?", UIAlertControllerStyleAlert, ^{
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]) {
......
......@@ -19,6 +19,8 @@
CGFloat interval = 15;
for (int i=0; i<3; i++) {
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(i*width+i*interval, 0, width, width)];
imageView.contentMode=UIViewContentModeScaleAspectFill;
imageView.clipsToBounds=YES;
imageView.userInteractionEnabled = YES;
imageView.tag = i;
[imageView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(TapClickAction:)]];
......
......@@ -45,7 +45,7 @@
cell.imageView.image = image;
WS(weakSelf);
cell.blockDelete = ^{
ShowAlertView(weakSelf.viewController, nil, @"确认删除", @"取消", @"确认", UIAlertControllerStyleAlert, ^{
ShowAlertView(nil, @"确认删除", @"取消", @"确认", UIAlertControllerStyleAlert, ^{
NSLog(@"删除");
[weakSelf.toolView deletePhotoWithIndex:indexPath.row];
},
......
......@@ -114,7 +114,7 @@
NSString *timeString = [self timeFormatted:second];
if (![[self class] isBlankString:timeString] && second < (NSInteger)CMTimeGetSeconds(self.playerItem.duration)) {
[self stopPlay];
ShowDefaultAlertView(self, nil, [NSString stringWithFormat:@"上次播放时间:%@,是否继续播放",timeString], UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, [NSString stringWithFormat:@"上次播放时间:%@,是否继续播放",timeString], UIAlertControllerStyleAlert, ^{
[weakSelf.customPlayer seekToTime:CMTimeMake([weakSelf.learningItem.attachment.playTime integerValue], ONE) toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero];
[weakSelf startPlay];
}, ^{
......
......@@ -327,7 +327,7 @@
- (IBAction)exitButtonClickAction:(UIButton *)sender {
WS(weakSelf);
ShowDefaultAlertView(self, nil, @"是否退出闯关?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"是否退出闯关?", UIAlertControllerStyleAlert, ^{
if ([weakSelf.delegate respondsToSelector:@selector(dismissController:)]) {
[weakSelf.delegate dismissController:YES];
}
......
......@@ -41,7 +41,7 @@
[XBLoadingView showHUDViewWithText:@"请选择所在区域"];return;
}
WS(weakSelf);
ShowDefaultAlertView(self, @"提示", @"确认后不可更改,请检查是否正确", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(@"提示", @"确认后不可更改,请检查是否正确", UIAlertControllerStyleAlert, ^{
[XBLoadingView showHUDViewWithDefault];
ToStoreAddress *address = [[ToStoreAddress alloc] init];
address.resellerid = [Shoppersmanager manager].shoppers.employee.currentDepart.fid;
......
......@@ -157,7 +157,7 @@
WS(weakSelf);
TONoticeEntity *entity = self.messageArray[indexPath.row];
if (!entity.readed) {
ShowDefaultAlertView(self, nil, @"是否设置为已读", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"是否设置为已读", UIAlertControllerStyleAlert, ^{
TONoticeEntity *entity = weakSelf.messageArray[indexPath.row];
[weakSelf readedMessage:entity.fid withIndexPath:indexPath];
}, nil);
......
......@@ -538,16 +538,16 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
weChatModel.total = weakSelf.weChatModel.wxcardDenomation;break;
}
}
NSString *message = MESSAGE(returnValue);
NSString *message = returnValue[@"msg"];
if ([[self class] isBlankString: message]) {
[XBLoadingView showHUDViewWithText:[NSString stringWithFormat:@"微信卡劵(%ld元)使用成功",weakSelf.weChatModel.wxcardDenomation]];
NSString *string = [NSString stringWithFormat:@"微信卡劵(%f元)使用成功",weakSelf.weChatModel.wxcardDenomation];
ShowDefaultAlertView(nil, string, UIAlertControllerStyleAlert,nil,nil);
}else {
[XBLoadingView showHUDViewWithText:message];
ShowDefaultAlertView(nil, message, UIAlertControllerStyleAlert, nil, nil);
}
[weakSelf promotionInformationExecutionOrder];
}else{
ShowDefaultAlertView(self, nil, [NSString stringWithFormat:@"微信卡劵使用失败:(%@),是否重试?",returnValue[@"msg"]], UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, [NSString stringWithFormat:@"微信卡劵使用失败:(%@),是否重试?",returnValue[@"msg"]], UIAlertControllerStyleAlert, ^{
[weakSelf scanWeChatCardNumber:weakSelf.tempWeChatModel];
}, ^{
[weakSelf promotionInformationExecutionOrder];
......@@ -685,11 +685,11 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
WS(weakSelf);
//判断是否有已抽奖未使用情况
if (![[self class] isBlankString:self.customerDrawModel.drawId]) {
ShowAlertView(self, nil, @"您有一个抽奖结果未使用,本次支付会默认使用", nil, @"我知道了", UIAlertControllerStyleAlert, ^{
ShowAlertView(nil, @"您有一个抽奖结果未使用,本次支付会默认使用", nil, @"我知道了", UIAlertControllerStyleAlert, ^{
[weakSelf promotionInformationExecutionOrder];
}, nil);
}else {
ShowAlertView(self, nil, @"恭喜您获得一次大转盘抽奖机会!", nil, @"马上参与", UIAlertControllerStyleAlert, ^{
ShowAlertView(nil, @"恭喜您获得一次大转盘抽奖机会!", nil, @"马上参与", UIAlertControllerStyleAlert, ^{
[weakSelf showLuckyDrawControl:model.lottery.uuid andOrderNumber:weakSelf.orderCode luckyDrawFinish:^(NSDictionary *dict) {
weakSelf.customerDrawModel = [[PromotionLuckDrawResultModel alloc]initWithDictionary:dict error:nil];
if ([BaseViewController isBlankString:weakSelf.customerDrawModel.awardId]) {
......
......@@ -127,7 +127,7 @@
- (IBAction)dismissPromotionChooseNavigation:(UIBarButtonItem *)sender {
WS(weakSelf);
ShowDefaultAlertView(self, nil, @"退出后此单将不在享受促销", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"退出后此单将不在享受促销", UIAlertControllerStyleAlert, ^{
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}, nil);
}
......
......@@ -395,7 +395,7 @@
PromotionalReadPacketModel *model = (PromotionalReadPacketModel *)object;
if ([model.body isEqualToString:GUIDE]) {
RedPackageDetail *entity = [[RedPackageDetail alloc] init];
entity.money = [NSNumber numberWithInteger:model.total];
entity.money = [NSNumber numberWithFloat:model.total];
entity.promotionBillNumber = model.promotionBillNumber;
entity.redPrority = [NSString stringWithFormat:@"%ld",model.priority];
[readPacketArray addObject:entity];
......@@ -422,7 +422,7 @@
if ([model.body isEqualToString:CONSUMER]) {
if (![[self class] isBlankString:self.weChatModel.wxcardNumber]) {
order.wxcardNumber = self.weChatModel.wxcardNumber;
order.wxcardDenomation = [NSNumber numberWithInteger:self.weChatModel.wxcardDenomation];
order.wxcardDenomation = [NSNumber numberWithFloat:self.weChatModel.wxcardDenomation];
order.wxCardPrority = model.priority;
}
}
......
......@@ -17,7 +17,7 @@
@property (nonatomic, copy) NSString *type;
//** 抵扣金额 */
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, assign) CGFloat total;
//** 描述 */
@property (nonatomic, copy) NSString *descriptionString;
......
......@@ -17,7 +17,7 @@
@property (nonatomic, copy) NSString *type;
// 卡劵面额
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, assign) CGFloat total;
//** 描述 */
@property (nonatomic, copy) NSString *descriptionString;
......@@ -40,7 +40,7 @@
/**
微信卡劵面额
*/
@property (nonatomic,assign) NSInteger wxcardDenomation;
@property (nonatomic,assign) CGFloat wxcardDenomation;
/**
微信卡劵卡号
......
......@@ -17,7 +17,7 @@
@property (nonatomic, copy) NSString *type;
//** 抵扣金额 */
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, assign) CGFloat total;
//** 描述 */
@property (nonatomic, copy) NSString *descriptionString;
......
......@@ -18,7 +18,7 @@
@property (nonatomic, copy) NSString *type;
//** 红包金额 */
@property (nonatomic, assign) NSInteger total;
@property (nonatomic, assign) CGFloat total;
//** 描述 */
@property (nonatomic, copy) NSString *descriptionString;
......
......@@ -314,7 +314,7 @@
- (void)undoOrderButtonClick:(NSInteger)cellindex
{
WS(weakSelf);
ShowDefaultAlertView(self, @"提示", @"请确认是否撤销订单", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(@"提示", @"请确认是否撤销订单", UIAlertControllerStyleAlert, ^{
[XBLoadingView showHUDViewWithDefault];
OrderBill *model = [weakSelf.datasArray objectAtIndex_opple:cellindex];
[HTTP networkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@",SERVERREQUESTURL(RESETORDER),model.order.orderNumber,model.order.orderState,@"005"] withRequestType:ONE withParameter:nil withReturnValueBlock:^(id returnValue) {
......
......@@ -263,7 +263,7 @@
WS(weakSelf);
// 判断应用是否有使用相机的权限
if (![BaseViewController determineCameraPermissions]) {
ShowAlertView(self, @"提示", @"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机", nil, @"知道了", UIAlertControllerStyleAlert, nil, nil);
ShowAlertView(@"提示", @"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机", nil, @"知道了", UIAlertControllerStyleAlert, nil, nil);
} else {
QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) {
[weakSelf dismissViewControllerAnimated:YES
......
......@@ -138,7 +138,7 @@
WS(weakSelf);
TOJingdongEcardEntity *model = self.datasArray[indexPath.row];
if ([[self class] isBlankString:model.orderReceiptUrl]) {
ShowAlertView(self, nil, @"不能查看未激活卡劵,请先上传小票激活卡劵", nil, @"我知道了", UIAlertControllerStyleAlert, ^{
ShowAlertView(nil, @"不能查看未激活卡劵,请先上传小票激活卡劵", nil, @"我知道了", UIAlertControllerStyleAlert, ^{
CardDetailsViewController *cardDetails = [[[weakSelf class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"CardDetailsViewController"];
[weakSelf.navigationController pushViewController:cardDetails animated:YES];
}, nil);
......
......@@ -210,7 +210,7 @@
- (IBAction)cancellationButtonClick:(UIButton *)sender {
WS(weakSelf);
ShowDefaultAlertView(self, @"提示", @"切换用户将清空用户数据,是否继续?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(@"提示", @"切换用户将清空用户数据,是否继续?", UIAlertControllerStyleAlert, ^{
//清除极光别名
[JPUSHService setTags:nil alias:@"" callbackSelector:nil object:nil];
[XBLoadingView showHUDViewWithDefault];
......@@ -227,7 +227,7 @@
}else
{
ShowAlertView(self, nil, @"切换用户失败", nil, @"我知道了", UIAlertControllerStyleAlert, nil, nil);
ShowAlertView(nil, @"切换用户失败", nil, @"我知道了", UIAlertControllerStyleAlert, nil, nil);
}
} withFailureBlock:^(id error) {
[XBLoadingView hideHUDViewWithDefault];
......
......@@ -49,7 +49,7 @@
if ([self includeChinese:self.inputRebateTextField.text]) {
[XBLoadingView showHUDViewWithText:@"格式不正确"];return;
}
ShowDefaultAlertView(self, nil, [NSString stringWithFormat:@"请确认提现金额:%@元",self.inputRebateTextField.text], UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, [NSString stringWithFormat:@"请确认提现金额:%@元",self.inputRebateTextField.text], UIAlertControllerStyleAlert, ^{
[XBLoadingView showHUDViewWithDefault];
ApplyRequest *withdrawal = [[ApplyRequest alloc] init];
withdrawal.amount = [NSNumber numberWithFloat:[weakSelf.inputRebateTextField.text floatValue]];
......
......@@ -220,13 +220,13 @@
#pragma mark - 提现<tag == 100 产品返利><tag == 101 欧普奖励>
- (IBAction)withdrawalButtonClickAction:(UIButton *)sender {
if (!self.resultEntity.bankCards.count && sender.tag == 101) {
[self showUnboundedAlertView];
}
if (!self.resultEntity.isUsable && sender.tag == 101) {
ShowAlertView(self, @"提示", @"只能在周二和周五发起提现申请!", nil, @"我知道了", UIAlertControllerStyleAlert, nil, nil);
ShowAlertView(@"提示", self.resultEntity.showApplyMessage, nil, @"我知道了", UIAlertControllerStyleAlert, nil, nil);
return;
}
if (!self.resultEntity.bankCards.count && sender.tag == 101) {
[self showUnboundedAlertView];
}
WS(weakSelf);
RebateDetailsViewController *rebateDetails = [[[self class] getMainStoryboardClass] instantiateViewControllerWithIdentifier:@"RebateDetailsViewController"];
rebateDetails.rebateAmount = (sender.tag == 100)?[self.resultEntity.accountTotal floatValue]:[self.resultEntity.redPackageAccountTotal floatValue];
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="ipad9_7" orientation="landscape">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -3178,26 +3178,26 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="00登录-谭" translatesAutoresizingMaskIntoConstraints="NO" id="v3R-bc-vx5">
<rect key="frame" x="30" y="12" width="40" height="40"/>
<rect key="frame" x="30" y="20" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="W92-kD-7pb"/>
<constraint firstAttribute="height" constant="40" id="lGg-wt-ncu"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gWN-DJ-u26">
<rect key="frame" x="75" y="12" width="18" height="20.5"/>
<rect key="frame" x="75" y="20" width="18" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Se9-GU-LNv">
<rect key="frame" x="75" y="37.5" width="14" height="14.5"/>
<rect key="frame" x="75" y="45.5" width="14" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AMb-KR-bVS">
<rect key="frame" x="754" y="15" width="100" height="35"/>
<rect key="frame" x="754" y="23" width="100" height="35"/>
<color key="backgroundColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="7pW-bX-LPK"/>
......@@ -3214,7 +3214,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5m-ce-eoH">
<rect key="frame" x="894" y="15" width="100" height="35"/>
<rect key="frame" x="894" y="23" width="100" height="35"/>
<color key="backgroundColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="5lr-UL-ncX"/>
......@@ -3236,7 +3236,7 @@
<constraint firstItem="AMb-KR-bVS" firstAttribute="centerY" secondItem="Z5m-ce-eoH" secondAttribute="centerY" id="DM2-99-5qv"/>
<constraint firstItem="Z5m-ce-eoH" firstAttribute="leading" secondItem="AMb-KR-bVS" secondAttribute="trailing" constant="40" id="E3W-Dm-C7g"/>
<constraint firstItem="gWN-DJ-u26" firstAttribute="leading" secondItem="v3R-bc-vx5" secondAttribute="trailing" constant="5" id="FUt-74-XXx"/>
<constraint firstItem="v3R-bc-vx5" firstAttribute="top" secondItem="sYW-Jc-Fde" secondAttribute="top" constant="12" id="JhU-py-TgY"/>
<constraint firstItem="v3R-bc-vx5" firstAttribute="top" secondItem="sYW-Jc-Fde" secondAttribute="top" constant="20" id="JhU-py-TgY"/>
<constraint firstItem="Z5m-ce-eoH" firstAttribute="centerY" secondItem="v3R-bc-vx5" secondAttribute="centerY" id="ScI-vs-7Mg"/>
<constraint firstItem="gWN-DJ-u26" firstAttribute="top" secondItem="v3R-bc-vx5" secondAttribute="top" id="V4A-VG-9e5"/>
<constraint firstItem="v3R-bc-vx5" firstAttribute="leading" secondItem="sYW-Jc-Fde" secondAttribute="leading" constant="30" id="m5z-Lt-G4O"/>
......
......@@ -61,7 +61,7 @@ PODS:
- UMengUShare/Core
- WYPopoverController (0.3.9)
- WZLBadge (1.2.5)
- YXAlertController (1.0.1)
- YXAlertController (1.0.2)
DEPENDENCIES:
- AFNetworking (~> 3.1.0)
......@@ -86,7 +86,7 @@ DEPENDENCIES:
- UMengUShare/Social/ReducedWeChat
- WYPopoverController (~> 0.3.9)
- WZLBadge (~> 1.2.5)
- YXAlertController (~> 1.0.1)
- YXAlertController (~> 1.0.2)
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
......@@ -113,8 +113,8 @@ SPEC CHECKSUMS:
UMengUShare: 7756e2e46ceba04e3000fb2c9b1d3f61784ca2ff
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
WZLBadge: 16c08aa0a645e2591690f21cbcb410a3d878c7ac
YXAlertController: 4cd6330eef5380047b28473aef35e3bf942fcced
YXAlertController: 8ca2722656d975858263b62c8ae0328c09005535
PODFILE CHECKSUM: ca99bc7218409a51a770d38b82cc9f99e6c1b2d1
PODFILE CHECKSUM: 91aa6880ad838660fc2adc77a00cb4d4cbd40356
COCOAPODS: 1.2.0
......@@ -208,7 +208,7 @@ static void * MWVideoPlayerObservation = &MWVideoPlayerObservation;
// Navigation buttons
if ([self.navigationController.viewControllers objectAtIndex:0] == self) {
// We're first on stack so show done button
_doneButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Done", nil) style:UIBarButtonItemStylePlain target:self action:@selector(doneButtonPressed:)];
_doneButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"完成", nil) style:UIBarButtonItemStylePlain target:self action:@selector(doneButtonPressed:)];
// Set appearance
[_doneButton setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[_doneButton setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone];
......
......@@ -61,7 +61,7 @@ PODS:
- UMengUShare/Core
- WYPopoverController (0.3.9)
- WZLBadge (1.2.5)
- YXAlertController (1.0.1)
- YXAlertController (1.0.2)
DEPENDENCIES:
- AFNetworking (~> 3.1.0)
......@@ -86,7 +86,7 @@ DEPENDENCIES:
- UMengUShare/Social/ReducedWeChat
- WYPopoverController (~> 0.3.9)
- WZLBadge (~> 1.2.5)
- YXAlertController (~> 1.0.1)
- YXAlertController (~> 1.0.2)
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
......@@ -113,8 +113,8 @@ SPEC CHECKSUMS:
UMengUShare: 7756e2e46ceba04e3000fb2c9b1d3f61784ca2ff
WYPopoverController: a9db25ac2841a686acdc0f3a99bdb21545db32f4
WZLBadge: 16c08aa0a645e2591690f21cbcb410a3d878c7ac
YXAlertController: 4cd6330eef5380047b28473aef35e3bf942fcced
YXAlertController: 8ca2722656d975858263b62c8ae0328c09005535
PODFILE CHECKSUM: ca99bc7218409a51a770d38b82cc9f99e6c1b2d1
PODFILE CHECKSUM: 91aa6880ad838660fc2adc77a00cb4d4cbd40356
COCOAPODS: 1.2.0
......@@ -18,19 +18,17 @@
/**
默认提示选择框
@param viewController 控制器对象
@param title 提示标题
@param message 提示说明
@param style 风格
@param completed 确定回调
@param canceled 取消回调
*/
extern void ShowDefaultAlertView(UIViewController *viewController,NSString *title,NSString *message,UIAlertControllerStyle style,void(^completed)(),void(^canceled)());
extern void ShowDefaultAlertView(NSString *title,NSString *message,UIAlertControllerStyle style,void(^completed)(),void(^canceled)());
/**
提示选择框
@param viewController 控制器对象
@param title 提示标题
@param message 提示说明
@param cancelTitle 取消按钮
......@@ -39,7 +37,7 @@ extern void ShowDefaultAlertView(UIViewController *viewController,NSString *titl
@param completed 确定回调
@param canceled 取消回调
*/
extern void ShowAlertView(UIViewController *viewController,NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)());
extern void ShowAlertView(NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)());
@end
......@@ -11,28 +11,35 @@
@implementation YXAlertController
#pragma mark -获取初始化alertView
/**
初始化base
@param title 提示标题
@param message 提示说明
@param style 风格
@return UIAlertController
*/
UIAlertController *BaseAlert(NSString *title,NSString *message,UIAlertControllerStyle style) {
UIAlertController *alertContr = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:style];
UIAlertController *alertContr = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
return alertContr;
}
/**
默认提示选择框
@param viewController 控制器对象
@param title 提示标题
@param message 提示说明
@param style 风格
@param completed 确定回调
@param canceled 取消回调
*/
void ShowDefaultAlertView(UIViewController *viewController,NSString *title,NSString *message,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
void ShowDefaultAlertView(NSString *title,NSString *message,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
UIAlertController *alert = BaseAlert(title, message, style);
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
......@@ -42,14 +49,13 @@ void ShowDefaultAlertView(UIViewController *viewController,NSString *title,NSStr
completed();
}
}]];
[viewController presentViewController:alert animated:YES completion:nil];
[AppRootViewController() presentViewController:alert animated:YES completion:nil];
}
/**
提示选择框
@param viewController 控制器对象
@param title 提示标题
@param message 提示说明
@param cancelTitle 取消按钮
......@@ -58,11 +64,11 @@ void ShowDefaultAlertView(UIViewController *viewController,NSString *title,NSStr
@param completed 确定回调
@param canceled 取消回调
*/
void ShowAlertView(UIViewController *viewController,NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
void ShowAlertView(NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
UIAlertController *alert = BaseAlert(title, message, style);
if (cancelTitle) {
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
......@@ -72,19 +78,27 @@ void ShowAlertView(UIViewController *viewController,NSString *title,NSString *me
[alert addAction:[UIAlertAction actionWithTitle:DefaultTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (completed) {
completed();
};
}
}]];
}
UIViewController *VC = [UIApplication sharedApplication].keyWindow.rootViewController;
[VC presentViewController:alert animated:YES completion:nil];
}
[AppRootViewController() presentViewController:alert animated:YES completion:nil];
}
/**
自动获取app最顶层控制器
@return UIViewController
*/
UIViewController *AppRootViewController() {
UIViewController *controller = [UIApplication sharedApplication].keyWindow.rootViewController;
if (controller.presentedViewController != nil) {
controller = controller.presentedViewController;
}
return controller;
}
......
......@@ -6608,6 +6608,8 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property (nonatomic, strong) NSArray<TOBankCardEntity> *bankCards;
@property (nonatomic,copy) NSString *showApplyMessage;
@end /* interface EarningsResponse */
......
......@@ -142,9 +142,11 @@
shareObject.webpageUrl = panoUrl;
messageObject.shareObject = shareObject;
}
[UMSocialGlobal shareInstance].isUsingHttpsWhenShareContent = NO;
[[UMSocialManager defaultManager] shareToPlatform:UMSocialPlatformType_WechatTimeLine messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
if (error) {
NSLog(@"************Share fail with error %@*********",error);
ShowDefaultAlertView(nil, @"分享失败", UIAlertControllerStyleAlert, nil, nil);
}else{
[XBLoadingView showHUDViewWithSuccessText:@"分享微信朋友圈成功" completeBlock:nil];
}
......@@ -195,8 +197,7 @@
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
WS(weakSelf);
if (distanceFromBottom <= height && self.type == Study) {
ShowDefaultAlertView(self, nil, @"学习完成,是否开始考核?", UIAlertControllerStyleAlert, ^{
ShowDefaultAlertView(nil, @"学习完成,是否开始考核?", UIAlertControllerStyleAlert, ^{
if (weakSelf.scrollViewEndBottomBlock) {
weakSelf.scrollViewEndBottomBlock(weakSelf.indexPath);
}
......
......@@ -673,7 +673,6 @@
NSDate * needFormatDate = [dateFormatter dateFromString:dateString];
// ------取当前时间和转换时间两个日期对象的时间间隔
NSTimeInterval time = [nowDate timeIntervalSinceDate:needFormatDate];
NSLog(@"time----%f",time);
// ------再然后,把间隔的秒数折算成天数和小时数:
NSString *dateStr = [[NSString alloc] init];
......
......@@ -11,6 +11,17 @@
#import "CYConstManager.h"
/**
* 禁止所有的打印,提交AppStore时使用
*/
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif
/**
* 判断请求是否成功
......
......@@ -22,7 +22,7 @@ target 'Lighting' do
pod 'JPush', '~> 3.0.1'
pod 'WZLBadge', '~> 1.2.5'
pod 'UITableView+FDTemplateLayoutCell', '~> 1.5.beta'
pod 'YXAlertController', '~> 1.0.1'
pod 'YXAlertController', '~> 1.0.2'
pod 'iCarousel', '~> 1.8.3'
pod 'UMengAnalytics'
pod 'Bugly', '~> 2.4.7'
......
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