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
b87fb731
Commit
b87fb731
authored
7 years ago
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉首面 等待时间|加入brand deeplink
parent
289771d9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
14 deletions
+32
-14
AppDelegate+Deeplink.m
iCemarose/Class/AppDelegate+Deeplink.m
+23
-9
Brand.storyboard
iCemarose/Class/UI/Brand/Brand.storyboard
+2
-2
KWMBrandCaramelVC.m
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
+4
-0
KWMMainVC.m
iCemarose/Class/UI/KWMMainVC.m
+1
-1
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+1
-1
KWMShopCartVC.m
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
+1
-1
No files found.
iCemarose/Class/AppDelegate+Deeplink.m
View file @
b87fb731
...
...
@@ -13,22 +13,36 @@
#import "KWMSelectedGoodsVC.h"
#import "KWMBlogDetailVC.h"
#import "KWMNewProductVC.h"
#import "KWMBrandCaramelVC.h"
@implementation
AppDelegate
(
Deeplink
)
-
(
UINavigationController
*
)
navigationController
{
return
[[
AppDelegate
mainViewController
]
selectedViewController
];
}
-
(
void
)
registerRouter
{
JLRoutes
*
routes
=
[
JLRoutes
routesForScheme
:
@"cemarose"
];
[
routes
addRoute
:
@"/collections/:handle/*"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
NSArray
*
tags
=
parameters
[
JLRouteWildcardComponentsKey
];
NSString
*
handle
=
parameters
[
@"handle"
];
tags
=
tags
.
count
>
0
?
[
tags
[
0
]
componentsSeparatedByString
:
@"+"
]
:
nil
;
// NSArray *tags = [parameters[JLRouteWildcardComponentsKey] componentsSeparatedByString:@"+"];
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"];
KWMSelectedGoodsVC
*
selectedGoodsVC
=
(
KWMSelectedGoodsVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMSelectedGoodsVC
kwmTag
]
fromStoryboard
:
@"New"
];
selectedGoodsVC
.
handle
=
parameters
[
@"handle"
];
selectedGoodsVC
.
ctags
=
tags
;
selectedGoodsVC
.
title
=
parameters
[
@"title"
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
selectedGoodsVC
animated
:
YES
];
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"
];
if
([
brands
containsObject
:
handle
])
{
KWMBrandCaramelVC
*
brandCaramelVC
=
[
KWMBrandCaramelVC
getNewInstance
];
brandCaramelVC
.
isSale
=
NO
;
brandCaramelVC
.
handle
=
handle
;
brandCaramelVC
.
brand
=
handle
;
[[
self
navigationController
]
pushViewController
:
brandCaramelVC
animated
:
NO
];
}
else
{
KWMSelectedGoodsVC
*
selectedGoodsVC
=
(
KWMSelectedGoodsVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMSelectedGoodsVC
kwmTag
]
fromStoryboard
:
@"New"
];
selectedGoodsVC
.
handle
=
handle
;
selectedGoodsVC
.
ctags
=
tags
;
selectedGoodsVC
.
title
=
parameters
[
@"title"
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
selectedGoodsVC
animated
:
NO
];
}
return
YES
;
}];
[
routes
addRoute
:
@"/products/:id"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
...
...
@@ -38,7 +52,7 @@
// productDetailVC.product = brandCell.leftProduct;
vc
.
handle
=
parameters
[
@"id"
];
// NSLog(@"%@",[AppDelegate mainViewController].selectedViewController);
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
vc
animated
:
YES
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
vc
animated
:
NO
];
return
YES
;
}];
[
routes
addRoute
:
@"/blogs/:blog/:handle"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
...
...
@@ -46,7 +60,7 @@
blogDetailVC
.
handle
=
parameters
[
@"handle"
];
blogDetailVC
.
type
=
KWMContentTypeBlog
;;
blogDetailVC
.
title
=
parameters
[
@"title"
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
blogDetailVC
animated
:
YES
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
blogDetailVC
animated
:
NO
];
return
YES
;
}];
[
routes
addRoute
:
@"/pages/:handle"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
...
...
@@ -54,7 +68,7 @@
blogDetailVC
.
handle
=
parameters
[
@"handle"
];
blogDetailVC
.
type
=
KWMContentTypePage
;
blogDetailVC
.
title
=
parameters
[
@"title"
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
blogDetailVC
animated
:
YES
];
[[
AppDelegate
mainViewController
].
selectedViewController
pushViewController
:
blogDetailVC
animated
:
NO
];
return
YES
;
}];
}
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/Brand/Brand.storyboard
View file @
b87fb731
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1212
1
"
systemVersion=
"16F73"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"1212
0
"
systemVersion=
"16F73"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
</device>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1208
9
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"1208
8
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
View file @
b87fb731
...
...
@@ -43,6 +43,10 @@
return
@"KWMBrandCaramelVC"
;
}
+
(
NSString
*
)
kwmBoard
{
return
@"Brand"
;
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
self
.
navigationController
setNavigationBarHidden
:
YES
];
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/KWMMainVC.m
View file @
b87fb731
...
...
@@ -36,7 +36,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
requestExchangeRateApi
];
[
self
initSplash
];
//
[self initSplash];
[
self
loadTabBar
];
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
BOOL
registerSuccess
=
[
defaults
boolForKey
:
KEY_USER_REGISTER
];
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
b87fb731
...
...
@@ -555,7 +555,7 @@
NSDictionary
*
customerDict
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"customer"
];
BUYCustomer
*
customer
=
[[
BUYCustomer
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
customerDict
];
BUYProductVariant
*
variant
=
self
.
variant
;
if
(
!
customer
||
!
variant
){
if
(
!
(
customer
&&
customer
.
identifier
&&
variant
)
){
return
;
}
NSDictionary
*
parament
=
@{
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
View file @
b87fb731
...
...
@@ -255,7 +255,7 @@
// price += [model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]].integerValue;
total
=
[
total
decimalNumberByAdding
:[
model
.
price
.
priceValue
decimalNumberByMultiplyingBy
:[
NSDecimalNumber
decimalNumberWithString
:
@
(
model
.
quantity
).
stringValue
]]];
// FIXME: 这里要bug
total
=
[
total
decimalNumberByAdding
:
nil
];
//
total = [total decimalNumberByAdding:nil];
}
}
// _lbTotalPrice.text = [NSString stringWithFormat: @"¥%@",[KWMStringUtil getEUR2CNYstring:@(price)]];
...
...
This diff is collapsed.
Click to expand it.
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