...
|
...
|
@@ -230,6 +230,39 @@ Cart = { |
|
|
new _alert('请至少选中一件商品!').show();
|
|
|
}
|
|
|
},
|
|
|
/*
|
|
|
* 删除失效商品
|
|
|
* @function [removePro]
|
|
|
* @params { Array } products 商品列表
|
|
|
* @params { Array } extraInfos 删除商品额外信息
|
|
|
*/
|
|
|
removeInvalid: function(products, extraInfos) {
|
|
|
var dialog;
|
|
|
|
|
|
if (products.length) {
|
|
|
dialog = new _confirm({
|
|
|
content: '<p style="font-size:25px;margin-bottom:20px;">清除失效商品</p><p>确定要清除失效商品吗?</p>',
|
|
|
cb: function() {
|
|
|
dialog.close();
|
|
|
Util.ajax({
|
|
|
url: '/shopping/cart/product/remove',
|
|
|
data: {skuList: JSON.stringify(products)},
|
|
|
type: 'DELETE',
|
|
|
success: function(res) {
|
|
|
Util.refreshCart(res, function() {
|
|
|
Stepper.init();
|
|
|
|
|
|
// 显示或者更新删除商品模块
|
|
|
Cart.showRemovedProducts(products, extraInfos);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}).show();
|
|
|
} else {
|
|
|
new _alert('购物袋中没有失效商品!').show();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/*
|
|
|
* 显示或者更新删除商品模块
|
...
|
...
|
|