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
27d221f0
Commit
27d221f0
authored
May 17, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
93d78f62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
35 deletions
+97
-35
HotCollectionViewCell.h
Lighting/Class/HotCollectionViewCell.h
+1
-1
HotCollectionViewCell.m
Lighting/Class/HotCollectionViewCell.m
+1
-0
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+12
-5
SceneLibraryViewController.m
Lighting/Class/SceneLibraryViewController.m
+6
-0
SearchViewController.m
Lighting/Class/SearchViewController.m
+31
-4
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+13
-3
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+3
-3
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+22
-16
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+8
-3
No files found.
Lighting/Class/HotCollectionViewCell.h
View file @
27d221f0
...
...
@@ -21,6 +21,6 @@
/**
* title
*/
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabe
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
titleLabe
;
@end
Lighting/Class/HotCollectionViewCell.m
View file @
27d221f0
...
...
@@ -37,6 +37,7 @@
{
_responseDatas
=
responseDatas
;
self
.
titleLabe
.
text
=
_responseDatas
.
name
;
}
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
27d221f0
...
...
@@ -137,15 +137,15 @@
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"%@"
,
error
);
}];
}
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListdatas
:
(
GoodsCondition
*
)
conditon
returnResponse
:
(
void
(
^
)(
GoodsResponse
*
))
finish
{
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -163,8 +163,6 @@
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
...
...
@@ -186,8 +184,17 @@
[
self
CreatescreeningButton
];
//搜索关键字
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
searchInputString
:
)
name
:
@"SEARCHINPUTSTRING"
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
searchInputString
:
)
name
:
SEARCHSTRING
object
:
nil
];
//返回根视图
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
popTorootviewController
:
)
name
:
POPROOTCONTROLLER
object
:
nil
];
}
#pragma mark -返回根视图
-
(
void
)
popTorootviewController
:
(
NSNotification
*
)
not
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
...
...
Lighting/Class/SceneLibraryViewController.m
View file @
27d221f0
...
...
@@ -93,9 +93,15 @@
page
.
page
=
0
;
condition
.
page
=
page
;
[
self
getSceneLibrarydatas
:
condition
];
}
#pragma mark -获取场景筛选数据
-
(
void
)
getdatasAction
{
...
...
Lighting/Class/SearchViewController.m
View file @
27d221f0
...
...
@@ -9,6 +9,8 @@
#import "SearchViewController.h"
#import "SearchCollectionViewCell.h"
#import "HotCollectionViewCell.h"
#import "ProductLibraryViewController.h"
@interface
SearchViewController
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
>
...
...
@@ -67,10 +69,35 @@
self
.
historyCollectionView
.
dataSource
=
self
;
self
.
hotCollectionView
.
dataSource
=
self
;
self
.
hotCollectionView
.
delegate
=
self
;
self
.
hotCollectionView
.
backgroundColor
=
[
UIColor
redColor
];
self
.
historyCollectionView
.
backgroundColor
=
[
UIColor
greenColor
];
self
.
hotCollectionView
.
alwaysBounceVertical
=
YES
;
self
.
historyCollectionView
.
alwaysBounceVertical
=
YES
;
//保存输入内容
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
searchInputString
:
)
name
:
SEARCHSTRING
object
:
nil
];
//返回根视图
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popTorootviewController:) name:POPROOTCONTROLLER object:nil];
}
#pragma mark -返回根视图
-
(
void
)
popTorootviewController
:
(
NSNotification
*
)
not
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
#pragma mark -输入内容
-
(
void
)
searchInputString
:
(
NSNotification
*
)
not
{
[
self
.
localSearchArray
addObject
:
not
.
object
];
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
UINavigationController
*
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
productVC
];
[
self
.
navigationController
pushViewController
:
nav
animated
:
YES
];
}
...
...
@@ -124,7 +151,7 @@
if
([
collectionView
isEqual
:
self
.
historyCollectionView
])
{
SearchCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"firstcell"
forIndexPath
:
indexPath
];
cell
.
searchLabe
.
text
=
[
self
.
localSearchArray
objectAtIndex_opple
:
indexPath
.
item
];
return
cell
;
}
if
([
collectionView
isEqual
:
self
.
hotCollectionView
])
{
...
...
@@ -145,7 +172,7 @@
return
self
.
response
.
list
.
count
;
}
return
20
;
return
self
.
localSearchArray
.
count
;
}
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
27d221f0
...
...
@@ -218,11 +218,19 @@
}
#pragma mark -搜索框代理方法
-
(
BOOL
)
textFieldShouldBeginEditing
:
(
UITextField
*
)
textField
{
self
.
selectedIndex
=
9
;
if
(
textField
.
text
.
length
!=
0
)
{
//返回根视图
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
POPROOTCONTROLLER
object
:
nil
];
}
else
{
self
.
selectedIndex
=
9
;
}
return
YES
;
}
...
...
@@ -236,7 +244,9 @@
[
textField
resignFirstResponder
];
self
.
selectedIndex
=
4
;
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"SEARCHINPUTSTRING"
object
:
textField
.
text
];
//搜索
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SEARCHSTRING
object
:
textField
.
text
];
}
return
YES
;
}
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
27d221f0
...
...
@@ -1167,7 +1167,7 @@
TargetAttributes
=
{
29706DA01CD082980003C412
=
{
CreatedOnToolsVersion
=
7.3
;
DevelopmentTeam
=
39XYE6VSP8
;
DevelopmentTeam
=
W54V2VB863
;
};
};
};
...
...
@@ -1517,7 +1517,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6
"
;
PROVISIONING_PROFILE
=
"
e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8
"
;
STRIP_PNG_TEXT
=
NO
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
};
...
...
@@ -1569,7 +1569,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6
"
;
PROVISIONING_PROFILE
=
"
e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8
"
;
STRIP_PNG_TEXT
=
NO
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
};
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
27d221f0
This diff is collapsed.
Click to expand it.
Lighting/Tools/PrefixHeader.pch
View file @
27d221f0
...
...
@@ -134,10 +134,15 @@
#define ServerAddress @"http://139.196.195.30:8090/opple-web/app"
/**
* 搜索框输入通知
*/
#define SEARCHSTRING @"SEARCHINPUTSTRING"
/**
* 搜索框返回根视图
*/
#define POPROOTCONTROLLER @"POPROOTCONTROLLER"
...
...
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