Commit d9d17148 by lee

Merge branch 'master' of git.oschina.net:kollway-kollway/newcemarose

parents 2b7089a3 b56408f9
......@@ -15,8 +15,6 @@
@interface KWMWishListVC ()
@property (weak,nonatomic) IBOutlet UILabel *lbTotalPrice;
@property (weak,nonatomic) IBOutlet UITableView *tbvWish;
@property(nonatomic) NSMutableArray *wishArray;
......@@ -40,12 +38,6 @@
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[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{
......@@ -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
-(void)kwm_setVariant:(KWMVariantsVC *)variantsVC variant:(BUYProductVariant *)variant color:(KWMColor *)color count:(NSInteger)count{
for(KWMWish *wish in self.wishArray){
......@@ -138,7 +116,6 @@
}
if (!error) {
// [this showToast:@"添加成功"];
[this setTotalPrice];
//[this.btnShopCart setTitle:cart.item_count.stringValue forState:UIControlStateNormal];
//callback(YES);
}else{
......
......@@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -1646,7 +1646,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="puG-Vo-gdd">
<rect key="frame" x="0.0" y="234" width="375" height="200"/>
<rect key="frame" x="0.0" y="259" width="375" height="150"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="你可能关心的问题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T4V-4O-WbC">
<rect key="frame" x="128" y="0.0" width="120" height="21"/>
......@@ -1682,7 +1682,7 @@
<action selector="onClickGetTime:" destination="iFV-ZT-0zX" eventType="touchUpInside" id="27h-gg-ltV"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3ni-BC-6WW">
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3ni-BC-6WW">
<rect key="frame" x="132" y="177" width="110" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="110" id="N0D-kQ-eGq"/>
......@@ -1704,7 +1704,7 @@
<constraint firstItem="3ni-BC-6WW" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="CqI-1L-ERJ"/>
<constraint firstItem="3ni-BC-6WW" firstAttribute="top" secondItem="3iW-9e-nhE" secondAttribute="bottom" constant="35" id="ISt-z3-thL"/>
<constraint firstItem="T4V-4O-WbC" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="MvE-KT-EgQ"/>
<constraint firstAttribute="height" constant="200" id="Wbe-Fv-YHk"/>
<constraint firstAttribute="height" constant="150" id="Wbe-Fv-YHk"/>
<constraint firstItem="3MF-En-1mW" firstAttribute="top" secondItem="T4V-4O-WbC" secondAttribute="bottom" constant="34" id="b1r-Lb-cP7"/>
<constraint firstItem="3MF-En-1mW" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="sVI-Au-PtI"/>
<constraint firstItem="3iW-9e-nhE" firstAttribute="top" secondItem="3MF-En-1mW" secondAttribute="bottom" constant="35" id="wpN-Nc-3yi"/>
......
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