Authored by 郭成尧

bundle-payment-ok

@@ -15,13 +15,13 @@ var $selectBtn = $('.select-btn'), @@ -15,13 +15,13 @@ var $selectBtn = $('.select-btn'),
15 /** 15 /**
16 * 选择商品颜色等 16 * 选择商品颜色等
17 */ 17 */
18 -$selectBtn.on('click', function () { 18 +$selectBtn.on('click', function() {
19 var self = $(this); 19 var self = $(this);
20 20
21 $.post('/product/detail/info', { 21 $.post('/product/detail/info', {
22 id: self.data('id'), 22 id: self.data('id'),
23 productSkn: self.data('skn') 23 productSkn: self.data('skn')
24 - }, function (data) { 24 + }, function(data) {
25 chosePanelRender(data); 25 chosePanelRender(data);
26 chosePanel.init(self.data('skn')); 26 chosePanel.init(self.data('skn'));
27 chosePanel.show(); 27 chosePanel.show();
@@ -31,7 +31,7 @@ $selectBtn.on('click', function () { @@ -31,7 +31,7 @@ $selectBtn.on('click', function () {
31 /** 31 /**
32 * 立即购买 32 * 立即购买
33 */ 33 */
34 -$buyNowBtn.on('click', function () { 34 +$buyNowBtn.on('click', function() {
35 var bundleGoods = [], 35 var bundleGoods = [],
36 bundleId = $('#activityId').val(), 36 bundleId = $('#activityId').val(),
37 gskn = $('span[id^="gskn"]'); 37 gskn = $('span[id^="gskn"]');
@@ -41,7 +41,7 @@ $buyNowBtn.on('click', function () { @@ -41,7 +41,7 @@ $buyNowBtn.on('click', function () {
41 return; 41 return;
42 } 42 }
43 43
44 - gskn.each(function () { 44 + gskn.each(function() {
45 if (!$(this).data('sku')) { 45 if (!$(this).data('sku')) {
46 tip.show('请为套餐商品选择属性'); 46 tip.show('请为套餐商品选择属性');
47 return; 47 return;
@@ -49,17 +49,16 @@ $buyNowBtn.on('click', function () { @@ -49,17 +49,16 @@ $buyNowBtn.on('click', function () {
49 49
50 bundleGoods.push({ 50 bundleGoods.push({
51 type: 'bundle', 51 type: 'bundle',
52 - skn: $(this).data('skn'),  
53 sku: $(this).data('sku'), 52 sku: $(this).data('sku'),
54 buy_number: 1 53 buy_number: 1
55 }); 54 });
56 }); 55 });
57 56
58 window.setCookie('bundle-info', JSON.stringify({ 57 window.setCookie('bundle-info', JSON.stringify({
59 - bundleGoods: bundleGoods,  
60 - bundleId: bundleId 58 + product_sku_list: bundleGoods,
  59 + activity_id: bundleId
61 })); 60 }));
62 61
63 window.location.href = 62 window.location.href =
64 - '/cart/index/orderEnsure?cartType=ordinary&bundleId=' + bundleId; 63 + '/cart/index/orderEnsure?cartType=bundle&activityType=bundle';
65 }); 64 });