Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
jinhu.tung
9 years ago
Commit
c79df398140f297b4c9e59315f6018f97e1b2629
1 parent
4d9f998d
catch error
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
apps/shopping/controllers/cart.js
apps/shopping/controllers/cart.js
View file @
c79df39
...
...
@@ -50,7 +50,7 @@ exports.changeProductNum = (req, res, next) => {
sku
,
goodTpye
}).
then
(
result
=>
{
//console.log('changeProductNum-INCREASE-result:', result);
//
console.log('changeProductNum-INCREASE-result:', result);
if
(
result
.
code
===
200
)
{
cartModel
.
getCartData
(
shoppingKey
,
uid
).
then
(
cartData
=>
{
res
.
json
(
_
.
merge
(
...
...
@@ -71,7 +71,7 @@ exports.changeProductNum = (req, res, next) => {
sku
,
goodTpye
}).
then
(
result
=>
{
//console.log('changeProductNum-DECREASE-result:', JSON.stringify(result));
//
console.log('changeProductNum-DECREASE-result:', JSON.stringify(result));
if
(
result
.
code
===
200
)
{
cartModel
.
getCartData
(
shoppingKey
,
uid
).
then
(
cartData
=>
{
res
.
json
(
_
.
merge
(
...
...
@@ -105,10 +105,10 @@ exports.removeProduct = (req, res, next) => {
_
.
merge
(
params
,
{
product_sku_list
:
productSkuList
});
}
//console.log('remove---params:', params);
//
console.log('remove---params:', params);
cartModel
.
removeGoods
(
params
).
then
(
result
=>
{
//console.log('remove-result:', result);
//
console.log('remove-result:', result);
res
.
json
(
_
.
merge
(
cartModel
.
filterCartData
(
result
,
uid
),
{
code
:
result
.
code
,
message
:
result
.
message
}));
}).
catch
(
next
);
};
...
...
Please
register
or
login
to post a comment