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
f0e99424711ddc48d0b234306885e788f591d93d
1 parent
8950e95e
send to favorite at least one
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
public/js/shopping/cart/cart.js
public/js/shopping/cart/cart.js
View file @
f0e9942
...
...
@@ -222,26 +222,30 @@ var Cart = {
var
msg
=
'确定要将该商品从购物车中移入收藏吗?<br/>移入收藏后该商品将不在购物车中显示'
;
var
dialog
;
if
(
products
.
length
>
1
)
{
msg
=
'确定要将已选中的商品从购物车中移入收藏吗?<br/>移入收藏后已选中的商品将不在购物车中显示'
;
}
dialog
=
new
_confirm
({
content
:
msg
,
cb
:
function
()
{
dialog
.
close
();
Util
.
ajax
({
url
:
'/shopping/cart/product/send_to_favorite'
,
type
:
'POST'
,
data
:
{
skuList
:
JSON
.
stringify
(
products
)},
success
:
function
(
res
)
{
Util
.
refreshCart
(
res
,
function
()
{
Stepper
.
init
();
});
}
});
if
(
!
products
.
length
)
{
new
_alert
(
'请至少选中一件商品!'
).
show
();
}
else
{
if
(
products
.
length
>
1
)
{
msg
=
'确定要将已选中的商品从购物车中移入收藏吗?<br/>移入收藏后已选中的商品将不在购物车中显示'
;
}
}).
show
();
dialog
=
new
_confirm
({
content
:
msg
,
cb
:
function
()
{
dialog
.
close
();
Util
.
ajax
({
url
:
'/shopping/cart/product/send_to_favorite'
,
type
:
'POST'
,
data
:
{
skuList
:
JSON
.
stringify
(
products
)},
success
:
function
(
res
)
{
Util
.
refreshCart
(
res
,
function
()
{
Stepper
.
init
();
});
}
});
}
}).
show
();
}
},
// 编辑商品的颜色和尺寸
...
...
Please
register
or
login
to post a comment