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
73bba6b9
Commit
73bba6b9
authored
Aug 06, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增接口添加行情调研
parent
708c7ada
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
3 deletions
+101
-3
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+6
-0
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+7
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+35
-1
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+20
-0
Survey.h
XFFruit/ViewControllers/Survey/models/Survey.h
+2
-2
SurveyPerson.h
XFFruit/ViewControllers/Survey/models/SurveyPerson.h
+18
-0
SurveyPerson.m
XFFruit/ViewControllers/Survey/models/SurveyPerson.m
+13
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
73bba6b9
...
...
@@ -65,6 +65,7 @@
7217E9F31B72364300FE5C1D
/* SurveyCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7217E9E11B72364300FE5C1D
/* SurveyCell.m */
;
};
7217E9F41B72364300FE5C1D
/* SurveyListCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7217E9E31B72364300FE5C1D
/* SurveyListCell.m */
;
};
7217E9F61B724A7600FE5C1D
/* mask.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7217E9F51B724A7600FE5C1D
/* mask.png */
;
};
72880C8D1B738973004DD99F
/* SurveyPerson.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72880C8C1B738973004DD99F
/* SurveyPerson.m */
;
};
871F9F047CDDAC523E4358DC
/* libPods.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
86D33EC280C440156ED1B976
/* libPods.a */
;
};
C10214CD1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10214CC1AD8FE200024637E
/* ICRStoreDetailViewController.m */
;
};
C10214CE1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10214CC1AD8FE200024637E
/* ICRStoreDetailViewController.m */
;
};
...
...
@@ -429,6 +430,8 @@
7217E9E21B72364300FE5C1D
/* SurveyListCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SurveyListCell.h
;
sourceTree
=
"<group>"
;
};
7217E9E31B72364300FE5C1D
/* SurveyListCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SurveyListCell.m
;
sourceTree
=
"<group>"
;
};
7217E9F51B724A7600FE5C1D
/* mask.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
mask.png
;
sourceTree
=
"<group>"
;
};
72880C8B1B738973004DD99F
/* SurveyPerson.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SurveyPerson.h
;
sourceTree
=
"<group>"
;
};
72880C8C1B738973004DD99F
/* SurveyPerson.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SurveyPerson.m
;
sourceTree
=
"<group>"
;
};
7DDFB1D460448C3B45118195
/* Pods.release.xcconfig */
=
{
isa
=
PBXFileReference
;
includeInIndex
=
1
;
lastKnownFileType
=
text.xcconfig
;
name
=
Pods.release.xcconfig
;
path
=
"Pods/Target Support Files/Pods/Pods.release.xcconfig"
;
sourceTree
=
"<group>"
;
};
86D33EC280C440156ED1B976
/* libPods.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libPods.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
C10214CB1AD8FE200024637E
/* ICRStoreDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICRStoreDetailViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -785,6 +788,8 @@
7217E9CC1B72364300FE5C1D
/* Survey.m */
,
7217E9CD1B72364300FE5C1D
/* SurveyResult.h */
,
7217E9CE1B72364300FE5C1D
/* SurveyResult.m */
,
72880C8B1B738973004DD99F
/* SurveyPerson.h */
,
72880C8C1B738973004DD99F
/* SurveyPerson.m */
,
);
path
=
models
;
sourceTree
=
"<group>"
;
...
...
@@ -1921,6 +1926,7 @@
C123A8FB1B2561E1003C0C36
/* JTPopOverWindow.m in Sources */
,
C142D2B41AC3A155000109A7
/* UIImage+Helper.m in Sources */
,
C18AEA9E1AD2F48200A1DB7B
/* ICRStore.m in Sources */
,
72880C8D1B738973004DD99F
/* SurveyPerson.m in Sources */
,
C15295BB1B244C8E00DF60D1
/* ICRQScoreViewController.m in Sources */
,
C123A9221B26ED85003C0C36
/* ICRQuestionManager.m in Sources */
,
C15918801AC4362D0013B391
/* UIApplication+CheckFirstRun.m in Sources */
,
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
73bba6b9
...
...
@@ -178,6 +178,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//添加行情调研单
-
(
void
)
saveSurveyWithAuthenticode
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
@end
...
...
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
73bba6b9
...
...
@@ -64,7 +64,10 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
kICRHTTP_VersionFetch
,
//Person
kICRHTTP_PersonQuery
kICRHTTP_PersonQuery
,
XFFHttp_SurveySave
};
static
NSString
*
const
ICRHTTPInterface
[]
=
{
...
...
@@ -111,6 +114,8 @@ static NSString * const ICRHTTPInterface[] = {
//Person
[
kICRHTTP_PersonQuery
]
=
@"user/download"
,
//行情调研
[
XFFHttp_SurveySave
]
=
@"survey/save"
};
static
NSString
*
const
ICRAttachmentTypeValue
[]
=
{
...
...
@@ -1274,4 +1279,33 @@ acceptTypeJson:YES
failure
:
failure
];
}
-
(
void
)
saveSurveyWithAuthenticode
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
}
return
;
}
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_SurveySave
];
[
self
POST
:
urlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
@end
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
73bba6b9
...
...
@@ -12,6 +12,7 @@
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "StartTimeView.h"
#import "Survey.h"
#define LeftMargin 15
#define BtnHeight 44
#define TableHeight 46
...
...
@@ -87,7 +88,26 @@ typedef enum : NSUInteger {
switch
(
btn
.
tag
)
{
case
SaveTag
:
{
Survey
*
survey
=
[[
Survey
alloc
]
init
];
survey
.
uuid
=
@""
;
survey
.
title
=
@"dddd"
;
survey
.
productcode
=
@"1111"
;
// survey.begindate = [NSDate date];
// survey.enddate = [NSDate date];
survey
.
note
=
@"ddddgdss"
;
//保存
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
NSLog
(
@"%@"
,
data
);
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
showTips
:
data
];
};
NSDictionary
*
dict
=
@{
@"authenticode"
:
@"sssffff"
,
@"userUuid"
:
@"1123"
,
@"action"
:
@"save"
,
@"survey"
:
[
survey
dictForCommit
]};
[[
ICRHTTPController
sharedController
]
saveSurveyWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
break
;
case
CommitTag
:
...
...
XFFruit/ViewControllers/Survey/models/Survey.h
View file @
73bba6b9
...
...
@@ -6,9 +6,9 @@
// Copyright (c) 2015年 Xummer. All rights reserved.
// 行情调研
#import "IBT
Object
.h"
#import "IBT
Model
.h"
@interface
Survey
:
IBT
Object
@interface
Survey
:
IBT
Model
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
billnumber
;
//调研单号
@property
(
nonatomic
,
strong
)
NSString
*
title
;
//标题
...
...
XFFruit/ViewControllers/Survey/models/SurveyPerson.h
0 → 100644
View file @
73bba6b9
//
// SurveyPerson.h
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTObject.h"
@interface
SurveyPerson
:
IBTObject
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
person
;
//用户id
@property
(
nonatomic
,
strong
)
NSString
*
personcode
;
//用户编码
@property
(
nonatomic
,
strong
)
NSString
*
personname
;
//用户名称
@property
(
nonatomic
,
assign
)
NSInteger
*
state
;
//状态
@end
XFFruit/ViewControllers/Survey/models/SurveyPerson.m
0 → 100644
View file @
73bba6b9
//
// SurveyPerson.m
// XFFruit
//
// Created by 陈俊俊 on 15/8/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SurveyPerson.h"
@implementation
SurveyPerson
@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