From 554d028ac00c4eaf17baa669b7909feeb8726b67 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Fri, 16 May 2025 13:38:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E4=BA=A4=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/GoodsLogic.php | 2 +- app/api/model/GoodsImage.php | 27 +++++++++++++++++++++++++++ app/api/model/GoodsItem.php | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 app/api/model/GoodsImage.php create mode 100644 app/api/model/GoodsItem.php diff --git a/app/api/logic/GoodsLogic.php b/app/api/logic/GoodsLogic.php index b70cdfd..7484696 100644 --- a/app/api/logic/GoodsLogic.php +++ b/app/api/logic/GoodsLogic.php @@ -115,7 +115,7 @@ class GoodsLogic{ //商品详情 public static function getGoodsDetail($user_id,$id){ - $goods = Goods::where(['id'=>$id,'status'=>1])->with(['goods_image','goods_item']); + $goods = Goods::where(['id'=>$id,'status'=>1])->with(['goods_image','goods_item'])->find(); if(empty($goods)){ return []; } diff --git a/app/api/model/GoodsImage.php b/app/api/model/GoodsImage.php new file mode 100644 index 0000000..50afbee --- /dev/null +++ b/app/api/model/GoodsImage.php @@ -0,0 +1,27 @@ +