From d81ca6e8e39b664e0f57dbf97b1c3e3b46d78878 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 23 Aug 2024 17:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E3=80=91MALL:=20=E4=BF=AE=E5=A4=8D=E6=BB=A1=E5=87=8F?= =?UTF-8?q?=E9=80=81=E6=B4=BB=E5=8A=A8=E8=A7=84=E5=88=99=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E5=9B=9E=E6=98=BE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rewardActivity/components/RewardRuleCouponShowcase.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponShowcase.vue b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponShowcase.vue index b4f356da..f7899fe3 100644 --- a/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponShowcase.vue +++ b/src/views/mall/promotion/rewardActivity/components/RewardRuleCouponShowcase.vue @@ -38,6 +38,7 @@ import { DICT_TYPE } from '@/utils/dict' import { discountFormat } from '@/views/mall/promotion/coupon/formatter' import { isEmpty } from '@/utils/is' import { useVModel } from '@vueuse/core' +import { findIndex } from '@/utils' defineOptions({ name: 'RewardRuleCouponShowcase' }) @@ -88,9 +89,11 @@ const initGiveCouponList = async () => { } for (let i = 0, len = data.length; i < len; i++) { + const coupon = data[i] + const index = findIndex(rewardRule.value.couponIds!, (item) => item.id === coupon.id) list.value.push({ - ...data[i], - giveCount: rewardRule.value.couponCounts![i] + ...coupon, + giveCount: rewardRule.value.couponCounts![index] }) } }