Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
d7dbc1f7
Commit
d7dbc1f7
authored
Aug 13, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询接口
parent
9f81a2f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
5 deletions
+49
-5
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+3
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+30
-2
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+1
-1
SurveyViewController.m
...ViewControllers/Survey/controllers/SurveyViewController.m
+15
-2
No files found.
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
d7dbc1f7
...
@@ -193,6 +193,9 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
...
@@ -193,6 +193,9 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
page_size
:(
NSUInteger
)
page_size
page_size
:(
NSUInteger
)
page_size
success
:(
void
(
^
)(
id
))
succ
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
failure
:(
void
(
^
)(
id
))
fail
;
-
(
void
)
querySurveyWithBillData
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//获取行情调研单反馈列表
//获取行情调研单反馈列表
-
(
void
)
getResultsWithSurveyUuid
:(
NSString
*
)
surveyUuid
-
(
void
)
getResultsWithSurveyUuid
:(
NSString
*
)
surveyUuid
success
:(
void
(
^
)(
id
))
succ
success
:(
void
(
^
)(
id
))
succ
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
d7dbc1f7
...
@@ -239,7 +239,7 @@ static NSString * const ICRAttachmentTypeValue[] = {
...
@@ -239,7 +239,7 @@ static NSString * const ICRAttachmentTypeValue[] = {
{
{
[
requestSerializer
setValue
:
user
.
orgId
forHTTPHeaderField
:
@"enterprise"
];
[
requestSerializer
setValue
:
user
.
orgId
forHTTPHeaderField
:
@"enterprise"
];
}
}
// [requestSerializer setValue:user.
authorization
forHTTPHeaderField:@"Authorization"];
// [requestSerializer setValue:user. forHTTPHeaderField:@"Authorization"];
return
requestSerializer
;
return
requestSerializer
;
}
}
...
@@ -1361,6 +1361,34 @@ acceptTypeJson:YES
...
@@ -1361,6 +1361,34 @@ acceptTypeJson:YES
failure
:
failure
];
failure
:
failure
];
}
}
-
(
void
)
querySurveyWithBillData
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
void
(
^
success
)(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
=
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
CLog
(
@"%@"
,
error
);
if
(
fail
)
{
fail
(
error
);
}
};
NSDictionary
*
dict
=
data
;
NSString
*
urlStr
=
[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_QuerySurvey
];
[
self
POST
:
urlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
-
(
void
)
getResultsWithSurveyUuid
:
(
NSString
*
)
surveyUuid
-
(
void
)
getResultsWithSurveyUuid
:
(
NSString
*
)
surveyUuid
success
:
(
void
(
^
)(
id
))
succ
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
failure
:
(
void
(
^
)(
id
))
fail
{
...
@@ -1439,7 +1467,7 @@ acceptTypeJson:YES
...
@@ -1439,7 +1467,7 @@ acceptTypeJson:YES
fail
(
error
);
fail
(
error
);
}
}
};
};
NSString
*
dateStr
=
@"2015-0
6-07
"
;
NSString
*
dateStr
=
@"2015-0
1-01
"
;
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetUser
]
stringByAppendingFormat
:
@"?start_date=%@&page_number=%@&page_size=%@"
,
dateStr
,
@
(
page_number
),
@
(
page_size
)];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetUser
]
stringByAppendingFormat
:
@"?start_date=%@&page_number=%@&page_size=%@"
,
dateStr
,
@
(
page_number
),
@
(
page_size
)];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
[
self
POST
:
encodeUrlStr
...
...
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
d7dbc1f7
...
@@ -141,7 +141,7 @@ typedef enum : NSUInteger {
...
@@ -141,7 +141,7 @@ typedef enum : NSUInteger {
NSString
*
message
=
data
[
@"message"
];
NSString
*
message
=
data
[
@"message"
];
if
(
success
==
1
)
{
if
(
success
==
1
)
{
//成功
//成功
[
IBTLoadingView
showTips
:
@""
];
[
IBTLoadingView
showTips
:
@"
操作成功
"
];
}
else
{
}
else
{
[
IBTLoadingView
showTips
:
message
];
[
IBTLoadingView
showTips
:
message
];
...
...
XFFruit/ViewControllers/Survey/controllers/SurveyViewController.m
View file @
d7dbc1f7
...
@@ -52,7 +52,7 @@ typedef enum : NSUInteger {
...
@@ -52,7 +52,7 @@ typedef enum : NSUInteger {
-
(
void
)
initData
{
-
(
void
)
initData
{
_dataArr
=
[
NSMutableArray
array
];
_dataArr
=
[
NSMutableArray
array
];
//
保存
//
查询
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
NSLog
(
@"%@"
,
data
);
NSLog
(
@"%@"
,
data
);
...
@@ -62,7 +62,20 @@ typedef enum : NSUInteger {
...
@@ -62,7 +62,20 @@ typedef enum : NSUInteger {
[
IBTLoadingView
showTips
:
data
];
[
IBTLoadingView
showTips
:
data
];
};
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[[
ICRHTTPController
sharedController
]
querySurveyWithBillNUmberLinke
:
@"fdsfds"
state
:
@"initial"
titleLike
:
@"fds"
orderFiled
:
@"fdsafds"
orderDirection
:
@"asc"
page_number
:
0
page_size
:
100
success
:
succ
failure
:
fail
];
// [[ICRHTTPController sharedController] querySurveyWithBillNUmberLinke:@"fdsfds" state:@"initial" titleLike:@"fds" orderFiled:@"fdsafds" orderDirection:@"asc" page_number:0 page_size:100 success:succ failure:fail];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSDictionary
*
dict
=
@{
// @"enterprise":@"402881894d3e4cca014d3e4cf7c2002a",
// @"userUuid":userUtil.userId,
// @"billNumberLike":@"150809",
// @"state":@"ee",
// @"titleLike":@"001",
// @"orderField":@"title",
// @"orderDirection":@"asc",
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
20
)};
[[
ICRHTTPController
sharedController
]
querySurveyWithBillData
:
dict
success
:
succ
failure
:
fail
];
// [[ICRHTTPController sharedController] getResultsWithSurveyUuid:@"111" success:succ failure:fail];
// [[ICRHTTPController sharedController] getResultsWithSurveyUuid:@"111" success:succ failure:fail];
// for (NSInteger i = 0; i < 4; i++) {
// for (NSInteger i = 0; i < 4; i++) {
...
...
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