feat(*): 工作台界面 - 优化插件中心、管理侧栏及画布与短剧列表
This commit is contained in:
@@ -170,6 +170,14 @@ export type ProjectSummary = {
|
||||
completedUnitCount: number;
|
||||
};
|
||||
|
||||
export type ProjectListPage = {
|
||||
projects: ProjectSummary[];
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
hasMore: boolean;
|
||||
};
|
||||
|
||||
export type ProjectDetail = {
|
||||
project: Project;
|
||||
units: ProjectUnit[];
|
||||
@@ -183,8 +191,10 @@ export type ProjectDetail = {
|
||||
assetCandidates: ProjectAssetCandidate[];
|
||||
};
|
||||
|
||||
export function listProjects() {
|
||||
return request<{ projects: ProjectSummary[] }>(api.get("/projects"));
|
||||
export function listProjects(): Promise<{ projects: ProjectSummary[] }>;
|
||||
export function listProjects(params: { page: number; pageSize: number }): Promise<ProjectListPage>;
|
||||
export function listProjects(params?: { page: number; pageSize: number }) {
|
||||
return request<{ projects: ProjectSummary[] } | ProjectListPage>(api.get("/projects", params ? { params: { page: params.page, page_size: params.pageSize } } : undefined));
|
||||
}
|
||||
|
||||
export function getProject(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user