|
@@ -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({
|
|
|
60
|
- type: 'GET',
|
|
|
61
|
- url: '/cart/index/getCartData',
|
|
|
62
|
- data: {
|
|
|
63
|
- id: id
|
|
|
64
|
- },
|
|
|
65
|
- success: function(data) {
|
|
|
66
|
- if (data) {
|
|
|
67
|
- $('#good-totalprice').html('¥' + data.commonCart.price);
|
|
|
68
|
- $('#good-activityPrice').html('¥' + data.commonCart.activityPrice);
|
|
|
69
|
- $('#good-total').html(data.commonCart.count + '件总计:¥' + data.commonCart.sumPrice);
|
57
|
+ $.ajax({
|
|
|
58
|
+ type: 'GET',
|
|
|
59
|
+ url: '/cart/index/getCartData',
|
|
|
60
|
+ data: {
|
|
|
61
|
+ skuList: JSON.stringfy(id)
|
|
|
62
|
+ },
|
|
|
63
|
+ success: function(data) {
|
|
|
64
|
+ if (data) {
|
|
|
65
|
+ $('#good-totalprice').html('¥' + data.commonCart.price);
|
|
|
66
|
+ $('#good-activityPrice').html('¥' + data.commonCart.activityPrice);
|
|
|
67
|
+ $('#good-total').html('总计:¥' + data.commonCart.sumPrice +' (' + data.commonCart.count + '件)');
|
|
|
68
|
+ }
|
|
|
69
|
+ },
|
|
|
70
|
+ error: function() {
|
|
|
71
|
+ tip.show('网络错误');
|
70
|
}
|
72
|
}
|
71
|
- },
|
|
|
72
|
- error: function() {
|
|
|
73
|
- tip.show('网络错误');
|
|
|
74
|
- }
|
|
|
75
|
- });
|
|
|
76
|
-
|
73
|
+ });
|
|
|
74
|
+ } else if(data.code === 200) {
|
|
|
75
|
+ tip.show('网络错误');
|
|
|
76
|
+ }
|
77
|
}).fail(function() {
|
77
|
}).fail(function() {
|
78
|
tip.show('网络错误');
|
78
|
tip.show('网络错误');
|
79
|
});
|
79
|
});
|