...
|
...
|
@@ -754,6 +754,7 @@ |
|
|
}
|
|
|
}*/
|
|
|
for(var i1=0;i1<$('.shopBox').length;i1++){
|
|
|
var goods_price = 0;
|
|
|
var freight = parseFloat($($('.shopBox')[i1]).attr('data-freight'));//运费
|
|
|
var free_freight = parseFloat($($('.shopBox')[i1]).attr('data-free_freight'));//满免运费
|
|
|
for(var i2=0;i2<$('.shopBox').eq(i1).find('ul li').length;i2++){
|
...
|
...
|
@@ -763,14 +764,16 @@ |
|
|
|
|
|
var subtotal = parseFloat($('.shopBox').eq(i1).find('ul li').eq(i2).find('.subtotalBox').html().split('¥')[1]);
|
|
|
totalPrice += subtotal;
|
|
|
goods_price += subtotal;
|
|
|
}else{
|
|
|
totalPrice -= freight;
|
|
|
}
|
|
|
}
|
|
|
if (totalPrice < free_freight) {
|
|
|
totalFreight += freight;
|
|
|
totalPrice += totalFreight;
|
|
|
}
|
|
|
if($("input[class='commodityCheck']:checked").length == 0){
|
|
|
totalPrice -= totalFreight;
|
|
|
console.log(goods_price);
|
|
|
console.log(free_freight);
|
|
|
console.log(totalPrice);
|
|
|
if (goods_price < free_freight) {
|
|
|
totalPrice += freight;
|
|
|
}
|
|
|
}
|
|
|
$('#totalCount').html(totalCount.toFixed(0));
|
...
|
...
|
|