fix(产品需求): 完善产品需求的诸多细节。
This commit is contained in:
@@ -135,6 +135,18 @@ export async function fetchGetProject(id: string) {
|
||||
return mapServiceResult(result as ServiceRequestResult<ProjectResponse>, normalizeProject);
|
||||
}
|
||||
|
||||
/** 根据产品ID获取产品下的所有项目 */
|
||||
export async function fetchGetProjectListByProductId(productId: string) {
|
||||
const result = await request<ProjectResponse[]>({
|
||||
...safeJsonRequestConfig,
|
||||
url: `${PROJECT_PREFIX}/list-by-product`,
|
||||
method: 'get',
|
||||
params: { productId }
|
||||
});
|
||||
|
||||
return mapServiceResult(result as ServiceRequestResult<ProjectResponse[]>, data => data.map(normalizeProject));
|
||||
}
|
||||
|
||||
/** 创建项目 */
|
||||
export async function fetchCreateProject(data: Api.Project.SaveProjectParams) {
|
||||
const result = await request<string | number>({
|
||||
|
||||
Reference in New Issue
Block a user