From 0c59b0d31d3a52e1655a039795af5bc75c9592b8 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Wed, 30 Aug 2023 14:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=97=E8=A1=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index bcf4cf64..3b472860 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -61,15 +61,15 @@ class Community extends BaseController public function lst() { $where = $this->request->params(['keyword','topic_id','is_hot','category_id','spu_id', 'is_type', 'resale_type']); + if (isset($where['category_id']) && $where['category_id'] == 0) { + $where['is_type'] = $this->repository::COMMUNIT_TYPE_FONT; + } if (!$where['category_id']) { unset($where['category_id']); } else if ($where['category_id'] == -1) { $where['is_type'] = $this->repository::COMMUNIT_TYPE_VIDEO; unset($where['category_id']); } - if (isset($where['category_id']) && $where['category_id'] == 0) { - $where['is_type'] = $this->repository::COMMUNIT_TYPE_FONT; - } $where = array_merge($where,$this->repository::IS_SHOW_WHERE); [$page, $limit] = $this->getPage(); return app('json')->success($this->repository->getApiList($where, $page, $limit, $this->user));