Authored by 郭成尧

pool-barch-no

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-04-06 16:51:52
* @Last Modified by: Targaryen
* @Last Modified time: 2017-04-12 11:24:53
* @Last Modified time: 2017-04-12 14:01:07
*/
const $ = require('yoho-jquery');
... ... @@ -16,6 +16,7 @@ let bundle = {
let $bundle = $('.bundle'); // 限定作用域
let activityId = $bundle.data('activityid');
let batchNo = $bundle.data('poolbatchno');
self.handle = handle;
... ... @@ -23,8 +24,16 @@ let bundle = {
* 减少套餐数量
*/
$bundle.on('click', '.bundle-nums .num-opt .btn-opt-minus', function(e) {
let skuIdsArray = [];
$(e.delegateTarget).find('.good-item').each(function() {
skuIdsArray.push($(this).data('id'));
});
self.decrBundle({
activity_id: activityId
activity_id: activityId,
batch_no: batchNo,
sku_ids: skuIdsArray.join(',')
}, e);
});
... ... @@ -32,8 +41,16 @@ let bundle = {
* 增加套餐数量
*/
$bundle.on('click', '.bundle-nums .num-opt .btn-opt-plus', function(e) {
let skuIdsArray = [];
$(e.delegateTarget).find('.good-item').each(function() {
skuIdsArray.push($(this).data('id'));
});
self.incrBundle({
activity_id: activityId
activity_id: activityId,
batch_no: batchNo,
sku_ids: skuIdsArray.join(',')
}, e);
});
... ... @@ -111,6 +128,7 @@ let bundle = {
product_sku: $(element).data('id'),
buy_number: $(e.delegateTarget).data('buynum'),
activity_id: $(e.delegateTarget).data('activityid'),
batch_no: $(e.delegateTarget).data('poolbatchno'),
selected: selected
});
});
... ...