Commit b9fcf3f5 by lee

u

parent 0fc3663b
......@@ -31,6 +31,10 @@
[[KWMShopCartData alloc] syncCartProducts:result.items];
}
- (void)setResultNoSync:(KWMCartResult *)result {
_result = result;
}
+ (instancetype)sharedInstance {
static KWMShoppingCart *instance;
static dispatch_once_t onceToken;
......@@ -38,7 +42,7 @@
instance = [[super allocWithZone:NULL] init];
});
if (!instance.result) {
instance.result = [[KWMCartResult alloc] init];
[instance setResultNoSync:[KWMCartResult new]];
instance.result.items = [[[KWMShopCartData alloc] getALLItems] mutableCopy];
NSInteger count = 0;
for (KWMShopCartModel *item in instance.items) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment