From 8ed6952c076df2c04e8387528d3081f6fa4756af Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Mon, 30 Dec 2024 14:17:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8C=87=E5=AE=9A=E7=B1=BB?= =?UTF-8?q?=E7=9B=AE=E4=B8=8B=E7=9A=84=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/IndexLogic.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/api/logic/IndexLogic.php b/app/api/logic/IndexLogic.php index 11b3c643..522a5b1b 100755 --- a/app/api/logic/IndexLogic.php +++ b/app/api/logic/IndexLogic.php @@ -1,6 +1,7 @@ [], 'mall_news' => $mall_news, 'hot_list' => $hot_list, + 'year_shop' => $year_shop, ]; } @@ -1124,8 +1125,8 @@ class IndexLogic extends Logic public static function getYearShop($get = []) { - $page_no = isset($get['page_no']) ?? 1; - $page_size = isset($get['page_size']) ?? 10; + $page_no = $get['page_no'] ?? 1; + $page_size = $get['page_size'] ?? 10; // 销售中商品:未删除/审核通过/已上架 $where = [ @@ -1139,6 +1140,11 @@ class IndexLogic extends Logic 'id' => 'desc' ]; + if (!empty(GoodsLogic::filterShopsIds())) { + // 过滤已删除、已冻结、已暂停营业、已到期的店铺 + $where[] = ['shop_id', 'not in', GoodsLogic::filterShopsIds()]; + } + // 分类ID $category_id = 290; $wh = "";