This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 把你本來分堆的地方改成一個 funciton | |
const groupCoupons = () => { | |
if (coupons.length !== 0) { | |
coupons.forEach(item => { | |
if (item.status === 'not_redeemed') { | |
const index = Object.values(couponFilter).map(i => i.cdId).indexOf(item.description) | |
if (index === -1) { | |
couponFilter.push({ | |
cdId: item.description, | |
title: item.title, |