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
00cee153
Commit
00cee153
authored
Nov 07, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我喜欢的页面-去除购物车显示
parent
47fdce39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
113 deletions
+3
-113
KWMWishListVC.m
iCemarose/Class/UI/NewProduct/KWMWishListVC.m
+0
-23
NewProduct.storyboard
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
+3
-90
No files found.
iCemarose/Class/UI/NewProduct/KWMWishListVC.m
View file @
00cee153
...
...
@@ -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
{
...
...
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
View file @
00cee153
...
...
@@ -5,7 +5,7 @@
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
3
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1317
4
"
/>
<capability
name=
"Aspect ratio constraints"
minToolsVersion=
"5.1"
/>
<capability
name=
"Constraints with non-1.0 multipliers"
minToolsVersion=
"5.1"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
...
...
@@ -537,110 +537,23 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
hidden=
"YES"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
allowsSelection=
"NO"
rowHeight=
"174"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Gm0-oI-7rN"
>
<rect
key=
"frame"
x=
"0.0"
y=
"10"
width=
"375"
height=
"
539
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"10"
width=
"375"
height=
"
657
"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<connections>
<outlet
property=
"dataSource"
destination=
"fOt-KO-9Ov"
id=
"Bcs-TC-UeS"
/>
<outlet
property=
"delegate"
destination=
"fOt-KO-9Ov"
id=
"zUC-zC-t5H"
/>
</connections>
</tableView>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kFe-LP-nvv"
userLabel=
"vPrice"
>
<rect
key=
"frame"
x=
"0.0"
y=
"549"
width=
"375"
height=
"118"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥ 0.00"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"SFr-ds-7t9"
>
<rect
key=
"frame"
x=
"157.5"
y=
"15"
width=
"60.5"
height=
"28"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Medium"
family=
"PingFang SC"
pointSize=
"20"
/>
<color
key=
"textColor"
red=
"0.94509803920000002"
green=
"0.57254901960000004"
blue=
"0.60392156860000001"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"b33-Xg-vbc"
>
<rect
key=
"frame"
x=
"40"
y=
"53"
width=
"295"
height=
"50"
/>
<subviews>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5Rk-6T-lK0"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"118"
height=
"50"
/>
<state
key=
"normal"
title=
"快速购买"
>
<color
key=
"titleColor"
red=
"0.22352941179999999"
green=
"0.22352941179999999"
blue=
"0.22352941179999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</state>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"uc2-hz-nIz"
>
<rect
key=
"frame"
x=
"118"
y=
"0.0"
width=
"177"
height=
"50"
/>
<color
key=
"backgroundColor"
red=
"0.14117647059999999"
green=
"0.14117647059999999"
blue=
"0.14117647059999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<fontDescription
key=
"fontDescription"
name=
"PingFangSC-Regular"
family=
"PingFang SC"
pointSize=
"15"
/>
<state
key=
"normal"
title=
"加入购物车"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"uc2-hz-nIz"
firstAttribute=
"width"
secondItem=
"5Rk-6T-lK0"
secondAttribute=
"width"
multiplier=
"1.5"
id=
"Dp4-gn-Ic1"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"uc2-hz-nIz"
secondAttribute=
"trailing"
id=
"IlD-Oa-JxK"
/>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"JPb-LF-Swj"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"uc2-hz-nIz"
secondAttribute=
"bottom"
id=
"ObQ-bk-z6W"
/>
<constraint
firstItem=
"5Rk-6T-lK0"
firstAttribute=
"top"
secondItem=
"b33-Xg-vbc"
secondAttribute=
"top"
id=
"Tqm-xC-wWw"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"5Rk-6T-lK0"
secondAttribute=
"bottom"
id=
"XFg-8n-6SS"
/>
<constraint
firstItem=
"5Rk-6T-lK0"
firstAttribute=
"leading"
secondItem=
"b33-Xg-vbc"
secondAttribute=
"leading"
id=
"cH2-y9-NT5"
/>
<constraint
firstItem=
"uc2-hz-nIz"
firstAttribute=
"top"
secondItem=
"b33-Xg-vbc"
secondAttribute=
"top"
id=
"nUo-Bu-QeP"
/>
<constraint
firstItem=
"uc2-hz-nIz"
firstAttribute=
"leading"
secondItem=
"5Rk-6T-lK0"
secondAttribute=
"trailing"
id=
"xkK-SZ-cVd"
/>
</constraints>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"KME-g8-0dp"
>
<rect
key=
"frame"
x=
"40"
y=
"53"
width=
"295"
height=
"50"
/>
<color
key=
"backgroundColor"
red=
"0.14117647059999999"
green=
"0.14117647059999999"
blue=
"0.14117647059999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"5Wx-pY-Hib"
/>
</constraints>
<state
key=
"normal"
title=
"结算"
>
<color
key=
"titleColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</state>
<connections>
<action
selector=
"onClickComplete:"
destination=
"fOt-KO-9Ov"
eventType=
"touchUpInside"
id=
"fYb-h4-MUt"
/>
</connections>
</button>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"b66-L6-qYh"
userLabel=
"line"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.84705882349999995"
green=
"0.85882352939999995"
blue=
"0.87058823529999996"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"y89-fj-aLL"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"b33-Xg-vbc"
secondAttribute=
"bottom"
constant=
"15"
id=
"25Q-5u-k6H"
/>
<constraint
firstAttribute=
"height"
relation=
"greaterThanOrEqual"
constant=
"118"
id=
"5lP-r0-Suh"
/>
<constraint
firstItem=
"SFr-ds-7t9"
firstAttribute=
"centerX"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"centerX"
id=
"7va-KE-hxf"
/>
<constraint
firstItem=
"b66-L6-qYh"
firstAttribute=
"top"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"top"
id=
"AJX-Ay-uGf"
/>
<constraint
firstItem=
"b66-L6-qYh"
firstAttribute=
"leading"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"leading"
id=
"HbJ-cy-ROs"
/>
<constraint
firstAttribute=
"height"
constant=
"118"
id=
"L0W-aN-7LN"
/>
<constraint
firstItem=
"SFr-ds-7t9"
firstAttribute=
"top"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"top"
constant=
"15"
id=
"No5-OE-AqH"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"KME-g8-0dp"
secondAttribute=
"trailing"
constant=
"40"
id=
"TUa-ke-dHk"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"KME-g8-0dp"
secondAttribute=
"bottom"
constant=
"15"
id=
"nJO-b2-P19"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"b66-L6-qYh"
secondAttribute=
"trailing"
id=
"oHD-39-dga"
/>
<constraint
firstItem=
"KME-g8-0dp"
firstAttribute=
"leading"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"leading"
constant=
"40"
id=
"ofB-zy-yf5"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"b33-Xg-vbc"
secondAttribute=
"trailing"
constant=
"40"
id=
"qX5-9n-DbR"
/>
<constraint
firstItem=
"b33-Xg-vbc"
firstAttribute=
"leading"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"leading"
constant=
"40"
id=
"rSA-eO-SYD"
/>
</constraints>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"5lP-r0-Suh"
/>
</mask>
</variation>
</view>
</subviews>
<color
key=
"backgroundColor"
red=
"0.95686274509803915"
green=
"0.96078431372549022"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstItem=
"kFe-LP-nvv"
firstAttribute=
"leading"
secondItem=
"UGP-zP-RNr"
secondAttribute=
"leading"
id=
"9TG-wq-MX9"
/>
<constraint
firstItem=
"Gm0-oI-7rN"
firstAttribute=
"leading"
secondItem=
"UGP-zP-RNr"
secondAttribute=
"leading"
id=
"K3h-xm-oGl"
/>
<constraint
firstItem=
"Gm0-oI-7rN"
firstAttribute=
"top"
secondItem=
"UGP-zP-RNr"
secondAttribute=
"top"
constant=
"10"
id=
"R3B-xM-pgh"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"trailing"
id=
"RR3-mH-23B"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Gm0-oI-7rN"
secondAttribute=
"trailing"
id=
"Ybf-hR-Ibz"
/>
<constraint
firstItem=
"kFe-LP-nvv"
firstAttribute=
"top"
secondItem=
"Gm0-oI-7rN"
secondAttribute=
"bottom"
id=
"yvS-NU-8xK"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"kFe-LP-nvv"
secondAttribute=
"bottom"
id=
"zBx-sm-Y8E"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Gm0-oI-7rN"
secondAttribute=
"bottom"
id=
"pjC-oG-3Jr"
/>
</constraints>
</view>
<connections>
<outlet
property=
"lbTotalPrice"
destination=
"SFr-ds-7t9"
id=
"MJr-m5-hj9"
/>
<outlet
property=
"tbvWish"
destination=
"Gm0-oI-7rN"
id=
"gcz-oK-W6j"
/>
</connections>
</viewController>
...
...
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