Authored by 郭成尧

verify-data

... ... @@ -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,11 +31,17 @@ $selectBtn.on('click', function() {
/**
* 立即购买
*/
$buyNowBtn.on('click', function() {
$buyNowBtn.on('click', function () {
var bundleGoods = [],
bundleId = $('#activityId').val();
bundleId = $('#activityId').val(),
gskn = $('span[id^="gskn"]');
$('span[id^="gskn"]').each(function() {
if (gskn.length < 1) {
tip.show('非法请求!');
return;
}
gskn.each(function () {
if (!$(this).data('sku')) {
tip.show('请为套餐商品选择属性');
return;
... ... @@ -43,6 +49,7 @@ $buyNowBtn.on('click', function() {
bundleGoods.push({
type: 'bundle',
skn: $(this).data('skn'),
sku: $(this).data('sku'),
buy_number: 1
});
... ... @@ -53,6 +60,6 @@ $buyNowBtn.on('click', function() {
bundleId: bundleId
}));
window.location.href = '/cart/index/orderEnsure?cartType=ordinary&bundleId=' +
bundleId;
window.location.href =
'/cart/index/orderEnsure?cartType=ordinary&bundleId=' + bundleId;
});
... ...