Browse Source

fix: 修复重复优惠券ID引起的页面异常

zhangyuhan 3 months ago
parent
commit
c0574103dd

+ 2 - 2
apps/bigmember_pc/src/views/order/ui/offers/list.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="order-offers-list">
     <SpecCard
-      :key="coupon.id"
-      v-for="coupon in couponList"
+      :key="coupon.id + '_' + index"
+      v-for="(coupon, index) in couponList"
       :class="{
         [coupon.className]: true,
         disabled: !coupon.usable

+ 2 - 2
apps/mobile/src/components/create-order/CouponNew.vue

@@ -64,8 +64,8 @@
                   :coupon="item"
                   :checked="item.lotteryId === selectedId"
                   :specOriginPrice="specOriginPrice"
-                  v-for="item in canUseCoupon"
-                  :key="item.lotteryId"
+                  v-for="(item, index) in canUseCoupon"
+                  :key="item.lotteryId + '_' + index"
                   @onChange="onRadioChange"
                 >
                 </CouponList>