Showing
2 changed files
with
12 additions
and
2 deletions
@@ -342,7 +342,7 @@ exports.selectGiftcard = (req, res, next) => { | @@ -342,7 +342,7 @@ exports.selectGiftcard = (req, res, next) => { | ||
342 | 342 | ||
343 | res.render('select-giftcard', { | 343 | res.render('select-giftcard', { |
344 | module: 'cart', | 344 | module: 'cart', |
345 | - page: 'buynow-select-giftcard', | 345 | + page: 'select-giftcard', |
346 | title: '礼品卡', | 346 | title: '礼品卡', |
347 | pageHeader: headerData, | 347 | pageHeader: headerData, |
348 | pageFooter: false, | 348 | pageFooter: false, |
@@ -32,7 +32,17 @@ class SelectGiftCard extends Page { | @@ -32,7 +32,17 @@ class SelectGiftCard extends Page { | ||
32 | * 使用礼品卡 | 32 | * 使用礼品卡 |
33 | */ | 33 | */ |
34 | useGiftCard() { | 34 | useGiftCard() { |
35 | - console.log('ok'); | 35 | + let selectedGiftCards = []; |
36 | + | ||
37 | + this.selector.giftcard.each((index, elem) => { | ||
38 | + let theElem = $(elem); | ||
39 | + | ||
40 | + if (theElem.hasClass('checked')) { | ||
41 | + selectedGiftCards.push(theElem.data('code')); | ||
42 | + } | ||
43 | + }); | ||
44 | + | ||
45 | + this.orderInfo('gift_card_code', selectedGiftCards.join(',')); | ||
36 | } | 46 | } |
37 | 47 | ||
38 | /** | 48 | /** |
-
Please register or login to post a comment