diff --git a/app/repository/SpuRepository.php b/app/repository/SpuRepository.php index 6a13677..5fd9aed 100644 --- a/app/repository/SpuRepository.php +++ b/app/repository/SpuRepository.php @@ -214,6 +214,8 @@ class SpuRepository extends Repository $activityText = Spu::activityTextList(); $list['list'] = $list['list']->each(function ($item) use ($activityText) { + $spuSkuList = $this->spuSkuList($item->id); + $item->skuId = $spuSkuList[0]["id"] ?? 0; $item->tag = $activityText[$item->activity_type] ?? ''; });