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
64630bb5
Commit
64630bb5
authored
Dec 27, 2015
by
AvatarC
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.oschina.net/gomoretech/RedstarIOS
into develop_avatar
parents
5851ab4e
db5156eb
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1318 additions
and
385 deletions
+1318
-385
project.pbxproj
redstar.xcodeproj/project.pbxproj
+90
-28
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
unfold_btn@2x.png
...ssets.xcassets/home/unfold_btn.imageset/unfold_btn@2x.png
+0
-0
unfold_btn@3x.png
...ssets.xcassets/home/unfold_btn.imageset/unfold_btn@3x.png
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+5
-2
AttachmentTableViewCell.h
...le/Announce/AnnounceDetail/Cell/AttachmentTableViewCell.h
+14
-0
AttachmentTableViewCell.m
...le/Announce/AnnounceDetail/Cell/AttachmentTableViewCell.m
+71
-0
AnnoDetailViewController.m
.../AnnounceDetail/ViewController/AnnoDetailViewController.m
+43
-16
OnLineViewController.m
...on/OnLine/AddOnLine/ViewController/OnLineViewController.m
+125
-10
OnLineResultDetailCell.h
...ion/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.h
+1
-0
OnLineResultDetailCell.m
...ion/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.m
+3
-3
OnLineResultViewController.m
...kOnLineResult/ViewController/OnLineResultViewController.m
+1
-1
OnLineCompleteViewController.m
...askComplete/ViewController/OnLineCompleteViewController.m
+4
-8
SpotCheckOnLineViewController.m
...heckOnLine/ViewController/SpotCheckOnLineViewController.m
+4
-4
SOPTableView.h
.../Module/Function/Standar/SOPCategarys/View/SOPTableView.h
+22
-0
SOPTableView.m
.../Module/Function/Standar/SOPCategarys/View/SOPTableView.m
+81
-0
SOPViewController.h
...n/Standar/SOPCategarys/ViewController/SOPViewController.h
+13
-0
SOPViewController.m
...n/Standar/SOPCategarys/ViewController/SOPViewController.m
+255
-0
StandardViewController.m
.../Function/Standar/ViewController/StandardViewController.m
+13
-6
TaskModel.h
...unction/WordOfMouth/Inspect/InspectTask/Model/TaskModel.h
+3
-0
RankDetailTableCell.m
...WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.m
+3
-2
RankScrollTableViewCell.h
...OfMouth/Ranking/RankDetail/Cell/RankScrollTableViewCell.h
+15
-0
RankScrollTableViewCell.m
...OfMouth/Ranking/RankDetail/Cell/RankScrollTableViewCell.m
+46
-0
RankSectionTableCell.h
...ordOfMouth/Ranking/RankDetail/Cell/RankSectionTableCell.h
+16
-0
RankSectionTableCell.m
...ordOfMouth/Ranking/RankDetail/Cell/RankSectionTableCell.m
+115
-0
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+342
-280
RankListModel.h
...ion/WordOfMouth/Ranking/RankingList/Model/RankListModel.h
+0
-1
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+5
-8
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+14
-16
HttpClient.h
redstar/Classes/Tools/HttpClient/HttpClient.h
+3
-0
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+11
-0
No files found.
redstar.xcodeproj/project.pbxproj
View file @
64630bb5
...
...
@@ -15,7 +15,6 @@
8409BDFC1C281ACD00354460
/* SelectStoreHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8409BDF21C281ACD00354460
/* SelectStoreHeadView.m */
;
};
8409BDFD1C281ACD00354460
/* TreeView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8409BDF41C281ACD00354460
/* TreeView.m */
;
};
8409BDFE1C281ACD00354460
/* SelectStoreViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8409BDF71C281ACD00354460
/* SelectStoreViewController.m */
;
};
840ABECC1BE1C29F006E49C5
/* RankDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
840ABECB1BE1C29F006E49C5
/* RankDetailViewController.m */
;
};
8419EAD41BEDC98F002635ED
/* HttpClient.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8419EAD31BEDC98F002635ED
/* HttpClient.m */
;
};
841D24F81BEB473C0005CC9F
/* CheckPicViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
841D24F71BEB473C0005CC9F
/* CheckPicViewController.m */
;
};
841D24FB1BEB75CA0005CC9F
/* QuestionDetailFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
841D24FA1BEB75CA0005CC9F
/* QuestionDetailFooterView.m */
;
};
...
...
@@ -96,7 +95,6 @@
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
;
};
84AD4F3F1BF498A900BFB37C
/* ranking.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
;
};
84AD4F461BF4A9E800BFB37C
/* RankHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
;
};
84AD4F491BF4BC0600BFB37C
/* RankDetailTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F481BF4BC0600BFB37C
/* RankDetailTableCell.m */
;
};
84BB16A21C191A7F00383A64
/* OnLineResultFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84BB16A11C191A7F00383A64
/* OnLineResultFootView.m */
;
};
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
;
};
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574C1BDB344900083584
/* UIView+Frame.m */
;
};
...
...
@@ -120,6 +118,13 @@
84CEB1721C2946EC0072ED0A
/* StoreDetailModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CEB1711C2946EC0072ED0A
/* StoreDetailModel.m */
;
};
84CF0F1E1BE9B40400C855CE
/* InspectDetailFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0F1D1BE9B40400C855CE
/* InspectDetailFooterView.m */
;
};
84CF0FA21BE9EDA900C855CE
/* TakePhotoView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84CF0FA11BE9EDA900C855CE
/* TakePhotoView.m */
;
};
84D2F5171C2CD3D400651EFB
/* SOPViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F5161C2CD3D400651EFB
/* SOPViewController.m */
;
};
84D2F51A1C2CE67500651EFB
/* SOPTableView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F5191C2CE67500651EFB
/* SOPTableView.m */
;
};
84D2F5201C2D213400651EFB
/* AttachmentTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F51F1C2D213400651EFB
/* AttachmentTableViewCell.m */
;
};
84D2F5341C2D739700651EFB
/* RankDetailTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F52C1C2D739700651EFB
/* RankDetailTableCell.m */
;
};
84D2F5351C2D739700651EFB
/* RankScrollTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F52E1C2D739700651EFB
/* RankScrollTableViewCell.m */
;
};
84D2F5361C2D739700651EFB
/* RankSectionTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F5301C2D739700651EFB
/* RankSectionTableCell.m */
;
};
84D2F5371C2D739700651EFB
/* RankDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D2F5331C2D739700651EFB
/* RankDetailViewController.m */
;
};
84D3E5F01C04BC8C001FF1DD
/* InspectUploadedViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5EF1C04BC8C001FF1DD
/* InspectUploadedViewController.m */
;
};
84D3E5F31C04BCD3001FF1DD
/* InspectNotUploadViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F21C04BCD3001FF1DD
/* InspectNotUploadViewController.m */
;
};
84D3E5F91C04BD8E001FF1DD
/* InspectNotUpLoadCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoadCell.m */
;
};
...
...
@@ -193,8 +198,6 @@
8409BDF41C281ACD00354460
/* TreeView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TreeView.m
;
sourceTree
=
"<group>"
;
};
8409BDF61C281ACD00354460
/* SelectStoreViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SelectStoreViewController.h
;
sourceTree
=
"<group>"
;
};
8409BDF71C281ACD00354460
/* SelectStoreViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SelectStoreViewController.m
;
sourceTree
=
"<group>"
;
};
840ABECA1BE1C29F006E49C5
/* RankDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailViewController.h
;
sourceTree
=
"<group>"
;
};
840ABECB1BE1C29F006E49C5
/* RankDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailViewController.m
;
sourceTree
=
"<group>"
;
};
8419EAD21BEDC98F002635ED
/* HttpClient.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HttpClient.h
;
sourceTree
=
"<group>"
;
};
8419EAD31BEDC98F002635ED
/* HttpClient.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HttpClient.m
;
sourceTree
=
"<group>"
;
};
841D24F61BEB473C0005CC9F
/* CheckPicViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CheckPicViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -356,8 +359,6 @@
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
ranking.plist
;
sourceTree
=
"<group>"
;
};
84AD4F441BF4A9E800BFB37C
/* RankHeadView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankHeadView.h
;
sourceTree
=
"<group>"
;
};
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankHeadView.m
;
sourceTree
=
"<group>"
;
};
84AD4F471BF4BC0600BFB37C
/* RankDetailTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailTableCell.h
;
sourceTree
=
"<group>"
;
};
84AD4F481BF4BC0600BFB37C
/* RankDetailTableCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailTableCell.m
;
sourceTree
=
"<group>"
;
};
84BB16A01C191A7F00383A64
/* OnLineResultFootView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineResultFootView.h
;
sourceTree
=
"<group>"
;
};
84BB16A11C191A7F00383A64
/* OnLineResultFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineResultFootView.m
;
sourceTree
=
"<group>"
;
};
84C957491BDB344900083584
/* UIBarButtonItem+Create.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIBarButtonItem+Create.h"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -405,6 +406,20 @@
84CF0F1D1BE9B40400C855CE
/* InspectDetailFooterView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectDetailFooterView.m
;
sourceTree
=
"<group>"
;
};
84CF0FA01BE9EDA900C855CE
/* TakePhotoView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TakePhotoView.h
;
sourceTree
=
"<group>"
;
};
84CF0FA11BE9EDA900C855CE
/* TakePhotoView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TakePhotoView.m
;
sourceTree
=
"<group>"
;
};
84D2F5151C2CD3D400651EFB
/* SOPViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SOPViewController.h
;
sourceTree
=
"<group>"
;
};
84D2F5161C2CD3D400651EFB
/* SOPViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SOPViewController.m
;
sourceTree
=
"<group>"
;
};
84D2F5181C2CE67500651EFB
/* SOPTableView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SOPTableView.h
;
sourceTree
=
"<group>"
;
};
84D2F5191C2CE67500651EFB
/* SOPTableView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SOPTableView.m
;
sourceTree
=
"<group>"
;
};
84D2F51E1C2D213400651EFB
/* AttachmentTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AttachmentTableViewCell.h
;
sourceTree
=
"<group>"
;
};
84D2F51F1C2D213400651EFB
/* AttachmentTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AttachmentTableViewCell.m
;
sourceTree
=
"<group>"
;
};
84D2F52B1C2D739700651EFB
/* RankDetailTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailTableCell.h
;
sourceTree
=
"<group>"
;
};
84D2F52C1C2D739700651EFB
/* RankDetailTableCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailTableCell.m
;
sourceTree
=
"<group>"
;
};
84D2F52D1C2D739700651EFB
/* RankScrollTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankScrollTableViewCell.h
;
sourceTree
=
"<group>"
;
};
84D2F52E1C2D739700651EFB
/* RankScrollTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankScrollTableViewCell.m
;
sourceTree
=
"<group>"
;
};
84D2F52F1C2D739700651EFB
/* RankSectionTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankSectionTableCell.h
;
sourceTree
=
"<group>"
;
};
84D2F5301C2D739700651EFB
/* RankSectionTableCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankSectionTableCell.m
;
sourceTree
=
"<group>"
;
};
84D2F5321C2D739700651EFB
/* RankDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailViewController.h
;
sourceTree
=
"<group>"
;
};
84D2F5331C2D739700651EFB
/* RankDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailViewController.m
;
sourceTree
=
"<group>"
;
};
84D3E5EE1C04BC8C001FF1DD
/* InspectUploadedViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectUploadedViewController.h
;
sourceTree
=
"<group>"
;
};
84D3E5EF1C04BC8C001FF1DD
/* InspectUploadedViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectUploadedViewController.m
;
sourceTree
=
"<group>"
;
};
84D3E5F11C04BCD3001FF1DD
/* InspectNotUploadViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectNotUploadViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -721,6 +736,7 @@
8426A4AD1BDF0CD600E5FDF5
/* Standard */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F5111C2CD3C300651EFB
/* SOPCategarys */
,
84CC34D91C09538E002F10E2
/* StandardHandout */
,
84CC34D51C094557002F10E2
/* Cell */
,
8426A4AE1BDF0CD600E5FDF5
/* View */
,
...
...
@@ -993,32 +1009,14 @@
848699AA1BDF810900859DFE
/* RankDetail */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F52A1C2D739700651EFB
/* Cell */
,
84D2F5311C2D739700651EFB
/* ViewController */
,
84AD4F401BF49FC100BFB37C
/* Model */
,
84AD4F371BF4842C00BFB37C
/* View */
,
848699AB1BDF810900859DFE
/* Cell */
,
848699AC1BDF810900859DFE
/* ViewController */
,
);
path
=
RankDetail
;
sourceTree
=
"<group>"
;
};
848699AB1BDF810900859DFE
/* Cell */
=
{
isa
=
PBXGroup
;
children
=
(
84AD4F471BF4BC0600BFB37C
/* RankDetailTableCell.h */
,
84AD4F481BF4BC0600BFB37C
/* RankDetailTableCell.m */
,
);
path
=
Cell
;
sourceTree
=
"<group>"
;
};
848699AC1BDF810900859DFE
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
840ABECA1BE1C29F006E49C5
/* RankDetailViewController.h */
,
840ABECB1BE1C29F006E49C5
/* RankDetailViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
848699AD1BDF810900859DFE
/* RankingList */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1464,6 +1462,8 @@
children
=
(
849B2F6F1C0CA22F005D809F
/* AnnoContentTableViewCell.h */
,
849B2F701C0CA22F005D809F
/* AnnoContentTableViewCell.m */
,
84D2F51E1C2D213400651EFB
/* AttachmentTableViewCell.h */
,
84D2F51F1C2D213400651EFB
/* AttachmentTableViewCell.m */
,
);
path
=
Cell
;
sourceTree
=
"<group>"
;
...
...
@@ -1869,6 +1869,63 @@
path
=
View
;
sourceTree
=
"<group>"
;
};
84D2F5111C2CD3C300651EFB
/* SOPCategarys */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F5121C2CD3C300651EFB
/* Cell */
,
84D2F5131C2CD3C300651EFB
/* View */
,
84D2F5141C2CD3C300651EFB
/* ViewController */
,
);
path
=
SOPCategarys
;
sourceTree
=
"<group>"
;
};
84D2F5121C2CD3C300651EFB
/* Cell */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
Cell
;
sourceTree
=
"<group>"
;
};
84D2F5131C2CD3C300651EFB
/* View */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F5181C2CE67500651EFB
/* SOPTableView.h */
,
84D2F5191C2CE67500651EFB
/* SOPTableView.m */
,
);
path
=
View
;
sourceTree
=
"<group>"
;
};
84D2F5141C2CD3C300651EFB
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F5151C2CD3D400651EFB
/* SOPViewController.h */
,
84D2F5161C2CD3D400651EFB
/* SOPViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
84D2F52A1C2D739700651EFB
/* Cell */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F52B1C2D739700651EFB
/* RankDetailTableCell.h */
,
84D2F52C1C2D739700651EFB
/* RankDetailTableCell.m */
,
84D2F52D1C2D739700651EFB
/* RankScrollTableViewCell.h */
,
84D2F52E1C2D739700651EFB
/* RankScrollTableViewCell.m */
,
84D2F52F1C2D739700651EFB
/* RankSectionTableCell.h */
,
84D2F5301C2D739700651EFB
/* RankSectionTableCell.m */
,
);
path
=
Cell
;
sourceTree
=
"<group>"
;
};
84D2F5311C2D739700651EFB
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
84D2F5321C2D739700651EFB
/* RankDetailViewController.h */
,
84D2F5331C2D739700651EFB
/* RankDetailViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
84DB9BC11BDCD49900822CC4
/* CustomDropMenu */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -2245,7 +2302,6 @@
buildActionMask
=
2147483647
;
files
=
(
8490C4C61BF9CE85006B6569
/* HomeTitleTableCell.m in Sources */
,
840ABECC1BE1C29F006E49C5
/* RankDetailViewController.m in Sources */
,
8497B62B1C043671007ECBE6
/* InspectTableView.m in Sources */
,
8409BDF91C281ACD00354460
/* SelectYetTableViewCell.m in Sources */
,
84AD4F261BF4356A00BFB37C
/* TaskModel.m in Sources */
,
...
...
@@ -2274,6 +2330,7 @@
84CC34CC1C093C2F002F10E2
/* OnLineTableViewCell.m in Sources */
,
84945F1B1C2A6A6300C1793C
/* AboutMeViewController.m in Sources */
,
84E363D21BFAC5200061547E
/* TaskListModel.m in Sources */
,
84D2F5351C2D739700651EFB
/* RankScrollTableViewCell.m in Sources */
,
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
,
848699B01BDF810900859DFE
/* InspectListCell.m in Sources */
,
846206B51C06AF700015C456
/* RankListHeaderView.m in Sources */
,
...
...
@@ -2282,9 +2339,11 @@
84CEB1721C2946EC0072ED0A
/* StoreDetailModel.m in Sources */
,
8474C5951BE78AE1007DCF19
/* QuestionDetailViewController.m in Sources */
,
84970DEF1BD8DD8A00C1728A
/* main.m in Sources */
,
84D2F5361C2D739700651EFB
/* RankSectionTableCell.m in Sources */
,
8474A01C1BE368D700315F30
/* HomeCellItem.m in Sources */
,
8409BDFD1C281ACD00354460
/* TreeView.m in Sources */
,
8409BDFB1C281ACD00354460
/* TreeNodeModel.m in Sources */
,
84D2F5171C2CD3D400651EFB
/* SOPViewController.m in Sources */
,
84CC34D11C093C5E002F10E2
/* LookOnLineViewController.m in Sources */
,
84D863731C11923F00E4F4CC
/* AddQuestionTableCell.m in Sources */
,
84D8257F1BDD2F7E00CC61F7
/* MineTableFooterView.m in Sources */
,
...
...
@@ -2299,15 +2358,16 @@
84AD4F361BF45BEB00BFB37C
/* InspectSortTableCell.m in Sources */
,
8480BEA21C14326100E2F18F
/* MoreScreenView.m in Sources */
,
84970E281BD8DEFE00C1728A
/* AppDelegate.m in Sources */
,
84D2F5341C2D739700651EFB
/* RankDetailTableCell.m in Sources */
,
8409BDFE1C281ACD00354460
/* SelectStoreViewController.m in Sources */
,
849B2F771C0CABE6005D809F
/* AnnounceDetailModel.m in Sources */
,
8490C4C31BF9A394006B6569
/* CustomPageControl.m in Sources */
,
848A201D1C180C1900422FAB
/* OnLineCompleteDetailCell.m in Sources */
,
84CEB16F1C2946DB0072ED0A
/* OnLineDetailModel.m in Sources */
,
84F57C461BEC388A00DDEEB1
/* CommentView.m in Sources */
,
84D2F51A1C2CE67500651EFB
/* SOPTableView.m in Sources */
,
84ED5DD81BF2E64300A1BB6D
/* ScreenView.m in Sources */
,
8474C5831BE751A2007DCF19
/* CommonFunc.m in Sources */
,
84AD4F491BF4BC0600BFB37C
/* RankDetailTableCell.m in Sources */
,
84DC873E1C24E90E00811037
/* AddPicTextTableViewCell.m in Sources */
,
848699B31BDF810900859DFE
/* InspectTaskViewController.m in Sources */
,
84CC34D81C094682002F10E2
/* StandardTableViewCell.m in Sources */
,
...
...
@@ -2330,6 +2390,7 @@
8473E3881C1BBFF600960257
/* InspectTaskDetailCell.m in Sources */
,
84F57C9C1BECA73800DDEEB1
/* StarBar.m in Sources */
,
84F57C4C1BEC785E00DDEEB1
/* AddQuestionViewController.m in Sources */
,
84D2F5201C2D213400651EFB
/* AttachmentTableViewCell.m in Sources */
,
84C9729F1C1ADD17003A3276
/* PictureCommentTableCell.m in Sources */
,
849A18461C152EBA00071600
/* AddPictureTableCell.m in Sources */
,
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
,
...
...
@@ -2354,6 +2415,7 @@
846ABDFC1C1EAB160020C331
/* PicTextModel.m in Sources */
,
84A673911C0C2681000F828E
/* FunctionViewController.m in Sources */
,
848699B61BDF812F00859DFE
/* RankingListViewController.m in Sources */
,
84D2F5371C2D739700651EFB
/* RankDetailViewController.m in Sources */
,
84C9729C1C1ADC5B003A3276
/* PictureTextTableCell.m in Sources */
,
84D825821BDD35E000CC61F7
/* HomeHeaderView.m in Sources */
,
849A18431C152CEE00071600
/* AddPictureViewController.m in Sources */
,
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
64630bb5
No preview for this file type
redstar/Assets.xcassets/home/unfold_btn.imageset/unfold_btn@2x.png
View replaced file @
5851ab4e
View file @
64630bb5
1.38 KB
|
W:
|
H:
15.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
redstar/Assets.xcassets/home/unfold_btn.imageset/unfold_btn@3x.png
View replaced file @
5851ab4e
View file @
64630bb5
1.66 KB
|
W:
|
H:
15.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
redstar/Classes/Macro/Url.h
View file @
64630bb5
...
...
@@ -10,10 +10,10 @@
#define Url_h
// url 测试环境
//
#define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境
#define kRedStarURL @"http://219.235.234.225:7580/"
//
#define kRedStarURL @"http://219.235.234.225:7580/"
// 检查更新
...
...
@@ -119,4 +119,7 @@
// 获取下级组织
#define kQueryLowerOrgsURL @"redstar-server/rest/organization/queryLowerOrgs"
// 口碑标注附件列表
#define kGetAttachmentsURL @"redstar-server/rest/standardpraise/get_attachments"
#endif
/* Url_h */
redstar/Classes/Module/Announce/AnnounceDetail/Cell/AttachmentTableViewCell.h
0 → 100644
View file @
64630bb5
//
// AttachmentTableViewCell.h
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
AttachmentTableViewCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UIButton
*
nameBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
downloadBtn
;
@end
redstar/Classes/Module/Announce/AnnounceDetail/Cell/AttachmentTableViewCell.m
0 → 100644
View file @
64630bb5
//
// AttachmentTableViewCell.m
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AttachmentTableViewCell.h"
@implementation
AttachmentTableViewCell
-
(
UIButton
*
)
nameBtn
{
if
(
!
_nameBtn
)
{
_nameBtn
=
[[
UIButton
alloc
]
init
];
_nameBtn
.
backgroundColor
=
[
UIColor
grayColor
];
_nameBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_nameBtn
.
layer
.
cornerRadius
=
4
.
0
;
[
self
.
contentView
addSubview
:
_nameBtn
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_nameBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_nameBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_nameBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
5
];
[
self
.
contentView
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_nameBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
10
];
[
self
.
contentView
addConstraint
:
lineViewLeft
];
NSLayoutConstraint
*
lineViewHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_nameBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
35
];
[
self
.
contentView
addConstraint
:
lineViewHeight
];
}
return
_nameBtn
;
}
-
(
UIButton
*
)
downloadBtn
{
if
(
!
_downloadBtn
)
{
_downloadBtn
=
[[
UIButton
alloc
]
init
];
_downloadBtn
.
backgroundColor
=
[
UIColor
grayColor
];
_downloadBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_downloadBtn
.
layer
.
cornerRadius
=
4
.
0
;
[
self
.
contentView
addSubview
:
_downloadBtn
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_downloadBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_downloadBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_downloadBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
5
];
[
self
.
contentView
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_downloadBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:
10
];
[
self
.
contentView
addConstraint
:
lineViewLeft
];
}
return
_downloadBtn
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
redstar/Classes/Module/Announce/AnnounceDetail/ViewController/AnnoDetailViewController.m
View file @
64630bb5
...
...
@@ -15,8 +15,10 @@
#import "AnnounceDetailModel.h"
#
define kAnnounceContentCell @"AnnoContentTableViewCell
"
#
import "AttachmentTableViewCell.h
"
#define kAnnounceContentCell @"AnnoContentTableViewCell"
#define kAttachmentTableViewCell @"AttachmentTableViewCell"
@interface
AnnoDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
...
...
@@ -43,7 +45,7 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kAnnounceDetailURL
,
self
.
affiche_uuid
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpCilent
getAnnounceDetailWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"anno详情 = %@"
,
response
);
NSLog
(
@"anno
公告
详情 = %@"
,
response
);
NSDictionary
*
dict
=
response
[
@"data"
];
AnnounceDetailModel
*
annoDetail
=
[
AnnounceDetailModel
announceDetailModelWithDict
:
dict
];
_annoDetail
=
annoDetail
;
...
...
@@ -94,6 +96,15 @@
}
-
(
void
)
showFile
:
(
UIButton
*
)
sender
{
}
-
(
void
)
downloadFile
:
(
UIButton
*
)
sender
{
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
@@ -103,13 +114,13 @@
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
1
;
return
1
+
_annoDetail
.
attachmentUrls
.
count
;
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
)
{
AnnoContentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAnnounceContentCell
];
if
(
!
cell
)
{
cell
=
[[
AnnoContentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAnnounceContentCell
];
...
...
@@ -123,6 +134,22 @@
cell
.
backgroundColor
=
kAnnounceHeaderColor
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
{
AttachmentTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kAttachmentTableViewCell
];
if
(
!
cell
)
{
cell
=
[[
AttachmentTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kAttachmentTableViewCell
];
}
NSDictionary
*
dict
=
_annoDetail
.
attachmentUrls
[
indexPath
.
row
-
1
];
NSString
*
name
=
dict
[
@"fileName"
];
[
cell
.
nameBtn
setTitle
:
name
forState
:
UIControlStateNormal
];
[
cell
.
downloadBtn
setTitle
:
@"下载"
forState
:
UIControlStateNormal
];
[
cell
.
nameBtn
addTarget
:
self
action
:
@selector
(
showFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
downloadBtn
addTarget
:
self
action
:
@selector
(
downloadFile
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
}
}
...
...
@@ -140,7 +167,7 @@
_tableView
.
tableHeaderView
=
self
.
headerView
;
_tableView
.
tableFooterView
=
self
.
footerView
;
[
_tableView
registerClass
:[
AnnoContentTableViewCell
class
]
forCellReuseIdentifier
:
kAnnounceContentCell
];
[
_tableView
registerClass
:[
AttachmentTableViewCell
class
]
forCellReuseIdentifier
:
kAttachmentTableViewCell
];
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/ViewController/OnLineViewController.m
View file @
64630bb5
...
...
@@ -22,6 +22,11 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
@property
(
nonatomic
,
strong
)
OnLineFooterView
*
footView
;
@property
(
nonatomic
,
strong
)
NSString
*
storeName
;
@property
(
nonatomic
,
strong
)
NSString
*
dateStr
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
UIView
*
pickBackView
;
@property
(
nonatomic
,
strong
)
UIDatePicker
*
datePicker
;
@end
@implementation
OnLineViewController
...
...
@@ -50,6 +55,7 @@
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
_storeName
=
@"全部"
;
_dateStr
=
@""
;
}
-
(
void
)
doBack
:
(
id
)
sender
...
...
@@ -75,6 +81,20 @@
-
(
void
)
saveClick
:
(
UIButton
*
)
sender
{
if
(
_dateStr
.
length
==
0
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"请选择截止时间!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
if
(
self
.
footView
.
titleTextView
.
text
.
length
==
0
||
self
.
footView
.
contentTextView
.
text
.
length
==
0
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"任务标题和任务内容不能为空!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
}
// 提示框
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要下达新的抽查任务吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
334281
;
...
...
@@ -82,6 +102,31 @@
[
alert
show
];
}
-
(
void
)
closeBackGroundView
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
.
0
f
;
_pickBackView
.
alpha
=
0
.
0
f
;
}
completion
:^
(
BOOL
finished
)
{
[
_backGroundView
removeFromSuperview
];
[
_datePicker
removeFromSuperview
];
[
_pickBackView
removeFromSuperview
];
_backGroundView
=
nil
;
_datePicker
=
nil
;
_pickBackView
=
nil
;
}];
}
-
(
void
)
okClick
:
(
UIButton
*
)
sender
{
NSDate
*
select
=
[
_datePicker
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"yyyy-MM-dd"
];
_dateStr
=
[
dateFormatter
stringFromDate
:
select
];
[
self
closeBackGroundView
];
[
self
.
tableView
reloadData
];
}
#pragma mark - SelectStoreDelegate
-
(
void
)
deliverWithArray
:
(
NSMutableArray
*
)
array
{
...
...
@@ -103,6 +148,7 @@
if
(
alertView
.
tag
==
334281
)
{
if
(
buttonIndex
==
1
)
{
NSDate
*
date
=
[
NSDate
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"YYYY-MM-dd hh:mm:ss"
];
...
...
@@ -117,24 +163,35 @@
NSLog
(
@"发起抽查url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"title"
:
self
.
footView
.
titleTextView
.
text
,
NSDictionary
*
parameters
=
@{
@"title"
:
self
.
footView
.
titleTextView
.
text
,
@"content"
:
self
.
footView
.
contentTextView
.
text
,
@"endDate"
:
dateString
,
@"endDate"
:
_dateStr
,
@"state"
:
@"initial"
,
@"stores"
:
_uuidArray
};
@"stores"
:
_uuidArray
};
NSLog
(
@"发起抽查par = %@"
,
parameters
);
[
httpClient
saveSportCheckWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"发起抽查 response = %@"
,
response
);
NSLog
(
@"发起抽查 error = %@"
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下达任务成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
334285
;
[
alert
show
];
}
}];
}
}
if
(
alertView
.
tag
==
334285
)
{
if
(
buttonIndex
==
0
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
}
#pragma mark - TableView Delegate/DateSource
...
...
@@ -153,7 +210,13 @@
}
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_titleArray
[
indexPath
.
row
]];
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
indexPath
.
row
==
0
)
{
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_storeName
];
}
else
{
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_dateStr
];
}
return
cell
;
...
...
@@ -167,12 +230,64 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
)
{
SelectStoreViewController
*
select
=
[[
SelectStoreViewController
alloc
]
init
];
select
.
delegate
=
self
;
[
self
.
navigationController
pushViewController
:
select
animated
:
YES
];
}
else
{
if
(
!
_backGroundView
)
{
_backGroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeBackGroundView
)];
[
_backGroundView
addGestureRecognizer
:
tapGR
];
}
if
(
!
_pickBackView
)
{
_pickBackView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
280
,
190
)];
_pickBackView
.
backgroundColor
=
[
UIColor
whiteColor
];
_pickBackView
.
center
=
CGPointMake
(
self
.
view
.
center
.
x
,
self
.
view
.
center
.
y
-
120
);
_pickBackView
.
alpha
=
0
.
0
;
UIButton
*
okButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
140
,
150
,
140
,
40
)];
[
okButton
setTitle
:
@"确定"
forState
:
UIControlStateNormal
];
okButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
okButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
okButton
addTarget
:
self
action
:
@selector
(
okClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_pickBackView
addSubview
:
okButton
];
UIButton
*
quitButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
150
,
140
,
40
)];
[
quitButton
setTitle
:
@"取消"
forState
:
UIControlStateNormal
];
quitButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
quitButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
quitButton
addTarget
:
self
action
:
@selector
(
closeBackGroundView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_pickBackView
addSubview
:
quitButton
];
}
if
(
!
_datePicker
)
{
_datePicker
=
[[
UIDatePicker
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
280
,
150
)];
_datePicker
.
datePickerMode
=
UIDatePickerModeDate
;
[
_pickBackView
addSubview
:
_datePicker
];
}
_backGroundView
.
alpha
=
0
;
_backGroundView
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tableView
];
[
self
.
view
insertSubview
:
_pickBackView
aboveSubview
:
_backGroundView
];
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
0
.
6
;
_pickBackView
.
alpha
=
1
.
0
;
}];
}
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.h
View file @
64630bb5
...
...
@@ -15,4 +15,5 @@
@property
(
nonatomic
,
strong
)
UILabel
*
addressLabel
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
showScrollView
;
// 轮播图
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
storePictures
:(
NSArray
*
)
storePictures
;
@end
redstar/Classes/Module/Function/OnLine/LookOnLineResult/Cell/OnLineResultDetailCell.m
View file @
64630bb5
...
...
@@ -11,16 +11,16 @@
#import <UIButton+WebCache.h>
@implementation
OnLineResultDetailCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
storePictures
:(
NSArray
*
)
storePictures
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
setupScrollView
];
[
self
setupScrollView
WithStorePictures
:
storePictures
];
}
return
self
;
}
-
(
void
)
setupScrollView
-
(
void
)
setupScrollView
WithStorePictures
:(
NSArray
*
)
storePictures
{
int
imageCount
=
4
;
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineResult/ViewController/OnLineResultViewController.m
View file @
64630bb5
...
...
@@ -180,7 +180,7 @@
{
OnLineResultDetailCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineResultDetailCell
];
if
(
!
cell
)
{
cell
=
[[
OnLineResultDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineResultDetailCell
];
cell
=
[[
OnLineResultDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineResultDetailCell
storePictures
:
_storeDetail
.
storePictures
];
}
cell
.
contentView
.
backgroundColor
=
kResultTitleBackColor
;
cell
.
shopNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_storeDetail
.
store_name
];
...
...
redstar/Classes/Module/Function/OnLine/OnLineTaskComplete/ViewController/OnLineCompleteViewController.m
View file @
64630bb5
...
...
@@ -176,14 +176,10 @@
if
(
indexPath
.
section
==
0
)
{
return
;
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// OnLineResultViewController *onLineResult = [[OnLineResultViewController alloc] init];
// onLineResult.storeDetail = _allStoreArray[indexPath.row];
// onLineResult.checkUuid = self.uuid;
// [self.navigationController pushViewController:onLineResult animated:YES];
OnLineResultViewController
*
onLineResult
=
[[
OnLineResultViewController
alloc
]
init
];
onLineResult
.
storeDetail
=
_allStoreArray
[
indexPath
.
row
];
onLineResult
.
checkUuid
=
self
.
uuid
;
[
self
.
navigationController
pushViewController
:
onLineResult
animated
:
YES
];
}
}
...
...
redstar/Classes/Module/Function/OnLine/SpotCheckOnLine/ViewController/SpotCheckOnLineViewController.m
View file @
64630bb5
...
...
@@ -193,10 +193,10 @@
-
(
void
)
addSpotCheckTaskClick
:
(
UIButton
*
)
sender
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
//
OnLineViewController *onlineVC = [[OnLineViewController alloc] init];
//
[self.navigationController pushViewController:onlineVC animated:YES];
//
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"当前功能正在开发!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//
[alert show];
OnLineViewController
*
onlineVC
=
[[
OnLineViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
onlineVC
animated
:
YES
];
}
-
(
void
)
dropCilck
:
(
MenuButton
*
)
sender
...
...
redstar/Classes/Module/Function/Standar/SOPCategarys/View/SOPTableView.h
0 → 100644
View file @
64630bb5
//
// SOPTableView.h
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
SOPTableViewDelegate
<
NSObject
>
-
(
void
)
selectRowWithDetailTitle
:
(
NSString
*
)
detailTitle
;
@end
@interface
SOPTableView
:
UITableView
@property
(
nonatomic
,
assign
)
id
<
SOPTableViewDelegate
>
sop_delegate
;
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
style
:(
UITableViewStyle
)
style
titleArray
:(
NSArray
*
)
titleArray
;
-
(
instancetype
)
initWithTitleArray
:(
NSArray
*
)
titleArray
;
@end
redstar/Classes/Module/Function/Standar/SOPCategarys/View/SOPTableView.m
0 → 100644
View file @
64630bb5
//
// SOPTableView.m
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SOPTableView.h"
@interface
SOPTableView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@end
@implementation
SOPTableView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
style
:(
UITableViewStyle
)
style
titleArray
:(
NSArray
*
)
titleArray
{
self
=
[
super
initWithFrame
:
frame
style
:
style
];
if
(
self
)
{
_titleArray
=
titleArray
;
[
self
setup
];
}
return
self
;
}
-
(
instancetype
)
initWithTitleArray
:(
NSArray
*
)
titleArray
{
self
=
[
super
init
];
if
(
self
)
{
_titleArray
=
titleArray
;
[
self
setup
];
}
return
self
;
}
-
(
void
)
setup
{
self
.
delegate
=
self
;
self
.
dataSource
=
self
;
}
#pragma mark - UItableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_titleArray
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"cell333"
];
if
(
!
cell
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
@"cell333"
];
}
cell
.
textLabel
.
text
=
_titleArray
[
indexPath
.
row
];
cell
.
textLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
cell
.
textLabel
.
textColor
=
kLightBlack
;
cell
.
textLabel
.
numberOfLines
=
0
;
return
cell
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
_sop_delegate
&&
[
_sop_delegate
respondsToSelector
:
@selector
(
selectRowWithDetailTitle
:)])
{
[
_sop_delegate
selectRowWithDetailTitle
:
_titleArray
[
indexPath
.
row
]];
}
}
@end
redstar/Classes/Module/Function/Standar/SOPCategarys/ViewController/SOPViewController.h
0 → 100644
View file @
64630bb5
//
// SOPViewController.h
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SOPViewController
:
UIViewController
@end
redstar/Classes/Module/Function/Standar/SOPCategarys/ViewController/SOPViewController.m
0 → 100644
View file @
64630bb5
//
// SOPViewController.m
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SOPViewController.h"
#import "GroupTabBar.h"
#import "GroupItems.h"
#import "SOPTableView.h"
#import "HttpClient.h"
#define SELECTED_VIEW_CONTROLLER_TAG 39998
@interface
SOPViewController
()
<
GroupTabBarDelegate
,
SOPTableViewDelegate
>
@property
(
nonatomic
,
strong
)
GroupTabBar
*
groupTabBar
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray1
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray2
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray3
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray4
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray5
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray6
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray7
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray8
;
@property
(
nonatomic
,
strong
)
NSString
*
detailTitle
;
@property
(
nonatomic
,
strong
)
UIButton
*
resetBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
queryBtn
;
@end
@implementation
SOPViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
extendedLayoutIncludesOpaqueBars
=
NO
;
self
.
modalPresentationCapturesStatusBarAppearance
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
self
.
titleArray
=
[
NSArray
arrayWithObjects
:
@"质量管理"
,
@"价格管理"
,
@"现场服务"
,
@"售后服务"
,
@"环境管理"
,
@"现场管理"
,
@"400呼叫管理"
,
@"单品管理"
,
nil
];
self
.
titleArray1
=
[
NSArray
arrayWithObjects
:
@"商品环保、质量检测管理规定"
,
@"商品资质管理规定"
,
@"三年质保管理规定"
,
@"商品绿色展陈管理规定"
,
@" 附件:绿色展陈操作手册"
,
nil
];
self
.
titleArray2
=
[
NSArray
arrayWithObjects
:
@"商品标价签管理规定"
,
@"商品调价管理规定"
,
@"商场全国大促活动执行管理规定"
,
@"商户促销活动管理规定"
,
@"“全场最低七折”管理规定"
,
nil
];
self
.
titleArray3
=
[
NSArray
arrayWithObjects
:
@"商场现场服务基本规定"
,
@"便民服务管理规定"
,
@"营业员管理规定"
,
@"播音管理规定"
,
@"商场实施管理者“顾客之声VOC”管理规定"
,
@"30天无理由退货管理规定"
,
@"15分钟退单管理规定"
,
@"商场全员顾客服务规范管理规定"
,
@" 附件:停车场安全员岗位车辆指挥标准手势手册"
,
@"设计免费咨询管理规定"
,
nil
];
self
.
titleArray4
=
[
NSArray
arrayWithObjects
:
@"商场客诉处理管理规定"
,
@"先行赔付管理规定"
,
@"商品质量保证金管理规定"
,
@"送货跟单回访管理规定"
,
nil
];
self
.
titleArray5
=
[
NSArray
arrayWithObjects
:
@"商场基础环境管理规定"
,
@"口碑商场环境管理规定"
,
@" 附件:室内地面维修养护规范"
,
@" 附件:商户装修“五区管理法”规定"
,
@" 附件:喷水池管理规范"
,
@"商场停车场管理规定"
,
@"商场洗手间管理规范"
,
@"商场综合物料管理规定"
,
nil
];
self
.
titleArray6
=
[
NSArray
arrayWithObjects
:
@"楼层日常巡场管理规定"
,
@"商户进/出货管理规定"
,
@"商户进场管理规定"
,
@"商户撤场管理规定"
,
@"商户信用等级评定管理规定"
,
nil
];
self
.
titleArray7
=
[
NSArray
arrayWithObjects
:
@"呼叫中心商场虚拟座席远程管理规定"
,
nil
];
self
.
titleArray8
=
[
NSArray
arrayWithObjects
:
@"商品信息管理规定"
,
nil
];
[
self
setupNav
];
[
self
setGroupBar
];
[
self
.
resetBtn
addTarget
:
self
action
:
@selector
(
resetClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
queryBtn
addTarget
:
self
action
:
@selector
(
queryClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
-
(
void
)
resetClick
:
(
UIButton
*
)
sender
{
}
-
(
void
)
queryClick
:
(
UIButton
*
)
sender
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kGetAttachmentsURL
];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"type"
:
@"sop"
,
// @"category1":_titleArray[_groupTabBar.selectNumber],
// @"category2":_detailTitle
@"category1"
:
@"11"
,
@"category2"
:
@"22"
};
[
http
getAttachmentsWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"7.1 口碑标注附件列表 = %@, error = %@"
,
response
,
error
);
}];
}
-
(
void
)
setupNav
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"SOP分类查询"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
}
-
(
void
)
setGroupBar
{
self
.
groupTabBar
=
[[
GroupTabBar
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
120
,
kScreenHeight
-
64
-
60
)];
_groupTabBar
.
delegate
=
self
;
[
self
.
view
addSubview
:
_groupTabBar
];
NSInteger
selectedIndex
=
0
;
NSIndexPath
*
selectedIndexPath
=
[
NSIndexPath
indexPathForRow
:
selectedIndex
inSection
:
0
];
SOPTableView
*
tableView1
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray1
];
tableView1
.
sop_delegate
=
self
;
GroupItems
*
tableItem1
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
0
]
view
:
tableView1
];
SOPTableView
*
tableView2
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray2
];
tableView2
.
sop_delegate
=
self
;
GroupItems
*
tableItem2
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
1
]
view
:
tableView2
];
SOPTableView
*
tableView3
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray3
];
tableView3
.
sop_delegate
=
self
;
GroupItems
*
tableItem3
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
2
]
view
:
tableView3
];
SOPTableView
*
tableView4
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray4
];
tableView4
.
sop_delegate
=
self
;
GroupItems
*
tableItem4
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
3
]
view
:
tableView4
];
SOPTableView
*
tableView5
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray5
];
tableView5
.
sop_delegate
=
self
;
GroupItems
*
tableItem5
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
4
]
view
:
tableView5
];
SOPTableView
*
tableView6
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray6
];
tableView6
.
sop_delegate
=
self
;
GroupItems
*
tableItem6
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
5
]
view
:
tableView6
];
SOPTableView
*
tableView7
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray7
];
tableView7
.
sop_delegate
=
self
;
GroupItems
*
tableItem7
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
6
]
view
:
tableView7
];
SOPTableView
*
tableView8
=
[[
SOPTableView
alloc
]
initWithTitleArray
:
_titleArray8
];
tableView8
.
sop_delegate
=
self
;
GroupItems
*
tableItem8
=
[[
GroupItems
alloc
]
initWithTitle
:
_titleArray
[
7
]
view
:
tableView8
];
[
tableView1
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView2
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView3
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView4
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView5
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView6
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView7
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
tableView8
selectRowAtIndexPath
:
selectedIndexPath
animated
:
NO
scrollPosition
:
UITableViewScrollPositionNone
];
[
self
.
view
insertSubview
:
tableView1
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView2
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView3
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView4
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView5
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView6
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView7
belowSubview
:
_groupTabBar
];
[
self
.
view
insertSubview
:
tableView8
belowSubview
:
_groupTabBar
];
_groupTabBar
.
items
=
@[
tableItem1
,
tableItem2
,
tableItem3
,
tableItem4
,
tableItem5
,
tableItem6
,
tableItem7
,
tableItem8
];
[
_groupTabBar
showIndex
:
0
];
}
-
(
void
)
doBack
:
(
id
)
sender
{
[
self
.
navigationController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark - SOPTableViewDelegate
-
(
void
)
selectRowWithDetailTitle
:
(
NSString
*
)
detailTitle
{
_detailTitle
=
detailTitle
;
}
#pragma mark - GroupTabBarDelegate
-
(
void
)
switchView
:
(
UIView
*
)
view
{
UIView
*
currentView
=
[
self
.
view
viewWithTag
:
SELECTED_VIEW_CONTROLLER_TAG
];
[
currentView
removeFromSuperview
];
currentView
=
nil
;
view
.
frame
=
CGRectMake
(
self
.
groupTabBar
.
frame
.
size
.
width
,
0
,
kScreenWidth
-
self
.
groupTabBar
.
frame
.
size
.
width
,
self
.
groupTabBar
.
size
.
height
);
view
.
tag
=
SELECTED_VIEW_CONTROLLER_TAG
;
[
self
.
view
insertSubview
:
view
belowSubview
:
_groupTabBar
];
}
#pragma mark - lazy loading
-
(
UIButton
*
)
resetBtn
{
if
(
!
_resetBtn
)
{
_resetBtn
=
[[
UIButton
alloc
]
init
];
_resetBtn
.
backgroundColor
=
[
UIColor
grayColor
];
_resetBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_resetBtn
setTitle
:
@"重置"
forState
:
UIControlStateNormal
];
_resetBtn
.
layer
.
cornerRadius
=
4
.
0
;
[
self
.
view
addSubview
:
_resetBtn
];
NSLayoutConstraint
*
lineViewHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
self
.
view
addConstraint
:
lineViewHeight
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:-
10
];
[
self
.
view
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
7
.
5
];
[
self
.
view
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_resetBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
view
addConstraint
:
lineViewLeft
];
}
return
_resetBtn
;
}
-
(
UIButton
*
)
queryBtn
{
if
(
!
_queryBtn
)
{
_queryBtn
=
[[
UIButton
alloc
]
init
];
_queryBtn
.
backgroundColor
=
kNavigationBarColor
;
_queryBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_queryBtn
setTitle
:
@"查看附件"
forState
:
UIControlStateNormal
];
_queryBtn
.
layer
.
cornerRadius
=
4
.
0
;
[
self
.
view
addSubview
:
_queryBtn
];
NSLayoutConstraint
*
lineViewHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_queryBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
self
.
view
addConstraint
:
lineViewHeight
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_queryBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
view
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_queryBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
7
.
5
];
[
self
.
view
addConstraint
:
lineViewBottom
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_queryBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeCenterX
multiplier
:
1
.
0
constant
:
10
];
[
self
.
view
addConstraint
:
lineViewLeft
];
}
return
_queryBtn
;
}
@end
redstar/Classes/Module/Function/Standar/ViewController/StandardViewController.m
View file @
64630bb5
...
...
@@ -9,6 +9,7 @@
#import "StandardViewController.h"
#import "StandardTableViewCell.h"
#import "HandOutViewController.h"
#import "SOPViewController.h"
#define kStandardTableViewCell @"standardTableViewCell"
@interface
StandardViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -102,14 +103,20 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
0
)
{
SOPViewController
*
sopVC
=
[[
SOPViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
sopVC
animated
:
YES
];
}
else
if
(
indexPath
.
section
==
1
)
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"该功能正在努力开发中!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
// if (indexPath.section == 1) {
// HandOutViewController *hoandOutVC = [[HandOutViewController alloc] init];
// [self.navigationController pushViewController:hoandOutVC animated:YES];
// }
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"该功能正在努力开发中!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
#pragma mark - lazy laoding
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskModel.h
View file @
64630bb5
...
...
@@ -29,6 +29,9 @@
@property
(
nonatomic
,
copy
)
NSString
*
originScore
;
@property
(
nonatomic
,
copy
)
NSString
*
readonlyType
;
@property
(
nonatomic
,
copy
)
NSString
*
orderNo
;
@property
(
nonatomic
,
assign
)
int
index
;
+
(
instancetype
)
taskModelWithDict
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
;
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.m
View file @
64630bb5
...
...
@@ -64,12 +64,13 @@
NSLayoutConstraint
*
shoppingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_mainTitleBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
37
];
[
self
.
contentView
addConstraint
:
shoppingLeft
];
NSLayoutConstraint
*
shoppingRight
=
[
NSLayoutConstraint
constraintWithItem
:
_mainTitleBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
scoreLabel
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingRight
];
NSLayoutConstraint
*
shoppingHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_mainTitleBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
42
];
[
self
.
contentView
addConstraint
:
shoppingHeight
];
NSLayoutConstraint
*
shoppingBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_mainTitleBtn
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
2
];
[
self
.
contentView
addConstraint
:
shoppingBottom
];
}
return
_mainTitleBtn
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankScrollTableViewCell.h
0 → 100644
View file @
64630bb5
//
// RankScrollTableViewCell.h
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
RankScrollTableViewCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankScrollTableViewCell.m
0 → 100644
View file @
64630bb5
//
// RankScrollTableViewCell.m
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "RankScrollTableViewCell.h"
#import <UIButton+WebCache.h>
@implementation
RankScrollTableViewCell
-
(
UIScrollView
*
)
scrollView
{
if
(
!
_scrollView
)
{
_scrollView
=
[[
UIScrollView
alloc
]
init
];
_scrollView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_scrollView
];
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
_scrollView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
5
];
[
self
.
contentView
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_scrollView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
_scrollView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_scrollView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
65
];
[
self
.
contentView
addConstraint
:
someoneHeight
];
NSLayoutConstraint
*
someoneBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_scrollView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
5
];
[
self
.
contentView
addConstraint
:
someoneBottom
];
}
return
_scrollView
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
}
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankSectionTableCell.h
0 → 100644
View file @
64630bb5
//
// RankSectionTableCell.h
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
RankSectionTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
categoryLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
scoreLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
gradeLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
arrowImageView
;
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankSectionTableCell.m
0 → 100644
View file @
64630bb5
//
// RankSectionTableCell.m
// redstar
//
// Created by admin on 15/12/25.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "RankSectionTableCell.h"
@implementation
RankSectionTableCell
-
(
UILabel
*
)
categoryLabel
{
if
(
!
_categoryLabel
)
{
_categoryLabel
=
[[
UILabel
alloc
]
init
];
_categoryLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_categoryLabel
.
textColor
=
kLightBlack
;
_categoryLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_categoryLabel
];
NSLayoutConstraint
*
shoppingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingTop
];
NSLayoutConstraint
*
shoppingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
shoppingLeft
];
NSLayoutConstraint
*
shoppingHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
50
];
[
self
.
contentView
addConstraint
:
shoppingHeight
];
NSLayoutConstraint
*
shoppingBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_categoryLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingBottom
];
}
return
_categoryLabel
;
}
-
(
UILabel
*
)
gradeLabel
{
if
(
!
_gradeLabel
)
{
_gradeLabel
=
[[
UILabel
alloc
]
init
];
_gradeLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_gradeLabel
];
NSLayoutConstraint
*
shoppingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_gradeLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingTop
];
NSLayoutConstraint
*
shoppingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_gradeLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
arrowImageView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingLeft
];
NSLayoutConstraint
*
shoppingWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_gradeLabel
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
60
];
[
self
.
contentView
addConstraint
:
shoppingWidth
];
NSLayoutConstraint
*
shoppingBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_gradeLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingBottom
];
}
return
_gradeLabel
;
}
-
(
UILabel
*
)
scoreLabel
{
if
(
!
_scoreLabel
)
{
_scoreLabel
=
[[
UILabel
alloc
]
init
];
_scoreLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_scoreLabel
];
NSLayoutConstraint
*
shoppingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_scoreLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingTop
];
NSLayoutConstraint
*
shoppingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_scoreLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
gradeLabel
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingLeft
];
NSLayoutConstraint
*
shoppingWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_scoreLabel
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
60
];
[
self
.
contentView
addConstraint
:
shoppingWidth
];
NSLayoutConstraint
*
shoppingBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_scoreLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
shoppingBottom
];
}
return
_scoreLabel
;
}
-
(
UIImageView
*
)
arrowImageView
{
if
(
!
_arrowImageView
)
{
_arrowImageView
=
[[
UIImageView
alloc
]
init
];
_arrowImageView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
contentView
addSubview
:
_arrowImageView
];
NSLayoutConstraint
*
shoppingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
shoppingTop
];
NSLayoutConstraint
*
shoppingRight
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
shoppingRight
];
NSLayoutConstraint
*
shoppingWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
12
.
5
];
[
self
.
contentView
addConstraint
:
shoppingWidth
];
NSLayoutConstraint
*
shoppingHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_arrowImageView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
7
.
5
];
[
self
.
contentView
addConstraint
:
shoppingHeight
];
}
return
_arrowImageView
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
64630bb5
...
...
@@ -8,6 +8,8 @@
#import "RankDetailViewController.h"
#import "RankDetailTableCell.h"
#import "RankSectionTableCell.h"
#import "RankScrollTableViewCell.h"
#import "RankDetailHeaderView.h"
#import <UIButton+WebCache.h>
#import "RankHeadView.h"
...
...
@@ -21,19 +23,20 @@
#import "CommentView.h"
#import <UIButton+WebCache.h>
#import <RATreeView.h>
#define kRankDetailCell @"RankDetailTableCell"
#define kRankSectionTableCell @"RankSectionTableviewCell"
#define kRankScrollTableViewCell @"RankScrollTableViewCell"
@interface
RankDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
RankHeadViewDelegat
e
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tabl
eView
;
@interface
RankDetailViewController
()
<
RATreeViewDelegate
,
RATreeViewDataSourc
e
,
UITextViewDelegate
>
@property
(
nonatomic
,
strong
)
RATreeView
*
tre
eView
;
@property
(
nonatomic
,
strong
)
RankDetailHeaderView
*
rankDetailHeaderView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
taskData
;
@property
(
nonatomic
,
strong
)
RankDetailHeaderView
*
rankDetailHeaderView
;
@property
(
nonatomic
,
strong
)
UIView
*
footerView
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
selectedIndexes
;
// 存放二次展开的cell
@property
(
nonatomic
,
strong
)
UIButton
*
commentButton
;
@property
(
nonatomic
,
strong
)
UIView
*
backGroundView
;
@property
(
nonatomic
,
strong
)
CommentView
*
commentView
;
...
...
@@ -74,22 +77,12 @@
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
// 初始化容器
self
.
selectedIndexes
=
[[
NSMutableDictionary
alloc
]
init
];
[
self
.
commentButton
setTitle
:
@"添加评论"
forState
:
UIControlStateNormal
];
// 请求口碑排名详情
[
self
requestRankingDetail
];
[
self
.
commentButton
setTitle
:
@"添加评论"
forState
:
UIControlStateNormal
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark - Private Methods
...
...
@@ -104,31 +97,83 @@
NSDictionary
*
dataDict
=
response
[
@"data"
];
TaskDetailModel
*
taskDetail
=
[
TaskDetailModel
taskDetailModelWithDict
:
dataDict
];
self
.
rankDetailHeaderView
.
taskDetail
=
taskDetail
;
[
self
.
rankDetailHeaderView
.
showAllBtn
addTarget
:
self
action
:
@selector
(
showAllClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
setupScrollView
];
NSArray
*
dataArray
=
dataDict
[
@"categories"
]
;
NSArray
*
dataArray
=
taskDetail
.
categories
;
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskGroup
*
taskGroup
=
[
TaskGroup
taskGroupWithDict
:
dict
];
for
(
int
a
=
0
;
a
<
taskGroup
.
answers
.
count
;
a
++
)
{
TaskModel
*
task
=
taskGroup
.
answers
[
a
];
task
.
index
=
a
;
}
[
tgArray
addObject
:
taskGroup
];
}
_taskData
=
tgArray
;
self
.
tableView
.
tableHeaderView
=
self
.
rankDetailHeaderView
;
self
.
rankDetailHeaderView
.
rankDetailView
.
addressLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
storeAddress
];
self
.
rankDetailHeaderView
.
rankDetailView
.
storePictures
=
self
.
storePictures
;
[
self
.
tableView
registerClass
:[
RankDetailTableCell
class
]
forCellReuseIdentifier
:
kRankDetailCell
];
[
self
setupScrollView
];
[
self
.
treeView
registerClass
:[
RankSectionTableCell
class
]
forCellReuseIdentifier
:
kRankSectionTableCell
];
[
self
.
treeView
registerClass
:[
RankDetailTableCell
class
]
forCellReuseIdentifier
:
kRankDetailCell
];
[
self
.
treeView
registerClass
:[
RankScrollTableViewCell
class
]
forCellReuseIdentifier
:
kRankScrollTableViewCell
];
}];
}
-
(
void
)
setupScrollView
{
int
imageCount
=
(
int
)
self
.
storePictures
.
count
;
CGFloat
marginW
=
5
.
0
;
CGFloat
imageViewW
=
90
+
2
*
marginW
;
CGFloat
imageViewH
=
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
bounds
.
size
.
height
-
4
;
if
(
imageCount
==
0
)
{
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
contentSize
=
CGSizeMake
(
4
*
imageViewW
,
imageViewH
+
4
);
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
[
button
setImage
:[
UIImage
imageNamed
:
@"default_pic"
]
forState
:
UIControlStateNormal
];
button
.
frame
=
CGRectMake
(
i
*
imageViewW
+
2
,
2
,
imageViewW
-
2
*
marginW
,
imageViewH
);
[
button
addTarget
:
self
action
:
@selector
(
showBigPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
addSubview
:
button
];
}
}
else
{
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
contentSize
=
CGSizeMake
(
imageCount
*
imageViewW
,
imageViewH
+
4
);
for
(
int
i
=
0
;
i
<
imageCount
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
NSDictionary
*
dict
=
(
NSDictionary
*
)
self
.
storePictures
[
i
];
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
dict
[
@"fileUrl"
]]];
[
button
sd_setImageWithURL
:
imageUrl
forState
:
UIControlStateNormal
placeholderImage
:
[
UIImage
imageNamed
:
@"default_pic"
]];
button
.
frame
=
CGRectMake
(
i
*
imageViewW
+
2
,
2
,
imageViewW
-
2
*
marginW
,
imageViewH
);
[
button
addTarget
:
self
action
:
@selector
(
showBigPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
addSubview
:
button
];
}
}
}
-
(
void
)
showBigPic
:
(
UIButton
*
)
btn
{
CheckPicViewController
*
checkVC
=
[[
CheckPicViewController
alloc
]
init
];
checkVC
.
checkImage
=
btn
.
imageView
.
image
;
[
self
.
navigationController
pushViewController
:
checkVC
animated
:
YES
];
}
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
-
(
void
)
addComment
:
(
UIButton
*
)
sender
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
if
([
permissions
containsObject
:
@"500202"
])
{
if
(
!
_backGroundView
)
{
_backGroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
UITapGestureRecognizer
*
tapGR
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
closeBackGroundView
)];
...
...
@@ -142,7 +187,7 @@
_commentView
.
contentTextView
.
delegate
=
self
;
[
_commentView
.
quitBtn
addTarget
:
self
action
:
@selector
(
closeBackGroundView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_commentView
.
sureBtn
addTarget
:
self
action
:
@selector
(
submitComment
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tabl
eView
];
[
self
.
view
insertSubview
:
_backGroundView
aboveSubview
:
_tre
eView
];
[
self
.
view
insertSubview
:
_commentView
aboveSubview
:
_backGroundView
];
_backGroundView
.
alpha
=
0
;
...
...
@@ -157,170 +202,164 @@
_commentView
.
frame
=
toFrame
;
}];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您没有评论的权限!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
textView
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
-
173
,
kScreenWidth
,
kCommentViewHeight
);
}];
// 提示框
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"您确定要提交评论吗?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
3652234
;
alert
.
delegate
=
self
;
[
alert
show
];
}
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
text
View
-
(
void
)
closeBackGround
View
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
kCommentViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
,
kScreenWidth
,
kCommentViewHeight
);
_backGroundView
.
alpha
=
.
0
f
;
_commentView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_backGroundView
removeFromSuperview
];
[
_commentView
removeFromSuperview
];
}];
}
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
-
(
void
)
showAllClick
:
(
UIButton
*
)
sender
{
if
(
range
.
location
>=
200
)
{
return
NO
;
sender
.
selected
=
!
sender
.
selected
;
if
(
sender
.
selected
)
{
_treeView
.
expandsChildRowsWhenRowExpands
=
YES
;
for
(
TaskGroup
*
taskGroup
in
self
.
taskData
)
{
[
_treeView
expandRowForItem
:
taskGroup
expandChildren
:
YES
withRowAnimation
:
RATreeViewRowAnimationFade
];
}
}
else
{
_treeView
.
expandsChildRowsWhenRowExpands
=
NO
;
for
(
TaskGroup
*
taskGroup
in
self
.
taskData
)
{
[
_treeView
collapseRowForItem
:
taskGroup
collapseChildren
:
YES
withRowAnimation
:
RATreeViewRowAnimationFade
];
}
else
{
return
YES
;
}
}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
{
NSDate
*
date
=
[
NSDate
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"YYYY-MM-dd+hh:mm:ss"
];
NSString
*
dateString
=
[
dateFormatter
stringFromDate
:
date
];
NSString
*
operId
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_code"
];
NSString
*
operName
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_name"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kAddCommentURL
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"url = %@"
,
url
);
}
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"entityType"
:
@"question"
,
@"entityUuid"
:
self
.
uuid
,
@"comment"
:
_commentView
.
contentTextView
.
text
}
;
NSLog
(
@"parameters = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
submitCommentWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"respo = %@, error = %@"
,
response
,
error
)
;
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"添加评论成功"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
delegate
=
self
;
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
]
;
#pragma mark - RAtreeView Delegate/DataSource
-
(
NSInteger
)
treeView
:
(
RATreeView
*
)
treeView
numberOfChildrenOfItem
:
(
id
)
item
{
NSInteger
level
=
[
treeView
levelForCellForItem
:
item
]
;
if
(
level
==
-
1
)
{
return
[
self
.
taskData
count
];
}
else
if
(
level
==
0
)
{
TaskGroup
*
data
=
item
;
return
data
.
answers
.
count
;
}
else
if
(
level
==
1
)
{
TaskModel
*
data
=
item
;
if
(
data
.
answerAttachments
.
count
==
0
)
{
return
0
;
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"添加评论失败"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
return
1
;
}
}]
;
// return 0
;
[
self
closeBackGroundView
];
}
else
{
return
0
;
}
}
-
(
void
)
closeBackGroundView
{
CGRect
fromFrame
=
CGRectMake
(
0
,
kScreenHeight
,
kScreenWidth
,
kCommentViewHeight
);
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_backGroundView
.
alpha
=
.
0
f
;
_commentView
.
frame
=
fromFrame
;
}
completion
:^
(
BOOL
finished
)
{
[
_backGroundView
removeFromSuperview
];
[
_commentView
removeFromSuperview
];
}];
}
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
-
(
id
)
treeView
:
(
RATreeView
*
)
treeView
child
:
(
NSInteger
)
index
ofItem
:
(
id
)
item
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
NSInteger
level
=
[
treeView
levelForCellForItem
:
item
];
if
(
level
==
-
1
)
{
return
[
self
.
taskData
objectAtIndex
:
index
];
}
else
if
(
level
==
0
)
{
TaskGroup
*
data
=
item
;
return
data
.
answers
[
index
];
}
else
if
(
level
==
1
)
{
TaskModel
*
data
=
item
;
if
(
data
.
answerAttachments
.
count
==
0
)
{
return
nil
;
}
else
{
return
data
.
answerAttachments
;
}
}
else
{
return
nil
;
}
}
-
(
void
)
setupScrollView
-
(
UITableViewCell
*
)
treeView
:
(
RATreeView
*
)
treeView
cellForItem
:
(
id
)
item
{
int
imageCount
=
(
int
)
self
.
storePictures
.
count
;
NSInteger
level
=
[
self
.
treeView
levelForCellForItem
:
item
]
;
CGFloat
marginW
=
5
.
0
;
CGFloat
imageViewW
=
90
+
2
*
marginW
;
CGFloat
imageViewH
=
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
bounds
.
size
.
height
-
4
;
if
(
level
==
0
)
{
TaskGroup
*
data
=
item
;
RankSectionTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kRankSectionTableCell
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
imageCount
==
0
)
{
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
contentSize
=
CGSizeMake
(
4
*
imageViewW
,
imageViewH
+
4
);
cell
.
categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
data
.
category
];
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
[
button
setImage
:[
UIImage
imageNamed
:
@"default_pic"
]
forState
:
UIControlStateNormal
];
button
.
frame
=
CGRectMake
(
i
*
imageViewW
+
2
,
2
,
imageViewW
-
2
*
marginW
,
imageViewH
);
[
button
addTarget
:
self
action
:
@selector
(
showBigPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
addSubview
:
button
];
}
}
else
{
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
.
contentSize
=
CGSizeMake
(
imageCount
*
imageViewW
,
imageViewH
+
4
);
NSString
*
scoreStr
=
[
NSString
stringWithFormat
:
@"%@ 分"
,
data
.
score
];
NSMutableAttributedString
*
scoreAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
scoreStr
];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
19
.
0
f
]}
range
:
NSMakeRange
(
0
,
scoreAttr
.
length
-
1
)];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailSmallTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
scoreAttr
.
length
-
1
,
1
)];
[
cell
.
scoreLabel
setAttributedText
:
scoreAttr
];
for
(
int
i
=
0
;
i
<
imageCount
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
NSDictionary
*
dict
=
(
NSDictionary
*
)
self
.
storePictures
[
i
];
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
dict
[
@"fileUrl"
]]];
[
button
sd_setImageWithURL
:
imageUrl
forState
:
UIControlStateNormal
placeholderImage
:
[
UIImage
imageNamed
:
@"default_pic"
]];
button
.
frame
=
CGRectMake
(
i
*
imageViewW
+
2
,
2
,
imageViewW
-
2
*
marginW
,
imageViewH
);
[
button
addTarget
:
self
action
:
@selector
(
showBigPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
rankDetailHeaderView
.
rankDetailView
.
showScrollView
addSubview
:
button
];
}
NSString
*
rankStr
=
[
NSString
stringWithFormat
:
@"第 %@ 名"
,
data
.
ranking
];
NSMutableAttributedString
*
rankAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
rankStr
];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
1
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kGradeNumberTextColor
}
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
[
rankAttr
addAttribute
:
NSFontAttributeName
value
:[
UIFont
fontWithName
:
@"Arial-BoldMT"
size
:
18
.
0
]
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
rankStr
.
length
-
1
,
1
)];
[
cell
.
gradeLabel
setAttributedText
:
rankAttr
];
cell
.
arrowImageView
.
image
=
[
UIImage
imageNamed
:
@"arrow_down"
];
return
cell
;
}
else
if
(
level
==
1
)
{
// if (level == 1)
TaskModel
*
data
=
item
;
RankDetailTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kRankDetailCell
];
if
(
!
cell
)
{
cell
=
[[
RankDetailTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kRankDetailCell
];
}
}
-
(
void
)
showBigPic
:
(
UIButton
*
)
btn
{
CheckPicViewController
*
checkVC
=
[[
CheckPicViewController
alloc
]
init
];
checkVC
.
checkImage
=
btn
.
imageView
.
image
;
[
self
.
navigationController
pushViewController
:
checkVC
animated
:
YES
];
}
cell
.
task
=
data
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
-
(
void
)
showScrollView
:
(
UIButton
*
)
sender
{
RankDetailTableCell
*
cell
=
(
RankDetailTableCell
*
)[[
sender
superview
]
superview
];
cell
.
isDrop
=
!
cell
.
isDrop
;
NSIndexPath
*
path
=
[
self
.
tableView
indexPathForCell
:
cell
];
[
cell
.
mainTitleBtn
setTitle
:[
NSString
stringWithFormat
:
@"%d、%@"
,
(
int
)(
data
.
index
+
1
)
,
data
.
title
]
forState
:
UIControlStateNormal
];
if
(
data
.
score
==
NULL
||
data
.
score
==
nil
)
{
cell
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0分"
];
}
else
{
cell
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@分"
,
data
.
score
];
}
[
_tableView
deselectRowAtIndexPath
:
path
animated
:
TRUE
]
;
return
cell
;
BOOL
isSelected
=
!
[
self
cellIsSelected
:
path
];
}
else
{
NSArray
*
data
=
item
;
RankScrollTableViewCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kRankScrollTableViewCell
];
if
(
!
cell
)
{
cell
=
[[
RankScrollTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kRankScrollTableViewCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
NSNumber
*
selectedIndex
=
[
NSNumber
numberWithBool
:
isSelected
];
[
_selectedIndexes
setObject
:
selectedIndex
forKey
:
path
];
if
(
cell
.
isDrop
)
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
M_PI
/
2
);
}];
NSArray
*
imgaeUrlArray
=
cell
.
task
.
answerAttachments
;
NSMutableArray
*
urlArray
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
imageUrlDict
in
imgaeUrlArray
)
{
for
(
NSDictionary
*
imageUrlDict
in
data
)
{
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
imageUrlDict
[
@"fileUrl"
]];
[
urlArray
addObject
:
urlStr
];
}
CGFloat
marginW
=
5
.
0
;
CGFloat
imageViewW
=
90
+
2
*
marginW
;
cell
.
scrollView
=
[[
UIScrollView
alloc
]
init
];
cell
.
scrollView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
cell
.
scrollView
.
contentSize
=
CGSizeMake
((
urlArray
.
count
-
1
)
*
imageViewW
,
65
);
[
cell
.
contentView
addSubview
:
cell
.
scrollView
];
for
(
int
i
=
0
;
i
<
urlArray
.
count
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
init
];
...
...
@@ -344,155 +383,181 @@
NSLayoutConstraint
*
urlHeight
=
[
NSLayoutConstraint
constraintWithItem
:
button
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
65
];
[
cell
.
scrollView
addConstraint
:
urlHeight
];
}
return
cell
;
}
NSLayoutConstraint
*
someoneTop
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
45
];
[
cell
.
contentView
addConstraint
:
someoneTop
];
NSLayoutConstraint
*
someoneLeft
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
cell
.
contentView
addConstraint
:
someoneLeft
];
NSLayoutConstraint
*
someoneRight
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
cell
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
cell
.
contentView
addConstraint
:
someoneRight
];
NSLayoutConstraint
*
someoneHeight
=
[
NSLayoutConstraint
constraintWithItem
:
cell
.
scrollView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
65
];
[
cell
.
contentView
addConstraint
:
someoneHeight
];
}
else
{
}
-
(
void
)
treeView
:
(
RATreeView
*
)
treeView
willExpandRowForItem
:
(
id
)
item
{
NSInteger
level
=
[
self
.
treeView
levelForCellForItem
:
item
];
if
(
level
==
0
)
{
RankSectionTableCell
*
cell
=
(
RankSectionTableCell
*
)[
_treeView
cellForItem
:
item
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
0
);
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
-
M_PI
);
}];
}
else
if
(
level
==
1
)
{
RankDetailTableCell
*
cell
=
(
RankDetailTableCell
*
)[
_treeView
cellForItem
:
item
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
M_PI
/
2
);
}];
if
(
cell
.
scrollView
)
{
[
cell
.
scrollView
removeFromSuperview
];
cell
.
scrollView
=
nil
;
}
}
}
[
_tableView
beginUpdates
];
[
_tableView
endUpdates
];
-
(
void
)
treeView
:
(
RATreeView
*
)
treeView
willCollapseRowForItem
:
(
id
)
item
{
NSInteger
level
=
[
self
.
treeView
levelForCellForItem
:
item
];
if
(
level
==
0
)
{
RankSectionTableCell
*
cell
=
(
RankSectionTableCell
*
)[
_treeView
cellForItem
:
item
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
0
);
}];
}
else
if
(
level
==
1
)
{
RankDetailTableCell
*
cell
=
(
RankDetailTableCell
*
)[
_treeView
cellForItem
:
item
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
cell
.
arrowImageView
.
transform
=
CGAffineTransformIdentity
;
cell
.
arrowImageView
.
transform
=
CGAffineTransformMakeRotation
(
-
0
);
}];
}
}
-
(
BOOL
)
cellIsSelected
:
(
NSIndexPath
*
)
indexPath
{
// Return whether the cell at the specified index path is selected or not
NSNumber
*
selectedIndex
=
[
_selectedIndexes
objectForKey
:
indexPath
];
return
selectedIndex
==
nil
?
FALSE
:
[
selectedIndex
boolValue
];
-
(
BOOL
)
treeView
:
(
RATreeView
*
)
treeView
canEditRowForItem
:
(
id
)
item
{
return
NO
;
}
#pragma mark - UI
TableView DataSource/
Delegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
table
View
#pragma mark - UI
text
Delegate
-
(
void
)
textViewDidBeginEditing
:
(
UITextView
*
)
text
View
{
return
_taskData
.
count
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
-
173
,
kScreenWidth
,
kCommentViewHeight
);
}];
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
-
(
void
)
textViewDidEndEditing
:
(
UITextView
*
)
textView
{
TaskGroup
*
taskGroup
=
_taskData
[
section
];
NSInteger
count
=
taskGroup
.
isOpened
?
taskGroup
.
answers
.
count
:
0
;
return
count
;
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
_commentView
.
frame
=
CGRectMake
(
0
,
self
.
view
.
frame
.
size
.
height
-
kCommentViewHeight
,
kScreenWidth
,
kCommentViewHeight
)
;
}]
;
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldChangeTextInRange
:
(
NSRange
)
range
replacementText
:
(
NSString
*
)
text
{
RankDetailTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kRankDetailCell
];
if
(
!
cell
)
{
cell
=
[[
RankDetailTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kRankDetailCell
];
}
TaskGroup
*
taskGroup
=
_taskData
[
indexPath
.
section
];
TaskModel
*
task
=
taskGroup
.
answers
[
indexPath
.
row
];
cell
.
task
=
task
;
if
(
!
[
text
isEqualToString
:
@""
])
{
_commentView
.
placeholderLabel2
.
hidden
=
YES
;
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
([
text
isEqualToString
:
@""
]
&&
range
.
location
==
0
&&
range
.
length
==
1
)
{
_commentView
.
placeholderLabel2
.
hidden
=
NO
;
}
[
cell
.
mainTitleBtn
setTitle
:[
NSString
stringWithFormat
:
@"%d、%@"
,
(
int
)(
indexPath
.
row
+
1
)
,
task
.
title
]
forState
:
UIControlStateNormal
];
if
(
task
.
score
==
NULL
||
task
.
score
==
nil
)
{
cell
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"0分"
];
if
([
text
isEqualToString
:
@"
\n
"
])
{
[
_commentView
.
contentTextView
resignFirstResponder
];
if
(
textView
.
text
.
length
!=
0
)
{
_commentView
.
placeholderLabel2
.
hidden
=
YES
;
}
else
{
cell
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@分"
,
task
.
score
];
_commentView
.
placeholderLabel2
.
hidden
=
NO
;
}
return
NO
;
}
// 按钮点击事件
[
cell
.
mainTitleBtn
addTarget
:
self
action
:
@selector
(
showScrollView
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
if
(
range
.
location
>=
200
)
{
return
NO
;
}
else
{
return
YES
;
}
return
YES
;
}
// cell的点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
3652234
)
{
if
(
buttonIndex
==
0
)
{
return
;
}
else
{
// 提交数据
NSDate
*
date
=
[
NSDate
date
];
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"YYYY-MM-dd+hh:mm:ss"
];
NSString
*
dateString
=
[
dateFormatter
stringFromDate
:
date
];
}
// cell的高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
self
cellIsSelected
:
indexPath
])
{
return
130
;
}
return
44
;
}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
50
;
}
NSString
*
operId
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_code"
];
NSString
*
operName
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_name"
];
// foot高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@?time=%@&operId=%@&operName=%@"
,
kRedStarURL
,
kAddCommentURL
,
dateString
,
operId
,
operName
];
url
=
[
url
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"url = %@"
,
url
);
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
RankHeadView
*
headView
=
[
RankHeadView
headViewWithTableView
:
tableView
];
headView
.
delegate
=
self
;
headView
.
taskGroup
=
_taskData
[
section
];
return
headView
;
}
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"entityType"
:
@"question"
,
@"entityUuid"
:
self
.
uuid
,
@"comment"
:
_commentView
.
contentTextView
.
text
};
NSLog
(
@"parameters = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
submitCommentWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"respo = %@, error = %@"
,
response
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"添加评论成功"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
delegate
=
self
;
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"添加评论失败"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}
}];
-
(
void
)
clickRankHeadView
{
[
self
.
tableView
reloadData
];
[
self
closeBackGroundView
];
}
}
}
#pragma mark - lazy Laoding
-
(
UITableView
*
)
tabl
eView
-
(
RATreeView
*
)
tre
eView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectZero
style
:
UITableViewStyleGrouped
];
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
tableFooterView
=
self
.
footerView
;
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
if
(
!
_treeView
)
{
_treeView
=
[[
RATreeView
alloc
]
initWithFrame
:
CGRectZero
];
_treeView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_treeView
.
delegate
=
self
;
_treeView
.
dataSource
=
self
;
_treeView
.
showsVerticalScrollIndicator
=
NO
;
_treeView
.
showsHorizontalScrollIndicator
=
NO
;
_treeView
.
treeHeaderView
=
self
.
rankDetailHeaderView
;
_treeView
.
treeFooterView
=
self
.
footerView
;
_treeView
.
rowHeight
=
UITableViewAutomaticDimension
;
_treeView
.
estimatedRowHeight
=
300
.
0
;
[
self
.
view
addSubview
:
_treeView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_treeView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_t
abl
eView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_t
re
eView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_t
abl
eView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_t
re
eView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_t
abl
eView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_t
re
eView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
}
return
_t
abl
eView
;
return
_t
re
eView
;
}
-
(
RankDetailHeaderView
*
)
rankDetailHeaderView
{
if
(
!
_rankDetailHeaderView
)
{
...
...
@@ -509,6 +574,9 @@
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
rankStr
.
length
-
1
,
1
)];
[
_rankDetailHeaderView
.
rankDetailView
.
gradeLabel
setAttributedText
:
rankAttr
];
}
self
.
rankDetailHeaderView
.
backgroundColor
=
kSectionBackGroundColor
;
self
.
rankDetailHeaderView
.
rankDetailView
.
addressLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
self
.
storeAddress
];
self
.
rankDetailHeaderView
.
rankDetailView
.
storePictures
=
self
.
storePictures
;
}
return
_rankDetailHeaderView
;
}
...
...
@@ -516,8 +584,11 @@
-
(
UIView
*
)
footerView
{
if
(
!
_footerView
)
{
_footerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
6
0
)];
_footerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
8
0
)];
UIView
*
lineView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
1
)];
lineView
.
backgroundColor
=
kSeparateLineColor
;
[
self
.
footerView
addSubview
:
lineView
];
}
return
_footerView
;
}
...
...
@@ -553,14 +624,5 @@
}
return
_commentButton
;
}
/*
#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
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Model/RankListModel.h
View file @
64630bb5
...
...
@@ -14,7 +14,6 @@
@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
,
assign
)
CGFloat
score
;
@property
(
nonatomic
,
copy
)
NSString
*
reported
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
64630bb5
...
...
@@ -139,10 +139,8 @@
__block
RankingListViewController
*
weakSelf
=
self
;
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSArray
*
dataArray
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
...
...
@@ -202,8 +200,6 @@
-
(
void
)
requestPartPraise
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
_statisMode
=
_selectButton
.
tag
-
323228
;
...
...
@@ -211,14 +207,15 @@
NSDictionary
*
dict
=
_titleArray
[
_pickRow
];
NSDictionary
*
parameters
=
@{
@"praiseUuid"
:
dict
[
@"uuid"
],
@"statisMode"
:
@
(
_statisMode
),
@"orgUuids"
:
_uuidArray
@"orgUuids"
:
_uuidArray
,
};
NSLog
(
@"parrrrrters = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"分区域 口碑排名response = %@ error = %@"
,
response
,
error
);
NSArray
*
dataArray
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
64630bb5
...
...
@@ -207,17 +207,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
// 口碑巡检
NSString
*
url1
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent1
=
[[
HttpClient
alloc
]
initWithUrl
:
url1
];
NSDictionary
*
parameters1
=
@{
@"
queryOrders"
:
@[@{
@"direction"
:
@"asc"
}]
,
NSDictionary
*
parameters1
=
@{
@"praiseUuid"
:
@""
,
@"
statisMode"
:
@
(
0
)
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
3
)
};
__block
HomeViewController
*
weakSelf
=
self
;
[
httpCilent1
getRankingListWithParameters
:
parameters1
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"刷新!! = 口碑排名response = %@"
,
response
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
...
...
@@ -283,15 +281,15 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"praiseUuid"
:
@""
,
@"statisMode"
:
@
(
0
)
@"statisMode"
:
@
(
0
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
3
)
};
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSArray
*
dataArray
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
tgArray
=
[
NSMutableArray
array
];
...
...
@@ -493,16 +491,16 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"当前功能正在开发!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
return
;
//
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"当前功能正在开发!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//
[alert show];
//
return;
// LookOnLineViewController *lookOnLine = [[LookOnLineViewController alloc] init];
// nav = [[UINavigationController alloc] initWithRootViewController:lookOnLine];
//
StandardViewController *standardVC = [[StandardViewController alloc] init];
//
nav = [[UINavigationController alloc] initWithRootViewController:standardVC];
StandardViewController
*
standardVC
=
[[
StandardViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
standardVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"图说口碑"
])
{
PictureViewController
*
pictureVC
=
[[
PictureViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
...
...
@@ -595,7 +593,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
RankListModel
*
rankList
=
_allRankListArray
[
indexPath
.
row
-
1
];
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
;
return
cell
;
}
...
...
redstar/Classes/Tools/HttpClient/HttpClient.h
View file @
64630bb5
...
...
@@ -122,4 +122,7 @@ typedef void (^completionBlock) (id response, NSError *error);
// 查询下级参数
-
(
void
)
queryLowerOrgsWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 获取口碑标准的附件列表
-
(
void
)
getAttachmentsWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
@end
redstar/Classes/Tools/HttpClient/HttpClient.m
View file @
64630bb5
...
...
@@ -419,4 +419,15 @@
}];
}
// 获取口碑标准的附件列表
-
(
void
)
getAttachmentsWithParameters
:
(
id
)
parameters
completion
:
(
completionBlock
)
completion
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
response
,
error
);
}
}];
}
@end
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