部分前台接口
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Service;
|
||||
use App\BaseApp\BaseService;
|
||||
use App\Enum\ProjectStatusEnum;
|
||||
use App\Enum\StatusEnum;
|
||||
use App\Models\CollectionModel;
|
||||
use App\Models\FeatureModel;
|
||||
use App\Models\ProjectLabelRelationModel;
|
||||
use App\Models\ProjectModel;
|
||||
@@ -71,6 +72,12 @@ class HomeService extends BaseService
|
||||
'features:id,project_id,name',
|
||||
'author:id,nick_name,avatar,email'
|
||||
];
|
||||
return $this->getDetail($id);
|
||||
$result = $this->getDetail($id);
|
||||
if (!empty($this->userId)) {
|
||||
$result['is_collection'] = CollectionModel::where('project_id', $id)->where('user_id', $this->userId)->exists();
|
||||
} else {
|
||||
$result['is_collection'] = false;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user