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
bfff262a
Commit
bfff262a
authored
Jul 25, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,product添加到wishlist时,name可能为nil的问题
2,搜索api问题 3,添加no more data提示
parent
4141588f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
32 additions
and
11 deletions
+32
-11
KWMDataProduct.h
iCemarose/Class/Api/Cemarose/KWMDataProduct.h
+2
-2
KWMSearchResult.m
iCemarose/Class/Api/Cemarose/KWMSearchResult.m
+3
-2
KWMBrandCaramelVC.m
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
+1
-1
KWMCategoryVC.m
iCemarose/Class/UI/Category/KWMCategoryVC.m
+5
-1
KWMBasePageVC.m
iCemarose/Class/UI/KWMBasePageVC.m
+5
-1
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+3
-1
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+4
-2
KWMSearchFeedbackVC.m
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
+6
-1
KWMCollectionRefreshUtil.m
iCemarose/Class/Util/KWMCollectionRefreshUtil.m
+1
-0
Header-Prefix.h
iCemarose/Header-Prefix.h
+2
-0
No files found.
iCemarose/Class/Api/Cemarose/KWMDataProduct.h
View file @
bfff262a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
@property
(
nonatomic
)
NSArray
*
variants
;
@property
(
nonatomic
)
NSArray
*
variants
;
@property
(
nonatomic
)
NSString
*
handle
;
@property
(
nonatomic
)
NSString
*
handle
;
@property
(
nonatomic
)
NSArray
*
options
;
@property
(
nonatomic
)
NSArray
*
options
;
@property
(
nonatomic
)
NSArray
*
images
;
@property
(
nonatomic
)
NSArray
<
Optional
>
*
images
;
@property
(
nonatomic
)
NSDictionary
*
image
;
@property
(
nonatomic
)
NSDictionary
<
Optional
>
*
image
;
@end
@end
iCemarose/Class/Api/Cemarose/KWMSearchResult.m
View file @
bfff262a
...
@@ -21,11 +21,12 @@
...
@@ -21,11 +21,12 @@
if
(
data
==
nil
){
if
(
data
==
nil
){
return
self
;
return
self
;
}
}
for
(
int
i
=
0
;
i
<
data
.
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
data
.
count
;
i
++
)
{
if
(
data
[
i
]
==
nil
){
if
(
data
[
i
]
==
nil
){
break
;
break
;
}
}
KWMDataProduct
*
dataProduct
=
[[
KWMDataProduct
alloc
]
initWithDictionary
:
data
[
i
]
error
:
nil
];
NSError
*
error
=
nil
;
KWMDataProduct
*
dataProduct
=
[[
KWMDataProduct
alloc
]
initWithDictionary
:
data
[
i
]
error
:
&
error
];
NSArray
*
dataArray
=
data
[
i
][
@"variants"
];
NSArray
*
dataArray
=
data
[
i
][
@"variants"
];
...
...
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
View file @
bfff262a
...
@@ -358,7 +358,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
...
@@ -358,7 +358,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
if
(
self
.
isSale
){
if
(
self
.
isSale
){
[
tags
addObject
:
@"sale"
];
[
tags
addObject
:
@"sale"
];
}
}
[
self
.
tbvBrandCaramel
.
mj_footer
resetNoMoreData
];
NSInteger
tagetPage
=
self
.
currentPage
.
integerValue
+
1
;
NSInteger
tagetPage
=
self
.
currentPage
.
integerValue
+
1
;
[
self
.
client
getProductsPage
:
tagetPage
inCollection
:
collectionId
withTags
:
tags
sortOrder
:
collectionSort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
){
[
self
.
client
getProductsPage
:
tagetPage
inCollection
:
collectionId
withTags
:
tags
sortOrder
:
collectionSort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
){
if
(
error
)
{
if
(
error
)
{
...
...
iCemarose/Class/UI/Category/KWMCategoryVC.m
View file @
bfff262a
...
@@ -303,10 +303,13 @@
...
@@ -303,10 +303,13 @@
[
tags
addObject
:
cmodel
.
brand
];
[
tags
addObject
:
cmodel
.
brand
];
}
}
[
self
.
client
getProductsPage
:
cpage
inCollection
:
cmodel
.
collection_id
withTags
:
tags
sortOrder
:
cmodel
.
sort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
){
[
self
.
client
getProductsPage
:
cpage
inCollection
:
cmodel
.
collection_id
withTags
:
tags
sortOrder
:
cmodel
.
sort
completion
:^
(
NSArray
*
products
,
NSUInteger
page
,
BOOL
reachedEnd
,
NSError
*
error
){
weakSelf
.
cvRightProduct
.
mj_footer
.
hidden
=
reachedEnd
;
weakSelf
.
cvRightProduct
.
mj_footer
.
hidden
=
false
;
if
(
cmodel
==
self
.
selectedCategory
)
{
if
(
cmodel
==
self
.
selectedCategory
)
{
[
weakSelf
.
refreshUtil
hideLoading
];
[
weakSelf
.
refreshUtil
hideLoading
];
}
}
if
(
reachedEnd
){
[
weakSelf
.
cvRightProduct
.
mj_footer
endRefreshingWithNoMoreData
];
}
weakSelf
.
filterTab
.
userInteractionEnabled
=
true
;
weakSelf
.
filterTab
.
userInteractionEnabled
=
true
;
if
(
error
){
if
(
error
){
...
@@ -332,6 +335,7 @@
...
@@ -332,6 +335,7 @@
-
(
void
)
setSelectedCategory
:
(
KWMCategoryModel
*
)
selectedCategory
{
-
(
void
)
setSelectedCategory
:
(
KWMCategoryModel
*
)
selectedCategory
{
_selectedCategory
=
selectedCategory
;
_selectedCategory
=
selectedCategory
;
[
self
.
cvRightProduct
.
mj_footer
resetNoMoreData
];
self
.
refreshUtil
.
page
=
_selectedCategory
.
page
;
self
.
refreshUtil
.
page
=
_selectedCategory
.
page
;
self
.
refreshUtil
.
hasNextPage
=
YES
;
self
.
refreshUtil
.
hasNextPage
=
YES
;
self
.
refreshUtil
.
dataList
=
_selectedCategory
.
products
;
self
.
refreshUtil
.
dataList
=
_selectedCategory
.
products
;
...
...
iCemarose/Class/UI/KWMBasePageVC.m
View file @
bfff262a
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
[
weakSelf
loadData
];
[
weakSelf
loadData
];
});
});
}];
}];
[
footer
setTitle
:
NO_MORE_DATA
forState
:
MJRefreshStateNoMoreData
];
footer
.
hidden
=
YES
;
footer
.
hidden
=
YES
;
return
footer
;
return
footer
;
}
}
...
@@ -218,8 +219,11 @@
...
@@ -218,8 +219,11 @@
if
([
self
hasNextPage
])
{
if
([
self
hasNextPage
])
{
tableView
.
mj_footer
.
hidden
=
NO
;
tableView
.
mj_footer
.
hidden
=
NO
;
[
tableView
.
mj_footer
resetNoMoreData
];
}
else
{
}
else
{
tableView
.
mj_footer
.
hidden
=
YES
;
tableView
.
mj_footer
.
hidden
=
NO
;
// tableView.mj_footer.hidden = YES;
[
tableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
}
[
tableView
reloadData
];
[
tableView
reloadData
];
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
bfff262a
...
@@ -143,7 +143,9 @@ typedef enum{
...
@@ -143,7 +143,9 @@ typedef enum{
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMClothingSetsHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMClothingSetsHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMMenuHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMMenuHeader
kwmTag
]];
self
.
cvHome
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingTarget
:
self
refreshingAction
:
@selector
(
loadMore
)];
MJRefreshAutoNormalFooter
*
refreshFooter
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingTarget
:
self
refreshingAction
:
@selector
(
loadMore
)];
[
refreshFooter
setTitle
:
NO_MORE_DATA
forState
:
MJRefreshStateNoMoreData
];
self
.
cvHome
.
mj_footer
=
refreshFooter
;
}
}
-
(
void
)
loadMore
{
-
(
void
)
loadMore
{
...
...
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
bfff262a
...
@@ -628,11 +628,13 @@
...
@@ -628,11 +628,13 @@
if
(
!
customer
||
!
self
.
variant
){
if
(
!
customer
||
!
self
.
variant
){
return
;
return
;
}
}
NSNumber
*
customerId
=
customer
.
identifier
?:
@
(
0
);
NSString
*
customerName
=
customer
.
lastName
?:
@""
;
BUYProduct
*
product
=
(
self
.
color
&&
self
.
color
.
product
)?
self
.
color
.
product
:
self
.
product
;
BUYProduct
*
product
=
(
self
.
color
&&
self
.
color
.
product
)?
self
.
color
.
product
:
self
.
product
;
NSDictionary
*
parament
=
@{
NSDictionary
*
parament
=
@{
@"customer_id"
:
customer
.
identifier
.
stringValue
,
@"customer_id"
:
customer
Id
.
stringValue
,
@"customer_email"
:
customer
.
email
,
@"customer_email"
:
customer
.
email
,
@"customer_name"
:
customer
.
last
Name
,
@"customer_name"
:
customerName
,
@"product_title"
:
product
.
title
,
@"product_title"
:
product
.
title
,
@"product_id"
:
product
.
identifier
.
stringValue
,
@"product_id"
:
product
.
identifier
.
stringValue
,
@"variant_id"
:
self
.
variant
.
identifier
.
stringValue
,
@"variant_id"
:
self
.
variant
.
identifier
.
stringValue
,
...
...
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
View file @
bfff262a
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#import "KWMBrandCaramelCell.h"
#import "KWMBrandCaramelCell.h"
#import "KWMSearchFeedBackView.h"
#import "KWMSearchFeedBackView.h"
#import "KWMNewProductVC.h"
#import "KWMNewProductVC.h"
#import "MJRefresh.h"
@interface
KWMSearchFeedbackVC
()
<
UITableViewDelegate
,
UITableViewDataSource
,
KWMSearchFeedBackViewDelegate
,
KWMBrandCaramelCellDelegate
>
@interface
KWMSearchFeedbackVC
()
<
UITableViewDelegate
,
UITableViewDataSource
,
KWMSearchFeedBackViewDelegate
,
KWMBrandCaramelCellDelegate
>
@property
(
nonatomic
)
KWMSearchFeedBackView
*
vSearchFB
;
@property
(
nonatomic
)
KWMSearchFeedBackView
*
vSearchFB
;
...
@@ -197,6 +198,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
...
@@ -197,6 +198,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
if
(
self
.
currentPage
.
integerValue
==
endPage
&&
endPage
!=
0
)
{
if
(
self
.
currentPage
.
integerValue
==
endPage
&&
endPage
!=
0
)
{
[
self
showToast
:
@"已经是最后一页"
];
[
self
showToast
:
@"已经是最后一页"
];
[
self
hideLoading
];
[
self
hideLoading
];
[
self
.
tbvSearch
.
mj_footer
endRefreshingWithNoMoreData
];
return
;
return
;
}
}
NSInteger
tagetPage
=
self
.
currentPage
.
integerValue
+
1
;
NSInteger
tagetPage
=
self
.
currentPage
.
integerValue
+
1
;
...
@@ -209,7 +211,10 @@ static NSString *idStr = @"KWMBrandCaramelCell";
...
@@ -209,7 +211,10 @@ static NSString *idStr = @"KWMBrandCaramelCell";
[
weakSelf
hideLoading
];
[
weakSelf
hideLoading
];
total
=
result
.
products
.
total
.
integerValue
;
total
=
result
.
products
.
total
.
integerValue
;
endPage
=
result
.
products
.
lastPage
.
integerValue
;
endPage
=
result
.
products
.
lastPage
.
integerValue
;
weakSelf
.
hasNextPage
=
tagetPage
!=
endPage
;
if
(
tagetPage
==
1
){
[
weakSelf
.
dataList
removeAllObjects
];
}
[
weakSelf
appendDataList
:
result
.
productList
setPage
:
tagetPage
];
[
weakSelf
appendDataList
:
result
.
productList
setPage
:
tagetPage
];
_vSearchFB
.
lbGoodsNum
.
text
=
[
NSString
stringWithFormat
:
@"%lu商品"
,(
unsigned
long
)
total
];
_vSearchFB
.
lbGoodsNum
.
text
=
[
NSString
stringWithFormat
:
@"%lu商品"
,(
unsigned
long
)
total
];
...
...
iCemarose/Class/Util/KWMCollectionRefreshUtil.m
View file @
bfff262a
...
@@ -163,6 +163,7 @@
...
@@ -163,6 +163,7 @@
[
weakSelf
loadData
];
[
weakSelf
loadData
];
});
});
}];
}];
[
footer
setTitle
:
NO_MORE_DATA
forState
:
MJRefreshStateNoMoreData
];
footer
.
hidden
=
YES
;
footer
.
hidden
=
YES
;
return
footer
;
return
footer
;
}
}
...
...
iCemarose/Header-Prefix.h
View file @
bfff262a
...
@@ -56,6 +56,8 @@
...
@@ -56,6 +56,8 @@
#define QQAppId @"##"
#define QQAppId @"##"
#define QQAppKey @"##"
#define QQAppKey @"##"
#define NO_MORE_DATA @"------ 沒有啦 ------"
//正式的微信key
//正式的微信key
#define WechatAppKey @"wx355a497b2a2dd6d5"
#define WechatAppKey @"wx355a497b2a2dd6d5"
...
...
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