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
e10d4c3f
Commit
e10d4c3f
authored
Feb 08, 2018
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.6.5(1.6.5.4)
parent
27ec3fbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
84 additions
and
15 deletions
+84
-15
LaunchScreen.storyboard
iCemarose/Base.lproj/LaunchScreen.storyboard
+1
-1
KWMAPIManager.h
iCemarose/Class/Api/KWMAPIManager.h
+4
-0
KWMAPIManager.m
iCemarose/Class/Api/KWMAPIManager.m
+5
-0
AppDelegate+Deeplink.m
iCemarose/Class/AppDelegate+Deeplink.m
+2
-2
Brand.storyboard
iCemarose/Class/UI/Brand/Brand.storyboard
+7
-6
KWMBrandCaramelVC.m
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
+13
-4
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+20
-0
KWMVariantsVC.m
iCemarose/Class/UI/NewProduct/KWMVariantsVC.m
+30
-0
NewProduct.storyboard
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
+0
-0
Info.plist
iCemarose/Info.plist
+2
-2
No files found.
iCemarose/Base.lproj/LaunchScreen.storyboard
View file @
e10d4c3f
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<constraint
firstAttribute=
"height"
constant=
"24"
id=
"x1H-Jw-5lD"
/>
<constraint
firstAttribute=
"height"
constant=
"24"
id=
"x1H-Jw-5lD"
/>
</constraints>
</constraints>
</imageView>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"v 1.6.
4
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ytF-B2-drm"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"v 1.6.
5
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ytF-B2-drm"
>
<rect
key=
"frame"
x=
"168"
y=
"631"
width=
"39"
height=
"16"
/>
<rect
key=
"frame"
x=
"168"
y=
"631"
width=
"39"
height=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.40000000000000002"
green=
"0.40000000000000002"
blue=
"0.40000000000000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
iCemarose/Class/Api/KWMAPIManager.h
View file @
e10d4c3f
...
@@ -190,6 +190,10 @@
...
@@ -190,6 +190,10 @@
success
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMNewProducts
*
result
))
success
success
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMNewProducts
*
result
))
success
failure
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
;
failure
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
;
-
(
NSURLSessionDataTask
*
)
checkStockInChina
:(
NSDictionary
*
)
parameters
success
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
KWMDictionaryResult
*
result
))
success
failure
:(
void
(
^
)(
NSURLSessionDataTask
*
task
,
NSError
*
error
))
failure
;
/**
/**
* 商品——打折API
* 商品——打折API
* @return NSURLSessionDataTask
* @return NSURLSessionDataTask
...
...
iCemarose/Class/Api/KWMAPIManager.m
View file @
e10d4c3f
...
@@ -778,6 +778,11 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -778,6 +778,11 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
failure
:
failure
];
failure
:
failure
];
}
}
-
(
NSURLSessionDataTask
*
)
checkStockInChina
:
(
NSDictionary
*
)
parameters
success
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
KWMDictionaryResult
*
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
NSError
*
))
failure
{
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://%@/app/variant-inventory"
,
WishList_API_DOMAIN
];
return
[
self
startSessionTask
:
KWMHTTPMethodGET
apiPath
:
apiPath
parameters
:
parameters
result
:
[
KWMDictionaryResult
class
]
model
:
nil
success
:
success
failure
:
failure
];
}
/**
/**
* 商品——打折API
* 商品——打折API
*/
*/
...
...
iCemarose/Class/AppDelegate+Deeplink.m
View file @
e10d4c3f
...
@@ -46,8 +46,8 @@ static NSMutableDictionary *controllerCache = nil;
...
@@ -46,8 +46,8 @@ static NSMutableDictionary *controllerCache = nil;
tags
=
tags
.
count
>
0
?
[
tags
[
0
]
componentsSeparatedByString
:
@"+"
]
:
nil
;
tags
=
tags
.
count
>
0
?
[
tags
[
0
]
componentsSeparatedByString
:
@"+"
]
:
nil
;
// NSArray *tags = [parameters[JLRouteWildcardComponentsKey] componentsSeparatedByString:@"+"];
// NSArray *tags = [parameters[JLRouteWildcardComponentsKey] componentsSeparatedByString:@"+"];
NSLog
(
@"trace tags %@"
,[
tags
componentsJoinedByString
:
@","
]);
NSLog
(
@"trace tags %@"
,[
tags
componentsJoinedByString
:
@","
]);
NSArray
*
brands
=
@[
@"amelie-wang"
,
@"babywalker"
,
@"beau-loves"
,
@"billieblush"
,
@"billybandit"
,
@"bonpoint"
,
@"burberry"
,
@"caramel"
,
@"chloe"
,
@"collegien"
,
@"dolce-gabbana"
,
@"emile-et-ida"
,
@"fendi"
,
@"gucci"
,
@"hucklebones"
,
@"il-gufo"
,
@"indikidual"
,
@"karl-lagerfeld-kids"
,
@"kenzo"
,
@"lanvin"
,
@"little-marc-jacobs"
,
@"loud-apparel"
,
@"louis-louise"
,
@"louise-misha"
,
@"marie-chantal"
,
@"marni"
,
@"mini-melissa"
,
@"mini-rodini"
,
@"mischka-aoki"
,
@"moncler"
,
@"moschino"
,
@"msgm"
,
@"nailmatic"
,
@"nana-huchy"
,
@"noukies"
,
@"oeuf"
,
@"patachou"
,
@"paul-smith"
,
@"pepe"
,
@"sons-daughters-eyewear"
,
@"stella-mccartney-kids"
,
@"story-loris"
,
@"tartine-et-chocolat"
,
@"the-animals-observatory"
,
@"tiny-cottons"
,
@"veja"
,
@"young-versace"
,
@"zadig-voltaire"
,
@"wolf-rita"
,
@"tip-toey-joey"
,
@"givenchy"
];
NSArray
*
brands
=
@[
@"amelie-wang"
,
@"babywalker"
,
@"beau-loves"
,
@"billieblush"
,
@"billybandit"
,
@"bonpoint"
,
@"burberry"
,
@"caramel"
,
@"chloe"
,
@"collegien"
,
@"dolce-gabbana"
,
@"emile-et-ida"
,
@"fendi"
,
@"gucci"
,
@"hucklebones"
,
@"il-gufo"
,
@"indikidual"
,
@"karl-lagerfeld-kids"
,
@"kenzo"
,
@"lanvin"
,
@"little-marc-jacobs"
,
@"loud-apparel"
,
@"louis-louise"
,
@"louise-misha"
,
@"marie-chantal"
,
@"marni"
,
@"mini-melissa"
,
@"mini-rodini"
,
@"mischka-aoki"
,
@"moncler"
,
@"moschino"
,
@"msgm"
,
@"nailmatic"
,
@"nana-huchy"
,
@"noukies"
,
@"oeuf"
,
@"patachou"
,
@"paul-smith"
,
@"pepe"
,
@"sons-daughters-eyewear"
,
@"stella-mccartney-kids"
,
@"story-loris"
,
@"tartine-et-chocolat"
,
@"the-animals-observatory"
,
@"tiny-cottons"
,
@"veja"
,
@"young-versace"
,
@"zadig-voltaire"
,
@"wolf-rita"
,
@"tip-toey-joey"
,
@"givenchy"
,
@"pintuan"
];
NSDictionary
*
brandNames
=
@{
@"amelie-wang"
:
@"Amelie Wang"
,
@"babywalker"
:
@"Babywalker"
,
@"beau-loves"
:
@"Beau Loves"
,
@"billieblush"
:
@"Billieblush"
,
@"billybandit"
:
@"Billybandit"
,
@"bonpoint"
:
@"Bonpoint"
,
@"burberry"
:
@"Burberry"
,
@"caramel"
:
@"Caramel"
,
@"chloe"
:
@"Chloé"
,
@"dolce-gabbana"
:
@"Dolce & Gabbana"
,
@"emile-et-ida"
:
@"Emile et Ida"
,
@"fendi"
:
@"Fendi"
,
@"givenchy"
:
@"Givenchy"
,
@"gucci"
:
@"Gucci"
,
@"hucklebones"
:
@"Hucklebones"
,
@"il-gufo"
:
@"Il Gufo"
,
@"indikidual"
:
@"Indikidual"
,
@"karl-lagerfeld-kids"
:
@"Karl Lagerfeld Kids"
,
@"kenzo"
:
@"Kenzo"
,
@"lanvin"
:
@"Lanvin"
,
@"little-marc-jacobs"
:
@"Little Marc Jacobs"
,
@"loud-apparel"
:
@"Loud Apparel"
,
@"louis-louise"
:
@"Louis Louise"
,
@"louise-misha"
:
@"Louise Misha"
,
@"marie-chantal"
:
@"Marie-Chantal"
,
@"marni"
:
@"Marni"
,
@"mini-melissa"
:
@"Mini Melissa"
,
@"mini-rodini"
:
@"Mini Rodini"
,
@"mischka-aoki"
:
@"Mischka Aoki"
,
@"moncler"
:
@"Moncler"
,
@"moschino"
:
@"MOSCHINO"
,
@"msgm"
:
@"MSGM"
,
@"nailmatic"
:
@"Nailmatic"
,
@"nana-huchy"
:
@"Nana Huchy"
,
@"noukies"
:
@"Noukie's"
,
@"oeuf"
:
@"Oeuf"
,
@"patachou"
:
@"Patachou"
,
@"paul-smith"
:
@"Paul Smith"
,
@"pepe"
:
@"PèPè"
,
@"sons-daughters-eyewear"
:
@"Sons + Daughters Eyewear"
,
@"stella-mccartney-kids"
:
@"Stella McCartney Kids"
,
@"story-loris"
:
@"Story Loris"
,
@"tartine-et-chocolat"
:
@"Tartine et Chocolat"
,
@"the-animals-observatory"
:
@"The Animals Observatory"
,
@"tiny-cottons"
:
@"Tiny Cottons"
,
@"tip-toey-joey"
:
@"Tip Toey Joey"
,
@"veja"
:
@"Veja"
,
@"young-versace"
:
@"Young Versace"
,
@"zadig-voltaire"
:
@"Zadig & Voltaire"
,
@"wolf-rita"
:
@"Wolf & Rita"
};
NSDictionary
*
brandNames
=
@{
@"amelie-wang"
:
@"Amelie Wang"
,
@"babywalker"
:
@"Babywalker"
,
@"beau-loves"
:
@"Beau Loves"
,
@"billieblush"
:
@"Billieblush"
,
@"billybandit"
:
@"Billybandit"
,
@"bonpoint"
:
@"Bonpoint"
,
@"burberry"
:
@"Burberry"
,
@"caramel"
:
@"Caramel"
,
@"chloe"
:
@"Chloé"
,
@"dolce-gabbana"
:
@"Dolce & Gabbana"
,
@"emile-et-ida"
:
@"Emile et Ida"
,
@"fendi"
:
@"Fendi"
,
@"givenchy"
:
@"Givenchy"
,
@"gucci"
:
@"Gucci"
,
@"hucklebones"
:
@"Hucklebones"
,
@"il-gufo"
:
@"Il Gufo"
,
@"indikidual"
:
@"Indikidual"
,
@"karl-lagerfeld-kids"
:
@"Karl Lagerfeld Kids"
,
@"kenzo"
:
@"Kenzo"
,
@"lanvin"
:
@"Lanvin"
,
@"little-marc-jacobs"
:
@"Little Marc Jacobs"
,
@"loud-apparel"
:
@"Loud Apparel"
,
@"louis-louise"
:
@"Louis Louise"
,
@"louise-misha"
:
@"Louise Misha"
,
@"marie-chantal"
:
@"Marie-Chantal"
,
@"marni"
:
@"Marni"
,
@"mini-melissa"
:
@"Mini Melissa"
,
@"mini-rodini"
:
@"Mini Rodini"
,
@"mischka-aoki"
:
@"Mischka Aoki"
,
@"moncler"
:
@"Moncler"
,
@"moschino"
:
@"MOSCHINO"
,
@"msgm"
:
@"MSGM"
,
@"nailmatic"
:
@"Nailmatic"
,
@"nana-huchy"
:
@"Nana Huchy"
,
@"noukies"
:
@"Noukie's"
,
@"oeuf"
:
@"Oeuf"
,
@"patachou"
:
@"Patachou"
,
@"paul-smith"
:
@"Paul Smith"
,
@"pepe"
:
@"PèPè"
,
@"sons-daughters-eyewear"
:
@"Sons + Daughters Eyewear"
,
@"stella-mccartney-kids"
:
@"Stella McCartney Kids"
,
@"story-loris"
:
@"Story Loris"
,
@"tartine-et-chocolat"
:
@"Tartine et Chocolat"
,
@"the-animals-observatory"
:
@"The Animals Observatory"
,
@"tiny-cottons"
:
@"Tiny Cottons"
,
@"tip-toey-joey"
:
@"Tip Toey Joey"
,
@"veja"
:
@"Veja"
,
@"young-versace"
:
@"Young Versace"
,
@"zadig-voltaire"
:
@"Zadig & Voltaire"
,
@"wolf-rita"
:
@"Wolf & Rita"
,
@"pintuan"
:
@"拼团专场"
};
//将handle的转化放到这里,转化之前将没转化过的handle存为标题
//将handle的转化放到这里,转化之前将没转化过的handle存为标题
NSString
*
title
=
handle
;
NSString
*
title
=
handle
;
// handle = [[KWMStringUtil deleteOtherCharExceptLetterWithLine:handle] lowercaseString];
// handle = [[KWMStringUtil deleteOtherCharExceptLetterWithLine:handle] lowercaseString];
...
...
iCemarose/Class/UI/Brand/Brand.storyboard
View file @
e10d4c3f
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13
529
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13
771
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
527
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
772
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<customFonts
key=
"customFonts"
>
<customFonts
key=
"customFonts"
>
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kkz-NK-BGC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"64"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IcS-3H-XUB"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"IcS-3H-XUB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"94"
width=
"375"
height=
"573"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"94"
width=
"375"
height=
"573"
/>
<color
key=
"backgroundColor"
red=
"0.95686274509803915"
green=
"0.96078431372549022"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
key=
"backgroundColor"
red=
"0.95686274509803915"
green=
"0.96078431372549022"
blue=
"0.96862745098039216"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
@@ -128,10 +132,6 @@
...
@@ -128,10 +132,6 @@
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"HK4-OE-vEa"
/>
<constraint
firstAttribute=
"height"
constant=
"30"
id=
"HK4-OE-vEa"
/>
</constraints>
</constraints>
</view>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kkz-NK-BGC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"64"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
</subviews>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraints>
...
@@ -161,6 +161,7 @@
...
@@ -161,6 +161,7 @@
<connections>
<connections>
<outlet
property=
"btnBottom"
destination=
"lgS-Wb-cuc"
id=
"yWf-RS-4uY"
/>
<outlet
property=
"btnBottom"
destination=
"lgS-Wb-cuc"
id=
"yWf-RS-4uY"
/>
<outlet
property=
"filterTab"
destination=
"hDa-nl-Tlr"
id=
"bN8-Bj-AEj"
/>
<outlet
property=
"filterTab"
destination=
"hDa-nl-Tlr"
id=
"bN8-Bj-AEj"
/>
<outlet
property=
"filterTabTopConstraint"
destination=
"5UQ-kj-JaO"
id=
"6sK-SX-ufP"
/>
<outlet
property=
"filterView"
destination=
"Cy8-TS-7aW"
id=
"bXn-6V-4bg"
/>
<outlet
property=
"filterView"
destination=
"Cy8-TS-7aW"
id=
"bXn-6V-4bg"
/>
<outlet
property=
"ivBrand"
destination=
"bSu-Ww-ztC"
id=
"i4m-wL-R2a"
/>
<outlet
property=
"ivBrand"
destination=
"bSu-Ww-ztC"
id=
"i4m-wL-R2a"
/>
<outlet
property=
"tbvBrandCaramel"
destination=
"IcS-3H-XUB"
id=
"Op2-g8-Z4j"
/>
<outlet
property=
"tbvBrandCaramel"
destination=
"IcS-3H-XUB"
id=
"Op2-g8-Z4j"
/>
...
...
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
View file @
e10d4c3f
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
@property
(
nonatomic
)
KWMBarandSelectView
*
barandSelectView
;
@property
(
nonatomic
)
KWMBarandSelectView
*
barandSelectView
;
@property
(
nonatomic
)
NSArray
<
BUYProduct
*>
*
productArr
;
@property
(
nonatomic
)
NSArray
<
BUYProduct
*>
*
productArr
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
filterTabTopConstraint
;
@end
@end
@implementation
KWMBrandCaramelVC
{
@implementation
KWMBrandCaramelVC
{
...
@@ -50,14 +51,22 @@
...
@@ -50,14 +51,22 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
if
(
!
[
self
.
handle
isEqualToString
:
@"pintuan"
])
{
[
self
initHeaderView
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
[
self
initHeaderView
];
}
else
{
self
.
title
=
self
.
brand
;
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
self
.
filterTabTopConstraint
.
constant
=
0
;
}
}
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
super
viewWillDisappear
:
animated
];
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
if
(
!
[
self
.
handle
isEqualToString
:
@"pintuan"
])
{
[
_barandSelectView
removeFromSuperview
];
[
self
.
navigationController
setNavigationBarHidden
:
NO
];
[
_barandSelectView
removeFromSuperview
];
}
}
}
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
...
...
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
e10d4c3f
...
@@ -41,10 +41,20 @@
...
@@ -41,10 +41,20 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnLike
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnLike
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
shareBtn
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
addToCartBtn
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
buyNowBtn
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightMidView
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightMidView
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
detailView2HeightConstraint
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
detailView2HeightConstraint
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
buyNowBtnRightConstraint
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
buyNowBtnLeftConstraint
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
buyNowBtnWidthConstraint
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
midDetailViewTopConstraint
;
// 0 非自动 1 是加购 2 是立即购买
// 0 非自动 1 是加购 2 是立即购买
@property
(
assign
,
nonatomic
)
NSInteger
autoAddToBag
;
@property
(
assign
,
nonatomic
)
NSInteger
autoAddToBag
;
...
@@ -149,6 +159,16 @@
...
@@ -149,6 +159,16 @@
BOOL
isShowContactUs
=
isMoncler
&&
!
isBusiness
;
BOOL
isShowContactUs
=
isMoncler
&&
!
isBusiness
;
self
.
vBottomBar
.
hidden
=
isShowContactUs
;
self
.
vBottomBar
.
hidden
=
isShowContactUs
;
self
.
btnContactUs
.
hidden
=
!
isShowContactUs
;
self
.
btnContactUs
.
hidden
=
!
isShowContactUs
;
if
([
self
.
product
.
tags
containsObject
:
@"PinTuan"
])
{
CGFloat
width
=
self
.
addToCartBtn
.
frame
.
size
.
width
;
self
.
addToCartBtn
.
hidden
=
YES
;
self
.
buyNowBtnLeftConstraint
.
constant
=
width
-
40
;
self
.
buyNowBtnRightConstraint
.
constant
=
-
(
width
-
80
);
self
.
buyNowBtnWidthConstraint
.
constant
=
-
120
;
[
self
.
buyNowBtn
setTitle
:
@"我要拼团"
forState
:
UIControlStateNormal
];
self
.
midDetailViewTopConstraint
.
constant
=
104
;
self
.
shareBtn
.
hidden
=
YES
;
}
}
}
}
}
...
...
iCemarose/Class/UI/NewProduct/KWMVariantsVC.m
View file @
e10d4c3f
...
@@ -40,6 +40,10 @@
...
@@ -40,6 +40,10 @@
@property
(
nonatomic
)
NSArray
<
BUYProductVariant
*>
*
variantArray
;
@property
(
nonatomic
)
NSArray
<
BUYProductVariant
*>
*
variantArray
;
@property
(
weak
,
nonatomic
)
NSURLSessionDataTask
*
lastCheckStockInChinaTask
;
@property
(
nonatomic
)
NSMutableDictionary
*
stockInChinas
;
//請求api拿到的admin 規格列表,主要使用到其中的庫存剩餘字段
//請求api拿到的admin 規格列表,主要使用到其中的庫存剩餘字段
@property
(
nonatomic
)
NSArray
<
KWMVariants
*>
*
adminVariantArray
;
@property
(
nonatomic
)
NSArray
<
KWMVariants
*>
*
adminVariantArray
;
...
@@ -54,6 +58,7 @@
...
@@ -54,6 +58,7 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
[
self
initView
];
[
self
initView
];
self
.
stockInChinas
=
[
NSMutableDictionary
new
];
}
}
-
(
void
)
viewDidLayoutSubviews
{
-
(
void
)
viewDidLayoutSubviews
{
...
@@ -273,6 +278,16 @@
...
@@ -273,6 +278,16 @@
headerLabel
.
text
=
indexPath
.
section
==
0
?
sizeTitle
:
colorTitle
;
headerLabel
.
text
=
indexPath
.
section
==
0
?
sizeTitle
:
colorTitle
;
[
headView
addSubview
:
headerLabel
];
[
headView
addSubview
:
headerLabel
];
NSNumber
*
stockInChina
=
[
self
.
stockInChinas
objectForKey
:
self
.
selectVariant
.
sku
];
if
(
stockInChina
.
boolValue
)
{
CGSize
headerSize
=
[
sizeTitle
sizeWithAttributes
:@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
12
.
5
]}];
UILabel
*
stockInChina
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
50
+
headerSize
.
width
,
15
,
80
,
30
)];
stockInChina
.
text
=
@"国内现货"
;
stockInChina
.
font
=
[
UIFont
systemFontOfSize
:
12
.
5
];
stockInChina
.
textColor
=
[
UIColor
sam_colorWithHex
:
@"F1929A"
];
[
headView
addSubview
:
stockInChina
];
}
return
headView
;
return
headView
;
}
}
...
@@ -337,6 +352,7 @@
...
@@ -337,6 +352,7 @@
}
}
self
.
selectVariant
=
variant
;
self
.
selectVariant
=
variant
;
self
.
selectAdminVariant
=
adminVariant
;
self
.
selectAdminVariant
=
adminVariant
;
[
self
checkStockInChina
:
variant
.
sku
];
[
self
.
cvVariants
reloadData
];
[
self
.
cvVariants
reloadData
];
[
self
initUI
];
[
self
initUI
];
}
else
if
(
indexPath
.
section
==
1
){
}
else
if
(
indexPath
.
section
==
1
){
...
@@ -357,6 +373,20 @@
...
@@ -357,6 +373,20 @@
}
}
}
}
-
(
void
)
checkStockInChina
:
(
NSString
*
)
sku
{
[
self
.
lastCheckStockInChinaTask
cancel
];
self
.
lastCheckStockInChinaTask
=
nil
;
if
([
self
.
stockInChinas
objectForKey
:
sku
])
{
return
;
}
__weak
typeof
(
self
)
this
=
self
;
self
.
lastCheckStockInChinaTask
=
[
self
.
api
checkStockInChina
:@{
@"sku"
:
sku
}
success
:
^
(
NSURLSessionDataTask
*
task
,
KWMDictionaryResult
*
result
)
{
NSNumber
*
status
=
result
.
data
[
@"status"
];
[
this
.
stockInChinas
setObject
:
status
forKey
:
sku
];
[
this
.
cvVariants
reloadData
];
}
failure
:
nil
];
}
#pragma mark -- API KWMAPIManager getAdminProduct
#pragma mark -- API KWMAPIManager getAdminProduct
-
(
void
)
requestAdminProduct
:
(
NSNumber
*
)
productId
{
-
(
void
)
requestAdminProduct
:
(
NSNumber
*
)
productId
{
if
(
productId
==
nil
){
if
(
productId
==
nil
){
...
...
iCemarose/Class/UI/NewProduct/NewProduct.storyboard
View file @
e10d4c3f
This diff is collapsed.
Click to expand it.
iCemarose/Info.plist
View file @
e10d4c3f
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.6.
4
<
/string
>
<
string
>
1.6.
5
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.6.4
<
/string
>
<
string
>
1.6.
5.
4
<
/string
>
<
k
e
y
>
ITSAppUsesNonExemptEncryption
<
/k
e
y
>
<
k
e
y
>
ITSAppUsesNonExemptEncryption
<
/k
e
y
>
<
fa
ls
e
/
>
<
fa
ls
e
/
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
...
...
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