Commit 3a1564f5 authored by 曹云霄's avatar 曹云霄

修复论坛帖子分页查询,优化图片显示压缩

parent 6b0b89b8
......@@ -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;
}
......
......@@ -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 {
......
......@@ -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:)]];
......
......@@ -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(@"提示", @"只能在周二和周五发起提现申请!", 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"/>
......
......@@ -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];
......
......@@ -67,16 +67,21 @@ void ShowDefaultAlertView(NSString *title,NSString *message,UIAlertControllerSty
void ShowAlertView(NSString *title,NSString *message,NSString *cancelTitle,NSString *DefaultTitle,UIAlertControllerStyle style,void(^completed)(),void(^canceled)()) {
UIAlertController *alert = BaseAlert(title, message, style);
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
}]];
[alert addAction:[UIAlertAction actionWithTitle:DefaultTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (completed) {
completed();
}
}]];
if (cancelTitle) {
[alert addAction:[UIAlertAction actionWithTitle:cancelTitle style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
if (canceled) {
canceled();
}
}]];
}
if (DefaultTitle) {
[alert addAction:[UIAlertAction actionWithTitle:DefaultTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
if (completed) {
completed();
}
}]];
}
[AppRootViewController() presentViewController:alert animated:YES completion:nil];
}
......
......@@ -6608,6 +6608,8 @@ extern NSString * const GRADEMETHOD_MANUL;
*
*/
@property (nonatomic, strong) NSArray<TOBankCardEntity> *bankCards;
@property (nonatomic,copy) NSString *showApplyMessage;
@end /* interface EarningsResponse */
......
......@@ -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
/**
* 判断请求是否成功
......
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