Authored by 郭成尧

bundle-payment-ok

... ... @@ -15,13 +15,13 @@ var $selectBtn = $('.select-btn'),
/**
* 选择商品颜色等
*/
$selectBtn.on('click', function () {
$selectBtn.on('click', function() {
var self = $(this);
$.post('/product/detail/info', {
id: self.data('id'),
productSkn: self.data('skn')
}, function (data) {
}, function(data) {
chosePanelRender(data);
chosePanel.init(self.data('skn'));
chosePanel.show();
... ... @@ -31,7 +31,7 @@ $selectBtn.on('click', function () {
/**
* 立即购买
*/
$buyNowBtn.on('click', function () {
$buyNowBtn.on('click', function() {
var bundleGoods = [],
bundleId = $('#activityId').val(),
gskn = $('span[id^="gskn"]');
... ... @@ -41,7 +41,7 @@ $buyNowBtn.on('click', function () {
return;
}
gskn.each(function () {
gskn.each(function() {
if (!$(this).data('sku')) {
tip.show('请为套餐商品选择属性');
return;
... ... @@ -49,17 +49,16 @@ $buyNowBtn.on('click', function () {
bundleGoods.push({
type: 'bundle',
skn: $(this).data('skn'),
sku: $(this).data('sku'),
buy_number: 1
});
});
window.setCookie('bundle-info', JSON.stringify({
bundleGoods: bundleGoods,
bundleId: bundleId
product_sku_list: bundleGoods,
activity_id: bundleId
}));
window.location.href =
'/cart/index/orderEnsure?cartType=ordinary&bundleId=' + bundleId;
'/cart/index/orderEnsure?cartType=bundle&activityType=bundle';
});
... ...