Skip to content

Commit 40fe63a

Browse files
committed
【代码优化】拼团活动和SPU详情分开查询
1 parent 0335657 commit 40fe63a

File tree

1 file changed

+1
-3
lines changed
  • src/components/DiyEditor/components/mobile/PromotionCombination

1 file changed

+1
-3
lines changed

src/components/DiyEditor/components/mobile/PromotionCombination/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ import {fenToYuan} from "@/utils";
123123
/** 拼团卡片 */
124124
defineOptions({name: 'PromotionCombination'})
125125
// 定义属性
126-
// 定义属性
127126
const props = defineProps<{ property: PromotionCombinationProperty }>();
128127
// 商品列表
129128
const spuList = ref<ProductSpuApi.Spu[]>([]);
@@ -150,13 +149,12 @@ watch(
150149
.map(activity => activity.spuId)
151150
.filter((spuId): spuId is number => typeof spuId === 'number');
152151
153-
// 如果有有效的 spuId,调用 API 获取详细信息
152+
// 如果存在有效的 spuId,调用 API 获取详细信息
154153
if (spuIdList.value.length > 0) {
155154
spuList.value = await ProductSpuApi.getSpuDetailList(spuIdList.value);
156155
} else {
157156
console.warn('没有用于获取详细信息的有效 spuId。');
158157
}
159-
160158
// 更新 SPU 的最低价格
161159
combinationActivityList.value.forEach(activity => {
162160
activity.products.forEach(product => {

0 commit comments

Comments
 (0)