From 9cc57fe64ed98a9cfe33b2ccd2eb7b9963dc0db7 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 1 Jun 2022 16:52:13 +0800 Subject: [PATCH] setter --- app/traits/spu/SkuTrait.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/traits/spu/SkuTrait.php b/app/traits/spu/SkuTrait.php index 21ed590..02f8a5e 100644 --- a/app/traits/spu/SkuTrait.php +++ b/app/traits/spu/SkuTrait.php @@ -62,6 +62,7 @@ trait SkuTrait $item->begin_at = $item->is_activity > 0 ? $item->limitTime['begin_at'] : ''; $item->end_at = $item->is_activity > 0 ? $item->limitTime['end_at'] : ''; + $item->unit = $item->spu->unit ?? ''; unset($item->spu); unset($item->activity);