|
@@ -32,13 +32,27 @@ $selectBtn.on('click', function() { |
|
@@ -32,13 +32,27 @@ $selectBtn.on('click', function() { |
32
|
* 立即购买
|
32
|
* 立即购买
|
33
|
*/
|
33
|
*/
|
34
|
$buyNowBtn.on('click', function() {
|
34
|
$buyNowBtn.on('click', function() {
|
|
|
35
|
+ var bundleGoods = [],
|
|
|
36
|
+ bundleId = $('#activityId').val();
|
|
|
37
|
+
|
35
|
$('span[id^="gskn"]').each(function() {
|
38
|
$('span[id^="gskn"]').each(function() {
|
36
|
if (!$(this).data('sku')) {
|
39
|
if (!$(this).data('sku')) {
|
37
|
tip.show('请为套餐商品选择属性');
|
40
|
tip.show('请为套餐商品选择属性');
|
38
|
return;
|
41
|
return;
|
39
|
}
|
42
|
}
|
40
|
|
43
|
|
41
|
- // TODO tar 已经获取到 sku
|
|
|
42
|
- console.log($(this).data('skn'), '-', $(this).data('sku'));
|
44
|
+ bundleGoods.push({
|
|
|
45
|
+ type: 'bundle',
|
|
|
46
|
+ sku: $(this).data('sku'),
|
|
|
47
|
+ buy_number: 1
|
|
|
48
|
+ });
|
43
|
});
|
49
|
});
|
|
|
50
|
+
|
|
|
51
|
+ window.setCookie('bundle-info', JSON.stringify({
|
|
|
52
|
+ bundleGoods: bundleGoods,
|
|
|
53
|
+ bundleId: bundleId
|
|
|
54
|
+ }));
|
|
|
55
|
+
|
|
|
56
|
+ window.location.href = '/cart/index/orderEnsure?cartType=ordinary&bundleId=' +
|
|
|
57
|
+ bundleId;
|
44
|
}); |
58
|
}); |