项目列表
This commit is contained in:
@@ -27,7 +27,7 @@ class HomeService extends BaseService
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目列表
|
||||
* 获取精选项目
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -50,6 +50,23 @@ class HomeService extends BaseService
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function projectList(): array
|
||||
{
|
||||
$this->where[] = [ 'status', '=', 1 ];
|
||||
$this->with = [
|
||||
'frameworks:id,name',
|
||||
'labels:id,name',
|
||||
'category:id,name',
|
||||
];
|
||||
return $this->getPageList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮播图
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function carousel(): array
|
||||
{
|
||||
$this->where[] = [ 'is_carousel', '=', 1 ];
|
||||
|
||||
Reference in New Issue
Block a user