|
@@ -12,7 +12,6 @@ var $ = require('jquery'), |
|
@@ -12,7 +12,6 @@ var $ = require('jquery'), |
12
|
var dialog = require('../me/dialog'),
|
12
|
var dialog = require('../me/dialog'),
|
13
|
tip = require('../plugin/tip');
|
13
|
tip = require('../plugin/tip');
|
14
|
|
14
|
|
15
|
-
|
|
|
16
|
var $names;
|
15
|
var $names;
|
17
|
|
16
|
|
18
|
//var $curDelPanel;
|
17
|
//var $curDelPanel;
|
|
@@ -55,25 +54,26 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { |
|
@@ -55,25 +54,26 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { |
55
|
} else {
|
54
|
} else {
|
56
|
$this.removeClass('icon-checkbox').addClass('icon-cb-checked');
|
55
|
$this.removeClass('icon-checkbox').addClass('icon-cb-checked');
|
57
|
}
|
56
|
}
|
58
|
- }
|
|
|
59
|
$.ajax({
|
57
|
$.ajax({
|
60
|
type: 'GET',
|
58
|
type: 'GET',
|
61
|
url: '/cart/index/getCartData',
|
59
|
url: '/cart/index/getCartData',
|
62
|
data: {
|
60
|
data: {
|
63
|
- id: id
|
61
|
+ skuList: JSON.stringfy(id)
|
64
|
},
|
62
|
},
|
65
|
success: function(data) {
|
63
|
success: function(data) {
|
66
|
if (data) {
|
64
|
if (data) {
|
67
|
$('#good-totalprice').html('¥' + data.commonCart.price);
|
65
|
$('#good-totalprice').html('¥' + data.commonCart.price);
|
68
|
$('#good-activityPrice').html('¥' + data.commonCart.activityPrice);
|
66
|
$('#good-activityPrice').html('¥' + data.commonCart.activityPrice);
|
69
|
- $('#good-total').html(data.commonCart.count + '件总计:¥' + data.commonCart.sumPrice);
|
67
|
+ $('#good-total').html('总计:¥' + data.commonCart.sumPrice +' (' + data.commonCart.count + '件)');
|
70
|
}
|
68
|
}
|
71
|
},
|
69
|
},
|
72
|
error: function() {
|
70
|
error: function() {
|
73
|
tip.show('网络错误');
|
71
|
tip.show('网络错误');
|
74
|
}
|
72
|
}
|
75
|
});
|
73
|
});
|
76
|
-
|
74
|
+ } else if(data.code === 200) {
|
|
|
75
|
+ tip.show('网络错误');
|
|
|
76
|
+ }
|
77
|
}).fail(function() {
|
77
|
}).fail(function() {
|
78
|
tip.show('网络错误');
|
78
|
tip.show('网络错误');
|
79
|
});
|
79
|
});
|