diff --git a/app/Service/Api/Good/OptionalListService.php b/app/Service/Api/Good/OptionalListService.php index 53b4d86..ef24391 100644 --- a/app/Service/Api/Good/OptionalListService.php +++ b/app/Service/Api/Good/OptionalListService.php @@ -138,7 +138,7 @@ class OptionalListService extends BaseService if (empty($skuList)) throw new ErrException('数据错误'); $skuList = array_column($skuList,null,'id'); foreach ($favorable['sku_list'] as &$v) { - $v['origin_spu_id'] = $skuList[$v['id']]['origin_sku_id'] ?? 0; + $v['origin_spu_id'] = $skuList[$v['origin_sku_id']]['spu_id'] ?? 0; } array_unshift($res,[