Authored by 郝肖肖

失效商品弹框 提示语修复

... ... @@ -581,32 +581,33 @@ Cart = {
* 清除失效商品
*/
removeInvalid: function() {
var invalidEles;
var invalidEles = $('.invalid-pros ul li.chk');
var products = [];
var dialog = new _confirm({
var dialog;
if (invalidEles.length <= 0) {
new _alert('购物袋中没有失效商品!').show();
return false;
}
dialog = new _confirm({
content: '<p style="font-size:25px;margin-bottom:20px;">清除失效商品</p><p>确定要清除失效商品吗?</p>',
cb: function() {
dialog.close();
invalidEles = $('.invalid-pros ul li.chk');
if (invalidEles.length > 0) {
$(invalidEles).each(function() {
products.push(JSON.parse($(this).attr('data-product_info')));
});
$(invalidEles).each(function() {
products.push(JSON.parse($(this).attr('data-product_info')));
});
Util.ajax({
url: '/shopping/cart/product/remove',
data: {skuList: JSON.stringify(products)},
type: 'DELETE',
success: function(res) {
Util.refreshCart(res, function() {
});
}
});
} else {
new _alert('购物袋中没有失效商品!').show();
}
Util.ajax({
url: '/shopping/cart/product/remove',
data: {skuList: JSON.stringify(products)},
type: 'DELETE',
success: function(res) {
Util.refreshCart(res, function() {
});
}
});
}
}).show();
}
... ...