|
@@ -76,6 +76,39 @@ $('.yoho-group a').hover(function() { |
|
@@ -76,6 +76,39 @@ $('.yoho-group a').hover(function() { |
76
|
$(this).text(data.en);
|
76
|
$(this).text(data.en);
|
77
|
});
|
77
|
});
|
78
|
|
78
|
|
|
|
79
|
+$bagGoodsList.on('click', '.del-good-btn', function() {
|
|
|
80
|
+ var $this = $(this),
|
|
|
81
|
+ data = $this.data();
|
|
|
82
|
+ var list = [];
|
|
|
83
|
+
|
|
|
84
|
+ if (!data) {
|
|
|
85
|
+ return;
|
|
|
86
|
+ }
|
|
|
87
|
+
|
|
|
88
|
+ list.push({
|
|
|
89
|
+ goods_type: data.type,
|
|
|
90
|
+ buy_number: data.num,
|
|
|
91
|
+ selected: 'Y',
|
|
|
92
|
+ product_sku: data.sku,
|
|
|
93
|
+ promotion_id: data.pid
|
|
|
94
|
+ });
|
|
|
95
|
+ $.ajax({
|
|
|
96
|
+ type: 'DELETE',
|
|
|
97
|
+ url: '/shopping/cart/product/remove',
|
|
|
98
|
+ data: {skuList: JSON.stringify(list)},
|
|
|
99
|
+ success: function(result) {
|
|
|
100
|
+ var num = parseInt($bagNum.text(), 10) || 0;
|
|
|
101
|
+
|
|
|
102
|
+ if (result.code === 200) {
|
|
|
103
|
+ num = num - data.num;
|
|
|
104
|
+ $bagNum.text(num);
|
|
|
105
|
+ $this.closest('.goods-item').remove();
|
|
|
106
|
+ }
|
|
|
107
|
+ }
|
|
|
108
|
+ });
|
|
|
109
|
+
|
|
|
110
|
+});
|
|
|
111
|
+
|
79
|
$('.contain-third').on({
|
112
|
$('.contain-third').on({
|
80
|
mouseenter: function() {
|
113
|
mouseenter: function() {
|
81
|
var $thirdWrapper = $(this).children('.third-nav-wrapper');
|
114
|
var $thirdWrapper = $(this).children('.third-nav-wrapper');
|