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
4cdb86ad
Commit
4cdb86ad
authored
Nov 09, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了httpcilent
parent
e190d8e9
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
518 additions
and
91 deletions
+518
-91
project.pbxproj
redstar.xcodeproj/project.pbxproj
+90
-0
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+3
-0
QuestionCommentCell.h
...nction/Question/QuestionDetail/Cell/QuestionCommentCell.h
+5
-1
QuestionDescribeCell.h
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.h
+3
-0
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+29
-10
QuestionDetailCell.h
...unction/Question/QuestionDetail/Cell/QuestionDetailCell.h
+3
-0
QuestionDetailCell.m
...unction/Question/QuestionDetail/Cell/QuestionDetailCell.m
+38
-12
QuestionDetailViewController.h
...stionDetail/ViewController/QuestionDetailViewController.h
+3
-0
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+2
-13
QuestionListTableCell.h
...nction/Question/QuestionList/Cell/QuestionListTableCell.h
+3
-0
QuestionListTableCell.m
...nction/Question/QuestionList/Cell/QuestionListTableCell.m
+18
-3
QuestionModel.h
...dule/Function/Question/QuestionList/Model/QuestionModel.h
+42
-0
QuestionModel.m
...dule/Function/Question/QuestionList/Model/QuestionModel.m
+13
-0
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+40
-22
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+28
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+6
-6
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+27
-24
HttpClient.h
redstar/Classes/Tools/HttpClient/HttpClient.h
+25
-0
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+88
-0
TaxisViewController.h
...ses/Tools/Menu/Taxis/ViewController/TaxisViewController.h
+13
-0
TaxisViewController.m
...ses/Tools/Menu/Taxis/ViewController/TaxisViewController.m
+39
-0
No files found.
redstar.xcodeproj/project.pbxproj
View file @
4cdb86ad
...
...
@@ -13,9 +13,12 @@
840826211BE5D2400022B795
/* OnLineFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
840826201BE5D2400022B795
/* OnLineFooterView.m */
;
};
840ABECC1BE1C29F006E49C5
/* RankDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
840ABECB1BE1C29F006E49C5
/* RankDetailViewController.m */
;
};
840ABECF1BE20A53006E49C5
/* RankShopDetialCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
840ABECE1BE20A53006E49C5
/* RankShopDetialCell.m */
;
};
8419EAD01BEDAC0A002635ED
/* TaxisViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8419EACF1BEDAC0A002635ED
/* TaxisViewController.m */
;
};
8419EAD41BEDC98F002635ED
/* HttpClient.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8419EAD31BEDC98F002635ED
/* HttpClient.m */
;
};
841BBCDE1BE49E18007A21BF
/* RankWorkDetailCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
841BBCDD1BE49E18007A21BF
/* RankWorkDetailCell.m */
;
};
841D24F81BEB473C0005CC9F
/* CheckPicViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
841D24F71BEB473C0005CC9F
/* CheckPicViewController.m */
;
};
841D24FB1BEB75CA0005CC9F
/* QuestionDetailFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
841D24FA1BEB75CA0005CC9F
/* QuestionDetailFooterView.m */
;
};
842547FC1BF03977006C79C5
/* QuestionModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
842547FB1BF03977006C79C5
/* QuestionModel.m */
;
};
8442BA5C1BDB8FDB005E5657
/* MineTableHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8442BA5B1BDB8FDB005E5657
/* MineTableHeaderView.m */
;
};
8474A01C1BE368D700315F30
/* HomeCellItem.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8474A01B1BE368D700315F30
/* HomeCellItem.m */
;
};
8474C5831BE751A2007DCF19
/* CommonFunc.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8474C5821BE751A2007DCF19
/* CommonFunc.m */
;
};
...
...
@@ -99,12 +102,18 @@
840ABECB1BE1C29F006E49C5
/* RankDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailViewController.m
;
sourceTree
=
"<group>"
;
};
840ABECD1BE20A53006E49C5
/* RankShopDetialCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankShopDetialCell.h
;
sourceTree
=
"<group>"
;
};
840ABECE1BE20A53006E49C5
/* RankShopDetialCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankShopDetialCell.m
;
sourceTree
=
"<group>"
;
};
8419EACE1BEDAC0A002635ED
/* TaxisViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TaxisViewController.h
;
sourceTree
=
"<group>"
;
};
8419EACF1BEDAC0A002635ED
/* TaxisViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TaxisViewController.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>"
;
};
841BBCDC1BE49E18007A21BF
/* RankWorkDetailCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankWorkDetailCell.h
;
sourceTree
=
"<group>"
;
};
841BBCDD1BE49E18007A21BF
/* RankWorkDetailCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankWorkDetailCell.m
;
sourceTree
=
"<group>"
;
};
841D24F61BEB473C0005CC9F
/* CheckPicViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CheckPicViewController.h
;
sourceTree
=
"<group>"
;
};
841D24F71BEB473C0005CC9F
/* CheckPicViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CheckPicViewController.m
;
sourceTree
=
"<group>"
;
};
841D24F91BEB75CA0005CC9F
/* QuestionDetailFooterView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QuestionDetailFooterView.h
;
sourceTree
=
"<group>"
;
};
841D24FA1BEB75CA0005CC9F
/* QuestionDetailFooterView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QuestionDetailFooterView.m
;
sourceTree
=
"<group>"
;
};
842547FA1BF03977006C79C5
/* QuestionModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QuestionModel.h
;
sourceTree
=
"<group>"
;
};
842547FB1BF03977006C79C5
/* QuestionModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QuestionModel.m
;
sourceTree
=
"<group>"
;
};
8442BA5A1BDB8FDB005E5657
/* MineTableHeaderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MineTableHeaderView.h
;
sourceTree
=
"<group>"
;
};
8442BA5B1BDB8FDB005E5657
/* MineTableHeaderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MineTableHeaderView.m
;
sourceTree
=
"<group>"
;
};
8474A01A1BE368D700315F30
/* HomeCellItem.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HomeCellItem.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -255,6 +264,72 @@
path
=
Cell
;
sourceTree
=
"<group>"
;
};
8419EABB1BEDA8F9002635ED
/* Menu */
=
{
isa
=
PBXGroup
;
children
=
(
8419EAC81BEDABF0002635ED
/* Screen */
,
8419EACB1BEDABF0002635ED
/* Taxis */
,
);
path
=
Menu
;
sourceTree
=
"<group>"
;
};
8419EAC81BEDABF0002635ED
/* Screen */
=
{
isa
=
PBXGroup
;
children
=
(
8419EAC91BEDABF0002635ED
/* View */
,
8419EACA1BEDABF0002635ED
/* ViewController */
,
);
path
=
Screen
;
sourceTree
=
"<group>"
;
};
8419EAC91BEDABF0002635ED
/* View */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
View
;
sourceTree
=
"<group>"
;
};
8419EACA1BEDABF0002635ED
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
8419EACB1BEDABF0002635ED
/* Taxis */
=
{
isa
=
PBXGroup
;
children
=
(
8419EACC1BEDABF0002635ED
/* View */
,
8419EACD1BEDABF0002635ED
/* ViewController */
,
);
path
=
Taxis
;
sourceTree
=
"<group>"
;
};
8419EACC1BEDABF0002635ED
/* View */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
View
;
sourceTree
=
"<group>"
;
};
8419EACD1BEDABF0002635ED
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
8419EACE1BEDAC0A002635ED
/* TaxisViewController.h */
,
8419EACF1BEDAC0A002635ED
/* TaxisViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
8419EAD11BEDC976002635ED
/* HttpClient */
=
{
isa
=
PBXGroup
;
children
=
(
8419EAD21BEDC98F002635ED
/* HttpClient.h */
,
8419EAD31BEDC98F002635ED
/* HttpClient.m */
,
);
path
=
HttpClient
;
sourceTree
=
"<group>"
;
};
841D24F51BEB473B0005CC9F
/* Check */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -264,6 +339,15 @@
path
=
Check
;
sourceTree
=
"<group>"
;
};
842547F91BF03962006C79C5
/* Model */
=
{
isa
=
PBXGroup
;
children
=
(
842547FA1BF03977006C79C5
/* QuestionModel.h */
,
842547FB1BF03977006C79C5
/* QuestionModel.m */
,
);
path
=
Model
;
sourceTree
=
"<group>"
;
};
8426A4A01BDF0CD600E5FDF5
/* Function */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -437,6 +521,7 @@
8474C5891BE78A85007DCF19
/* QuestionList */
=
{
isa
=
PBXGroup
;
children
=
(
842547F91BF03962006C79C5
/* Model */
,
8474C58A1BE78A85007DCF19
/* Cell */
,
8474C58D1BE78A85007DCF19
/* View */
,
8474C58E1BE78A85007DCF19
/* ViewController */
,
...
...
@@ -717,6 +802,8 @@
84970E261BD8DEFE00C1728A
/* Tools */
=
{
isa
=
PBXGroup
;
children
=
(
8419EAD11BEDC976002635ED
/* HttpClient */
,
8419EABB1BEDA8F9002635ED
/* Menu */
,
84F57C991BECA72C00DDEEB1
/* StarBar */
,
8474C5801BE751A2007DCF19
/* CommonFunc */
,
84F166981BE715D20061D350
/* ZanButton */
,
...
...
@@ -1271,7 +1358,10 @@
8442BA5C1BDB8FDB005E5657
/* MineTableHeaderView.m in Sources */
,
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
8474C5911BE78A85007DCF19
/* QuestionListTableCell.m in Sources */
,
8419EAD01BEDAC0A002635ED
/* TaxisViewController.m in Sources */
,
84F1669B1BE715E40061D350
/* ZanButton.m in Sources */
,
8419EAD41BEDC98F002635ED
/* HttpClient.m in Sources */
,
842547FC1BF03977006C79C5
/* QuestionModel.m in Sources */
,
84E420441BE84A2300689976
/* QuestionCommentCell.m in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
4cdb86ad
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
4cdb86ad
...
...
@@ -18,4 +18,7 @@
// QuestionList
#define kQuestionListURL @"redstar-server/rest/question/query"
// InspectList
#define kInspectListURL @"redstar-server/rest/praise/query"
#endif
/* Url_h */
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionCommentCell.h
View file @
4cdb86ad
...
...
@@ -7,11 +7,15 @@
//
#import <UIKit/UIKit.h>
#import "QuestionModel.h"
@interface
QuestionCommentCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
suggestLabel
;
// 评论
@property
(
nonatomic
,
strong
)
UILabel
*
peopleLabel
;
// 评论人
@property
(
nonatomic
,
strong
)
UILabel
*
positionLabel
;
// 职位
@property
(
nonatomic
,
strong
)
UILabel
*
dateLabel
;
// 职位
@property
(
nonatomic
,
strong
)
UILabel
*
dateLabel
;
// 时间
@property
(
nonatomic
,
strong
)
QuestionModel
*
question
;
@end
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.h
View file @
4cdb86ad
...
...
@@ -7,6 +7,7 @@
//
#import <UIKit/UIKit.h>
#import "QuestionModel.h"
@interface
QuestionDescribeCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
// 标题
...
...
@@ -21,4 +22,6 @@
@property
(
nonatomic
,
strong
)
UILabel
*
peopleLabel
;
// 解决人
@property
(
nonatomic
,
strong
)
UILabel
*
dateLabel
;
// 时间
@property
(
nonatomic
,
strong
)
QuestionModel
*
question
;
@end
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
4cdb86ad
...
...
@@ -24,16 +24,6 @@
self
.
titleLabel
.
textColor
=
kDetailCellDescribeTextColor
;
_titleLabel
.
text
=
@"问题与建议描述"
;
self
.
describeLabel
.
textColor
=
kdetailCellTitleColor
;
_describeLabel
.
text
=
@"系统跟单维护在订单当天发出回访短信,此时商品可能尚未送达到用户,引起消费者的疑问和不解,进而引起客户的不满和投诉,建议集团把短信回访延后1-2天,也避免由此引起的客户抱怨。"
;
NSMutableAttributedString
*
attributedString
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
_describeLabel
.
text
];
NSMutableParagraphStyle
*
paragraphStyle
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle
.
lineSpacing
=
6
;
//行自定义行高度
[
attributedString
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle
range
:
NSMakeRange
(
0
,
[
_describeLabel
.
text
length
])];
_describeLabel
.
attributedText
=
attributedString
;
[
self
.
describeLabel
sizeToFit
];
self
.
pictureLabel
.
textColor
=
kDetailCellDescribeTextColor
;
_pictureLabel
.
text
=
@"照片"
;
...
...
@@ -41,7 +31,33 @@
self
.
feedbackLabel
.
textColor
=
kDetailCellDescribeTextColor
;
self
.
feedbackBackView
.
backgroundColor
=
kQuestionFeedBackColor
;
}
-
(
void
)
setQuestion
:
(
QuestionModel
*
)
question
{
_question
=
question
;
// 问题与描述
NSString
*
describeStr
=
[
NSString
stringWithFormat
:
@"%@"
,
question
.
content
];
NSMutableAttributedString
*
attributedString
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
describeStr
];
NSMutableParagraphStyle
*
paragraphStyle1
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle1
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle1
.
lineSpacing
=
6
;
//行自定义行高度
[
attributedString
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle1
range
:
NSMakeRange
(
0
,
[
describeStr
length
])];
self
.
describeLabel
.
attributedText
=
attributedString
;
// 反馈
NSString
*
answerStr
=
[
NSString
stringWithFormat
:
@"%@"
,
question
.
feedback
];
NSMutableAttributedString
*
answerAttrStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
answerStr
];
NSMutableParagraphStyle
*
paragraphStyle2
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle2
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle2
.
lineSpacing
=
6
;
//行自定义行高度
[
answerAttrStr
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle2
range
:
NSMakeRange
(
0
,
answerStr
.
length
)];
self
.
answerLabel
.
attributedText
=
answerAttrStr
;
// 解决人
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"问题解决负责人:%@"
,
question
.
responsiblePersonName
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"反馈时间:%@"
,
question
.
lastModify_time
];
}
#pragma mark - lazy loading
...
...
@@ -76,9 +92,11 @@
{
if
(
!
_describeLabel
)
{
_describeLabel
=
[[
UILabel
alloc
]
init
];
_describeLabel
.
textColor
=
kdetailCellTitleColor
;
_describeLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_describeLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_describeLabel
.
numberOfLines
=
0
;
[
_describeLabel
sizeToFit
];
[
self
.
contentView
addSubview
:
_describeLabel
];
// 顶端
...
...
@@ -220,6 +238,7 @@
{
if
(
!
_answerLabel
)
{
_answerLabel
=
[[
UILabel
alloc
]
init
];
[
_answerLabel
sizeToFit
];
_answerLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_answerLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_answerLabel
.
textColor
=
kQuestionFeedBackTitleColor
;
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDetailCell.h
View file @
4cdb86ad
...
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "ZanButton.h"
#import "QuestionModel.h"
@interface
QuestionDetailCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
stateLabel
;
// 状态
...
...
@@ -16,4 +17,6 @@
@property
(
nonatomic
,
strong
)
UILabel
*
shopLabel
;
// 商场
@property
(
nonatomic
,
strong
)
UILabel
*
peopleLabel
;
// 提报人
@property
(
nonatomic
,
strong
)
UILabel
*
dateLabel
;
// 提报时间
@property
(
nonatomic
,
strong
)
QuestionModel
*
question
;
@end
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDetailCell.m
View file @
4cdb86ad
...
...
@@ -21,33 +21,59 @@
#pragma mark - Private Methods
-
(
void
)
setup
{
}
-
(
void
)
setQuestion
:
(
QuestionModel
*
)
question
{
_question
=
question
;
// 状态
if
([
question
.
state
isEqualToString
:
@"resolved"
])
{
NSString
*
stateText
=
[
NSString
stringWithFormat
:
@"状态:已解决"
];
NSMutableAttributedString
*
stateAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
stateText
];
[
stateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
stateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
boldSystemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
stateText
.
length
-
3
)];
[
self
.
stateLabel
setAttributedText
:
stateAttr
];
}
else
{
NSString
*
stateText
=
[
NSString
stringWithFormat
:
@"状态:已创建"
];
NSMutableAttributedString
*
stateAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
stateText
];
[
stateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
stateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
boldSystemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
stateText
.
length
-
3
)];
[
self
.
stateLabel
setAttributedText
:
stateAttr
];
}
// 点赞数
[
self
.
thumbBtn
setTitle
:
@"300"
forState
:
UIControlStateNormal
];
NSString
*
sortText
=
[
NSString
stringWithFormat
:
@"分类:送货跟单-送货跟单"
];
// 分类
NSString
*
sortText
=
[
NSString
stringWithFormat
:
@"分类:%@"
,
question
.
categoryName
];
NSMutableAttributedString
*
sortAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
sortText
];
[
sortAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
sortAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
sortText
.
length
-
3
)];
[
self
.
sortLabel
setAttributedText
:
sortAttr
];
NSString
*
shopText
=
[
NSString
stringWithFormat
:
@"商场:京沪西南-上海区域-上海金桥"
];
// 商场
NSString
*
shopText
=
[
NSString
stringWithFormat
:
@"商场:%@"
,
question
.
projectPath
];
NSMutableAttributedString
*
shopAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
shopText
];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
3
)];
[
shopAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
3
,
shopText
.
length
-
3
)];
[
self
.
shopLabel
setAttributedText
:
shopAttr
];
NSString
*
peopleText
=
[
NSString
stringWithFormat
:
@"问题提报人:张三"
];
// 问题提报人
NSDictionary
*
submitPersonDict
=
question
.
submitPerson
;
NSString
*
peopleText
=
[
NSString
stringWithFormat
:
@"问题提报人:%@"
,
submitPersonDict
[
@"name"
]];
NSMutableAttributedString
*
peopleAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
peopleText
];
[
peopleAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
6
)];
[
peopleAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
6
,
peopleText
.
length
-
6
)];
[
self
.
peopleLabel
setAttributedText
:
peopleAttr
];
NSString
*
dateText
=
[
NSString
stringWithFormat
:
@"提报时间:2015-10-29 23:15:30"
];
// 提报时间
NSString
*
dateText
=
[
NSString
stringWithFormat
:
@"提报时间:%@"
,
question
.
submitTime
];
NSMutableAttributedString
*
dateAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
dateText
];
[
dateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailCellDescribeTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
0
,
5
)];
[
dateAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kdetailCellTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
.
0
f
]}
range
:
NSMakeRange
(
5
,
dateText
.
length
-
5
)];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.h
View file @
4cdb86ad
...
...
@@ -7,7 +7,10 @@
//
#import <UIKit/UIKit.h>
#import "QuestionModel.h"
@interface
QuestionDetailViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
QuestionModel
*
question
;
@end
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
4cdb86ad
...
...
@@ -140,6 +140,7 @@
if
(
!
cell
)
{
cell
=
[[
QuestionDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kQuestionDetailCell
];
}
cell
.
question
=
self
.
question
;
return
cell
;
}
else
if
(
indexPath
.
section
==
1
)
{
...
...
@@ -147,19 +148,7 @@
if
(
!
cell
)
{
cell
=
[[
QuestionDescribeCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kQuestionDescribeCell
];
}
cell
.
answerLabel
.
text
=
@"新的SOP对营业员跟单的要求,已经修改为送货完成后的2天内,不再是要求当天。"
;
NSMutableAttributedString
*
attributedString
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
cell
.
answerLabel
.
text
];
NSMutableParagraphStyle
*
paragraphStyle
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle
.
alignment
=
NSTextAlignmentLeft
;
paragraphStyle
.
lineSpacing
=
6
;
//行自定义行高度
[
attributedString
addAttribute
:
NSParagraphStyleAttributeName
value
:
paragraphStyle
range
:
NSMakeRange
(
0
,
[
cell
.
answerLabel
.
text
length
])];
cell
.
answerLabel
.
attributedText
=
attributedString
;
[
cell
.
answerLabel
sizeToFit
];
cell
.
peopleLabel
.
text
=
@"问题解决负责人:杨发布"
;
cell
.
dateLabel
.
text
=
@"反馈时间:2015-09-11 10:23:15"
;
cell
.
question
=
self
.
question
;
return
cell
;
}
else
{
...
...
redstar/Classes/Module/Function/Question/QuestionList/Cell/QuestionListTableCell.h
View file @
4cdb86ad
...
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "ZanButton.h"
#import "QuestionModel.h"
@interface
QuestionListTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
// 标题
...
...
@@ -18,4 +19,6 @@
@property
(
nonatomic
,
strong
)
ZanButton
*
thumbBtn
;
// 点赞
@property
(
nonatomic
,
strong
)
QuestionModel
*
question
;
// 点赞
@end
redstar/Classes/Module/Function/Question/QuestionList/Cell/QuestionListTableCell.m
View file @
4cdb86ad
...
...
@@ -23,12 +23,23 @@
{
self
.
titleLabel
.
textColor
=
kQuestionCellTitleColor
;
self
.
hotLabel
.
font
=
[
UIFont
boldSystemFontOfSize
:
12
.
0
];
self
.
detailsLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
self
.
stateLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
self
.
dateLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
self
.
thumbBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
}
-
(
void
)
setQuestion
:
(
QuestionModel
*
)
question
{
_question
=
question
;
// 标题
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
question
.
content
];
// 反馈(副标题)
self
.
detailsLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
question
.
feedback
];
// 服务类型
self
.
stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
question
.
categoryName
];
// 提报时间
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"提报时间:%@"
,
question
.
submitTime
];
}
#pragma mark - lazy laoding
-
(
UILabel
*
)
titleLabel
{
...
...
@@ -93,6 +104,7 @@
{
if
(
!
_detailsLabel
)
{
_detailsLabel
=
[[
UILabel
alloc
]
init
];
_detailsLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
_detailsLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_detailsLabel
.
textColor
=
kQuestionCellTitleColor
;
[
self
.
contentView
addSubview
:
_detailsLabel
];
...
...
@@ -122,6 +134,8 @@
_stateLabel
=
[[
UILabel
alloc
]
init
];
_stateLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_stateLabel
.
textColor
=
kQuestionStateColor
;
_stateLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
self
.
contentView
addSubview
:
_stateLabel
];
// 顶端
...
...
@@ -149,6 +163,7 @@
_dateLabel
=
[[
UILabel
alloc
]
init
];
_dateLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_dateLabel
.
textColor
=
kQuestionStateColor
;
_dateLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
self
.
contentView
addSubview
:
_dateLabel
];
// 顶端
...
...
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.h
0 → 100644
View file @
4cdb86ad
//
// QuestionModel.h
// redstar
//
// Created by admin on 15/11/9.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
QuestionModel
:
NSObject
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
categoryName
;
//问题分类名称
@property
(
nonatomic
,
strong
)
NSString
*
categoryUuid
;
//问题分类Uuid
@property
(
nonatomic
,
strong
)
NSString
*
content
;
//问题内容
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
//
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
//
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
//
@property
(
nonatomic
,
strong
)
NSString
*
enterprise
;
//
@property
(
nonatomic
,
strong
)
NSString
*
feedback
;
//问题反馈
@property
(
nonatomic
,
strong
)
NSString
*
groupName
;
//专业组名称
@property
(
nonatomic
,
strong
)
NSString
*
groupUuid
;
//专业组Uuid
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
//
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
//
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
//
@property
(
nonatomic
,
strong
)
NSArray
*
pictureIds
;
//pictureIds
@property
(
nonatomic
,
strong
)
NSString
*
projectName
;
//商场名称
@property
(
nonatomic
,
strong
)
NSString
*
projectPath
;
//组织路径
@property
(
nonatomic
,
strong
)
NSString
*
projectUuid
;
//商场Uuid
@property
(
nonatomic
,
strong
)
NSDictionary
*
resolvePerson
;
//问题解决人Uuid
@property
(
nonatomic
,
strong
)
NSString
*
responsiblePersonName
;
//责任人姓名
@property
(
nonatomic
,
strong
)
NSString
*
responsiblePersonUuid
;
//责任人Uuid
@property
(
nonatomic
,
strong
)
NSString
*
state
;
//问题状态
@property
(
nonatomic
,
strong
)
NSDictionary
*
submitPerson
;
//
@property
(
nonatomic
,
strong
)
NSString
*
submitTime
;
//
@property
(
nonatomic
,
strong
)
NSString
*
type
;
//问题处理分类
@property
(
nonatomic
,
strong
)
NSString
*
version
;
//
@end
redstar/Classes/Module/Function/Question/QuestionList/Model/QuestionModel.m
0 → 100644
View file @
4cdb86ad
//
// QuestionModel.m
// redstar
//
// Created by admin on 15/11/9.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "QuestionModel.h"
@implementation
QuestionModel
@end
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
4cdb86ad
...
...
@@ -10,15 +10,16 @@
#import "QuestionListTableCell.h"
#import "MenuButton.h"
#import "QuestionDetailViewController.h"
#import "AddQuestionViewController.h"
#import
<AFNetworking.h>
#import "HttpClient.h"
#import
"QuestionModel.h"
#define kQuestionListCell @"questionListTableViewCell"
@interface
QuestionViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
@end
@implementation
QuestionViewController
...
...
@@ -27,7 +28,12 @@
{
[
super
viewDidLoad
];
[
self
.
tableView
registerClass
:[
QuestionListTableCell
class
]
forCellReuseIdentifier
:
kQuestionListCell
];
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
extendedLayoutIncludesOpaqueBars
=
NO
;
self
.
modalPresentationCapturesStatusBarAppearance
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
[
self
setupNav
];
...
...
@@ -42,14 +48,12 @@
#pragma mark - Private Methods
-
(
void
)
requestQuestionList
{
AFHTTPSessionManager
*
session
=
[
AFHTTPSessionManager
manager
];
session
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
[
session
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
[
session
.
requestSerializer
setValue
:
@"5a74170150b940ae0150b940f7db0082"
forHTTPHeaderField
:
@"enterprise"
];
// 初始化数组
self
.
allQuestionArray
=
[
NSMutableArray
array
];
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSLog
(
@"urlStr = %@"
,
urlStr
);
// 请求参数
NSDictionary
*
parameters
=
@{
@"user"
:
@"5a74170150b940ae0150b940f8450083"
,
@"scope"
:
@"all"
,
@"category"
:
@""
,
...
...
@@ -57,12 +61,22 @@
@"state"
:
@"resolved"
};
[
session
GET
:
urlStr
parameters
:
parameters
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
NSLog
(
@"response = %@"
,
responseObject
);
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
NSLog
(
@"error = %@"
,
error
);
// 发起请求
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
urlStr
];
//
__block
QuestionViewController
*
weakSelf
=
self
;
// 请求问题列表
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSLog
(
@"recods = %@"
,
recordsDict
);
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
[
weakSelf
.
allQuestionArray
addObject
:
question
];
}
[
weakSelf
.
tableView
registerClass
:[
QuestionListTableCell
class
]
forCellReuseIdentifier
:
kQuestionListCell
];
}];
}
-
(
void
)
setupNav
...
...
@@ -88,11 +102,15 @@
[
self
.
navigationController
pushViewController
:
addQuestionVC
animated
:
YES
];
}
#pragma mark - UItableView Delegate/DataSource
-
(
void
)
taxiBtnCilck
:
(
UIButton
*
)
sender
{
}
#pragma mark - UItableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
5
;
return
_allQuestionArray
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
...
...
@@ -101,10 +119,8 @@
if
(
!
cell
)
{
cell
=
[[
QuestionListTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kQuestionListCell
];
}
cell
.
titleLabel
.
text
=
@"系统跟单维护回访短信早于物流跟单送货"
;
cell
.
detailsLabel
.
text
=
@"新的SOP营业员跟单送货完成后的两天内未能及时返回,回访短信已经发送"
;
cell
.
stateLabel
.
text
=
@"服务 - 15分钟退单"
;
cell
.
dateLabel
.
text
=
@"提报时间:2015-09-10 08:10:18"
;
cell
.
question
=
_allQuestionArray
[
indexPath
.
row
];
// cell.stateLabel.text = @"服务 - 15分钟退单";
return
cell
;
}
...
...
@@ -113,6 +129,7 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
QuestionDetailViewController
*
questionDetailVC
=
[[
QuestionDetailViewController
alloc
]
init
];
questionDetailVC
.
question
=
(
QuestionModel
*
)
_allQuestionArray
[
indexPath
.
row
];
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
...
...
@@ -164,6 +181,7 @@
[
taxiButton
setImage
:[
UIImage
imageNamed
:
@"sort_icon"
]
forState
:
UIControlStateNormal
];
taxiButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
taxiButton
setTitle
:
@"排序"
forState
:
UIControlStateNormal
];
[
taxiButton
addTarget
:
self
action
:
@selector
(
taxiBtnCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
sectionView
addSubview
:
taxiButton
];
MenuButton
*
screenButton
=
[[
MenuButton
alloc
]
init
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
4cdb86ad
...
...
@@ -11,6 +11,8 @@
#import "MenuButton.h"
#import "InspectTaskViewController.h"
#import "HttpClient.h"
#define kInspectListCell @"InspectListCellTableViewCell"
@interface
InspectListViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -46,6 +48,8 @@
self
.
test5Array
=
[
NSArray
arrayWithObjects
:
@
(
5
),
@
(
12
),
@
(
0
),
@
(
8
),
@
(
20
),
nil
];
self
.
test6Array
=
[
NSArray
arrayWithObjects
:
@
(
16
),
@
(
25
),
@
(
20
),
@
(
100
),
@
(
20
),
nil
];
[
self
requestInspectList
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
...
...
@@ -60,6 +64,29 @@
// Dispose of any resources that can be recreated.
}
#pragma mark - Private
-
(
void
)
taxiBtnCilck
:
(
UIButton
*
)
sender
{
}
-
(
void
)
requestInspectList
{
// NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL];
// HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
// NSDictionary *parameters = @{@"userUuid":@"",
// @"state":@"",
// @"beginDateFrom":,
// @"endDateTo":@"",
// @"nameLike":@"",
// @"queryOrders":@"",
// @"pageNumber":@"",
// @"pageSize":@""};
// [httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
//
// }];
}
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
...
...
@@ -154,6 +181,7 @@
[
taxiButton
setImage
:[
UIImage
imageNamed
:
@"sort_icon"
]
forState
:
UIControlStateNormal
];
taxiButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
14
.
0
];
[
taxiButton
setTitle
:
@"排序"
forState
:
UIControlStateNormal
];
[
taxiButton
addTarget
:
self
action
:
@selector
(
taxiBtnCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
sectionView
addSubview
:
taxiButton
];
MenuButton
*
screenButton
=
[[
MenuButton
alloc
]
init
];
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
4cdb86ad
...
...
@@ -84,13 +84,13 @@
// 口碑列表 或口碑排名
-
(
void
)
wordOfMouthClick
:
(
UIButton
*
)
sender
{
// InspectListViewController *inspectListVC = [[InspectListViewController alloc] init];
// self.hidesBottomBarWhenPushed = YES;
// [self.navigationController pushViewController:inspectListVC animated:YES];
RankingListViewController
*
rankListVC
=
[[
RankingListViewController
alloc
]
init
];
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
rankListVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
inspectListVC
animated
:
YES
];
// RankingListViewController *rankListVC = [[RankingListViewController alloc] init];
// self.hidesBottomBarWhenPushed = YES;
// [self.navigationController pushViewController:rankListVC animated:YES];
}
// 问题与知识
...
...
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
4cdb86ad
...
...
@@ -73,30 +73,33 @@
*/
-
(
void
)
loginButtonClick
:
(
UIButton
*
)
sender
{
AFHTTPSessionManager
*
session
=
[
AFHTTPSessionManager
manager
];
session
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
[
session
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
kRedStarURL
,
kLoginURL
,
self
.
loginView
.
usernameTextFiled
.
text
];
NSString
*
password
=
self
.
loginView
.
passwordTextFiled
.
text
;
NSString
*
passwordMD5
=
[
CommonFunc
md5
:
password
];
NSDictionary
*
parameters
=
@{
@"authenticode"
:
@"211534962"
,
@"password"
:
passwordMD5
};
[
session
POST
:
urlStr
parameters
:
parameters
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
if
([
responseObject
[
@"message"
]
isEqualToString
:
@"ok"
])
{
NSLog
(
@"response = %@"
,
responseObject
);
NSUserDefaults
*
userDefault
=
[
NSUserDefaults
standardUserDefaults
];
[
userDefault
setObject
:
self
.
loginView
.
usernameTextFiled
.
text
forKey
:
@"username"
];
[
userDefault
setObject
:
self
.
loginView
.
passwordTextFiled
.
text
forKey
:
@"password"
];
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
[
self
presentViewController
:
_rootTBC
animated
:
YES
completion
:
nil
];
}
else
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"%@"
,
responseObject
[
@"message"
]]
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
[
alertView
show
];
}
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
NSLog
(
@"error = %@"
,
error
);
}];
// AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
// session.requestSerializer = [AFJSONRequestSerializer serializer];
// [session.requestSerializer setValue:@"application/json;charset=utf-8" forHTTPHeaderField:@"Content-Type"];
// NSString *urlStr = [NSString stringWithFormat:@"%@%@%@", kRedStarURL, kLoginURL, self.loginView.usernameTextFiled.text];
// NSString *password = self.loginView.passwordTextFiled.text;
// NSString *passwordMD5 = [CommonFunc md5:password];
// NSDictionary *parameters = @{@"authenticode":@"211534962",@"password":passwordMD5};
// [session POST:urlStr parameters:parameters success:^(NSURLSessionDataTask *task, id responseObject) {
// if ([responseObject[@"message"] isEqualToString:@"ok"]) {
//
// NSLog(@"response = %@", responseObject);
//
// NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
// [userDefault setObject:self.loginView.usernameTextFiled.text forKey:@"username"];
// [userDefault setObject:self.loginView.passwordTextFiled.text forKey:@"password"];
// self.rootTBC = [[RootTabBarController alloc] init];
// [self presentViewController:_rootTBC animated:YES completion:nil];
// } else {
// UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:[NSString stringWithFormat:@"%@", responseObject[@"message"]] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
// [alertView show];
// }
// } failure:^(NSURLSessionDataTask *task, NSError *error) {
// NSLog(@"error = %@", error);
// }];
}
...
...
redstar/Classes/Tools/HttpClient/HttpClient.h
0 → 100644
View file @
4cdb86ad
//
// HttpClient.h
// redstar
//
// Created by admin on 15/11/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AFNetworking.h>
typedef
void
(
^
completionBlock
)
(
id
response
,
NSError
*
error
);
@interface
HttpClient
:
NSObject
// 初始化
-
(
id
)
initWithUrl
:(
NSString
*
)
url
;
// 获取问题列表
-
(
void
)
getQuestionListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 获取巡检列表
-
(
void
)
getInspectListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
@end
redstar/Classes/Tools/HttpClient/HttpClient.m
0 → 100644
View file @
4cdb86ad
//
// HttpClient.m
// redstar
//
// Created by admin on 15/11/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "HttpClient.h"
@interface
HttpClient
()
{
AFHTTPSessionManager
*
_manager
;
NSString
*
_url
;
}
@end
@implementation
HttpClient
-
(
id
)
initWithUrl
:(
NSString
*
)
url
{
self
=
[
super
init
];
if
(
self
)
{
_url
=
url
;
_manager
=
[
AFHTTPSessionManager
manager
];
_manager
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
_manager
.
responseSerializer
=
[
AFJSONResponseSerializer
serializer
];
// 设置请求头
[
_manager
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
[
_manager
.
requestSerializer
setValue
:
@"5a74170150b940ae0150b940f7db0082"
forHTTPHeaderField
:
@"enterprise"
];
}
return
self
;
}
-
(
void
)
postParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
{
NSString
*
url
=
_url
;
[
_manager
POST
:
url
parameters
:
parameters
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
if
(
completion
)
{
NSError
*
error
=
nil
;
completion
(
responseObject
,
error
);
}
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
nil
,
error
);
}
}];
}
-
(
void
)
getParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
{
NSString
*
url
=
_url
;
[
_manager
GET
:
url
parameters
:
parameters
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
if
(
completion
)
{
NSError
*
error
=
nil
;
completion
(
responseObject
,
error
);
}
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
nil
,
error
);
}
}];
}
// 获取问题列表
-
(
void
)
getQuestionListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
{
[
self
getParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
response
,
error
);
}
}];
}
// 获取巡检列表
-
(
void
)
getInspectListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
{
[
self
postParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
if
(
completion
)
{
completion
(
response
,
error
);
}
}];
}
@end
redstar/Classes/Tools/Menu/Taxis/ViewController/TaxisViewController.h
0 → 100644
View file @
4cdb86ad
//
// TaxisViewController.h
// redstar
//
// Created by admin on 15/11/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
TaxisViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
UITableView
*
taxisTableView
;
@end
redstar/Classes/Tools/Menu/Taxis/ViewController/TaxisViewController.m
0 → 100644
View file @
4cdb86ad
//
// TaxisViewController.m
// redstar
//
// Created by admin on 15/11/7.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "TaxisViewController.h"
@interface
TaxisViewController
()
@end
@implementation
TaxisViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark - Lazy loading
-
(
UITableView
*
)
taxisTableView
{
if
(
_taxisTableView
)
{
_taxisTableView
=
[[
UITableView
alloc
]
init
];
}
return
_taxisTableView
;
}
@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