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
f5007424
Commit
f5007424
authored
Jul 05, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.oschina.net/kollway-kollway/newcemarose
parents
992d3f7d
5a894330
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
8 deletions
+36
-8
AppDelegate.h
iCemarose/AppDelegate.h
+1
-1
AppDelegate.m
iCemarose/AppDelegate.m
+5
-0
AppDelegate+Deeplink.m
iCemarose/Class/AppDelegate+Deeplink.m
+7
-0
KWMSearchBrandVC.m
iCemarose/Class/UI/Brand/KWMSearchBrandVC.m
+5
-1
KWMProductDetailVC.h
iCemarose/Class/UI/Product/KWMProductDetailVC.h
+5
-0
KWMProductDetailVC.m
iCemarose/Class/UI/Product/KWMProductDetailVC.m
+9
-4
KWMSelectedGoodsVC.h
iCemarose/Class/UI/Product/KWMSelectedGoodsVC.h
+2
-0
UIViewController+AppearLog.m
iCemarose/Class/UIViewController+AppearLog.m
+1
-1
Info.plist
iCemarose/Info.plist
+1
-1
No files found.
iCemarose/AppDelegate.h
View file @
f5007424
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
(
void
)
toLogin
;
-
(
void
)
toLogin
;
-
(
void
)
toGuide
;
-
(
void
)
toGuide
;
+
(
UITabBarController
*
)
mainViewController
;
@end
@end
iCemarose/AppDelegate.m
View file @
f5007424
...
@@ -83,6 +83,11 @@
...
@@ -83,6 +83,11 @@
return
YES
;
return
YES
;
}
}
+
(
UIViewController
*
)
mainViewController
{
UIViewController
*
vc
=
[[[[
UIApplication
sharedApplication
]
delegate
]
window
]
rootViewController
];
return
vc
;
}
//去到引导界面
//去到引导界面
-
(
void
)
toGuide
{
-
(
void
)
toGuide
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"Guide"
bundle
:
nil
];
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"Guide"
bundle
:
nil
];
...
...
iCemarose/Class/AppDelegate+Deeplink.m
View file @
f5007424
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
#import "AppDelegate+Deeplink.h"
#import "AppDelegate+Deeplink.h"
#import <JLRoutes/JLRoutes.h>
#import <JLRoutes/JLRoutes.h>
#import "AppDelegate.h"
#import "KWMProductDetailVC.h"
#import "KWMSelectedGoodsVC.h"
@implementation
AppDelegate
(
Deeplink
)
@implementation
AppDelegate
(
Deeplink
)
...
@@ -20,6 +23,10 @@
...
@@ -20,6 +23,10 @@
}];
}];
[
routes
addRoute
:
@"/products/:id"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
[
routes
addRoute
:
@"/products/:id"
handler
:
^
BOOL
(
NSDictionary
<
NSString
*
,
id
>
*
_Nonnull
parameters
)
{
NSLog
(
@"product id %@"
,
parameters
[
@"id"
]);
NSLog
(
@"product id %@"
,
parameters
[
@"id"
]);
// KWMProductDetailVC *productDetailVC = (KWMProductDetailVC*)[KWMBaseVC findControllerBy:[KWMProductDetailVC kwmTag] fromStoryboard:@"New"];
// productDetailVC.product = brandCell.leftProduct;
// productDetailVC.handle = parameters[@"id"];
// [[AppDelegate mainViewController].selectedViewController.navigationController pushViewController:productDetailVC animated:YES];
return
YES
;
return
YES
;
}];
}];
}
}
...
...
iCemarose/Class/UI/Brand/KWMSearchBrandVC.m
View file @
f5007424
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMBrandCaramelVC.h"
#import "KWMBrandCaramelVC.h"
#import "KWMSearchBrandsCell.h"
#import "KWMSearchBrandsCell.h"
#import <RXCollections/RXCollection.h>
...
@@ -298,7 +299,10 @@ static NSString *identify = @"KWMSearchBrandsCell";
...
@@ -298,7 +299,10 @@ static NSString *identify = @"KWMSearchBrandsCell";
if
([
weakSelf
hasCemaroseError
:
result
]){
if
([
weakSelf
hasCemaroseError
:
result
]){
return
;
return
;
}
}
NSArray
*
indexArray
=
[
result
.
brands
arrayWithPinYinFirstLetterFormat
];
// NSArray *indexArray= [result.brands arrayWithPinYinFirstLetterFormat];
NSArray
*
indexArray
=
[[
result
.
brands
rx_filterWithBlock
:
^
BOOL
(
id
each
)
{
return
each
&&
each
!=
[
NSNull
null
];
}]
arrayWithPinYinFirstLetterFormat
];
_dataArray
=
[
NSMutableArray
arrayWithArray
:
indexArray
];
_dataArray
=
[
NSMutableArray
arrayWithArray
:
indexArray
];
[
weakSelf
.
tbvSearchBrand
reloadData
];
[
weakSelf
.
tbvSearchBrand
reloadData
];
};
};
...
...
iCemarose/Class/UI/Product/KWMProductDetailVC.h
View file @
f5007424
...
@@ -14,4 +14,9 @@
...
@@ -14,4 +14,9 @@
@property
(
nonatomic
)
NSNumber
*
productId
;
@property
(
nonatomic
)
NSNumber
*
productId
;
/**
* SKU 人为定义的SKU
*/
@property
(
nonatomic
)
NSString
*
handle
;
@end
@end
iCemarose/Class/UI/Product/KWMProductDetailVC.m
View file @
f5007424
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
[
self
initRecommendProduct
];
[
self
initRecommendProduct
];
// [self initShopCartCount];
// [self initShopCartCount];
//刷新product,如果是缓存的product,因为没有字典,所以会发生错误,需要重新请求一个有字典的product
//刷新product,如果是缓存的product,因为没有字典,所以会发生错误,需要重新请求一个有字典的product
if
(
self
.
product
&&
self
.
product
.
identifier
&&
!
self
.
product
.
JSONDictionary
){
if
(
!
self
.
handle
||
(
self
.
product
&&
self
.
product
.
identifier
&&
!
self
.
product
.
JSONDictionary
)
){
[
self
getProductBy
:
nil
product
:
self
.
product
];
[
self
getProductBy
:
nil
product
:
self
.
product
];
}
}
NSArray
*
types
=
@[
@"baby"
,
@"girls"
,
@"boys"
,
@"shoes"
,
@"newborn"
];
NSArray
*
types
=
@[
@"baby"
,
@"girls"
,
@"boys"
,
@"shoes"
,
@"newborn"
];
...
@@ -441,11 +441,11 @@
...
@@ -441,11 +441,11 @@
//查找商品API
//查找商品API
-
(
void
)
getProductBy
:
(
NSNumber
*
)
productId
product
:
(
BUYProduct
*
)
product
{
-
(
void
)
getProductBy
:
(
NSNumber
*
)
productId
product
:
(
BUYProduct
*
)
product
{
if
(
productId
==
nil
&&
product
==
nil
){
if
(
productId
==
nil
&&
product
==
nil
&&
!
self
.
handle
){
return
;
return
;
}
}
[
self
showLoading
];
[
self
showLoading
];
[
self
.
client
getProductById
:
productId
?
productId
:
product
.
identifier
completion
:
^
(
BUYProduct
*
_Nullable
product
,
NSError
*
_Nullable
error
)
{
void
(
^
completion
)(
BUYProduct
*
,
NSError
*
)
=
^
(
BUYProduct
*
_Nullable
product
,
NSError
*
_Nullable
error
)
{
[
self
hideLoading
];
[
self
hideLoading
];
if
(
product
!=
nil
&&
error
==
nil
)
{
if
(
product
!=
nil
&&
error
==
nil
)
{
self
.
product
=
product
;
self
.
product
=
product
;
...
@@ -456,7 +456,12 @@
...
@@ -456,7 +456,12 @@
self
.
product
=
nil
;
self
.
product
=
nil
;
[
self
showError
:
error
];
[
self
showError
:
error
];
}
}
}];
};
if
(
self
.
handle
)
{
[
self
.
client
getProductByHandle
:
self
.
handle
completion
:
completion
];
}
else
{
[
self
.
client
getProductById
:
productId
?
productId
:
product
.
identifier
completion
:
completion
];
}
}
}
...
...
iCemarose/Class/UI/Product/KWMSelectedGoodsVC.h
View file @
f5007424
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
@property
(
nonatomic
)
BOOL
isLoading
;
@property
(
nonatomic
)
BOOL
isLoading
;
@property
(
strong
,
nonatomic
)
NSArray
*
ctags
;
@property
(
nonatomic
)
KWMProductType
*
productType
;
@property
(
nonatomic
)
KWMProductType
*
productType
;
@property
(
nonatomic
)
BUYCollectionSort
collectionSort
;
@property
(
nonatomic
)
BUYCollectionSort
collectionSort
;
...
...
iCemarose/Class/UIViewController+AppearLog.m
View file @
f5007424
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#import <JRSwizzle/JRSwizzle.h>
#import <JRSwizzle/JRSwizzle.h>
@implementation
UIViewController
(
AppearLog
)
@implementation
UIViewController
(
AppearLog
)
#if DEBUG
#if DEBUG
|| 1
+
(
void
)
load
+
(
void
)
load
{
{
[
self
jr_swizzleMethod
:
@selector
(
viewWillAppear
:)
withMethod
:
@selector
(
logViewWillAppear
:
)
error
:
nil
];
[
self
jr_swizzleMethod
:
@selector
(
viewWillAppear
:)
withMethod
:
@selector
(
logViewWillAppear
:
)
error
:
nil
];
...
...
iCemarose/Info.plist
View file @
f5007424
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,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
>
20170
60917
<
/string
>
<
string
>
20170
70509
<
/string
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
k
e
y
>
LSApplicationQueriesSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
weixin
<
/string
>
<
string
>
weixin
<
/string
>
...
...
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