Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
红星美凯龙管理在线APP IOS
Commits
91eaf61e
Commit
91eaf61e
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改口碑排名排序
parent
3345fa1f
master
develop
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
54 deletions
+20
-54
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
InspectNotUploadViewController.m
...ectDetail/ViewController/InspectNotUploadViewController.m
+0
-2
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+9
-1
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+11
-51
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
91eaf61e
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectNotUploadViewController.m
View file @
91eaf61e
...
...
@@ -232,8 +232,6 @@
self
.
footerView
.
height
=
self
.
footerView
.
takePhotoView
.
frame
.
size
.
height
+
220
;
// 退出图片选择控制器
[
picker
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSLog
(
@"222222self.tableView.frame = %@, self.contentSize = %@, self.contentOff = %@"
,
NSStringFromCGRect
(
self
.
tableView
.
frame
),
NSStringFromCGSize
(
self
.
tableView
.
contentSize
),
NSStringFromCGPoint
(
self
.
tableView
.
contentOffset
));
}
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
91eaf61e
...
...
@@ -116,7 +116,7 @@
RankListModel
*
rankList
=
[
RankListModel
rankListModelWithDict
:
ListDict
];
[
tgArray
addObject
:
rankList
];
}
_rankData
=
tgArray
;
_rankData
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
]
;
if
(
_rankData
.
count
==
0
)
{
...
...
@@ -138,6 +138,14 @@
}];
}
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
return
[
p2
.
score
compare
:
p1
.
score
];
}];
return
sortedArray
;
}
-
(
void
)
doBack
:
(
id
)
sender
{
[
self
.
navigationController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
91eaf61e
...
...
@@ -53,6 +53,8 @@
#import <MJRefresh.h>
#import "SearchViewController.h"
typedef
NSComparisonResult
(
^
NSComparator
)(
id
obj1
,
id
obj2
);
@interface
HomeViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIScrollViewDelegate
,
UITextFieldDelegate
,
RankListHeaderDelegate
>
@property
(
nonatomic
,
strong
)
UIImageView
*
bgImageView
;
// 背景
@property
(
nonatomic
,
strong
)
UITextField
*
searchTextField
;
// 搜索框
...
...
@@ -282,13 +284,21 @@
RankListModel
*
rankList
=
[
RankListModel
rankListModelWithDict
:
ListDict
];
[
tgArray
addObject
:
rankList
];
}
_allRankListArray
=
tgArray
;
_allRankListArray
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
]
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
return
[
p2
.
score
compare
:
p1
.
score
];
}];
return
sortedArray
;
}
-
(
void
)
requestInspectList
...
...
@@ -597,56 +607,6 @@
}
// if ([title isEqualToString:@"口碑排名"]) {
// if (indexPath.section == i) {
// HomeTitleTableCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeTitleTableCell];
// if (!cell) {
// cell = [[HomeTitleTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeTitleTableCell];
// }
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// return cell;
// } else {
// RankingListCell *cell = [tableView dequeueReusableCellWithIdentifier:kHomeRankingListCell];
// if (!cell) {
// cell = [[RankingListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeRankingListCell];
// }
// cell.rankList = _allRankListArray[indexPath.row - 1];
// cell.gradeImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"medal_0%d", (int)indexPath.row]];
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// return cell;
// }
// } else if ([title isEqualToString:@"问题知识"]) {
// if (indexPath.section == i) {
// // 问题与知识
// QuestionListTableCell *cell = [tableView dequeueReusableCellWithIdentifier:kHomeQuestionListTableCell];
// if (!cell) {
// cell = [[QuestionListTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeQuestionListTableCell];
// }
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// QuestionModel *question = _allQuestionArray[indexPath.row];
// cell.question = question;
// return cell;
// }
// } else if ([title isEqualToString:@"口碑巡检"]) {
// InspectListCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeInspectListCell];
// if (!cell) {
// cell = [[InspectListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeInspectListCell];
// }
// TaskListModel *taskList = _taskListDataArray[indexPath.row];
// cell.taskList = taskList;
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// cell.allView.backgroundColor = kProgressViewAllBackColor;
// UIImage *image = [UIImage imageNamed:@"progress-bar"];
// image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile];
// cell.alreadyView.image = image;
// return cell;
//
// } else {
// return nil;
// }
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment