parent
3051aed6b2
commit
959fe83d72
|
@ -361,7 +361,7 @@
|
|||
// 选择有 promotionPrice 且最小的
|
||||
state.settlementSku = state.goodsInfo.skus
|
||||
.filter((sku) => sku.stock > 0 && sku.promotionPrice > 0)
|
||||
.reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr));
|
||||
.reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr), []);
|
||||
|
||||
// 设置满减送活动
|
||||
if (data.rewardActivity) {
|
||||
|
|
|
@ -416,7 +416,7 @@ export function appendSettlementProduct(spus, settlementInfos) {
|
|||
// 选择价格最小的 SKU 设置到 SPU 上
|
||||
const settlementSku = settlementInfo.skus
|
||||
.filter((sku) => sku.promotionPrice > 0)
|
||||
.reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr));
|
||||
.reduce((prev, curr) => (prev.promotionPrice < curr.promotionPrice ? prev : curr), []);
|
||||
if (settlementSku) {
|
||||
spu.promotionType = settlementSku.promotionType;
|
||||
spu.promotionPrice = settlementSku.promotionPrice;
|
||||
|
|
Loading…
Reference in New Issue