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
54c14e77
Commit
54c14e77
authored
Dec 18, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复排名分数显示多位小数bug
parent
87d226bc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
45 additions
and
14 deletions
+45
-14
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
InspectListCell.m
...on/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
+0
-1
TaskDetailModel.h
...n/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.h
+2
-1
RankDetailHeaderView.m
...ordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.m
+8
-1
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+2
-1
RankingListCell.m
...on/WordOfMouth/Ranking/RankingList/Cell/RankingListCell.m
+7
-1
RankListModel.h
...ion/WordOfMouth/Ranking/RankingList/Model/RankListModel.h
+3
-1
RankListHeaderView.m
...WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
+11
-3
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+6
-3
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+3
-1
SearchViewController.m
...Classes/Module/Home/ViewController/SearchViewController.m
+3
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
54c14e77
No preview for this file type
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
View file @
54c14e77
...
...
@@ -65,7 +65,6 @@
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
NSLog
(
@"taskList = %@"
,
taskList
.
state
);
if
([
taskList
.
state
isEqualToString
:
@"submitted"
])
{
NSString
*
str
=
[
NSString
stringWithFormat
:
@"巡检进度:未处理"
];
NSMutableAttributedString
*
strAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
str
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskDetailModel.h
View file @
54c14e77
...
...
@@ -27,7 +27,8 @@
@property
(
nonatomic
,
assign
)
int
reportCount
;
@property
(
nonatomic
,
copy
)
NSString
*
reportTime
;
@property
(
nonatomic
,
copy
)
NSString
*
reported
;
@property
(
nonatomic
,
copy
)
NSString
*
score
;
//@property (nonatomic, copy) NSString *score;
@property
(
nonatomic
,
assign
)
CGFloat
score
;
@property
(
nonatomic
,
copy
)
NSString
*
state
;
@property
(
nonatomic
,
copy
)
NSString
*
store_code
;
@property
(
nonatomic
,
copy
)
NSString
*
store_name
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.m
View file @
54c14e77
...
...
@@ -58,7 +58,14 @@
self
.
rankDetailView
.
totalScoreLabel
.
text
=
@"总评分"
;
self
.
rankDetailView
.
totalGradeLabel
.
text
=
@"总排名"
;
self
.
rankDetailView
.
timeLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
beginDate
];
self
.
rankDetailView
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
score
];
//self.rankDetailView.scoreLabel.text = [NSString stringWithFormat:@"%@", taskDetail.score];
if
(
taskDetail
.
score
==
0
)
{
self
.
rankDetailView
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0"
];
}
else
{
self
.
rankDetailView
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.1f"
,
taskDetail
.
score
];
}
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
54c14e77
...
...
@@ -497,7 +497,8 @@
{
if
(
!
_rankDetailHeaderView
)
{
_rankDetailHeaderView
=
[[
RankDetailHeaderView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
298
)];
if
(
self
.
indexRow
<
3
)
{
NSLog
(
@"se。row= =%ld"
,
_indexRow
);
if
(
self
.
indexRow
<=
3
)
{
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"medal_0%ld"
,
(
long
)(
_indexRow
)];
_rankDetailHeaderView
.
rankDetailView
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
}
else
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Cell/RankingListCell.m
View file @
54c14e77
...
...
@@ -33,8 +33,14 @@
{
_rankList
=
rankList
;
self
.
shopNameButton
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
rankList
.
store_name
];
self
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
rankList
.
score
];
//self.scoreLabel.text = [NSString stringWithFormat:@"%@", rankList.score];
if
(
rankList
.
score
==
0
)
{
self
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0"
];
}
else
{
self
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.1f"
,
rankList
.
score
];
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankListModel.h
View file @
54c14e77
...
...
@@ -14,7 +14,9 @@
@property
(
nonatomic
,
copy
)
NSString
*
store_uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
store_code
;
@property
(
nonatomic
,
copy
)
NSString
*
store_name
;
@property
(
nonatomic
,
copy
)
NSString
*
score
;
// @property (nonatomic,copy) NSString * score;
@property
(
nonatomic
,
assign
)
CGFloat
score
;
@property
(
nonatomic
,
copy
)
NSString
*
reported
;
@property
(
nonatomic
,
copy
)
NSString
*
commentId
;
@property
(
nonatomic
,
copy
)
NSString
*
ranking
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
View file @
54c14e77
...
...
@@ -71,7 +71,8 @@
[
self
addSubview
:
scoreLabel
];
_scoreLabel
=
scoreLabel
;
if
(
index
<
3
)
{
if
(
index
<=
3
)
{
NSLog
(
@"indec === %d"
,
index
);
UIImageView
*
gradeImageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"medal_0%d"
,
index
]]];
[
self
addSubview
:
gradeImageView
];
_gradeImageView
=
gradeImageView
;
...
...
@@ -120,12 +121,19 @@
{
_rankListModel
=
rankListModel
;
[
_bgButton
setTitle
:
rankListModel
.
store_name
forState
:
UIControlStateNormal
];
if
(
rankListModel
.
score
==
nil
||
rankListModel
.
score
==
NULL
||
[
rankListModel
.
score
isEqual
:[
NSNull
null
]])
{
if
(
rankListModel
.
score
==
0
)
{
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0"
];
}
else
{
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
@
"
,
rankListModel
.
score
];
_scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%
.1f
"
,
rankListModel
.
score
];
}
// if (rankListModel.score == nil || rankListModel.score == NULL || [rankListModel.score isEqual:[NSNull null]]) {
// _scoreLabel.text = [NSString stringWithFormat:@"0"];
// } else {
// _scoreLabel.text = [NSString stringWithFormat:@"%@",rankListModel.score];
// }
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
54c14e77
...
...
@@ -233,7 +233,9 @@
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
return
[
p2
.
score
compare
:
p1
.
score
];
//return [@(p2.score) compare:@(p1.score)];
return
[
@
(
p2
.
score
)
compare
:
@
(
p1
.
score
)];
}];
return
sortedArray
;
}
...
...
@@ -409,7 +411,7 @@
}
else
{
RankListModel
*
rankList
=
_rankData
[
indexPath
.
section
-
1
];
RankDetailViewController
*
rankDetailVC
=
[[
RankDetailViewController
alloc
]
init
];
rankDetailVC
.
indexRow
=
indexPath
.
section
;
rankDetailVC
.
indexRow
=
rankList
.
index
;
rankDetailVC
.
uuid
=
rankList
.
uuid
;
rankDetailVC
.
store_uuid
=
rankList
.
store_uuid
;
rankDetailVC
.
storeAddress
=
rankList
.
storeAddress
;
...
...
@@ -442,6 +444,7 @@
return
nil
;
}
else
{
RankListModel
*
rankList
=
_rankData
[
section
-
1
];
NSLog
(
@"indeB === %d"
,
rankList
.
index
);
RankListHeaderView
*
headView
=
[
RankListHeaderView
headViewWithTableView
:
tableView
section
:
section
-
1
index
:
rankList
.
index
];
headView
.
delegate
=
self
;
[
headView
.
pushButton
addTarget
:
self
action
:
@selector
(
pushclick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -456,7 +459,7 @@
RankListModel
*
rankList
=
_rankData
[
section
];
RankDetailViewController
*
rankDetailVC
=
[[
RankDetailViewController
alloc
]
init
];
rankDetailVC
.
indexRow
=
section
-
1
;
rankDetailVC
.
indexRow
=
rankList
.
index
;
rankDetailVC
.
uuid
=
rankList
.
uuid
;
rankDetailVC
.
store_uuid
=
rankList
.
store_uuid
;
rankDetailVC
.
storeAddress
=
rankList
.
storeAddress
;
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
54c14e77
...
...
@@ -334,7 +334,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
return
[
p2
.
score
compare
:
p1
.
score
];
//return [p2.score compare:p1.score];
return
[
@
(
p2
.
score
)
compare
:
@
(
p1
.
score
)];
}];
return
sortedArray
;
}
...
...
redstar/Classes/Module/Home/ViewController/SearchViewController.m
View file @
54c14e77
...
...
@@ -259,7 +259,9 @@
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
return
[
p2
.
score
compare
:
p1
.
score
];
// return [p2.score compare:p1.score];
return
[
@
(
p2
.
score
)
compare
:
@
(
p1
.
score
)];
}];
return
sortedArray
;
}
...
...
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