Commit e639546a authored by admin's avatar admin

修改问题与知识界面相关

parent 3e71de06
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
#define kCommentWithStarViewHeight 325 #define kCommentWithStarViewHeight 325
#define kTaxisViewHeight 150 #define kTaxisViewHeight 150
#define kScreenViewHeight 240 #define kScreenViewHeight 240
#define kMoreScreenViewHeight 410 #define kMoreScreenViewHeight 310
#define kRefreshInspectPointNotification @"refreshInspectPoint" #define kRefreshInspectPointNotification @"refreshInspectPoint"
......
...@@ -30,7 +30,16 @@ ...@@ -30,7 +30,16 @@
_question = question; _question = question;
// 标题 // 标题
self.titleLabel.text = [NSString stringWithFormat:@"%@",question.title]; // self.titleLabel.text = [NSString stringWithFormat:@"%@",question.title];
// NSString *intro = [NSString stringWithFormat:@"%@", question.content];
// NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
// NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
// [paragraphStyle setLineSpacing:3];
// [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, intro.length)];
// [self.detailsLabel setAttributedText:attributedString];
// 反馈(副标题) // 反馈(副标题)
self.detailsLabel.text = [NSString stringWithFormat:@"%@", question.content]; self.detailsLabel.text = [NSString stringWithFormat:@"%@", question.content];
// 服务类型 // 服务类型
...@@ -118,24 +127,33 @@ ...@@ -118,24 +127,33 @@
if (!_detailsLabel) { if (!_detailsLabel) {
_detailsLabel = [[UILabel alloc] init]; _detailsLabel = [[UILabel alloc] init];
_detailsLabel.font = [UIFont systemFontOfSize:15.0]; _detailsLabel.font = [UIFont systemFontOfSize:15.0];
_detailsLabel.numberOfLines = 2;
_detailsLabel.translatesAutoresizingMaskIntoConstraints = NO; _detailsLabel.translatesAutoresizingMaskIntoConstraints = NO;
_detailsLabel.textColor = kQuestionCellTitleColor; _detailsLabel.textColor = kQuestionCellTitleColor;
[self.contentView addSubview:_detailsLabel]; [self.contentView addSubview:_detailsLabel];
// 顶端 // 顶端
NSLayoutConstraint *detailsTop = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; NSLayoutConstraint *detailsTop = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:8];
[self.contentView addConstraint:detailsTop]; [self.contentView addConstraint:detailsTop];
// 左边 // 左边
NSLayoutConstraint *detailsLeft = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20]; NSLayoutConstraint *detailsLeft = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:detailsLeft]; [self.contentView addConstraint:detailsLeft];
// NSLayoutConstraint *titleRight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.hotLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:-15];
// [self.contentView addConstraint:titleRight];
// 右边 // 右边
NSLayoutConstraint *detailsRight = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20]; NSLayoutConstraint *detailsRight = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.hotLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:-10];
[self.contentView addConstraint:detailsRight]; [self.contentView addConstraint:detailsRight];
// // 右边
// NSLayoutConstraint *detailsRight = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
// [self.contentView addConstraint:detailsRight];
// 高度 // 高度
NSLayoutConstraint *detailsHeight = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25]; NSLayoutConstraint *detailsHeight = [NSLayoutConstraint constraintWithItem:_detailsLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:45];
[self.contentView addConstraint:detailsHeight]; [self.contentView addConstraint:detailsHeight];
} }
return _detailsLabel; return _detailsLabel;
...@@ -152,7 +170,7 @@ ...@@ -152,7 +170,7 @@
[self.contentView addSubview:_stateLabel]; [self.contentView addSubview:_stateLabel];
// 顶端 // 顶端
NSLayoutConstraint *stateTop = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.detailsLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:3]; NSLayoutConstraint *stateTop = [NSLayoutConstraint constraintWithItem:_stateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.detailsLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.contentView addConstraint:stateTop]; [self.contentView addConstraint:stateTop];
// 左边 // 左边
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
@property (nonatomic, strong) ScopeTableView *scopeTableView; @property (nonatomic, strong) ScopeTableView *scopeTableView;
@property (nonatomic, strong) GroupTableView *groupTableView; @property (nonatomic, strong) GroupTableView *groupTableView;
@property (nonatomic, strong) CategoryTableView *categoryTableView; @property (nonatomic, strong) CategoryTableView *categoryTableView;
@property (nonatomic, strong) UITextView *textView1; //@property (nonatomic, strong) UITextView *textView1;
@property (nonatomic, strong) UITextView *textView2; //@property (nonatomic, strong) UITextView *textView2;
@property (nonatomic, strong) StateTableView *stateTableView; @property (nonatomic, strong) StateTableView *stateTableView;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- (void)setup - (void)setup
{ {
self.groupTabBar = [[GroupTabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 350)]; self.groupTabBar = [[GroupTabBar alloc] initWithFrame:CGRectMake(0, 0, 100, 250)];
_groupTabBar.delegate = self; _groupTabBar.delegate = self;
[self addSubview:_groupTabBar]; [self addSubview:_groupTabBar];
...@@ -56,25 +56,25 @@ ...@@ -56,25 +56,25 @@
self.categoryTableView = [[CategoryTableView alloc] init]; self.categoryTableView = [[CategoryTableView alloc] init];
GroupItems *categoryItem = [[GroupItems alloc] initWithTitle:@"问题分类" view:_categoryTableView]; GroupItems *categoryItem = [[GroupItems alloc] initWithTitle:@"问题分类" view:_categoryTableView];
self.textView1 = [[UITextView alloc] init]; // self.textView1 = [[UITextView alloc] init];
_textView1.delegate = self; // _textView1.delegate = self;
_textView1.tag = 9991; // _textView1.tag = 9991;
self.placeholderLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)]; // self.placeholderLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)];
self.placeholderLabel1.text = @"请输入标题..."; // self.placeholderLabel1.text = @"请输入标题...";
self.placeholderLabel1.font = [UIFont systemFontOfSize:15.0]; // self.placeholderLabel1.font = [UIFont systemFontOfSize:15.0];
self.placeholderLabel1.textColor = kOnLineCellDetailColor; // self.placeholderLabel1.textColor = kOnLineCellDetailColor;
[self.textView1 addSubview:self.placeholderLabel1]; // [self.textView1 addSubview:self.placeholderLabel1];
GroupItems *textViewItem1 = [[GroupItems alloc] initWithTitle:@"标题类似于" view:_textView1]; // GroupItems *textViewItem1 = [[GroupItems alloc] initWithTitle:@"标题类似于" view:_textView1];
//
self.textView2 = [[UITextView alloc] init]; // self.textView2 = [[UITextView alloc] init];
_textView2.delegate = self; // _textView2.delegate = self;
_textView2.tag = 9992; // _textView2.tag = 9992;
self.placeholderLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)]; // self.placeholderLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 100, 30)];
self.placeholderLabel2.text = @"请输入关键字..."; // self.placeholderLabel2.text = @"请输入关键字...";
self.placeholderLabel2.font = [UIFont systemFontOfSize:15.0]; // self.placeholderLabel2.font = [UIFont systemFontOfSize:15.0];
self.placeholderLabel2.textColor = kOnLineCellDetailColor; // self.placeholderLabel2.textColor = kOnLineCellDetailColor;
[self.textView2 addSubview:self.placeholderLabel2]; // [self.textView2 addSubview:self.placeholderLabel2];
GroupItems *textViewItem2 = [[GroupItems alloc] initWithTitle:@"关键字类似于" view:_textView2]; // GroupItems *textViewItem2 = [[GroupItems alloc] initWithTitle:@"关键字类似于" view:_textView2];
self.stateTableView = [[StateTableView alloc] init]; self.stateTableView = [[StateTableView alloc] init];
GroupItems *stateItem = [[GroupItems alloc] initWithTitle:@"问题状态" view:_stateTableView]; GroupItems *stateItem = [[GroupItems alloc] initWithTitle:@"问题状态" view:_stateTableView];
...@@ -85,12 +85,14 @@ ...@@ -85,12 +85,14 @@
[self insertSubview:_scopeTableView belowSubview:_groupTabBar]; [self insertSubview:_scopeTableView belowSubview:_groupTabBar];
[self insertSubview:_groupTableView belowSubview:_groupTabBar]; [self insertSubview:_groupTableView belowSubview:_groupTabBar];
[self insertSubview:_categoryTableView belowSubview:_groupTabBar]; [self insertSubview:_categoryTableView belowSubview:_groupTabBar];
[self insertSubview:_textView1 belowSubview:_groupTabBar]; // [self insertSubview:_textView1 belowSubview:_groupTabBar];
[self insertSubview:_textView2 belowSubview:_groupTabBar]; // [self insertSubview:_textView2 belowSubview:_groupTabBar];
[self insertSubview:_stateTableView belowSubview:_groupTabBar]; [self insertSubview:_stateTableView belowSubview:_groupTabBar];
[self insertSubview:_timeTableView belowSubview:_groupTabBar]; [self insertSubview:_timeTableView belowSubview:_groupTabBar];
_groupTabBar.items = @[scopeItem, groupItem, categoryItem, textViewItem1, textViewItem2, stateItem, timeItem]; _groupTabBar.items = @[scopeItem, groupItem, categoryItem, stateItem, timeItem];
// _groupTabBar.items = @[scopeItem, groupItem, categoryItem, textViewItem1, textViewItem2, stateItem, timeItem];
[_groupTabBar showIndex:0]; [_groupTabBar showIndex:0];
self.backView.backgroundColor = [UIColor whiteColor]; self.backView.backgroundColor = [UIColor whiteColor];
...@@ -184,45 +186,45 @@ ...@@ -184,45 +186,45 @@
return _submitBtn; return _submitBtn;
} }
#pragma mark - UITextView Delegate //#pragma mark - UITextView Delegate
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { //- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
if (![text isEqualToString:@""]) { // if (![text isEqualToString:@""]) {
if (textView.tag == 9991) { // if (textView.tag == 9991) {
self.placeholderLabel1.hidden = YES; // self.placeholderLabel1.hidden = YES;
} else { // } else {
self.placeholderLabel2.hidden = YES; // self.placeholderLabel2.hidden = YES;
} // }
} // }
//
if ([text isEqualToString:@""] && range.location == 0 && range.length == 1) { // if ([text isEqualToString:@""] && range.location == 0 && range.length == 1) {
if (textView.tag == 9991) { // if (textView.tag == 9991) {
self.placeholderLabel1.hidden = NO; // self.placeholderLabel1.hidden = NO;
} else { // } else {
self.placeholderLabel2.hidden = NO; // self.placeholderLabel2.hidden = NO;
} // }
} // }
//
if ([text isEqualToString:@"\n"]) { // if ([text isEqualToString:@"\n"]) {
[self.textView1 resignFirstResponder]; // [self.textView1 resignFirstResponder];
[self.textView2 resignFirstResponder]; // [self.textView2 resignFirstResponder];
//
if (textView.tag == 9991) { // if (textView.tag == 9991) {
if (textView.text.length != 0) { // if (textView.text.length != 0) {
self.placeholderLabel1.hidden = YES; // self.placeholderLabel1.hidden = YES;
} else { // } else {
self.placeholderLabel1.hidden = NO; // self.placeholderLabel1.hidden = NO;
} // }
} else { // } else {
if (textView.text.length != 0) { // if (textView.text.length != 0) {
self.placeholderLabel2.hidden = YES; // self.placeholderLabel2.hidden = YES;
} else { // } else {
self.placeholderLabel2.hidden = NO; // self.placeholderLabel2.hidden = NO;
} // }
} // }
return NO; // return NO;
} // }
//
return YES; // return YES;
} //}
@end @end
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
// 分组 // 分组
@property (nonatomic, assign) NSInteger groupRow; @property (nonatomic, assign) NSInteger groupRow;
@property (nonatomic, strong) NSMutableArray *allGroupNameArray; @property (nonatomic, strong) NSMutableArray *allGroupNameArray;
@property (nonatomic, strong) NSArray *queryOrders;
// 分类 // 分类
@property (nonatomic, copy) NSString *categoryName; @property (nonatomic, copy) NSString *categoryName;
@property (nonatomic, assign) NSInteger stateRow; @property (nonatomic, assign) NSInteger stateRow;
...@@ -132,13 +132,18 @@ ...@@ -132,13 +132,18 @@
NSString *urlStr = [NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionListURL]; NSString *urlStr = [NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionListURL];
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"]; NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSArray *queryOrders = @[@{@"field":@"resolveTime",
@"direction":@"desc"}];
_queryOrders = queryOrders;
// 请求参数 // 请求参数
NSDictionary *parameters = @{@"user":user_uuid, NSDictionary *parameters = @{@"user":user_uuid,
@"scope":@"all", @"scope":@"all",
@"pageNumber":@(0), @"pageNumber":@(0),
@"pageSize":@(20) @"pageSize":@(20),
@"queryOrders":queryOrders
}; };
// 发起请求 // 发起请求
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:urlStr]; HttpClient *httpClient = [[HttpClient alloc] initWithUrl:urlStr];
// //
...@@ -184,7 +189,8 @@ ...@@ -184,7 +189,8 @@
NSDictionary *parameters = @{@"user":user_uuid, NSDictionary *parameters = @{@"user":user_uuid,
@"scope":@"all", @"scope":@"all",
@"pageNumber":@(_page), @"pageNumber":@(_page),
@"pageSize":pageSize @"pageSize":pageSize,
@"queryOrders":_queryOrders
}; };
// 发起请求 // 发起请求
...@@ -335,6 +341,7 @@ ...@@ -335,6 +341,7 @@
} }
if (!_taxisView) { if (!_taxisView) {
_taxisView = [[TaxisView alloc] init]; _taxisView = [[TaxisView alloc] init];
_taxisView.tag = 3928342;
_taxisView.backgroundColor = [UIColor whiteColor]; _taxisView.backgroundColor = [UIColor whiteColor];
} }
...@@ -423,24 +430,80 @@ ...@@ -423,24 +430,80 @@
- (void)searchBarClick:(UIButton *)sender - (void)searchBarClick:(UIButton *)sender
{ {
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"content CONTAINS %@ || title CONTAINS %@", self.searchBar.searchTextFiled.text, self.searchBar.searchTextFiled.text]; if (_searchBar.searchTextFiled.text.length == 0) {
NSArray *arrayPre=[_allQuestionArray filteredArrayUsingPredicate:predicate]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"请输入问题的关键字!" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
_allQuestionArray = [NSMutableArray arrayWithArray:arrayPre]; [alert show];
if (_allQuestionArray.count == 0) {
if (_tableView) {
[_tableView removeFromSuperview];
_tableView = nil;
}
self.noDataView.backgroundColor = [UIColor whiteColor];
} else { } else {
if (_noDataView) { NSString *urlStr = [NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionListURL];
[_noDataView removeFromSuperview]; NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
_noDataView = nil; NSNumber *pageSize = [[NSUserDefaults standardUserDefaults] objectForKey:@"requestNumber"];
} NSDictionary *parameters = @{@"user":user_uuid,
self.searchBar.backgroundColor = kSectionBackGroundColor; @"pageNumber":@(0),
[self.tableView reloadData]; @"pageSize":pageSize,
@"keyword":_searchBar.searchTextFiled.text,
@"queryOrders":@[@{@"field":@"keyword",
@"direction":@"asc"}]
};
// 发起请求
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:urlStr];
//
__block QuestionViewController *weakSelf = self;
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
// 请求问题列表
[httpClient getQuestionListWithParameters:parameters completion:^(id response, NSError *error) {
NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSMutableArray *tempArray = [NSMutableArray array];
for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init];
[question setValuesForKeysWithDictionary:questionDict];
[tempArray addObject:question];
}
_allQuestionArray = tempArray;
if (_allQuestionArray.count == 0) {
if (_tableView) {
[_tableView removeFromSuperview];
_tableView = nil;
}
weakSelf.noDataView.backgroundColor = [UIColor whiteColor];
[MBProgressHUD hideHUDForView:weakSelf.view animated:YES];
} else {
if (_noDataView) {
[_noDataView removeFromSuperview];
_noDataView = nil;
}
weakSelf.tableView.delegate = weakSelf;
weakSelf.tableView.dataSource = weakSelf;
[weakSelf.tableView reloadData];
[MBProgressHUD hideHUDForView:weakSelf.view animated:YES];
}
self.menuView.backgroundColor = kInspectSectionBackGroundColor;
}];
} }
// NSPredicate *predicate = [NSPredicate predicateWithFormat:@"content CONTAINS %@ || title CONTAINS %@", self.searchBar.searchTextFiled.text, self.searchBar.searchTextFiled.text];
// NSArray *arrayPre=[_allQuestionArray filteredArrayUsingPredicate:predicate];
// _allQuestionArray = [NSMutableArray arrayWithArray:arrayPre];
//
// if (_allQuestionArray.count == 0) {
// if (_tableView) {
// [_tableView removeFromSuperview];
// _tableView = nil;
// }
// self.noDataView.backgroundColor = [UIColor whiteColor];
// } else {
// if (_noDataView) {
// [_noDataView removeFromSuperview];
// _noDataView = nil;
// }
// self.searchBar.backgroundColor = kSectionBackGroundColor;
// [self.tableView reloadData];
// }
} }
// 重置按钮 // 重置按钮
...@@ -454,8 +517,8 @@ ...@@ -454,8 +517,8 @@
[_screenView.stateTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; [_screenView.stateTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[_screenView.timeTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; [_screenView.timeTableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
_screenView.textView1.text = @""; // _screenView.textView1.text = @"";
_screenView.textView2.text = @""; // _screenView.textView2.text = @"";
} }
...@@ -501,19 +564,22 @@ ...@@ -501,19 +564,22 @@
NSArray *array = @[@{@"field":@"category", NSArray *array = @[@{@"field":@"category",
@"direction":@"asc"}]; @"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"]; [parameters setObject:array forKey:@"queryOrders"];
} else if (_screenView.groupTabBar.selectNumber == 3) { }
[parameters setObject:_screenView.textView1.text forKey:@"contentLike"]; // else if (_screenView.groupTabBar.selectNumber == 3) {
NSArray *array = @[@{@"field":@"contentLike", // [parameters setObject:_screenView.textView1.text forKey:@"contentLike"];
@"direction":@"asc"}]; // NSArray *array = @[@{@"field":@"contentLike",
[parameters setObject:array forKey:@"queryOrders"]; // @"direction":@"asc"}];
// [parameters setObject:array forKey:@"queryOrders"];
} else if (_screenView.groupTabBar.selectNumber == 4) { //
[parameters setObject:_screenView.textView2.text forKey:@"keyword"]; // }
NSArray *array = @[@{@"field":@"keyword", // else if (_screenView.groupTabBar.selectNumber == 4) {
@"direction":@"asc"}]; // [parameters setObject:_screenView.textView2.text forKey:@"keyword"];
[parameters setObject:array forKey:@"queryOrders"]; // NSArray *array = @[@{@"field":@"keyword",
// @"direction":@"asc"}];
} else if (_screenView.groupTabBar.selectNumber == 5) { // [parameters setObject:array forKey:@"queryOrders"];
//
// }
else if (_screenView.groupTabBar.selectNumber == 3) {
if (_stateRow == 0) { if (_stateRow == 0) {
[parameters setObject:@"created" forKey:@"state"]; [parameters setObject:@"created" forKey:@"state"];
} else if (_stateRow == 1) { } else if (_stateRow == 1) {
...@@ -524,7 +590,7 @@ ...@@ -524,7 +590,7 @@
NSArray *array = @[@{@"field":@"state", NSArray *array = @[@{@"field":@"state",
@"direction":@"asc"}]; @"direction":@"asc"}];
[parameters setObject:array forKey:@"queryOrders"]; [parameters setObject:array forKey:@"queryOrders"];
} else if (_screenView.groupTabBar.selectNumber == 6) { } else if (_screenView.groupTabBar.selectNumber == 4) {
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
...@@ -657,14 +723,16 @@ ...@@ -657,14 +723,16 @@
} else if (sender.tag - kTAxisBtnTag == 2) { } else if (sender.tag - kTAxisBtnTag == 2) {
queryOrders = @[@{@"field":@"likeCount", queryOrders = @[@{@"field":@"resolveTime",
@"direction":@"desc"}]; @"direction":@"asc"}];
} else { } else {
queryOrders = @[@{@"field":@"likeCount", queryOrders = @[@{@"field":@"resolveTime",
@"direction":@"asc"}]; @"direction":@"desc"}];
} }
_queryOrders = queryOrders;
NSDictionary *parameters = @{@"user":user_uuid, NSDictionary *parameters = @{@"user":user_uuid,
@"scope":@"all", @"scope":@"all",
@"pageNumber":@(0), @"pageNumber":@(0),
...@@ -747,7 +815,7 @@ ...@@ -747,7 +815,7 @@
// cell的高度 // cell的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
return 120; return 100;
} }
......
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