更新列表类型展示

This commit is contained in:
yaooo 2023-08-30 14:59:26 +08:00
parent 408e34c9ad
commit 0c59b0d31d

View File

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