Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
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
cemarose
ios1x
Commits
343bf742
Commit
343bf742
authored
Jul 14, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,套装cell查看更多
2,wishlist api demain 3,套装cell样式调整。---使价格能显示完整
parent
058a9d44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
8 deletions
+57
-8
KWMAPIManager.m
iCemarose/Class/Api/KWMAPIManager.m
+4
-4
KWMClothingSetsCell.h
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.h
+2
-0
KWMClothingSetsCell.m
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.m
+27
-1
KWMClothingSetsCell.xib
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.xib
+0
-0
KWMClothingSetsHeader.h
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsHeader.h
+2
-0
KWMClothingSetsHeader.m
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsHeader.m
+10
-2
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+8
-1
Header-Prefix.h
iCemarose/Header-Prefix.h
+4
-0
No files found.
iCemarose/Class/Api/KWMAPIManager.m
View file @
343bf742
...
@@ -891,7 +891,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -891,7 +891,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
-
(
NSURLSessionDataTask
*
)
saveWish
:
(
NSDictionary
*
)
parameters
-
(
NSURLSessionDataTask
*
)
saveWish
:
(
NSDictionary
*
)
parameters
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-save"
,
@"test.cemarose.com"
];
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-save"
,
WishList_API_DOMAIN
];
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
apiPath
:
apiPath
apiPath
:
apiPath
parameters
:
parameters
parameters
:
parameters
...
@@ -911,7 +911,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -911,7 +911,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
-
(
NSURLSessionDataTask
*
)
getWishList
:
(
NSDictionary
*
)
parameters
-
(
NSURLSessionDataTask
*
)
getWishList
:
(
NSDictionary
*
)
parameters
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist"
,
@"test.cemarose.com"
];
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist"
,
WishList_API_DOMAIN
];
return
[
self
startSessionTask
:
KWMHTTPMethodGET
return
[
self
startSessionTask
:
KWMHTTPMethodGET
apiPath
:
apiPath
apiPath
:
apiPath
parameters
:
parameters
parameters
:
parameters
...
@@ -931,7 +931,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -931,7 +931,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
-
(
NSURLSessionDataTask
*
)
removeWish
:
(
NSDictionary
*
)
parameters
-
(
NSURLSessionDataTask
*
)
removeWish
:
(
NSDictionary
*
)
parameters
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-prune"
,
@"test.cemarose.com"
];
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-prune"
,
WishList_API_DOMAIN
];
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
apiPath
:
apiPath
apiPath
:
apiPath
parameters
:
parameters
parameters
:
parameters
...
@@ -950,7 +950,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -950,7 +950,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
-
(
NSURLSessionDataTask
*
)
clearWishList
:
(
NSDictionary
*
)
parameters
-
(
NSURLSessionDataTask
*
)
clearWishList
:
(
NSDictionary
*
)
parameters
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMAdditionalListResult
*
result
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
{
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-delete"
,
@"test.cemarose.com"
];
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/wishlist-delete"
,
WishList_API_DOMAIN
];
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
return
[
self
startSessionTask
:
KWMHTTPMethodPOST
apiPath
:
apiPath
apiPath
:
apiPath
parameters
:
parameters
parameters
:
parameters
...
...
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.h
View file @
343bf742
...
@@ -13,4 +13,6 @@
...
@@ -13,4 +13,6 @@
@property
(
nonatomic
)
BUYProduct
*
product
;
@property
(
nonatomic
)
BUYProduct
*
product
;
@property
(
nonatomic
)
BOOL
isMore
;
@end
@end
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.m
View file @
343bf742
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMImageUtil.h"
#import "KWMImageUtil.h"
#import "UIImageView+WebCache.h"
#import "UIImageView+WebCache.h"
#import "BUYProductVariant+Currency.h"
#import "UIView+Prettify.h"
#import "UIColor+SAMAdditions.h"
@interface
KWMClothingSetsCell
()
@interface
KWMClothingSetsCell
()
...
@@ -18,14 +21,22 @@
...
@@ -18,14 +21,22 @@
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbPrice
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbPrice
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbComparePrice
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIImageView
*
ivProduct
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIImageView
*
ivProduct
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vMore
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vContent
;
@end
@end
@implementation
KWMClothingSetsCell
@implementation
KWMClothingSetsCell
-
(
void
)
awakeFromNib
{
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
super
awakeFromNib
];
[
self
.
vMore
setBorder
:
0
.
5
cornerRadius
:
0
borderColor
:
[
UIColor
sam_colorWithHex
:
@"D8DBDE"
]];
}
}
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
-
(
void
)
setProduct
:
(
BUYProduct
*
)
product
{
...
@@ -37,9 +48,24 @@
...
@@ -37,9 +48,24 @@
self
.
lbName
.
text
=
product
.
title
;
self
.
lbName
.
text
=
product
.
title
;
if
(
product
.
variantsArray
.
count
>
0
){
if
(
product
.
variantsArray
.
count
>
0
){
BUYProductVariant
*
variant
=
product
.
variantsArray
.
firstObject
;
BUYProductVariant
*
variant
=
product
.
variantsArray
.
firstObject
;
self
.
lbPrice
.
text
=
[
KWMStringUtil
price
:
variant
.
price
];
self
.
lbPrice
.
text
=
variant
.
price
.
priceValueFormatted
;
if
(
variant
.
compareAtPrice
){
self
.
lbComparePrice
.
hidden
=
NO
;
NSString
*
priceString
=
variant
.
compareAtPriceFormatted
;
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
self
.
lbComparePrice
.
attributedText
=
attribtStr
;
}
else
{
self
.
lbComparePrice
.
hidden
=
YES
;
}
}
}
}
}
}
}
-
(
void
)
setIsMore
:
(
BOOL
)
isMore
{
_isMore
=
isMore
;
self
.
vMore
.
hidden
=
!
isMore
;
self
.
vContent
.
hidden
=
isMore
;
}
@end
@end
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsCell.xib
View file @
343bf742
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsHeader.h
View file @
343bf742
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_gotoClothingSetsPage
;
@end
@end
@interface
KWMClothingSetsHeader
:
UIView
<
UICollectionViewDataSource
,
UICollectionViewDelegate
>
@interface
KWMClothingSetsHeader
:
UIView
<
UICollectionViewDataSource
,
UICollectionViewDelegate
>
...
...
iCemarose/Class/UI/NewHome/Cell/KWMClothingSetsHeader.m
View file @
343bf742
...
@@ -91,12 +91,13 @@
...
@@ -91,12 +91,13 @@
BUYProduct
*
product
=
[
self
.
productArray
objectAtIndex
:
indexPath
.
row
];
BUYProduct
*
product
=
[
self
.
productArray
objectAtIndex
:
indexPath
.
row
];
cell
.
product
=
product
;
cell
.
product
=
product
;
cell
.
isMore
=
indexPath
.
row
==
9
;
return
cell
;
return
cell
;
}
}
-
(
CGSize
)
collectionView
:
(
UICollectionView
*
)
collectionView
layout
:
(
UICollectionViewLayout
*
)
collectionViewLayout
sizeForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
CGSize
)
collectionView
:
(
UICollectionView
*
)
collectionView
layout
:
(
UICollectionViewLayout
*
)
collectionViewLayout
sizeForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
CGSize
size
=
CGSizeMake
(
66
,
1
00
);
CGSize
size
=
CGSizeMake
(
66
,
1
17
);
return
size
;
return
size
;
}
}
...
@@ -105,11 +106,18 @@
...
@@ -105,11 +106,18 @@
}
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
if
(
self
.
productArray
&&
self
.
productArray
.
count
>
9
){
return
10
;
}
return
self
.
productArray
?
self
.
productArray
.
count
:
0
;
return
self
.
productArray
?
self
.
productArray
.
count
:
0
;
}
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
[
self
.
delegate
kwm_onClickProduct
:
self
.
productArray
[
indexPath
.
item
]];
if
(
indexPath
.
row
==
9
){
[
self
.
delegate
kwm_gotoClothingSetsPage
];
}
else
{
[
self
.
delegate
kwm_onClickProduct
:
self
.
productArray
[
indexPath
.
item
]];
}
}
}
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
343bf742
...
@@ -57,6 +57,8 @@ typedef enum{
...
@@ -57,6 +57,8 @@ typedef enum{
@property
(
nonatomic
)
NSMutableDictionary
*
dataMapping
;
@property
(
nonatomic
)
NSMutableDictionary
*
dataMapping
;
@property
(
nonatomic
)
NSString
*
clotingSetsHandle
;
@end
@end
@implementation
KWMNewHomeVC
@implementation
KWMNewHomeVC
...
@@ -178,7 +180,11 @@ typedef enum{
...
@@ -178,7 +180,11 @@ typedef enum{
#pragma mark - KWMRecommendDelegate
#pragma mark - KWMRecommendDelegate
-
(
void
)
kwm_gotoRecommendPage
{
-
(
void
)
kwm_gotoRecommendPage
{
[
self
openURLWithString
:
@"https://cemarose.myshopify.com/collections/hot-sell-app"
];
[
self
openURLWithString
:
@"https://cemarose.myshopify.com/collections/hot-sell-app"
];
}
-
(
void
)
kwm_gotoClothingSetsPage
{
[
self
openURLWithString
:[
NSString
stringWithFormat
:
@"https://cemarose.myshopify.com/collections/%@"
,
self
.
clotingSetsHandle
]];
}
}
#pragma mark - KWMRecommendDelegate KWMClothingSetsDelegate KWMHotSalesDelegate
#pragma mark - KWMRecommendDelegate KWMClothingSetsDelegate KWMHotSalesDelegate
...
@@ -381,6 +387,7 @@ typedef enum{
...
@@ -381,6 +387,7 @@ typedef enum{
NSString
*
handle
=
clothingParam
.
count
>
1
?
clothingParam
[
1
]
:
nil
;
NSString
*
handle
=
clothingParam
.
count
>
1
?
clothingParam
[
1
]
:
nil
;
NSArray
*
tags
=
clothingParam
.
count
>
2
?
[
clothingParam
[
2
]
componentsSeparatedByString
:
@"+"
]
:
nil
;
NSArray
*
tags
=
clothingParam
.
count
>
2
?
[
clothingParam
[
2
]
componentsSeparatedByString
:
@"+"
]
:
nil
;
if
(
handle
)
{
if
(
handle
)
{
self
.
clotingSetsHandle
=
handle
;
[
self
requestProductWithHandle
:
handle
tags
:
tags
valueKeyPath
:
@"clothingSetsHeader.productArray"
];
[
self
requestProductWithHandle
:
handle
tags
:
tags
valueKeyPath
:
@"clothingSetsHeader.productArray"
];
}
}
}
}
...
...
iCemarose/Header-Prefix.h
View file @
343bf742
...
@@ -69,6 +69,8 @@
...
@@ -69,6 +69,8 @@
//额外api domain
//额外api domain
#define Additional_API_DOMAIN @"liang.tofnews.com"
#define Additional_API_DOMAIN @"liang.tofnews.com"
#define WishList_API_DOMAIN @"test.cemarose.com"
#define Pay_API_DOMAIN @"liang.tofnews.com"
#define Pay_API_DOMAIN @"liang.tofnews.com"
//Shopify对应的key(测试用)
//Shopify对应的key(测试用)
...
@@ -83,6 +85,8 @@
...
@@ -83,6 +85,8 @@
#define Additional_API_DOMAIN @"apps.cemarose.com"
#define Additional_API_DOMAIN @"apps.cemarose.com"
#define WishList_API_DOMAIN @"apps.cemarose.com"
#define Pay_API_DOMAIN @"alipay.cemarose.com"
#define Pay_API_DOMAIN @"alipay.cemarose.com"
//Shopify对应的key(正式)
//Shopify对应的key(正式)
...
...
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