Commit 00cee153 by houweibin

我喜欢的页面-去除购物车显示

parent 47fdce39
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
@interface KWMWishListVC () @interface KWMWishListVC ()
@property (weak,nonatomic) IBOutlet UILabel *lbTotalPrice;
@property (weak,nonatomic) IBOutlet UITableView *tbvWish; @property (weak,nonatomic) IBOutlet UITableView *tbvWish;
@property(nonatomic) NSMutableArray *wishArray; @property(nonatomic) NSMutableArray *wishArray;
...@@ -40,12 +38,6 @@ ...@@ -40,12 +38,6 @@
-(void)viewWillAppear:(BOOL)animated { -(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO]; [self.navigationController setNavigationBarHidden:NO];
[self setTotalPrice];
}
- (IBAction)onClickComplete:(id)sender{
KWMShopCartVC *ShopCartVC = (KWMShopCartVC *)[KWMBaseVC findControllerBy:[KWMShopCartVC kwmTag] fromStoryboard:@"ShopCart"];
[self.navigationController pushViewController:ShopCartVC animated:YES];
} }
- (void)initView{ - (void)initView{
...@@ -70,20 +62,6 @@ ...@@ -70,20 +62,6 @@
} }
} }
//计算总价格
- (void) setTotalPrice{
NSArray *shopCartList = (NSMutableArray *)[[KWMShoppingCart sharedInstance] items];
NSDecimalNumber *total = [NSDecimalNumber decimalNumberWithDecimal:@(0).decimalValue];
for (KWMShopCartModel *model in shopCartList) {
if (model.line_price) {
total = [total decimalNumberByAdding:model.line_price.priceValue];
}else{
total = [total decimalNumberByAdding:[model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]]];
}
}
self.lbTotalPrice.text = total.priceFormatted;
}
#pragma mark --KWMVariantsVCDelegate #pragma mark --KWMVariantsVCDelegate
-(void)kwm_setVariant:(KWMVariantsVC *)variantsVC variant:(BUYProductVariant *)variant color:(KWMColor *)color count:(NSInteger)count{ -(void)kwm_setVariant:(KWMVariantsVC *)variantsVC variant:(BUYProductVariant *)variant color:(KWMColor *)color count:(NSInteger)count{
for(KWMWish *wish in self.wishArray){ for(KWMWish *wish in self.wishArray){
...@@ -138,7 +116,6 @@ ...@@ -138,7 +116,6 @@
} }
if (!error) { if (!error) {
// [this showToast:@"添加成功"]; // [this showToast:@"添加成功"];
[this setTotalPrice];
//[this.btnShopCart setTitle:cart.item_count.stringValue forState:UIControlStateNormal]; //[this.btnShopCart setTitle:cart.item_count.stringValue forState:UIControlStateNormal];
//callback(YES); //callback(YES);
}else{ }else{
......
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