merge-bundle-to-cart
Showing
3 changed files
with
15 additions
and
9 deletions
@@ -307,6 +307,7 @@ const modify = (req, res, next) => { | @@ -307,6 +307,7 @@ const modify = (req, res, next) => { | ||
307 | newProductSku = req.body.new_product_sku || 0, | 307 | newProductSku = req.body.new_product_sku || 0, |
308 | buyNumber = req.body.buy_number || 0, | 308 | buyNumber = req.body.buy_number || 0, |
309 | activity_id = req.body.activity_id, | 309 | activity_id = req.body.activity_id, |
310 | + batch_no = req.body.batch_no, | ||
310 | selected = req.body.selected; | 311 | selected = req.body.selected; |
311 | 312 | ||
312 | if (!oldProductSku || !newProductSku) { | 313 | if (!oldProductSku || !newProductSku) { |
@@ -323,7 +324,8 @@ const modify = (req, res, next) => { | @@ -323,7 +324,8 @@ const modify = (req, res, next) => { | ||
323 | new_product_sku: newProductSku, | 324 | new_product_sku: newProductSku, |
324 | buy_number: buyNumber, | 325 | buy_number: buyNumber, |
325 | selected: selected, | 326 | selected: selected, |
326 | - activity_id: activity_id | 327 | + activity_id: activity_id, |
328 | + batch_no: batch_no | ||
327 | }], shoppingKey).then(data => { | 329 | }], shoppingKey).then(data => { |
328 | data ? res.json(data) : res.status(400).json({ | 330 | data ? res.json(data) : res.status(400).json({ |
329 | message: '操作失败' | 331 | message: '操作失败' |
@@ -14,13 +14,10 @@ const domains = { | @@ -14,13 +14,10 @@ const domains = { | ||
14 | liveApi: 'http://testapi.live.yohops.com:9999/', | 14 | liveApi: 'http://testapi.live.yohops.com:9999/', |
15 | singleApi: 'http://api-test3.yohops.com:9999/', | 15 | singleApi: 'http://api-test3.yohops.com:9999/', |
16 | 16 | ||
17 | - // api: 'http://api-test3.yohops.com:9999/', | ||
18 | - // service: 'http://service-test3.yohops.com:9999/', | ||
19 | - api: 'http://api.yoho.cn/', | ||
20 | - service: 'http://service.yoho.cn/', | 17 | + api: 'http://api-test3.yohops.com:9999/', |
18 | + service: 'http://service-test3.yohops.com:9999/', | ||
21 | global: 'http://api-global.yohobuy.com', | 19 | global: 'http://api-global.yohobuy.com', |
22 | 20 | ||
23 | - | ||
24 | // liveApi: 'http://api.live.yoho.cn/', | 21 | // liveApi: 'http://api.live.yoho.cn/', |
25 | // singleApi: 'http://single.yoho.cn/', | 22 | // singleApi: 'http://single.yoho.cn/', |
26 | 23 |
@@ -366,9 +366,12 @@ let goodObj = { | @@ -366,9 +366,12 @@ let goodObj = { | ||
366 | }, | 366 | }, |
367 | url; | 367 | url; |
368 | 368 | ||
369 | - // 套餐需要 activity_id | 369 | + // 套餐需要 activity_id batch_no |
370 | if (data.activity_id) { | 370 | if (data.activity_id) { |
371 | - Object.assign(goodData, {activity_id: data.activity_id}); | 371 | + Object.assign(goodData, { |
372 | + activity_id: data.activity_id, | ||
373 | + batch_no: data.batch_no | ||
374 | + }); | ||
372 | } | 375 | } |
373 | 376 | ||
374 | if (promotionId) { | 377 | if (promotionId) { |
@@ -492,6 +495,7 @@ let goodObj = { | @@ -492,6 +495,7 @@ let goodObj = { | ||
492 | promotionId; | 495 | promotionId; |
493 | let isSelected = $(e.delegateTarget).find('.chk.select').hasClass('checked'); | 496 | let isSelected = $(e.delegateTarget).find('.chk.select').hasClass('checked'); |
494 | let activityId = $(e.delegateTarget).data('activityid'); | 497 | let activityId = $(e.delegateTarget).data('activityid'); |
498 | + let batchNo = $(e.delegateTarget).data('poolbatchno'); | ||
495 | 499 | ||
496 | id = $(e.delegateTarget).data('id'); | 500 | id = $(e.delegateTarget).data('id'); |
497 | count = $(e.delegateTarget).find('.good-num').val(); | 501 | count = $(e.delegateTarget).find('.good-num').val(); |
@@ -517,7 +521,10 @@ let goodObj = { | @@ -517,7 +521,10 @@ let goodObj = { | ||
517 | 521 | ||
518 | // 套餐需要传 activityId | 522 | // 套餐需要传 activityId |
519 | if (activityId) { | 523 | if (activityId) { |
520 | - Object.assign(data, {activity_id: activityId}); | 524 | + Object.assign(data, { |
525 | + activity_id: activityId, | ||
526 | + batch_no: batchNo | ||
527 | + }); | ||
521 | } | 528 | } |
522 | self.showEditPannelWithSku(data, id, isSelected, canEditNum, promotionId, e); | 529 | self.showEditPannelWithSku(data, id, isSelected, canEditNum, promotionId, e); |
523 | }, | 530 | }, |
-
Please register or login to post a comment