From a74dfe48db57565101e835346ae839b8cd11c67c Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Mon, 16 Sep 2024 23:23:40 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9C=AC=E5=9C=B0=E7=94=9F=E6=B4=BB=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreLogic.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index ac0145cd..a7b7820e 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -7,7 +7,7 @@ use app\common\model\LocalStore; use app\common\model\localstore\LocalGoodsStore; use app\common\model\LocalStoreOrder; use think\facade\Db; - +use think\facade\Config; class LocalStoreLogic extends Logic { public function getLocalList($data) @@ -227,7 +227,12 @@ class LocalStoreLogic extends Logic ->toArray(); foreach($list as $key=>$value){ $goods = Db::name("local_store_goods")->where("id",$value['goods_id'])->find(); + $image = Db::name("local_store_goods_pic")->where("id",$value['lsg_id'])->select(); + foreach($image as $k=>$v){ + $image[$k]['url'] = Config::get('aliyunoss.domain').$v['url']; + } $list[$key]['goods_msg'] = $goods; + $list[$key]['goods_image'] = $image; $local = Db::name("local_store")->field("shopName,shopLogo")->where("lstore_id",$value['lstore_id'])->find(); $list[$key]['local_msg'] = $local; } @@ -261,7 +266,12 @@ class LocalStoreLogic extends Logic ->toArray(); foreach($list as $key=>$value){ $goods = Db::name("local_store_goods")->where("id",$value['goods_id'])->find(); + $image = Db::name("local_store_goods_pic")->where("id",$value['lsg_id'])->select(); + foreach($image as $k=>$v){ + $image[$k]['url'] = Config::get('aliyunoss.domain').$v['url']; + } $list[$key]['goods_msg'] = $goods; + $list[$key]['goods_image'] = $image; $local = Db::name("local_store")->field("shopName,shopLogo")->where("lstore_id",$value['lstore_id'])->find(); $list[$key]['local_msg'] = $local; }