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
0185d337
Commit
0185d337
authored
Jul 19, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ui,fix checkout does not have uid,fix address country can not input 中国,App.Home data cache 24H
parent
e2b375ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
61 deletions
+74
-61
KWMAPIManager.m
iCemarose/Class/Api/KWMAPIManager.m
+3
-1
KWMRightProductCell.m
iCemarose/Class/UI/Category/Cell/KWMRightProductCell.m
+1
-0
KWMCategoryVC.m
iCemarose/Class/UI/Category/KWMCategoryVC.m
+4
-0
KWMVariantsVC.m
iCemarose/Class/UI/NewProduct/KWMVariantsVC.m
+1
-1
KWMNewVC.h
iCemarose/Class/UI/Product/KWMNewVC.h
+48
-48
KWMNewVC.m
iCemarose/Class/UI/Product/KWMNewVC.m
+0
-0
KWMBeforePayVC.m
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
+8
-5
KWMEditAddressVC.m
iCemarose/Class/UI/ShopCart/KWMEditAddressVC.m
+2
-1
KWMShopCartVC.m
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
+5
-3
Info.plist
iCemarose/Info.plist
+2
-2
No files found.
iCemarose/Class/Api/KWMAPIManager.m
View file @
0185d337
...
@@ -696,7 +696,9 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
...
@@ -696,7 +696,9 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
}
}
-
(
NSURLSessionDataTask
*
)
getHomeDataWithSuccess
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
KWMHomeDataResult
*
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
NSError
*
))
failure
{
-
(
NSURLSessionDataTask
*
)
getHomeDataWithSuccess
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
KWMHomeDataResult
*
))
success
failure
:
(
void
(
^
)(
NSURLSessionDataTask
*
,
NSError
*
))
failure
{
NSString
*
apiPath
=
@"https://ogbgohpla.qnssl.com/App.Home.json?32"
;
NSInteger
st
=
[[
NSDate
date
]
timeIntervalSince1970
];
st
=
st
-
st
%
86400
-
28800
;
NSString
*
apiPath
=
[
NSString
stringWithFormat
:
@"https://ogbgohpla.qnssl.com/App.Home.json?%ld"
,
st
];
return
[
self
startSessionTask
:
KWMHTTPMethodGET
apiPath
:
apiPath
parameters
:
nil
result
:
[
KWMHomeDataResult
class
]
model
:
nil
success
:
success
failure
:
failure
];
return
[
self
startSessionTask
:
KWMHTTPMethodGET
apiPath
:
apiPath
parameters
:
nil
result
:
[
KWMHomeDataResult
class
]
model
:
nil
success
:
success
failure
:
failure
];
}
}
...
...
iCemarose/Class/UI/Category/Cell/KWMRightProductCell.m
View file @
0185d337
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
}
}
_product
=
product
;
_product
=
product
;
NSArray
*
variantsArray
=
product
.
variantsArray
;
NSArray
*
variantsArray
=
product
.
variantsArray
;
self
.
lbTitle
.
text
=
product
.
vendor
;
if
(
variantsArray
&&
variantsArray
.
count
>
0
){
if
(
variantsArray
&&
variantsArray
.
count
>
0
){
BUYProductVariant
*
variant
=
variantsArray
.
firstObject
;
BUYProductVariant
*
variant
=
variantsArray
.
firstObject
;
// self.lbPrice.text = [KWMStringUtil price:variant.price];
// self.lbPrice.text = [KWMStringUtil price:variant.price];
...
...
iCemarose/Class/UI/Category/KWMCategoryVC.m
View file @
0185d337
...
@@ -56,6 +56,10 @@
...
@@ -56,6 +56,10 @@
self
.
title
=
@"分类"
;
self
.
title
=
@"分类"
;
}
}
+
(
NSString
*
)
kwmBoard
{
return
@"Main"
;
}
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
[
self
initData
];
[
self
initData
];
...
...
iCemarose/Class/UI/NewProduct/KWMVariantsVC.m
View file @
0185d337
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
}
}
self
.
vCount
.
hidden
=
self
.
wish
?
YES
:
NO
;
self
.
vCount
.
hidden
=
self
.
wish
?
YES
:
NO
;
self
.
lbCount
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
self
.
count
];
self
.
lbCount
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
self
.
count
];
self
.
lbPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormatted
:
self
.
totalPrice
];
self
.
lbPrice
.
text
=
[[
KWMCurrencyUtil
sharedInstance
]
priceFormatted
ByCurrencyCode
:
self
.
totalPrice
];
}
}
-
(
void
)
initCollectionView
{
-
(
void
)
initCollectionView
{
...
...
iCemarose/Class/UI/Product/KWMNewVC.h
View file @
0185d337
////
//// KWMNewVC.h
//// iCemarose
////
//// Created by 陈荣科 on 16/8/23.
//// Copyright © 2016年 kollway. All rights reserved.
////
//
//
// KWMNewVC.h
//#import "KWMBasePageVC.h"
// iCemarose
//#import "KWMSearchBar.h"
//
//#import "KWMNewGoodsCell.h"
// Created by 陈荣科 on 16/8/23.
//#import "KWMTBVSectionHeardView.h"
// Copyright © 2016年 kollway. All rights reserved.
//#import "UIColor+SAMAdditions.h"
//
//
////tab页-商品
#import "KWMBasePageVC.h"
//@interface KWMNewVC : KWMBasePageVC<UITableViewDelegate,UITableViewDataSource,KWMSearchBarDelegate,KWMNewGoodsCellDelegate,KWMTBVSectionHeardViewDelegate>
#import "KWMSearchBar.h"
//
#import "KWMNewGoodsCell.h"
//@property (weak, nonatomic) IBOutlet UIButton *btnBaby;
#import "KWMTBVSectionHeardView.h"
//
#import "UIColor+SAMAdditions.h"
//@property (weak, nonatomic) IBOutlet UIButton *btnGirl;
//
//tab页-商品
//@property (weak, nonatomic) IBOutlet UIButton *btnBoy;
@interface
KWMNewVC
:
KWMBasePageVC
<
UITableViewDelegate
,
UITableViewDataSource
,
KWMSearchBarDelegate
,
KWMNewGoodsCellDelegate
,
KWMTBVSectionHeardViewDelegate
>
//
//@property (weak, nonatomic) IBOutlet UIButton *btnShoes;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnBaby
;
//
//@property (weak, nonatomic) IBOutlet UIButton *btnNewGoods;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnGirl
;
//
//@property (weak, nonatomic) IBOutlet UIButton *btnDiscount;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnBoy
;
//
//@property (weak, nonatomic) IBOutlet UITableView *tbvNewGoods;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnShoes
;
//
//@property (weak, nonatomic) IBOutlet UIView *vLine;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnNewGoods
;
//
//@property (weak, nonatomic) IBOutlet UIView *vBackground;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnDiscount
;
//
//
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tbvNewGoods
;
//- (IBAction)onClickBabyBtn:(id)sender;
//
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vLine
;
//- (IBAction)onClickGirlBtn:(id)sender;
//
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vBackground
;
//- (IBAction)onClickBoyBtn:(id)sender;
//
//- (IBAction)onClickShoesBtn:(id)sender;
-
(
IBAction
)
onClickBabyBtn
:(
id
)
sender
;
//
//- (IBAction)onClickNewGoodsBtn:(id)sender;
-
(
IBAction
)
onClickGirlBtn
:(
id
)
sender
;
//
//- (IBAction)onClickDiscountBtn:(id)sender;
-
(
IBAction
)
onClickBoyBtn
:(
id
)
sender
;
//
//@end
-
(
IBAction
)
onClickShoesBtn
:(
id
)
sender
;
-
(
IBAction
)
onClickNewGoodsBtn
:(
id
)
sender
;
-
(
IBAction
)
onClickDiscountBtn
:(
id
)
sender
;
@end
iCemarose/Class/UI/Product/KWMNewVC.m
View file @
0185d337
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
View file @
0185d337
...
@@ -333,6 +333,7 @@
...
@@ -333,6 +333,7 @@
checkout
.
billingAddress
=
self
.
address
;
checkout
.
billingAddress
=
self
.
address
;
}
}
checkout
.
email
=
self
.
customer
.
email
;
checkout
.
email
=
self
.
customer
.
email
;
checkout
.
customerId
=
self
.
customer
.
identifier
;
// self.client.urlScheme = @"CemaroseApp://";
// self.client.urlScheme = @"CemaroseApp://";
// 走session的情况下应该不存在update 只是update cart自动会update到checkout
// 走session的情况下应该不存在update 只是update cart自动会update到checkout
// if(checkoutCache){
// if(checkoutCache){
...
@@ -719,13 +720,15 @@
...
@@ -719,13 +720,15 @@
[
self
.
navigationController
pushViewController
:
successVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
successVC
animated
:
YES
];
}
}
-
(
void
)
clearCheckout
{
-
(
void
)
clearCheckout
{
self
.
cartCookie
=
nil
;
self
.
cartCookie
=
nil
;
[[
KWMShoppingCart
sharedInstance
]
clearCartWithCallback
:
^
(
NSError
*
error
,
KWMCartResult
*
cart
)
{
[
KWMHttpUtil
deleteCookie
:
@"cart"
];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [[KWMShoppingCart sharedInstance] clearCartWithCallback:^(NSError *error, KWMCartResult *cart) {
[
KWMHttpUtil
deleteCookie
:
@"cart"
];
//// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// });
// [KWMHttpUtil deleteCookie:@"cart"];
}];
//// });
// }];
// [KWMHttpUtil deleteCookie:@"cart"];
// [KWMHttpUtil deleteCookie:@"cart"];
// [[KWMShopCartData alloc] removeAllItems];
// [[KWMShopCartData alloc] removeAllItems];
[
self
.
userDao
deleteCheckoutCache
];
[
self
.
userDao
deleteCheckoutCache
];
...
...
iCemarose/Class/UI/ShopCart/KWMEditAddressVC.m
View file @
0185d337
...
@@ -145,6 +145,7 @@
...
@@ -145,6 +145,7 @@
}
else
{
}
else
{
requestAddress
=
[[
BUYAddress
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
nil
];
requestAddress
=
[[
BUYAddress
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
nil
];
}
}
NSString
*
country
=
[
self
.
tfCountry
.
text
trim
];
requestAddress
.
lastName
=
[
self
.
tfName
.
text
trim
];
requestAddress
.
lastName
=
[
self
.
tfName
.
text
trim
];
requestAddress
.
phone
=
[
self
.
tfPhone
.
text
trim
];
requestAddress
.
phone
=
[
self
.
tfPhone
.
text
trim
];
requestAddress
.
province
=
[
self
.
tfProvince
.
text
trim
];
requestAddress
.
province
=
[
self
.
tfProvince
.
text
trim
];
...
@@ -152,7 +153,7 @@
...
@@ -152,7 +153,7 @@
requestAddress
.
city
=
[
self
.
tfCity
.
text
trim
];
requestAddress
.
city
=
[
self
.
tfCity
.
text
trim
];
requestAddress
.
address1
=
[
self
.
tfAddress
.
text
trim
];
requestAddress
.
address1
=
[
self
.
tfAddress
.
text
trim
];
requestAddress
.
address2
=
[
self
.
tfAddressDetail
.
text
trim
];
requestAddress
.
address2
=
[
self
.
tfAddressDetail
.
text
trim
];
requestAddress
.
country
=
[
self
.
tfCountry
.
text
trim
]
;
requestAddress
.
country
=
[
country
isEqualToString
:
@"中国"
]
?
@"China"
:
country
;
requestAddress
.
countryCode
=
@""
;
requestAddress
.
countryCode
=
@""
;
requestAddress
.
zip
=
[
self
.
tfZip
.
text
trim
];
requestAddress
.
zip
=
[
self
.
tfZip
.
text
trim
];
requestAddress
.
firstName
=
[(
requestAddress
.
firstName
?
requestAddress
.
firstName
:
@""
)
trim
];
requestAddress
.
firstName
=
[(
requestAddress
.
firstName
?
requestAddress
.
firstName
:
@""
)
trim
];
...
...
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
View file @
0185d337
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
#import "KWMUserModel.h"
#import "KWMUserModel.h"
#import "KWMLoginVC.h"
#import "KWMLoginVC.h"
#import "KWMShopCartData.h"
#import "KWMShopCartData.h"
#import "KWMNewVC.h"
//#import "KWMNewVC.h"
#import "KWMCategoryVC.h"
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMShoppingCart.h"
#import "KWMShoppingCart.h"
...
@@ -93,9 +94,10 @@
...
@@ -93,9 +94,10 @@
//点击随意逛逛
//点击随意逛逛
-
(
IBAction
)
onClickRandomBtn
:
(
id
)
sender
{
-
(
IBAction
)
onClickRandomBtn
:
(
id
)
sender
{
NSLog
(
@"点击了随意逛逛"
);
NSLog
(
@"点击了随意逛逛"
);
KWMNewVC
*
newVC
=
(
KWMNewVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMNewVC
kwmTag
]
fromStoryboard
:
@"Main"
];
//
KWMNewVC *newVC = (KWMNewVC *)[KWMBaseVC findControllerBy:[KWMNewVC kwmTag] fromStoryboard:@"Main"];
self
.
hidesBottomBarWhenPushed
=
NO
;
self
.
hidesBottomBarWhenPushed
=
NO
;
[
self
.
navigationController
pushViewController
:
newVC
animated
:
YES
];
KWMCategoryVC
*
vc
=
[
KWMCategoryVC
getNewInstance
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}
}
-
(
void
)
onClickComplete
:
(
id
)
sender
{
-
(
void
)
onClickComplete
:
(
id
)
sender
{
...
...
iCemarose/Info.plist
View file @
0185d337
...
@@ -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.5.
0
<
/string
>
<
string
>
1.5.
1
<
/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
>
2017071
812
<
/string
>
<
string
>
2017071
910
<
/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