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));