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
73fffe50
Commit
73fffe50
authored
Aug 02, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
1fe2f360
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
3 deletions
+23
-3
KWMDataProduct.h
iCemarose/Class/Api/Cemarose/KWMDataProduct.h
+2
-0
KWMDataProduct.m
iCemarose/Class/Api/Cemarose/KWMDataProduct.m
+12
-0
KWMShoppingCart.m
iCemarose/Class/Model/KWMShoppingCart.m
+1
-1
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+1
-0
KWMSearchFeedbackVC.m
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
+2
-2
KWMShopCartVC.m
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
+5
-0
No files found.
iCemarose/Class/Api/Cemarose/KWMDataProduct.h
View file @
73fffe50
...
...
@@ -18,4 +18,6 @@
@property
(
nonatomic
)
NSArray
<
Optional
>
*
images
;
@property
(
nonatomic
)
NSDictionary
<
Optional
>
*
image
;
-
(
BOOL
)
available
;
@end
iCemarose/Class/Api/Cemarose/KWMDataProduct.m
View file @
73fffe50
...
...
@@ -7,7 +7,19 @@
//
#import "KWMDataProduct.h"
#import "KWMVariants.h"
@implementation
KWMDataProduct
-
(
BOOL
)
available
{
BOOL
ret
=
NO
;
for
(
KWMVariants
*
v
in
self
.
variants
)
{
if
(
v
.
inventoryQuantity
.
integerValue
>
0
)
{
ret
=
YES
;
break
;
}
}
return
ret
;
}
@end
iCemarose/Class/Model/KWMShoppingCart.m
View file @
73fffe50
...
...
@@ -65,7 +65,7 @@
-
(
void
)
addTasksObject
:
(
NSURLSessionDataTask
*
)
object
{
if
(
self
.
tasks
.
lastObject
&&
[
self
.
tasks
.
lastObject
.
currentRequest
.
URL
.
absoluteString
isEqualToString
:
object
.
currentRequest
.
URL
.
absoluteString
]
&&
[
object
.
currentRequest
.
URL
.
absoluteString
isMatchedByRegex
:
@"cart.js$"
])
{
return
;
if
(
!
self
.
sync
)
return
;
}
[
self
.
tasks
addObject
:
object
];
if
(
self
.
tasks
.
count
==
1
)
{
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
73fffe50
...
...
@@ -394,6 +394,7 @@ typedef enum{
-
(
void
)
setHomeData
:
(
KWMHomeData
*
)
homeData
{
_homeData
=
homeData
;
// [self.homeData.ad_banner[0] setUrl:@"https://www.cemarose.cn/collections/skirts/girls"];
self
.
adHeader
.
adArray
=
self
.
homeData
.
ad_banner
;
// self.homeData.hot_sales.single_show_count = @(1);
self
.
clothingSetsHeader
.
headerImage
=
self
.
homeData
.
clothing_sets
.
image
;
...
...
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
View file @
73fffe50
...
...
@@ -216,8 +216,8 @@ static NSString *idStr = @"KWMBrandCaramelCell";
[
weakSelf
.
dataList
removeAllObjects
];
}
NSArray
*
products
=
[
result
.
productList
rx_filterWithBlock
:
^
BOOL
(
BUY
Product
*
each
)
{
return
each
.
availableValue
;
NSArray
*
products
=
[
result
.
productList
rx_filterWithBlock
:
^
BOOL
(
KWMData
Product
*
each
)
{
return
[
each
available
]
;
}];
[
weakSelf
appendDataList
:
products
setPage
:
tagetPage
];
_vSearchFB
.
lbGoodsNum
.
text
=
[
NSString
stringWithFormat
:
@"%lu商品"
,(
unsigned
long
)
total
];
...
...
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
View file @
73fffe50
...
...
@@ -64,11 +64,16 @@
NSArray
*
ids
=
[
cart
.
items
rx_mapWithBlock
:
^
id
(
KWMShopCartModel
*
each
)
{
return
each
.
product_id
;
}];
if
(
ids
&&
ids
.
count
>
0
)
{
[
this
.
client
getProductsByIds
:
ids
completion
:
^
(
NSArray
<
BUYProduct
*>
*
_Nullable
products
,
NSError
*
_Nullable
error
)
{
[
this
hideLoading
];
// [this refresh];
[
this
checkInStockWithItems
:
cart
.
items
products
:
products
];
}];
}
else
{
[
this
hideLoading
];
[
this
refresh
];
}
}];
}
...
...
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