From fe916f5acaf2d70b95d4c0f977920a0706d9967f Mon Sep 17 00:00:00 2001 From: youda Date: Fri, 18 Apr 2025 02:19:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Infinite.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Infinite.php b/app/api/controller/Infinite.php index 948db07..35a3efc 100755 --- a/app/api/controller/Infinite.php +++ b/app/api/controller/Infinite.php @@ -75,8 +75,8 @@ class Infinite extends Base $goods['need_draw_num'] = 1; } - $goods_type = GoodsType::field('corner_text')->where('value','=',$goods['type'] )->find(); - if($goods_type){ + $goods_type = GoodsType::field('corner_text')->where('value', '=', $goods['type'])->find(); + if ($goods_type) { $goods['type_text'] = $goods_type['corner_text']; } #当前热度 @@ -1247,6 +1247,7 @@ class Infinite extends Base }); } + $ling_goods_list = GoodsList::field('goods_id,shang_id,title,imgurl') ->append(['shang_info']) ->where(['goods_id' => $goods_id]) @@ -1258,6 +1259,18 @@ class Infinite extends Base $value['imgurl'] = imageUrl($value['imgurl']); } + $ling_goods_list1 = GoodsList::field('goods_id,shang_id,title,imgurl') + ->append(['shang_info']) + ->where(['goods_id' => $goods_id]) + ->where('is_lingzhu', '=', 1) + ->where(['num' => 0]) + ->order('sort desc,shang_id asc,id asc') + ->select(); + foreach ($ling_goods_list1 as &$value) { + $value['imgurl'] = imageUrl($value['imgurl']); + $ling_goods_list[] = $value; + } + $data = []; $data['goods'] = $goods; $data['king_user'] = $king_user;