更改逛逛查询

This commit is contained in:
mkm 2023-01-16 17:47:11 +08:00
parent 39272b4fb8
commit a7273030e8

View File

@ -54,20 +54,18 @@ class Community extends BaseController
public function lst()
{
$where = $this->request->params(['keyword', 'topic_id', 'is_hot', 'category_id', 'spu_id']);
$a = true;
if ($where['category_id'] == 69) {
[$page, $limit] = $this->getPage();
return app('json')->success($this->repository->getApiListTwo($where, $page, $limit, $this->user));
}
if (!$where['category_id']) {
unset($where['category_id']);
//查询非社区数据
$where['no_category_id'] = 69;
$a = false;
} else if ($where['category_id'] == -1) {
$where['is_type'] = $this->repository::COMMUNIT_TYPE_VIDEO;
unset($where['category_id']);
}
if ($a && $where['category_id'] == 69) {
[$page, $limit] = $this->getPage();
return app('json')->success($this->repository->getApiListTwo($where, $page, $limit, $this->user));
}
$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));