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
92a4b538
Commit
92a4b538
authored
May 19, 2016
by
ZCJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
ff5c95b0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
303 additions
and
102 deletions
+303
-102
FollowHeartViewController.h
Lighting/Class/FollowHeartViewController.h
+5
-3
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+4
-1
ProductLibraryView.h
Lighting/Class/ProductLibraryView.h
+12
-0
ProductLibraryView.m
Lighting/Class/ProductLibraryView.m
+154
-0
SeceneCollectionPictureCell.h
Lighting/Class/SeceneCollectionPictureCell.h
+1
-0
SeceneCollectionPictureCell.m
Lighting/Class/SeceneCollectionPictureCell.m
+8
-1
SeceneLibraryView.h
Lighting/Class/SeceneLibraryView.h
+8
-1
SeceneLibraryView.m
Lighting/Class/SeceneLibraryView.m
+104
-89
Podfile.lock
Lighting/Podfile.lock
+6
-6
podfile
Lighting/podfile
+1
-1
No files found.
Lighting/Class/FollowHeartViewController.h
View file @
92a4b538
...
...
@@ -28,8 +28,10 @@
@property
(
nonatomic
,
strong
)
FootSubView
*
footSubView
;
@property
(
nonatomic
,
strong
)
SeceneLibraryView
*
seceneLibraryView
;
@property
(
nonatomic
,
strong
)
ProductLibraryView
*
productLibraryView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
zoomButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
temporaryBtn
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
zoomButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
temporaryBtn
;
@end
Lighting/Class/FollowHeartViewController.m
View file @
92a4b538
...
...
@@ -158,6 +158,7 @@
//添加场景
-
(
void
)
addSceneLibraryView
{
self
.
seceneLibraryView
=
[[
SeceneLibraryView
alloc
]
init
];
self
.
seceneLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
seceneLibraryView
.
delegate
=
self
;
...
...
@@ -167,7 +168,7 @@
-
(
void
)
addProductLibraryView
{
self
.
productLibraryView
=
[[
ProductLibraryView
alloc
]
init
];
self
.
productLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
productLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
productLibraryView
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
productLibraryView
.
view
];
}
...
...
@@ -176,6 +177,8 @@
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
...
...
Lighting/Class/ProductLibraryView.h
View file @
92a4b538
...
...
@@ -33,4 +33,16 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array3
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
/**
* 筛选数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
screeningDatas
;
/**
* 商品数据源对象
*/
@property
(
nonatomic
,
strong
)
GoodsResponse
*
datasArray
;
/**
* 商品iD
*/
@property
(
nonatomic
,
copy
)
NSString
*
goodsID
;
@end
Lighting/Class/ProductLibraryView.m
View file @
92a4b538
...
...
@@ -11,9 +11,21 @@
@implementation
ProductLibraryView
-
(
void
)
viewDidLoad
{
[
self
initdata
];
[
self
getScreeningdatas
];
[
self
initSubView
];
}
/**
* 初始化筛选数据源
*/
-
(
NSMutableArray
*
)
screeningDatas
{
if
(
_screeningDatas
==
nil
)
{
_screeningDatas
=
[
NSMutableArray
array
];
}
return
_screeningDatas
;
}
//- (instancetype)initWithFrame:(CGRect)frame
//{
...
...
@@ -32,7 +44,146 @@
self
.
array3
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"田园"
,
@"宫廷"
,
@"乡村"
,
@"日式风格"
,
@"欧式风格"
,
@"混搭风格"
,
@"现代简约"
,
nil
];
self
.
arrayData
=
self
.
array3
;
}
//#pragma mark -热门搜索
//- (void)setSelectedCode:(NSString *)selectedCode
//{
// _selectedCode = selectedCode;
// //默认数据
// GoodsCondition *conditon = [[GoodsCondition alloc]init];
// //分页数据
// DataPage *Newpage = [[DataPage alloc]init];
// Newpage.page = 0;
// conditon.page = Newpage;
// conditon.categoryEquals = _selectedCode;
//
// __weak typeof(self)weakSelf = self;
// [self getGoodsListdatas:conditon returnResponse:^(GoodsResponse *response) {
//
// if (response.goodsEntity.count == 0) {
//
// [self ErrorMBProgressView:@"暂无数据"];
// }else
// {
// weakSelf.datasArray = response;
// [weakSelf.productCollectionView reloadData];
// }
// }];
//
//}
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListDatas
{
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
0
;
conditon
.
page
=
Newpage
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
if
(
response
.
goodsEntity
.
count
==
0
)
{
[
self
ErrorMBProgressView
:
@"暂无数据"
];
}
else
{
weakSelf
.
datasArray
=
response
;
// [weakSelf.productCollectionView reloadData];
}
}];
}
#pragma mark -获取产品筛选数据
-
(
void
)
getScreeningdatas
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/getGoodsFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
space
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
material
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
price
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
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
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
GoodsResponse
*
sponse
=
[[
GoodsResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
//返回结果
finish
(
sponse
);
}
else
{
[
self
ErrorMBProgressView
:
@"暂无数据"
];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
//#pragma mark -获取商品详情
//- (void)getGoodsListDetails
//
//{
// [self CreateMBProgressHUDLoding];
// NSString *url = [NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoods/",_goodsID];
// [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
//
// [self RemoveMBProgressHUDLoding];
// if ([returnValue[@"code"] isEqualToNumber:@0]) {
//
// self.entity = [[TOGoodsEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
// [self HeaderViewAssignment];
// [self.productDetilsTableview reloadData];
// }
// else
// {
// [self ErrorMBProgressView:returnValue[@"message"]];
// }
//
//
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
//
// } WithFailureBlock:^(id error) {
//
// [self RemoveMBProgressHUDLoding];
// NSLog(@"%@",error);
// }];
//}
-
(
void
)
initSubView
{
for
(
int
i
=
0
;
i
<
self
.
nameData
.
count
;
i
++
)
{
...
...
@@ -61,6 +212,8 @@
tap
.
cancelsTouchesInView
=
NO
;
[[
UIApplication
sharedApplication
].
keyWindow
addGestureRecognizer
:
tap
];
[
self
initSubViews
];
[
self
getGoodsListDatas
];
}
...
...
@@ -95,6 +248,7 @@
[
self
.
collectionView
registerClass
:[
ProductCollectionPictureCell
class
]
forCellWithReuseIdentifier
:
@"UICollectionViewCell"
];
[
self
.
subView
addSubview
:
self
.
collectionView
];
}
-
(
void
)
selectedType
:
(
UIButton
*
)
sender
{
...
...
Lighting/Class/SeceneCollectionPictureCell.h
View file @
92a4b538
...
...
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface
SeceneCollectionPictureCell
:
UICollectionViewCell
@property
(
nonatomic
,
strong
)
TOSceneEntity
*
model
;
@property
(
strong
,
nonatomic
)
UIImageView
*
imageView
;
@end
Lighting/Class/SeceneCollectionPictureCell.m
View file @
92a4b538
...
...
@@ -13,9 +13,16 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
frame
.
size
.
width
,
frame
.
size
.
height
)];
self
.
imageView
.
image
=
[
UIImage
imageNamed
:
@"backView"
];
[
self
addSubview
:
self
.
imageView
];
}
return
self
;
}
#pragma mark -赋值
-
(
void
)
setModel
:(
TOSceneEntity
*
)
model
{
_model
=
model
;
[
self
.
imageView
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
pricure
]
placeholderImage
:
ReplaceImage
];
}
@end
Lighting/Class/SeceneLibraryView.h
View file @
92a4b538
...
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "SeceneCollectionPictureCell.h"
#import "screeningButton.h"
@protocol
AddSecenePicturedelegate
<
NSObject
>
@required
...
...
@@ -27,9 +28,15 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property
(
nonatomic
,
strong
)
UIButton
*
kongJianBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
fengGeBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
leiXingBtn
;
@property
(
nonatomic
,
strong
)
NS
Mutable
Array
*
arrayData
;
@property
(
nonatomic
,
strong
)
NSArray
*
arrayData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array1
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array3
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
@property
(
nonatomic
,
strong
)
SceneFilter
*
filter
;
//筛选数据源
@property
(
nonatomic
,
strong
)
SceneResponse
*
response
;
// 列表数据
@property
(
nonatomic
,
strong
)
NSArray
*
imageArray
;
//筛选cell个数图片
@property
(
strong
,
nonatomic
)
screeningButton
*
StyleButton
;
//风格按钮
@property
(
strong
,
nonatomic
)
screeningButton
*
SpaceButton
;
//房型按钮
@end
Lighting/Class/SeceneLibraryView.m
View file @
92a4b538
This diff is collapsed.
Click to expand it.
Lighting/Podfile.lock
View file @
92a4b538
...
...
@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- IQKeyboardManager (4.0.
3
)
- IQKeyboardManager (4.0.
2
)
- JSONModel (1.2.0)
- Masonry (0.6.4)
- MBProgressHUD (0.9.2)
...
...
@@ -32,9 +32,9 @@ PODS:
- MMDrawerController/Core
- MMDrawerController/Subclass (0.6.0):
- MMDrawerController/Core
- SDWebImage (3.7.
6
):
- SDWebImage/Core (= 3.7.
6
)
- SDWebImage/Core (3.7.
6
)
- SDWebImage (3.7.
5
):
- SDWebImage/Core (= 3.7.
5
)
- SDWebImage/Core (3.7.
5
)
- SVProgressHUD (2.0.3)
DEPENDENCIES:
...
...
@@ -51,14 +51,14 @@ DEPENDENCIES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
IQKeyboardManager:
be9695ffc5a52077deb4847608f338771022d6d1
IQKeyboardManager:
2341089c4ae25fa2fa82ce356a259fcd267dc6b6
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
Masonry: 281802d04d787ea2973179ee8bcb50500579ede2
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4
MMDrawerController: e3a54a5570388463ad3b36975251575b50c4e1a0
SDWebImage:
c325cf02c30337336b95beff20a13df489ec0ec9
SDWebImage:
69c6303e3348fba97e03f65d65d4fbc26740f461
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
COCOAPODS: 0.39.0
Lighting/podfile
View file @
92a4b538
platform
:ios
,
'9.0'
pod
'MBProgressHUD'
,
'~> 0.9.2'
pod
'SVProgressHUD'
,
'~> 2.0.3'
pod
'IQKeyboardManager'
,
'~> 4.0.0
'
pod
'IQKeyboardManager'
,
'~> 4.0.0
’
pod '
MMDrawerController
', '
~>
0.6
.
0
'
pod '
MJExtension
', '
~>
3.0
.
10
'
pod '
Masonry
', '
~>
0.6
.
4
'
...
...
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