...
|
...
|
@@ -205,7 +205,8 @@ var Cart = { |
|
|
var dialog;
|
|
|
|
|
|
if (products.length) {
|
|
|
// Cart.showRemovedProducts(products, extraInfos);
|
|
|
//Cart.showRemovedProducts(products, extraInfos);
|
|
|
|
|
|
dialog = new _confirm({
|
|
|
content: '您确定要从购物车中删除该商品吗?',
|
|
|
cb: function() {
|
...
|
...
|
@@ -303,25 +304,39 @@ var Cart = { |
|
|
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 (callback) {
|
|
|
return callback();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}).show();
|
|
|
// callback存在说明从删除模块收藏
|
|
|
if (callback) {
|
|
|
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 (callback) {
|
|
|
return callback();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
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();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
|