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
4ab42698
Commit
4ab42698
authored
Nov 22, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url.h添加问题详情接口
parent
6b9855fb
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
90 additions
and
35 deletions
+90
-35
project.pbxproj
redstar.xcodeproj/project.pbxproj
+2
-0
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+2
-0
CommentView.m
redstar/Classes/Module/Comment/View/CommentView.m
+0
-1
OnLineFooterView.m
...ar/Classes/Module/Function/OnLine/View/OnLineFooterView.m
+0
-1
PictureTableCell.m
...dule/Function/Picture/PictureList/Cell/PictureTableCell.m
+0
-1
QuestionDescribeCell.m
...ction/Question/QuestionDetail/Cell/QuestionDescribeCell.m
+0
-1
QuestionDetailFooterView.m
...n/Question/QuestionDetail/View/QuestionDetailFooterView.m
+0
-1
QuestionDetailViewController.m
...stionDetail/ViewController/QuestionDetailViewController.m
+17
-1
QuestionListTableCell.m
...nction/Question/QuestionList/Cell/QuestionListTableCell.m
+0
-1
QuestionViewController.m
...tion/QuestionList/ViewController/QuestionViewController.m
+12
-4
InspectDetailFooterView.m
...outh/Inspect/InspectDetail/View/InspectDetailFooterView.m
+0
-1
TakePhotoView.h
...on/WordOfMouth/Inspect/InspectDetail/View/TakePhotoView.h
+2
-1
TakePhotoView.m
...on/WordOfMouth/Inspect/InspectDetail/View/TakePhotoView.m
+27
-7
InspectSettleViewController.m
...nspectDetail/ViewController/InspectSettleViewController.m
+3
-8
InspectListCell.m
...on/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
+6
-2
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+2
-0
InspectTaskViewController.m
...ct/InspectTask/ViewController/InspectTaskViewController.m
+4
-1
LoginView.m
redstar/Classes/Module/Login/View/LoginView.m
+0
-3
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+1
-0
MineTableFooterView.m
redstar/Classes/Module/Mine/View/MineTableFooterView.m
+0
-1
HttpClient.h
redstar/Classes/Tools/HttpClient/HttpClient.h
+3
-0
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+9
-0
No files found.
redstar.xcodeproj/project.pbxproj
View file @
4ab42698
...
...
@@ -1694,6 +1694,7 @@
baseConfigurationReference
=
6C6D8B0ECF8531E34D0DFF6B
/* Pods.debug.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/redstar/redstar.pch"
;
INFOPLIST_FILE
=
redstar/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
...
...
@@ -1708,6 +1709,7 @@
baseConfigurationReference
=
13B0DDED3E0E584D79B395CF
/* Pods.release.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/redstar/redstar.pch"
;
INFOPLIST_FILE
=
redstar/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
7.0
;
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
4ab42698
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
4ab42698
...
...
@@ -18,6 +18,8 @@
// QuestionList
#define kQuestionListURL @"redstar-server/rest/question/query"
#define kQuestionDetailURL @"redstar-server/rest/question/get/"
// InspectList获取口碑列表
#define kInspectListURL @"redstar-server/rest/praise/query"
...
...
redstar/Classes/Module/Comment/View/CommentView.m
View file @
4ab42698
...
...
@@ -273,7 +273,6 @@
// 设置圆角
_sureBtn
.
layer
.
cornerRadius
=
4
;
_sureBtn
.
layer
.
masksToBounds
=
YES
;
_sureBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_sureBtn
.
backgroundColor
=
kLoginButtonBackGroundColor
;
[
_sureBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Function/OnLine/View/OnLineFooterView.m
View file @
4ab42698
...
...
@@ -268,7 +268,6 @@
_saveButton
=
[[
UIButton
alloc
]
init
];
_saveButton
.
backgroundColor
=
kNavigationBarColor
;
_saveButton
.
layer
.
cornerRadius
=
5
;
_saveButton
.
layer
.
masksToBounds
=
YES
;
_saveButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_saveButton
];
...
...
redstar/Classes/Module/Function/Picture/PictureList/Cell/PictureTableCell.m
View file @
4ab42698
...
...
@@ -89,7 +89,6 @@
_hotLabel
.
textColor
=
[
UIColor
whiteColor
];
_hotLabel
.
text
=
@"HOT"
;
_hotLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_hotLabel
.
layer
.
masksToBounds
=
YES
;
_hotLabel
.
layer
.
cornerRadius
=
3
;
[
self
.
contentView
addSubview
:
_hotLabel
];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/Cell/QuestionDescribeCell.m
View file @
4ab42698
...
...
@@ -207,7 +207,6 @@
_feedbackBackView
=
[[
UIView
alloc
]
init
];
_feedbackBackView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_feedbackBackView
.
layer
.
cornerRadius
=
5
;
_feedbackBackView
.
layer
.
masksToBounds
=
YES
;
_feedbackBackView
.
layer
.
borderWidth
=
1
;
_feedbackBackView
.
layer
.
borderColor
=
kQuestionFeedBackTitleCGColor
;
[
self
.
contentView
addSubview
:
_feedbackBackView
];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/View/QuestionDetailFooterView.m
View file @
4ab42698
...
...
@@ -43,7 +43,6 @@
// 设置圆角
_addButon
.
layer
.
cornerRadius
=
5
;
_addButon
.
layer
.
masksToBounds
=
YES
;
_addButon
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_addButon
.
backgroundColor
=
kLoginButtonBackGroundColor
;
[
_addButon
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Function/Question/QuestionDetail/ViewController/QuestionDetailViewController.m
View file @
4ab42698
...
...
@@ -47,7 +47,8 @@
self
.
test3Array
=
[
NSArray
arrayWithObjects
:
@"2015-09-10 10:21:43"
,
@"2015-10-27 11:21:43"
,
nil
];
// 问题详情
[
self
requestQestionDetail
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
...
...
@@ -65,6 +66,20 @@
}
#pragma mark - Private Methods
-
(
void
)
requestQestionDetail
{
NSDictionary
*
dict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"loginData"
];
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?userUuid=%@"
,
kRedStarURL
,
kQuestionListURL
,
_question
.
uuid
,
user_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
[
httpClient
getQuestionDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"response = %@"
,
response
);
}];
}
-
(
void
)
setupNav
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
...
...
@@ -121,6 +136,7 @@
}
// 提交评论
-
(
void
)
submitComment
:
(
UIButton
*
)
sender
{
NSNumber
*
count
=
[
NSNumber
numberWithInteger
:
_commentView
.
starBar
.
starNumber
];
...
...
redstar/Classes/Module/Function/Question/QuestionList/Cell/QuestionListTableCell.m
View file @
4ab42698
...
...
@@ -86,7 +86,6 @@
_hotLabel
.
textColor
=
[
UIColor
whiteColor
];
_hotLabel
.
text
=
@"HOT"
;
_hotLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_hotLabel
.
layer
.
masksToBounds
=
YES
;
_hotLabel
.
layer
.
cornerRadius
=
3
;
[
self
.
contentView
addSubview
:
_hotLabel
];
...
...
redstar/Classes/Module/Function/Question/QuestionList/ViewController/QuestionViewController.m
View file @
4ab42698
...
...
@@ -94,13 +94,20 @@
self
.
allQuestionArray
=
[
NSMutableArray
array
];
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSDictionary
*
dict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"loginData"
];
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
// 请求参数
NSDictionary
*
parameters
=
@{
@"user"
:
@"5a74170150b940ae0150b940f8450083"
,
NSDictionary
*
parameters
=
@{
@"user"
:
user_uuid
,
@"scope"
:
@"all"
,
@"group"
:
@""
,
@"category"
:
@""
,
@"type"
:
@""
//,@"state":@"resolved"
@"contentLike"
:
@""
,
@"keyword"
:
@""
,
@"state"
:
@"created"
,
@"submitTimeFrom"
:
@""
,
@"submitTimeTo"
:
@""
,
@"pageNumber"
:
@
(
1
),
@"pageSize"
:
@
(
10
)
};
// 发起请求
...
...
@@ -114,6 +121,7 @@
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSLog
(
@"问题与知识列表recods = %@"
,
recordsDict
);
NSLog
(
@"error = %@"
,
error
);
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/InspectDetailFooterView.m
View file @
4ab42698
...
...
@@ -190,7 +190,6 @@
_reportBtn
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
20
.
0
];
_reportBtn
.
backgroundColor
=
kNavigationBarColor
;
_reportBtn
.
layer
.
cornerRadius
=
5
.
0
;
_reportBtn
.
layer
.
masksToBounds
=
YES
;
[
_reportBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_reportBtn
];
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/TakePhotoView.h
View file @
4ab42698
...
...
@@ -27,5 +27,6 @@
@property
(
nonatomic
,
strong
)
id
<
TakePhotoDelegate
>
delegate
;
-
(
BOOL
)
deleClose
:(
UIButton
*
)
btn
;
-
(
UIButton
*
)
createButtonWithImage
:(
id
)
imageNameOrImage
andSeletor
:
(
SEL
)
selector
;
-
(
void
)
changeOld
:(
UIButton
*
)
btn
;
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/View/TakePhotoView.m
View file @
4ab42698
...
...
@@ -124,7 +124,7 @@
// 长按添加删除按钮
-
(
void
)
longPress
:
(
UIGestureRecognizer
*
)
gester
-
(
void
)
longPress
:
(
UIGestureRecognizer
*
)
gester
{
if
(
gester
.
state
==
UIGestureRecognizerStateBegan
)
{
...
...
@@ -196,13 +196,28 @@
}
}
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
// NSLog(@"newPath = %@", newPath);
// // NSMutableArray *arr = [[NSMutableArray alloc] init];
// //把图片转换为Base64的字符串
// NSData *data = UIImageJPEGRepresentation(currentImage, 0.4);
// NSString *base64Str = [data base64EncodedStringWithOptions:0];
//// [arr addObject:image64];
// //写入plist文件as
// [base64Str writeToFile:newPath atomically:NO];
}
#pragma mark - UIImagePickerController 代理方法
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
*
)
info
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
*
)
info
{
UIImage
*
image
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
//UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
if
(
editTag
==
-
1
)
{
// 创建一个新的控件
UIButton
*
btn
=
[
self
createButtonWithImage
:
image
andSeletor
:
@selector
(
changeOld
:
)];
...
...
@@ -211,11 +226,16 @@
[
self
.
images
addObject
:
image
];
if
(
self
.
subviews
.
count
-
1
==
MaxImageCount
)
{
[[
self
.
subviews
lastObject
]
setHidden
:
YES
];
}
}
else
{
//获取沙盒路径,
NSString
*
path_sandox
=
NSHomeDirectory
();
//创建一个存储plist文件的路径
NSString
*
newPath
=
[
path_sandox
stringByAppendingPathComponent
:
@"/Documents/pic.plist"
];
}
else
{
// 根据tag修改需要编辑的控件
UIButton
*
btn
=
(
UIButton
*
)[
self
viewWithTag
:
editTag
];
int
index
=
(
int
)[
self
.
images
indexOfObject
:[
btn
imageForState
:
UIControlStateNormal
]];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectDetail/ViewController/InspectSettleViewController.m
View file @
4ab42698
...
...
@@ -13,7 +13,6 @@
#import "CheckPicViewController.h"
#import "HttpClient.h"
#define kInspectSettleCell @"InspectSettleCell"
@interface
InspectSettleViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
TakePhotoDelegate
>
...
...
@@ -44,6 +43,7 @@
[
self
.
tableView
registerClass
:[
InspectSettleCell
class
]
forCellReuseIdentifier
:
kInspectSettleCell
];
self
.
tableView
.
tableFooterView
=
self
.
footerView
;
self
.
footerView
.
takePhotoView
.
delegate
=
self
;
...
...
@@ -102,6 +102,7 @@
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
InspectSettleCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kInspectSettleCell
];
if
(
!
cell
)
{
cell
=
[[
InspectSettleCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kInspectSettleCell
];
...
...
@@ -111,7 +112,6 @@
cell
.
introLabel
.
text
=
@"参考说明"
;
cell
.
introDetailLabel
.
text
=
@"字体以简体中文为主;内容贴近活动主题;悬挂牢固,以不影响顾客浏览体验为佳"
;
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
...
...
@@ -119,11 +119,6 @@
}
//// cell的高度
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
//{
// return 200;
//}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
...
...
@@ -148,7 +143,7 @@
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
_tableView
.
estimatedRowHeight
=
15
0
.
0
;
_tableView
.
estimatedRowHeight
=
20
0
.
0
;
[
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/WordOfMouth/Inspect/InspectList/Cell/InspectListCell.m
View file @
4ab42698
...
...
@@ -58,6 +58,10 @@
self
.
multiplier
=
(
CGFloat
)
taskList
.
reportCount
/
taskList
.
questionCount
;
}
if
(
self
.
multiplier
>
1
)
{
self
.
multiplier
=
1
.
0
;
}
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
...
...
@@ -260,8 +264,8 @@
_allView
=
[[
UIView
alloc
]
init
];
_allView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_allView
.
layer
.
cornerRadius
=
3
;
_allView
.
layer
.
masksToBounds
=
YES
;
_allView
.
layer
.
borderWidth
=
1
;
_allView
.
layer
.
masksToBounds
=
YES
;
_allView
.
layer
.
borderColor
=
kUsernameBorderColor
;
[
self
.
contentView
addSubview
:
_allView
];
...
...
@@ -300,7 +304,7 @@
NSLayoutConstraint
*
overDateBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_alreadyView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
allView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:-
1
];
[
self
.
allView
addConstraint
:
overDateBottom
];
NSLayoutConstraint
*
overDatewidth
=
[
NSLayoutConstraint
constraintWithItem
:
_alreadyView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
allView
attribute
:
NSLayoutAttributeWidth
multiplier
:
_multiplier
constant
:
0
];
NSLayoutConstraint
*
overDatewidth
=
[
NSLayoutConstraint
constraintWithItem
:
_alreadyView
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
allView
attribute
:
NSLayoutAttributeWidth
multiplier
:
_multiplier
constant
:
-
1
];
[
self
.
allView
addConstraint
:
overDatewidth
];
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
4ab42698
...
...
@@ -50,6 +50,8 @@
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"巡检列表"
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/ViewController/InspectTaskViewController.m
View file @
4ab42698
...
...
@@ -19,6 +19,7 @@
#import "HttpClient.h"
#import "TaskDetailModel.h"
#import <MBProgressHUD.h>
#define kTaskSortCell @"InspectTaskSortCell"
...
...
@@ -94,7 +95,7 @@
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
__block
InspectTaskViewController
*
weakSelf
=
self
;
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getPraiseDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑巡检明细PraiseDetail = %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
...
...
@@ -114,6 +115,8 @@
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
...
...
redstar/Classes/Module/Login/View/LoginView.m
View file @
4ab42698
...
...
@@ -156,7 +156,6 @@
_usernameView
=
[[
UIView
alloc
]
init
];
}
_usernameView
.
layer
.
cornerRadius
=
5
;
_usernameView
.
layer
.
masksToBounds
=
YES
;
_usernameView
.
layer
.
borderWidth
=
1
;
_usernameView
.
layer
.
borderColor
=
kUsernameBorderColor
;
_usernameView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
...
@@ -187,7 +186,6 @@
_passwordView
=
[[
UIView
alloc
]
init
];
}
_passwordView
.
layer
.
cornerRadius
=
5
;
_passwordView
.
layer
.
masksToBounds
=
YES
;
_passwordView
.
layer
.
borderWidth
=
1
;
_passwordView
.
layer
.
borderColor
=
kPasswordBorderColor
;
_passwordView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
...
@@ -385,7 +383,6 @@
}
// 设置圆角
_loginButton
.
layer
.
cornerRadius
=
5
;
_loginButton
.
layer
.
masksToBounds
=
YES
;
_loginButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_loginButton
.
backgroundColor
=
kLoginButtonBackGroundColor
;
[
_loginButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
4ab42698
...
...
@@ -128,6 +128,7 @@
UIWindow
*
window
=
[[
UIApplication
sharedApplication
].
windows
lastObject
];
[
MBProgressHUD
showHUDAddedTo
:
window
animated
:
YES
];
[
httpClient
loginWithUsername
:
self
.
loginView
.
usernameTextFiled
.
text
password
:
self
.
loginView
.
passwordTextFiled
.
text
completion
:^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"response = %@, error = %@"
,
response
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
// 保存登陆信息
...
...
redstar/Classes/Module/Mine/View/MineTableFooterView.m
View file @
4ab42698
...
...
@@ -34,7 +34,6 @@
}
_quitButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
19
.
0
];
_quitButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_quitButton
.
layer
.
masksToBounds
=
YES
;
_quitButton
.
layer
.
cornerRadius
=
5
.
0
;
[
_quitButton
setTitle
:
@"退出登录"
forState
:
UIControlStateNormal
];
[
self
addSubview
:
_quitButton
];
...
...
redstar/Classes/Tools/HttpClient/HttpClient.h
View file @
4ab42698
...
...
@@ -25,6 +25,9 @@ typedef void (^completionBlock) (id response, NSError *error);
// 获取问题列表
-
(
void
)
getQuestionListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 获取问题详情
-
(
void
)
getQuestionDetailWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
// 获取巡检列表
-
(
void
)
getInspectListWithParameters
:(
id
)
parameters
completion
:(
completionBlock
)
completion
;
...
...
redstar/Classes/Tools/HttpClient/HttpClient.m
View file @
4ab42698
...
...
@@ -115,6 +115,15 @@
}];
}
-
(
void
)
getQuestionDetailWithParameters
:
(
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
{
...
...
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