Commit 88f94923 authored by admin's avatar admin

按照新排名接口修正

parent 1e87f045
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
@property (nonatomic,copy) NSString *store_uuid; @property (nonatomic,copy) NSString *store_uuid;
@property (nonatomic,copy) NSString *store_code; @property (nonatomic,copy) NSString *store_code;
@property (nonatomic,copy) NSString *store_name; @property (nonatomic,copy) NSString *store_name;
// @property (nonatomic,copy) NSString * score;
@property (nonatomic, assign) CGFloat score; @property (nonatomic, assign) CGFloat score;
@property (nonatomic,copy) NSString *reported; @property (nonatomic,copy) NSString *reported;
......
...@@ -139,10 +139,8 @@ ...@@ -139,10 +139,8 @@
__block RankingListViewController *weakSelf = self; __block RankingListViewController *weakSelf = self;
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"口碑排名response = %@", response); NSLog(@"口碑排名response = %@", response);
if ([(NSArray *)response[@"data"] count] == 0) { NSDictionary *dataDict = response[@"data"];
return; NSArray *dataArray = dataDict[@"records"];
}
NSArray *dataArray = response[@"data"];
NSMutableArray *tgArray = [NSMutableArray array]; NSMutableArray *tgArray = [NSMutableArray array];
...@@ -202,8 +200,6 @@ ...@@ -202,8 +200,6 @@
- (void)requestPartPraise - (void)requestPartPraise
{ {
NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL]; NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL];
_statisMode = _selectButton.tag - 323228; _statisMode = _selectButton.tag - 323228;
...@@ -211,14 +207,15 @@ ...@@ -211,14 +207,15 @@
NSDictionary *dict = _titleArray[_pickRow]; NSDictionary *dict = _titleArray[_pickRow];
NSDictionary *parameters = @{@"praiseUuid":dict[@"uuid"], NSDictionary *parameters = @{@"praiseUuid":dict[@"uuid"],
@"statisMode":@(_statisMode), @"statisMode":@(_statisMode),
@"orgUuids":_uuidArray @"orgUuids":_uuidArray,
}; };
NSLog(@"parrrrrters = %@", parameters); NSLog(@"parrrrrters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"分区域 口碑排名response = %@ error = %@", response, error); NSLog(@"分区域 口碑排名response = %@ error = %@", response, error);
NSArray *dataArray = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"];
NSMutableArray *tgArray = [NSMutableArray array]; NSMutableArray *tgArray = [NSMutableArray array];
......
...@@ -207,17 +207,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -207,17 +207,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
// 口碑巡检 // 口碑巡检
NSString *url1 = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL]; NSString *url1 = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL];
HttpClient *httpCilent1 = [[HttpClient alloc] initWithUrl:url1]; HttpClient *httpCilent1 = [[HttpClient alloc] initWithUrl:url1];
NSDictionary *parameters1 = @{ NSDictionary *parameters1 = @{@"praiseUuid":@"",
@"queryOrders":@[@{@"direction":@"asc"}], @"statisMode":@(0),
@"pageNumber":@(0), @"pageNumber":@(0),
@"pageSize":@(3) @"pageSize":@(3)
}; };
__block HomeViewController *weakSelf = self; __block HomeViewController *weakSelf = self;
[httpCilent1 getRankingListWithParameters:parameters1 completion:^(id response, NSError *error) { [httpCilent1 getRankingListWithParameters:parameters1 completion:^(id response, NSError *error) {
NSLog(@"刷新!! = 口碑排名response = %@", response); NSLog(@"刷新!! = 口碑排名response = %@", response);
if ([(NSArray *)response[@"data"] count] == 0) {
return;
}
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"]; NSArray *dataArray = dataDict[@"records"];
...@@ -283,15 +281,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -283,15 +281,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL]; NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL];
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url]; HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"praiseUuid":@"", NSDictionary *parameters = @{@"praiseUuid":@"",
@"statisMode":@(0) @"statisMode":@(0),
@"pageNumber":@(0),
@"pageSize":@(3)
}; };
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"口碑排名response = %@", response); NSLog(@"口碑排名response = %@", response);
if ([(NSArray *)response[@"data"] count] == 0) { NSDictionary *dataDict = response[@"data"];
return; NSArray *dataArray = dataDict[@"records"];
}
NSArray *dataArray = response[@"data"];
NSMutableArray *tgArray = [NSMutableArray array]; NSMutableArray *tgArray = [NSMutableArray array];
...@@ -595,7 +593,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2); ...@@ -595,7 +593,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
} }
RankListModel *rankList = _allRankListArray[indexPath.row - 1]; RankListModel *rankList = _allRankListArray[indexPath.row - 1];
cell.rankList = rankList; cell.rankList = rankList;
cell.gradeImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"medal_0%d", rankList.index]]; cell.gradeImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"medal_0%d", rankList.index+ 1]];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;
} }
......
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