【功能修复】修复拼团的价格显示

pull/539/head
卢越 2024-09-06 22:23:15 +08:00
parent 7d60b5a619
commit 3dc02f7282
2 changed files with 7 additions and 7 deletions

View File

@ -16,6 +16,7 @@ export interface CombinationActivityVO {
virtualGroup?: number
status?: number
limitDuration?: number
combinationPrice?: number
products: CombinationProductVO[]
}

View File

@ -152,14 +152,13 @@ watch(
// SPU
combinationActivityList.value.forEach((activity) => {
activity.products.forEach((product) => {
const spu = spuList.value.find((spu) => spu.id === product.spuId)
// spuId
const spu = spuList.value.find((spu) => spu.id === activity.spuId)
if (spu) {
// 便
spu.price = Math.min(product.combinationPrice || Infinity, spu.price || Infinity)
// 便
spu.price = Math.min(activity.combinationPrice || Infinity, spu.price || Infinity)
}
})
})
}
} catch (error) {
console.error('获取拼团活动细节或 SPU 细节时出错:', error)