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
f8f9c8a3
Commit
f8f9c8a3
authored
Sep 04, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u chechout logic
parent
5ce74fef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
KWMBeforePayVC.m
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
+13
-9
No files found.
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
View file @
f8f9c8a3
...
...
@@ -119,8 +119,8 @@
this
.
address
=
address
;
this
.
checkout
=
checkout
;
[
this
showToast
:
@"更新地址成功"
];
[
this
initData
];
[
this
flushCheckout
:
dictionary
];
//
[this initData];
// [this.userDao saveCheckoutCache:checkout.JSONDictionary];
}
else
{
...
...
@@ -317,7 +317,7 @@
if
(
!
checkoutCache
||
self
.
cartCookie
)
{
checkout
=
[[
BUYCheckout
alloc
]
initWithModelManager
:
self
.
client
.
modelManager
JSONDictionary
:
nil
];
}
if
(
self
.
address
){
//
if(self.address){
if
([
self
checkAddress
:
self
.
address
]){
KWMSelectAddressVC
*
addressVC
=
(
KWMSelectAddressVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMSelectAddressVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
addressVC
.
checkout
=
checkout
;
...
...
@@ -333,7 +333,7 @@
}
checkout
.
shippingAddress
=
self
.
address
;
checkout
.
billingAddress
=
self
.
address
;
}
//
}
checkout
.
email
=
self
.
customer
.
email
;
checkout
.
customerId
=
self
.
customer
.
identifier
;
// self.client.urlScheme = @"CemaroseApp://";
...
...
@@ -565,17 +565,21 @@
[
this
hideLoading
];
BUYCheckout
*
checkout
=
[
this
.
client
.
modelManager
insertCheckoutWithJSONDictionary
:
responseObject
[
@"checkout"
]];
this
.
checkout
=
checkout
;
[
this
initData
];
[
this
.
userDao
saveCheckoutCache
:
responseObject
[
@"checkout"
]];
if
(
this
.
checkout
.
shippingAddress
&&
!
this
.
checkout
.
shippingRate
)
{
[
this
requestShippingData
];
}
[
self
flushCheckout
:
responseObject
[
@"checkout"
]];
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
[
this
hideLoading
];
[
this
showError
:
error
];
}];
}
-
(
void
)
flushCheckout
:
(
NSDictionary
*
)
dic
{
[
self
initData
];
[
self
.
userDao
saveCheckoutCache
:
dic
];
if
(
self
.
checkout
.
shippingAddress
&&
!
self
.
checkout
.
shippingRate
)
{
[
self
requestShippingData
];
}
}
-
(
void
)
requestShippingData
{
if
(
self
.
checkout
==
nil
){
return
;
...
...
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