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
26faa242
Commit
26faa242
authored
9 years ago
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
d15cff48
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
248 additions
and
288 deletions
+248
-288
project.pbxproj
redstar.xcodeproj/project.pbxproj
+6
-0
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+8
-1
OnLineTableViewCell.m
...dule/Function/OnLine/AddOnLine/Cell/OnLineTableViewCell.m
+7
-2
RankListHeaderView.m
...WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
+1
-1
RankPickView.h
...ction/WordOfMouth/Ranking/RankingList/View/RankPickView.h
+14
-0
RankPickView.m
...ction/WordOfMouth/Ranking/RankingList/View/RankPickView.m
+36
-0
RankingListViewController.h
...ng/RankingList/ViewController/RankingListViewController.h
+0
-6
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+161
-278
HttpClient.h
redstar/Classes/Tools/HttpClient/HttpClient.h
+5
-0
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+10
-0
No files found.
redstar.xcodeproj/project.pbxproj
View file @
26faa242
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
849B2F711C0CA22F005D809F
/* AnnoContentTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F701C0CA22F005D809F
/* AnnoContentTableViewCell.m */
;
};
849B2F711C0CA22F005D809F
/* AnnoContentTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F701C0CA22F005D809F
/* AnnoContentTableViewCell.m */
;
};
849B2F741C0CA60E005D809F
/* AnnounceDetailFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F731C0CA60E005D809F
/* AnnounceDetailFootView.m */
;
};
849B2F741C0CA60E005D809F
/* AnnounceDetailFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F731C0CA60E005D809F
/* AnnounceDetailFootView.m */
;
};
849B2F771C0CABE6005D809F
/* AnnounceDetailModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F761C0CABE6005D809F
/* AnnounceDetailModel.m */
;
};
849B2F771C0CABE6005D809F
/* AnnounceDetailModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
849B2F761C0CABE6005D809F
/* AnnounceDetailModel.m */
;
};
84A2270E1C229409002766DC
/* RankPickView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A2270D1C229409002766DC
/* RankPickView.m */
;
};
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
;
};
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
;
};
84A6738E1C0BE2D0000F828E
/* OnLineCompleteCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
;
};
84A6738E1C0BE2D0000F828E
/* OnLineCompleteCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
;
};
84A673911C0C2681000F828E
/* FunctionViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673901C0C2681000F828E
/* FunctionViewController.m */
;
};
84A673911C0C2681000F828E
/* FunctionViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673901C0C2681000F828E
/* FunctionViewController.m */
;
};
...
@@ -309,6 +310,8 @@
...
@@ -309,6 +310,8 @@
849B2F731C0CA60E005D809F
/* AnnounceDetailFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AnnounceDetailFootView.m
;
sourceTree
=
"<group>"
;
};
849B2F731C0CA60E005D809F
/* AnnounceDetailFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AnnounceDetailFootView.m
;
sourceTree
=
"<group>"
;
};
849B2F751C0CABE6005D809F
/* AnnounceDetailModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AnnounceDetailModel.h
;
sourceTree
=
"<group>"
;
};
849B2F751C0CABE6005D809F
/* AnnounceDetailModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AnnounceDetailModel.h
;
sourceTree
=
"<group>"
;
};
849B2F761C0CABE6005D809F
/* AnnounceDetailModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AnnounceDetailModel.m
;
sourceTree
=
"<group>"
;
};
849B2F761C0CABE6005D809F
/* AnnounceDetailModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AnnounceDetailModel.m
;
sourceTree
=
"<group>"
;
};
84A2270C1C229409002766DC
/* RankPickView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankPickView.h
;
sourceTree
=
"<group>"
;
};
84A2270D1C229409002766DC
/* RankPickView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankPickView.m
;
sourceTree
=
"<group>"
;
};
84A673861C0B50B4000F828E
/* OnLineCompleteViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteViewController.h
;
sourceTree
=
"<group>"
;
};
84A673861C0B50B4000F828E
/* OnLineCompleteViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteViewController.h
;
sourceTree
=
"<group>"
;
};
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteViewController.m
;
sourceTree
=
"<group>"
;
};
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteViewController.m
;
sourceTree
=
"<group>"
;
};
84A6738C1C0BE2D0000F828E
/* OnLineCompleteCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteCell.h
;
sourceTree
=
"<group>"
;
};
84A6738C1C0BE2D0000F828E
/* OnLineCompleteCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteCell.h
;
sourceTree
=
"<group>"
;
};
...
@@ -711,6 +714,8 @@
...
@@ -711,6 +714,8 @@
children
=
(
children
=
(
846206B31C06AF700015C456
/* RankListHeaderView.h */
,
846206B31C06AF700015C456
/* RankListHeaderView.h */
,
846206B41C06AF700015C456
/* RankListHeaderView.m */
,
846206B41C06AF700015C456
/* RankListHeaderView.m */
,
84A2270C1C229409002766DC
/* RankPickView.h */
,
84A2270D1C229409002766DC
/* RankPickView.m */
,
);
);
path
=
View
;
path
=
View
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2272,6 +2277,7 @@
...
@@ -2272,6 +2277,7 @@
84CC34E21C09583D002F10E2
/* LookOnLineTableViewCell.m in Sources */
,
84CC34E21C09583D002F10E2
/* LookOnLineTableViewCell.m in Sources */
,
8480BEB21C143A4100E2F18F
/* StateTableView.m in Sources */
,
8480BEB21C143A4100E2F18F
/* StateTableView.m in Sources */
,
849B2F711C0CA22F005D809F
/* AnnoContentTableViewCell.m in Sources */
,
849B2F711C0CA22F005D809F
/* AnnoContentTableViewCell.m in Sources */
,
84A2270E1C229409002766DC
/* RankPickView.m in Sources */
,
84D3E6021C04DA85001FF1DD
/* InspectUpLoadFootView.m in Sources */
,
84D3E6021C04DA85001FF1DD
/* InspectUpLoadFootView.m in Sources */
,
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
,
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
,
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
26faa242
No preview for this file type
This diff is collapsed.
Click to expand it.
redstar/Classes/Macro/Url.h
View file @
26faa242
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
// 口碑排名列表
// 口碑排名列表
#define kRankingListURL @"redstar-server/rest/praise/ranking"
#define kRankingListURL @"redstar-server/rest/praise/ranking"
// 提交评论
// 提交评论
#define kAddCommentURL @"redstar-server/rest/comment/submit"
#define kAddCommentURL @"redstar-server/rest/comment/submit"
...
@@ -105,4 +104,12 @@
...
@@ -105,4 +104,12 @@
// 口碑取消点赞
// 口碑取消点赞
#define kPicturePraiseCancelLikeURL @"redstar-server/rest/legendpraise/cancel_like/"
#define kPicturePraiseCancelLikeURL @"redstar-server/rest/legendpraise/cancel_like/"
/**
* 口碑排名(新)
*/
// 获取口碑列表
#define kQueryShortPraiseURL @"redstar-server/rest/praise/query_short?userUuid="
#endif
/* Url_h */
#endif
/* Url_h */
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/OnLine/AddOnLine/Cell/OnLineTableViewCell.m
View file @
26faa242
...
@@ -97,10 +97,13 @@
...
@@ -97,10 +97,13 @@
{
{
if
(
!
_storeBtn
)
{
if
(
!
_storeBtn
)
{
_storeBtn
=
[[
UIButton
alloc
]
init
];
_storeBtn
=
[[
UIButton
alloc
]
init
];
_storeBtn
.
tag
=
323228
;
[
_storeBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
[
_storeBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_storeBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_storeBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_storeBtn
setTitle
:
@"商场得分"
forState
:
UIControlStateNormal
];
_storeBtn
.
selected
=
YES
;
[
_storeBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_storeBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_storeBtn
setImage
:[
UIImage
imageNamed
:
@"
on
_select_box"
]
forState
:
UIControlStateSelected
];
[
_storeBtn
setImage
:[
UIImage
imageNamed
:
@"
no
_select_box"
]
forState
:
UIControlStateSelected
];
_storeBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
f
];
_storeBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
f
];
_storeBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_storeBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_storeBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
_storeBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
...
@@ -132,10 +135,12 @@
...
@@ -132,10 +135,12 @@
{
{
if
(
!
_averageBtn
)
{
if
(
!
_averageBtn
)
{
_averageBtn
=
[[
UIButton
alloc
]
init
];
_averageBtn
=
[[
UIButton
alloc
]
init
];
_averageBtn
.
tag
=
323229
;
[
_averageBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
[
_averageBtn
setTitleColor
:
kOnLineCellTitleColor
forState
:
UIControlStateNormal
];
_averageBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_averageBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_averageBtn
setTitle
:
@"区域平均分"
forState
:
UIControlStateNormal
];
[
_averageBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_averageBtn
setImage
:[
UIImage
imageNamed
:
@"select_box"
]
forState
:
UIControlStateNormal
];
[
_averageBtn
setImage
:[
UIImage
imageNamed
:
@"
on
_select_box"
]
forState
:
UIControlStateSelected
];
[
_averageBtn
setImage
:[
UIImage
imageNamed
:
@"
no
_select_box"
]
forState
:
UIControlStateSelected
];
_averageBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
f
];
_averageBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
f
];
_averageBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_averageBtn
.
imageEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
20
);
_averageBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
_averageBtn
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
View file @
26faa242
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
{
{
[
super
layoutSubviews
];
[
super
layoutSubviews
];
_bgView
.
frame
=
self
.
bounds
;
_bgView
.
frame
=
self
.
bounds
;
_bgButton
.
frame
=
CGRectMake
(
30
,
0
,
0
.
3
*
kScreenWidth
,
self
.
bounds
.
size
.
height
);
_bgButton
.
frame
=
CGRectMake
(
30
,
0
,
0
.
3
5
*
kScreenWidth
,
self
.
bounds
.
size
.
height
);
_arrowImageView
.
frame
=
CGRectMake
(
20
,
(
self
.
frame
.
size
.
height
-
11
)
/
2
,
9
,
10
);
_arrowImageView
.
frame
=
CGRectMake
(
20
,
(
self
.
frame
.
size
.
height
-
11
)
/
2
,
9
,
10
);
_scoreLabel
.
frame
=
CGRectMake
(
0
.
4
*
kScreenWidth
,
0
,
0
.
25
*
kScreenWidth
,
50
);
_scoreLabel
.
frame
=
CGRectMake
(
0
.
4
*
kScreenWidth
,
0
,
0
.
25
*
kScreenWidth
,
50
);
if
(
_section
<
3
)
{
if
(
_section
<
3
)
{
...
...
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankPickView.h
0 → 100644
View file @
26faa242
//
// RankPickView.h
// redstar
//
// Created by admin on 15/12/17.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
RankPickView
:
UIView
@property
(
nonatomic
,
strong
)
UIPickerView
*
pickerView
;
@property
(
nonatomic
,
strong
)
UIButton
*
okButton
;
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankPickView.m
0 → 100644
View file @
26faa242
//
// RankPickView.m
// redstar
//
// Created by admin on 15/12/17.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "RankPickView.h"
@implementation
RankPickView
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
-
(
void
)
setup
{
self
.
pickerView
=
[[
UIPickerView
alloc
]
init
];
_pickerView
.
frame
=
CGRectMake
(
0
,
30
,
kScreenWidth
,
120
);
[
self
addSubview
:
_pickerView
];
self
.
okButton
=
[[
UIButton
alloc
]
init
];
_okButton
.
frame
=
CGRectMake
(
kScreenWidth
-
60
,
0
,
60
,
30
);
[
_okButton
setTitle
:
@"完成"
forState
:
UIControlStateNormal
];
[
_okButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
_okButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
16
.
0
];
[
self
addSubview
:
_okButton
];
}
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.h
View file @
26faa242
...
@@ -11,11 +11,5 @@
...
@@ -11,11 +11,5 @@
@interface
RankingListViewController
:
UIViewController
@interface
RankingListViewController
:
UIViewController
//@property (nonatomic, strong) UILabel *pointLabel1; // 月度排名
//@property (nonatomic, strong) UILabel *pointLabel2; // 参与商场数量
//@property (nonatomic, strong) DateButton *dateButton; // 年月日
//@property (nonatomic, strong) UILabel *shoppingCountLabel; // 商场数
//@property (nonatomic, strong) UIView *lineView; // 分割线
@end
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
26faa242
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#import "HomeTitleTableCell.h"
#import "HomeTitleTableCell.h"
#import "SelectStoreViewController.h"
#import "SelectStoreViewController.h"
#import "RankPickView.h"
#define konlineCell @"onlinesTableViewCell"
#define konlineCell @"onlinesTableViewCell"
...
@@ -33,10 +34,8 @@
...
@@ -33,10 +34,8 @@
#define kRankScreenTableViewCell @"rankingScreenCell"
#define kRankScreenTableViewCell @"rankingScreenCell"
#define kShopNameBtnTag 15000
#define kShopNameBtnTag 15000
@interface
RankingListViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
RankListHeaderDelegate
>
@interface
RankingListViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
RankListHeaderDelegate
,
UIPickerViewDelegate
,
UIPickerViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
//@property (nonatomic, strong) UIView *headView;
//@property (nonatomic, strong) UIView *lineView1;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@property
(
nonatomic
,
strong
)
NoDataView
*
noDataView
;
@property
(
nonatomic
,
strong
)
NoDataView
*
noDataView
;
...
@@ -48,6 +47,13 @@
...
@@ -48,6 +47,13 @@
@property
(
nonatomic
,
strong
)
NSArray
*
rankData
;
@property
(
nonatomic
,
strong
)
NSArray
*
rankData
;
@property
(
nonatomic
,
strong
)
NSArray
*
allTitleArray
;
@property
(
nonatomic
,
strong
)
NSArray
*
allTitleArray
;
@property
(
nonatomic
,
strong
)
UIButton
*
selectButton
;
@property
(
nonatomic
,
strong
)
RankPickView
*
pickerView
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
titleArray
;
@property
(
nonatomic
,
assign
)
NSInteger
pickRow
;
@end
@end
@implementation
RankingListViewController
@implementation
RankingListViewController
...
@@ -58,6 +64,11 @@
...
@@ -58,6 +64,11 @@
self
.
allTitleArray
=
[
NSArray
arrayWithObjects
:
@"口碑巡检"
,
@"选择范围"
,
@"统计方式"
,
nil
];
self
.
allTitleArray
=
[
NSArray
arrayWithObjects
:
@"口碑巡检"
,
@"选择范围"
,
@"统计方式"
,
nil
];
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
...
@@ -81,9 +92,9 @@
...
@@ -81,9 +92,9 @@
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
}
}
_pickRow
=
0
;
[
self
requestShortPraise
];
[
self
requestRankingList
];
[
self
requestRankingList
];
self
.
shoppingLabel
.
text
=
@"商场名称"
;
self
.
shoppingLabel
.
text
=
@"商场名称"
;
...
@@ -110,12 +121,8 @@
...
@@ -110,12 +121,8 @@
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"
:
@"5a7417015147f8eb0151482b2359005b"
,
NSDictionary
*
parameters
=
@{
@"beginDateFrom"
:
@""
,
@"statisMode"
:
@
(
0
),
@"endDateTo"
:
@""
,
@"queryOrders"
:
@[],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
};
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
__block
RankingListViewController
*
weakSelf
=
self
;
__block
RankingListViewController
*
weakSelf
=
self
;
...
@@ -124,8 +131,7 @@
...
@@ -124,8 +131,7 @@
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
return
;
}
}
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
...
@@ -135,7 +141,6 @@
...
@@ -135,7 +141,6 @@
}
}
_rankData
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
];
_rankData
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
];
if
(
_rankData
.
count
==
0
)
{
if
(
_rankData
.
count
==
0
)
{
weakSelf
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
weakSelf
.
noDataView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
...
@@ -144,12 +149,62 @@
...
@@ -144,12 +149,62 @@
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
}
}];
}];
}
}
-
(
void
)
requestShortPraise
{
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kQueryShortPraiseURL
,
user_uuid
];
NSLog
(
@"url = %@"
,
url
);
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpCilent
queryShortPraiseWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"查询所有列表 response = %@ error= %@"
,
response
,
error
);
NSArray
*
dataArray
=
response
[
@"data"
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
[
_titleArray
addObject
:
dict
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
reloadData
];
}
}];
}
-
(
void
)
requestPartPraise
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
NSInteger
statisMode
=
_selectButton
.
tag
-
323228
;
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
dict
=
_titleArray
[
_pickRow
];
NSDictionary
*
parameters
=
@{
@"praiseUuid"
:
dict
[
@"uuid"
],
@"statisMode"
:
@
(
statisMode
),
};
NSLog
(
@"parrrrrters = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"分区域 口碑排名response = %@"
,
response
);
NSArray
*
dataArray
=
response
[
@"data"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
ListDict
in
dataArray
)
{
RankListModel
*
rankList
=
[
RankListModel
rankListModelWithDict
:
ListDict
];
[
tgArray
addObject
:
rankList
];
}
_rankData
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
];
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
...
@@ -169,6 +224,42 @@
...
@@ -169,6 +224,42 @@
}
}
-
(
void
)
statisticsClick
:
(
UIButton
*
)
sender
{
NSLog
(
@"sender.tag = %ld, _sele.tag = %ld"
,
sender
.
tag
,
_selectButton
.
tag
);
if
(
sender
.
tag
==
_selectButton
.
tag
)
{
return
;
}
else
{
_selectButton
.
selected
=
NO
;
sender
.
selected
=
YES
;
_selectButton
=
(
UIButton
*
)
sender
;
}
}
-
(
void
)
closeBackGroundView
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
200
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
.
0
f
;
_pickerView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_backGroundView
removeFromSuperview
];
[
_pickerView
removeFromSuperview
];
}];
}
-
(
void
)
okClick
:
(
UIButton
*
)
sender
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
OnLineTableViewCell
*
cell
=
(
OnLineTableViewCell
*
)[
_tableView
cellForRowAtIndexPath
:
indexPath
];
_pickRow
=
[
_pickerView
.
pickerView
selectedRowInComponent
:
0
];
NSDictionary
*
dict
=
_titleArray
[
_pickRow
];
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
[
self
closeBackGroundView
];
}
#pragma mark - UITableView DataSource/Delegate
#pragma mark - UITableView DataSource/Delegate
...
@@ -190,8 +281,6 @@
...
@@ -190,8 +281,6 @@
// cell显示的内容
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
row
<
3
)
{
if
(
indexPath
.
row
<
3
)
{
OnLineTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
konlineCell
];
OnLineTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
konlineCell
];
...
@@ -200,11 +289,22 @@
...
@@ -200,11 +289,22 @@
}
}
cell
.
titleLabel
.
text
=
_allTitleArray
[
indexPath
.
row
];
cell
.
titleLabel
.
text
=
_allTitleArray
[
indexPath
.
row
];
if
(
indexPath
.
row
<
2
)
{
if
(
indexPath
.
row
<
2
)
{
cell
.
selectLabel
.
text
=
@"2015年10月口碑检查"
;
if
(
indexPath
.
row
==
0
)
{
if
(
_titleArray
.
count
==
0
)
{
cell
.
selectLabel
.
text
=
@""
;
}
else
{
NSDictionary
*
dict
=
_titleArray
[
_pickRow
];
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
}
}
else
{
cell
.
selectLabel
.
text
=
@"全部"
;
}
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
else
{
}
else
{
[
cell
.
storeBtn
setTitle
:
@"商场得分"
forState
:
UIControlStateNormal
];
[
cell
.
storeBtn
addTarget
:
self
action
:
@selector
(
statisticsClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
averageBtn
setTitle
:
@"区域平均分"
forState
:
UIControlStateNormal
];
_selectButton
=
cell
.
storeBtn
;
[
cell
.
averageBtn
addTarget
:
self
action
:
@selector
(
statisticsClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
}
return
cell
;
return
cell
;
...
@@ -220,7 +320,7 @@
...
@@ -220,7 +320,7 @@
[
queryAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
20
.
0
f
]}
range
:
NSMakeRange
(
7
,
queryStr
.
length
-
9
)];
[
queryAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
20
.
0
f
]}
range
:
NSMakeRange
(
7
,
queryStr
.
length
-
9
)];
[
queryAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kLightGray
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
queryStr
.
length
-
1
,
1
)];
[
queryAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kLightGray
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
queryStr
.
length
-
1
,
1
)];
[
cell
.
queryLabel
setAttributedText
:
queryAttr
];
[
cell
.
queryLabel
setAttributedText
:
queryAttr
];
[
cell
.
screenButton
addTarget
:
self
action
:
@selector
(
clickHeadView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
screenButton
addTarget
:
self
action
:
@selector
(
requestPartPraise
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
return
cell
;
}
else
{
}
else
{
HomeTitleTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeTitleCellInde
];
HomeTitleTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeTitleCellInde
];
...
@@ -250,6 +350,31 @@
...
@@ -250,6 +350,31 @@
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
if
(
!
_backGroundView
)
{
_backGroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeBackGroundView
)];
[
_backGroundView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_pickerView
)
{
_pickerView
=
[[
RankPickView
alloc
]
init
];
_pickerView
.
backgroundColor
=
[
UIColor
whiteColor
];
_pickerView
.
pickerView
.
delegate
=
self
;
_pickerView
.
pickerView
.
dataSource
=
self
;
}
_backGroundView
.
alpha
=
0
;
_backGroundView
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tableView
];
[
self
.
view
insertSubview
:
_pickerView
aboveSubview
:
_backGroundView
];
_pickerView
.
frame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
200
);
[
_pickerView
.
okButton
addTarget
:
self
action
:
@selector
(
okClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
0
.
6
;
_pickerView
.
frame
=
CGRectMake
(
0
,
kScreenHeight
-
200
,
kScreenWidth
,
200
);
}];
}
else
if
(
indexPath
.
row
==
1
)
{
}
else
if
(
indexPath
.
row
==
1
)
{
SelectStoreViewController
*
select
=
[[
SelectStoreViewController
alloc
]
init
];
SelectStoreViewController
*
select
=
[[
SelectStoreViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
select
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
select
animated
:
YES
];
...
@@ -292,7 +417,7 @@
...
@@ -292,7 +417,7 @@
return
nil
;
return
nil
;
}
else
{
}
else
{
RankListHeaderView
*
headView
=
[
RankListHeaderView
headViewWithTableView
:
tableView
section
:
section
];
RankListHeaderView
*
headView
=
[
RankListHeaderView
headViewWithTableView
:
tableView
section
:
section
-
1
];
headView
.
delegate
=
self
;
headView
.
delegate
=
self
;
[
headView
.
pushButton
addTarget
:
self
action
:
@selector
(
pushclick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
headView
.
pushButton
addTarget
:
self
action
:
@selector
(
pushclick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
headView
.
rankListModel
=
_rankData
[
section
-
1
];
headView
.
rankListModel
=
_rankData
[
section
-
1
];
...
@@ -316,259 +441,25 @@
...
@@ -316,259 +441,25 @@
[
self
.
navigationController
pushViewController
:
rankDetailVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
rankDetailVC
animated
:
YES
];
}
}
#pragma mark - PickViewDelegate/DataSource
-
(
NSInteger
)
numberOfComponentsInPickerView
:
(
UIPickerView
*
)
pickerView
{
return
1
;
}
#pragma mark - lazy loading
-
(
NSInteger
)
pickerView
:
(
UIPickerView
*
)
pickerView
numberOfRowsInComponent
:
(
NSInteger
)
component
//- (UILabel *)pointLabel1
{
//{
return
_titleArray
.
count
;
// if (!_pointLabel1) {
}
// _pointLabel1 = [[UILabel alloc] init];
// _pointLabel1.translatesAutoresizingMaskIntoConstraints = NO;
// _pointLabel1.textColor = kRankHeadTitleTextColor;
// _pointLabel1.font = [UIFont systemFontOfSize:15.0];
// _pointLabel1.textAlignment = NSTextAlignmentCenter;
// [self.headView addSubview:_pointLabel1];
//
// NSLayoutConstraint *point1Top = [NSLayoutConstraint constraintWithItem:_pointLabel1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7];
// [self.headView addConstraint:point1Top];
//
// NSLayoutConstraint *point1Right = [NSLayoutConstraint constraintWithItem:_pointLabel1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:15];
// [self.headView addConstraint:point1Right];
//
// NSLayoutConstraint *point1Left = [NSLayoutConstraint constraintWithItem:_pointLabel1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
// [self.headView addConstraint:point1Left];
//
// NSLayoutConstraint *point1Height = [NSLayoutConstraint constraintWithItem:_pointLabel1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
// [self.headView addConstraint:point1Height];
// }
// return _pointLabel1;
//}
//
//- (UIView *)lineView
//{
// if (!_lineView) {
// _lineView = [[UIView alloc] init];
// _lineView.translatesAutoresizingMaskIntoConstraints = NO;
// [self.headView addSubview:_lineView];
//
// NSLayoutConstraint *point1Top = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:10];
// [self.headView addConstraint:point1Top];
//
//
//
// NSLayoutConstraint *point1Left = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.pointLabel1 attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
// [self.headView addConstraint:point1Left];
//
// NSLayoutConstraint *point1Height = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:50];
// [self.headView addConstraint:point1Height];
//
// NSLayoutConstraint *point1Width = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:0.5];
// [self.headView addConstraint:point1Width];
//
// }
// return _lineView;
//}
//
//
//- (UILabel *)pointLabel2
//{
// if (!_pointLabel2) {
// _pointLabel2 = [[UILabel alloc] init];
// _pointLabel2.translatesAutoresizingMaskIntoConstraints = NO;
// _pointLabel2.textColor = kRankHeadTitleTextColor;
// _pointLabel2.font = [UIFont systemFontOfSize:15.0];
// _pointLabel2.textAlignment = NSTextAlignmentCenter;
// [self.headView addSubview:_pointLabel2];
//
// NSLayoutConstraint *point1Top = [NSLayoutConstraint constraintWithItem:_pointLabel2 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:7];
// [self.headView addConstraint:point1Top];
//
// NSLayoutConstraint *point1Right = [NSLayoutConstraint constraintWithItem:_pointLabel2 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-(kScreenWidth / 2 - 15 - 90) / 2];
// [self.headView addConstraint:point1Right];
//
//
// NSLayoutConstraint *point1Height = [NSLayoutConstraint constraintWithItem:_pointLabel2 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
// [self.headView addConstraint:point1Height];
// }
// return _pointLabel2;
//}
//
//
//- (DateButton *)dateButton
//{
// if (!_dateButton) {
// _dateButton = [[DateButton alloc] init];
// _dateButton.translatesAutoresizingMaskIntoConstraints = NO;
//
// NSString *dateStr = [NSString stringWithFormat:@"2015 年 08 月"];
// NSMutableAttributedString *dateAttr = [[NSMutableAttributedString alloc] initWithString:dateStr];
// [dateAttr addAttributes:@{NSForegroundColorAttributeName:kDateButtonTextColor,NSFontAttributeName:[UIFont systemFontOfSize:21.0f]} range:NSMakeRange(0,5)];
// [dateAttr addAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} range:NSMakeRange(5,1)];
// [dateAttr addAttributes:@{NSForegroundColorAttributeName:kDateButtonTextColor,NSFontAttributeName:[UIFont systemFontOfSize:21.0f]} range:NSMakeRange(6,4)];
// [dateAttr addAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} range:NSMakeRange(10,1)];
// [_dateButton setAttributedTitle:dateAttr forState:UIControlStateNormal];
//
// [self.headView addSubview:_dateButton];
//
// NSLayoutConstraint *dateTop = [NSLayoutConstraint constraintWithItem:_dateButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.pointLabel1 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
// [self.headView addConstraint:dateTop];
//
// NSLayoutConstraint *dateLeft = [NSLayoutConstraint constraintWithItem:_dateButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.pointLabel1 attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:-70];
// [self.headView addConstraint:dateLeft];
//
// NSLayoutConstraint *dateWidth = [NSLayoutConstraint constraintWithItem:_dateButton attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:150];
// [self.headView addConstraint:dateWidth];
//
// NSLayoutConstraint *dateHeight = [NSLayoutConstraint constraintWithItem:_dateButton attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
// [_dateButton addConstraint:dateHeight];
// }
// return _dateButton;
//}
//
//- (UILabel *)shoppingCountLabel
//{
// if (!_shoppingCountLabel) {
// _shoppingCountLabel = [[UILabel alloc] init];
// _shoppingCountLabel.translatesAutoresizingMaskIntoConstraints = NO;
//
// [self.headView addSubview:_shoppingCountLabel];
//
// NSLayoutConstraint *shoppingCountTop = [NSLayoutConstraint constraintWithItem:_shoppingCountLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.pointLabel2 attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
// [self.headView addConstraint:shoppingCountTop];
//
// NSLayoutConstraint *shoppingCountRight = [NSLayoutConstraint constraintWithItem:_shoppingCountLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-(kScreenWidth / 2 - 60) / 2];
// [self.headView addConstraint:shoppingCountRight];
//
// NSLayoutConstraint *shoppingCountHeight = [NSLayoutConstraint constraintWithItem:_shoppingCountLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:30];
// [_shoppingCountLabel addConstraint:shoppingCountHeight];
// }
// return _shoppingCountLabel;
//}
//
//
//- (UIView *)lineView1
//{
// if (!_lineView1) {
// _lineView1 = [[UIView alloc] init];
// _lineView1.translatesAutoresizingMaskIntoConstraints = NO;
// [self.headView addSubview:_lineView1];
//
// NSLayoutConstraint *lineBottom = [NSLayoutConstraint constraintWithItem:_lineView1 attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:75];
// [self.headView addConstraint:lineBottom];
//
// NSLayoutConstraint *lineLeft = [NSLayoutConstraint constraintWithItem:_lineView1 attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
// [self.headView addConstraint:lineLeft];
//
// NSLayoutConstraint *lineRight = [NSLayoutConstraint constraintWithItem:_lineView1 attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
// [self.headView addConstraint:lineRight];
//
// NSLayoutConstraint *lineHeight = [NSLayoutConstraint constraintWithItem:_lineView1 attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:1];
// [_lineView1 addConstraint:lineHeight];
// }
// return _lineView1;
//}
//
//- (UIView *)headView
//{
// if (!_headView) {
// _headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 116)];
// _headView.backgroundColor = [UIColor whiteColor];
// }
// return _headView;
//}
//- (UILabel *)shoppingLabel
//{
// if (!_shoppingLabel) {
// // 商场
// _shoppingLabel = [[UILabel alloc] init];
// _shoppingLabel.textAlignment = NSTextAlignmentCenter;
// _shoppingLabel.textColor = kRankHeadTitleTextColor;
// _shoppingLabel.backgroundColor = kSectionBackGroundColor;
//
// _shoppingLabel.font = [UIFont systemFontOfSize:17.0];
// _shoppingLabel.translatesAutoresizingMaskIntoConstraints = NO;
// [self.headView addSubview:_shoppingLabel];
//
// //
// NSLayoutConstraint *shoppingTop = [NSLayoutConstraint constraintWithItem:_shoppingLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:76];
// [self.headView addConstraint:shoppingTop];
//
// NSLayoutConstraint *shoppingLeft = [NSLayoutConstraint constraintWithItem:_shoppingLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
// [self.headView addConstraint:shoppingLeft];
//
// NSLayoutConstraint *shoppingRight = [NSLayoutConstraint constraintWithItem:_shoppingLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.scoreLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
// [self.headView addConstraint:shoppingRight];
//
// NSLayoutConstraint *shoppingBottom = [NSLayoutConstraint constraintWithItem:_shoppingLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
// [self.headView addConstraint:shoppingBottom];
//
// NSLayoutConstraint *shoppingWidth = [NSLayoutConstraint constraintWithItem:_shoppingLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scoreLabel attribute:NSLayoutAttributeWidth multiplier:1.2 constant:0];
// [self.headView addConstraint:shoppingWidth];
// }
// return _shoppingLabel;
//}
//
//- (UILabel *)scoreLabel
//{
// if (!_scoreLabel) {
// _scoreLabel = [[UILabel alloc] init];
// _scoreLabel.textAlignment = NSTextAlignmentCenter;
// _scoreLabel.textColor = kRankHeadTitleTextColor;
// _scoreLabel.backgroundColor = kSectionBackGroundColor;
// _scoreLabel.font = [UIFont systemFontOfSize:17.0];
// _scoreLabel.translatesAutoresizingMaskIntoConstraints = NO;
// [self.headView addSubview:_scoreLabel];
//
// //
// NSLayoutConstraint *scoreTop = [NSLayoutConstraint constraintWithItem:_scoreLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:76];
// [self.headView addConstraint:scoreTop];
//
// NSLayoutConstraint *scoreRight = [NSLayoutConstraint constraintWithItem:_scoreLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.gradeLabel attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
// [self.headView addConstraint:scoreRight];
//
// NSLayoutConstraint *scoreWidth = [NSLayoutConstraint constraintWithItem:_scoreLabel attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.gradeLabel attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0];
// [self.headView addConstraint:scoreWidth];
//
// NSLayoutConstraint *scoreBottom = [NSLayoutConstraint constraintWithItem:_scoreLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
// [self.headView addConstraint:scoreBottom];
// }
// return _scoreLabel;
//}
//
//- (UILabel *)gradeLabel
//{
// if (!_gradeLabel) {
// _gradeLabel = [[UILabel alloc] init];
// _gradeLabel.textAlignment = NSTextAlignmentCenter;
// _gradeLabel.textColor = kRankHeadTitleTextColor;
// _gradeLabel.font = [UIFont systemFontOfSize:17.0];
// _gradeLabel.translatesAutoresizingMaskIntoConstraints = NO;
// _gradeLabel.backgroundColor = kSectionBackGroundColor;
//
// [self.headView addSubview:_gradeLabel];
//
// //
// NSLayoutConstraint *gradeTop = [NSLayoutConstraint constraintWithItem:_gradeLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeTop multiplier:1.0 constant:76];
// [self.headView addConstraint:gradeTop];
//
// NSLayoutConstraint *gradeRight = [NSLayoutConstraint constraintWithItem:_gradeLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
// [self.headView addConstraint:gradeRight];
//
// NSLayoutConstraint *gradeBottom = [NSLayoutConstraint constraintWithItem:_gradeLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.headView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
// [self.headView addConstraint:gradeBottom];
// }
// return _gradeLabel;
//}
-
(
NSString
*
)
pickerView
:
(
UIPickerView
*
)
pickerView
titleForRow
:
(
NSInteger
)
row
forComponent
:
(
NSInteger
)
component
{
NSDictionary
*
dict
=
_titleArray
[
row
];
return
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
-
(
UITableView
*
)
tableView
{
{
...
@@ -628,14 +519,6 @@
...
@@ -628,14 +519,6 @@
{
{
[
_tableView
reloadData
];
[
_tableView
reloadData
];
}
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/HttpClient/HttpClient.h
View file @
26faa242
...
@@ -113,5 +113,10 @@ typedef void (^completionBlock) (id response, NSError *error);
...
@@ -113,5 +113,10 @@ typedef void (^completionBlock) (id response, NSError *error);
// 口碑取消点赞
// 口碑取消点赞
-
(
void
)
cancelLikePicturePraiseWithCompletion
:(
completionBlock
)
completion
;
-
(
void
)
cancelLikePicturePraiseWithCompletion
:(
completionBlock
)
completion
;
/**
* 口碑排名(新)
*/
// 获取口碑列表
-
(
void
)
queryShortPraiseWithCompletion
:(
completionBlock
)
completion
;
@end
@end
This diff is collapsed.
Click to expand it.
redstar/Classes/Tools/HttpClient/HttpClient.m
View file @
26faa242
...
@@ -397,4 +397,14 @@
...
@@ -397,4 +397,14 @@
}];
}];
}
}
// 获取口碑列表
-
(
void
)
queryShortPraiseWithCompletion
:
(
completionBlock
)
completion
{
[
self
getParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
response
,
error
);
}
}];
}
@end
@end
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