Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-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
张杰
Opple-iOS
Commits
6b88076d
Commit
6b88076d
authored
May 11, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
6d40a954
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
48 deletions
+98
-48
ClientViewController.m
Lighting/Class/ClientViewController.m
+4
-1
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+9
-5
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+8
-0
Toolview.h
Lighting/Class/Tabbar/Toolview.h
+5
-0
Toolview.m
Lighting/Class/Tabbar/Toolview.m
+24
-9
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+37
-29
CustomButton.m
Lighting/Tools/CustomButton.m
+1
-1
NetworkRequestClassManager.m
Lighting/Tools/NetworkRequestClassManager.m
+6
-3
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+4
-0
No files found.
Lighting/Class/ClientViewController.m
View file @
6b88076d
...
...
@@ -193,6 +193,7 @@
#pragma mark -UITextFieldDelegate代理 ----搜索
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
[
textField
resignFirstResponder
];
[
self
searchCustomerInforMation
];
return
YES
;
}
...
...
@@ -209,9 +210,11 @@
[
self
CreateMBProgressHUDLoding
];
ConsumerQueryCondition
*
searchCustomer
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
searchCustomer
.
page
=
page
;
searchCustomer
.
nameEquals
=
self
.
searchPersonInformationField
.
text
;
searchCustomer
.
mobileEquals
=
self
.
searchPersonInformationField
.
text
;
searchCustomer
.
page
.
sort
=
@"lastVisitedTime"
;
//request
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/consumer/query"
]
WithRequestType
:
0
WithParameter
:
searchCustomer
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
6b88076d
...
...
@@ -487,13 +487,17 @@
condition
.
spaceEquals
=
spaceCode
;
condition
.
materialEqueals
=
materialCode
;
if
(
!
[
priceTitle
isEqualToString
:
@"全部"
])
{
//价格字符串切割
NSArray
*
spacrArray
=
[
priceTitle
componentsSeparatedByString
:
@"到"
];
condition
.
startprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
0
]
integerValue
]];
condition
.
endprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
1
]
integerValue
]];
}
__weak
typeof
(
self
)
Weakself
=
self
;
NSLog
(
@"%@"
,[
condition
toDictionary
]);
//
NSLog(@"%@",[condition toDictionary]);
[
self
getGoodsListdatas
:
condition
returnResponse
:
^
(
GoodsResponse
*
response
)
{
Weakself
.
screenSecondView
.
totalNumber
=
response
.
total
;
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
6b88076d
...
...
@@ -214,6 +214,14 @@
}
#pragma mark -二维码扫描
-
(
void
)
QrcodeButtonClick
{
NSLog
(
@"二维码扫描"
);
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
Lighting/Class/Tabbar/Toolview.h
View file @
6b88076d
...
...
@@ -17,6 +17,11 @@
*/
-
(
void
)
ButtonClickAction
:
(
NSInteger
)
Buttontag
withButton
:
(
UIButton
*
)
button
;
/**
* 点击二维码扫描按钮
*/
-
(
void
)
QrcodeButtonClick
;
@end
...
...
Lighting/Class/Tabbar/Toolview.m
View file @
6b88076d
...
...
@@ -61,37 +61,43 @@
[
self
addSubview
:
backView
];
//搜索图标
UIImageView
*
imageview
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
10
,
7
.
5
,
20
,
20
)];
imageview
.
image
=
TCImage
(
@"search"
);
[
backView
addSubview
:
imageview
];
//输入框
UITextField
*
inputField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
50
,
0
,
170
,
35
)];
UITextField
*
inputField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
45
,
0
,
170
,
35
)];
inputField
.
borderStyle
=
UITextBorderStyleNone
;
inputField
.
placeholder
=
@"请输入关键字"
;
inputField
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
backView
addSubview
:
inputField
];
//扫描二维码
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
button
.
frame
=
CGRectMake
(
backView
.
frame
.
size
.
width
+
backView
.
frame
.
origin
.
x
+
15
,
(
NavigationHeight
-
20
)
/
2
,
25
,
20
);
[
button
setBackgroundImage
:
TCImage
(
@"圆角矩形-3"
)
forState
:
UIControlStateNormal
];
[
button
addTarget
:
self
action
:
@selector
(
QrCodeButtonClickAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
button
];
//按钮
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"右视图"
,
@"某某用户"
,
@"我的客户"
,
@"购物车"
,
nil
];
//图片
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"dial"
,
@"Cog"
,
@"data"
,
@"ablum"
,
nil
];
for
(
int
i
=
1
;
i
<
5
;
i
++
)
{
CustomButton
*
button
=
[
CustomButton
buttonWithType
:
UIButtonTypeCustom
];
button
.
frame
=
CGRectMake
(
ScreenWidth
-
(
i
*
ButtonWIDTH
+
Buttoninterval
*
(
i
-
1
)),
10
,
ButtonWIDTH
,
ButtonRIGHT
);
[
button
setTitleColor
:
[
UIColor
redColor
]
forState
:
UIControlStateNormal
];
[
button
setTitleColor
:
kMainBlueColor
forState
:
UIControlStateNormal
];
[
button
setTitle
:[
titleArray
objectAtIndex_opple
:
i
-
1
]
forState
:
UIControlStateNormal
];
button
.
tag
=
100
+
i
-
1
;
[
button
addTarget
:
self
action
:
@selector
(
ButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
if
(
i
==
4
)
{
button
.
instructionsNumber
=
i
;
}
if
(
i
==
1
)
{
[
button
setImage
:
TCImage
(
@"business"
)
forState
:
UIControlStateNormal
];
}
else
{
[
button
setImage
:
TCImage
(
@"data"
)
forState
:
UIControlStateNormal
];
}
[
button
setImage
:
TCImage
([
imageArray
objectAtIndex_opple
:
i
-
1
])
forState
:
UIControlStateNormal
];
[
self
addSubview
:
button
];
}
...
...
@@ -104,6 +110,15 @@
}
#pragma mark -二维码扫描码
-
(
void
)
QrCodeButtonClickAction
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
QrcodeButtonClick
)])
{
[
self
.
delegate
QrcodeButtonClick
];
}
}
#pragma mark -按钮事件响应
-
(
void
)
ButtonClick
:
(
UIButton
*
)
button
{
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
6b88076d
This diff is collapsed.
Click to expand it.
Lighting/Tools/CustomButton.m
View file @
6b88076d
...
...
@@ -28,7 +28,7 @@
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
self
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
1
3
];
self
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
1
1
];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
}
...
...
Lighting/Tools/NetworkRequestClassManager.m
View file @
6b88076d
...
...
@@ -74,7 +74,10 @@ static NetworkRequestClassManager *manager = nil;
if
(
requestType
==
0
)
{
[
manager
POST
:
requestURLString
parameters
:[
jastorobject
toDictionary
]
progress
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nullable
responseObject
)
{
NSLog
(
@"%@"
,[
jastorobject
toDictionary
]);
// toDictionary 转字典
[
manager
POST
:
requestURLString
parameters
:[
jastorobject
toJSONString
]
progress
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nullable
responseObject
)
{
successBlock
(
responseObject
);
...
...
@@ -86,7 +89,7 @@ static NetworkRequestClassManager *manager = nil;
}
else
if
(
requestType
==
1
){
[
manager
GET
:
requestURLString
parameters
:[
jastorobject
to
Dictionary
]
progress
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nullable
responseObject
)
{
[
manager
GET
:
requestURLString
parameters
:[
jastorobject
to
JSONString
]
progress
:
nil
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nullable
responseObject
)
{
successBlock
(
responseObject
);
...
...
Lighting/Tools/PrefixHeader.pch
View file @
6b88076d
...
...
@@ -57,6 +57,10 @@
*/
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
/**
* 默认显示头像
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]]
/**
* AppDelegate代理
...
...
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