From 86cd151c293e4294263dc24a3cf82f3c0a3b0fed Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Thu, 12 Sep 2024 17:19:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AC=E5=9C=B0=E7=94=9F?= =?UTF-8?q?=E6=B4=BB=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreGoodsLogic.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/api/logic/LocalStoreGoodsLogic.php b/app/api/logic/LocalStoreGoodsLogic.php index ae75168d..46774176 100644 --- a/app/api/logic/LocalStoreGoodsLogic.php +++ b/app/api/logic/LocalStoreGoodsLogic.php @@ -239,6 +239,12 @@ class LocalStoreGoodsLogic extends Logic // 'goods_id' => $get['id'] // ])->field('id, spec_id, value')->select(); // + foreach ($data['spec'] as &$v1) { + foreach ($v1['item'] as $key => &$v2) { + $v1['attr'][$key] = $v2; + $v1['item'][$key] = $v2['value']; + } + } } if ($data) {