|
@@ -75,11 +75,14 @@ ColorPanelAction = { |
|
@@ -75,11 +75,14 @@ ColorPanelAction = { |
75
|
var $item = $this.closest('li[data-role="pitem"]');
|
75
|
var $item = $this.closest('li[data-role="pitem"]');
|
76
|
|
76
|
|
77
|
// var pid = $item.data('pid');
|
77
|
// var pid = $item.data('pid');
|
|
|
78
|
+ var swapData = {};
|
78
|
var oldSku = $item.data('id');
|
79
|
var oldSku = $item.data('id');
|
79
|
var $size = $this.closest('.goods-choose-box').find('.choose-size .dt.active');
|
80
|
var $size = $this.closest('.goods-choose-box').find('.choose-size .dt.active');
|
80
|
var newSku = $size.data('sku');
|
81
|
var newSku = $size.data('sku');
|
81
|
var newSkn = $this.closest('.goods-info').data('skn');
|
82
|
var newSkn = $this.closest('.goods-info').data('skn');
|
82
|
var promotionId = $item.data('promotionid');
|
83
|
var promotionId = $item.data('promotionid');
|
|
|
84
|
+ var poolId = $item.data('pool-id');
|
|
|
85
|
+ var batchNo = $item.data('batch-no');
|
83
|
|
86
|
|
84
|
// 没有重新选择颜色-尺码,则不用重新请求显示
|
87
|
// 没有重新选择颜色-尺码,则不用重新请求显示
|
85
|
if (!oldSku || !newSku || oldSku === newSku) {
|
88
|
if (!oldSku || !newSku || oldSku === newSku) {
|
|
@@ -91,7 +94,23 @@ ColorPanelAction = { |
|
@@ -91,7 +94,23 @@ ColorPanelAction = { |
91
|
if ($item.data('isgift') || $item.data('ispricegift')) {
|
94
|
if ($item.data('isgift') || $item.data('ispricegift')) {
|
92
|
return capi.updateCartGiftItem(promotionId, newSkn, newSku);
|
95
|
return capi.updateCartGiftItem(promotionId, newSkn, newSku);
|
93
|
}
|
96
|
}
|
94
|
- capi.updateCartItem(newSku, oldSku);
|
97
|
+
|
|
|
98
|
+ swapData = {
|
|
|
99
|
+ buy_number: '1',
|
|
|
100
|
+ selected: 'Y',
|
|
|
101
|
+ new_product_sku: newSku,
|
|
|
102
|
+ old_product_sku: oldSku
|
|
|
103
|
+ }
|
|
|
104
|
+
|
|
|
105
|
+ // 套餐编辑尺码
|
|
|
106
|
+ if (poolId) {
|
|
|
107
|
+ $.extend(swapData, {
|
|
|
108
|
+ activity_id: poolId,
|
|
|
109
|
+ batch_no: batchNo
|
|
|
110
|
+ });
|
|
|
111
|
+ }
|
|
|
112
|
+
|
|
|
113
|
+ capi.updateCartItem(swapData);
|
95
|
},
|
114
|
},
|
96
|
_hideColorSizePanel: function($item) {
|
115
|
_hideColorSizePanel: function($item) {
|
97
|
$item.find('.goods-choose-box').hide();
|
116
|
$item.find('.goods-choose-box').hide();
|