From 05482384f919a787a715016c134646f54d883861 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Tue, 29 Oct 2024 15:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=9C=AC=E5=9C=B0=E7=94=9F?= =?UTF-8?q?=E6=B4=BB=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreGoodsCartLogic.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/api/logic/LocalStoreGoodsCartLogic.php b/app/api/logic/LocalStoreGoodsCartLogic.php index 3efb71d0..38441d72 100644 --- a/app/api/logic/LocalStoreGoodsCartLogic.php +++ b/app/api/logic/LocalStoreGoodsCartLogic.php @@ -69,7 +69,10 @@ class LocalStoreGoodsCartLogic extends Logic ->field('c.id, c.item_id, c.goods_num, g.id as lsg_id, g.title, g.price') ->append(['pic', 'item']) ->select(); - return $cart; + if ($cart) { + return $cart->toArray(); + } + return []; } public static function cartNum($post, $user_id)