部分前台接口

This commit is contained in:
2025-05-07 16:52:49 +08:00
parent 7a08ac219e
commit 8a99bcb904
8 changed files with 65 additions and 5 deletions

View File

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