This commit is contained in:
xuyue committed 2025-10-22 17:26:10 +08:00
1 parent 476944d22e
commit 3bc3fb7d02
10 files changed
+864 -687

No files matched your search

+4 -1
View File
@@ -31,7 +31,10 @@ async function request<T>(url: string, options: RequestInit = {}): Promise<T> {
// API方法
export const api = {
// 获取项目列表
getProjects: (): Promise<Project[]> => request<Project[]>("/projects"),
getProjects: (searchQuery?: string): Promise<Project[]> => {
const url = searchQuery ? `/projects?search=${encodeURIComponent(searchQuery)}` : "/projects"
return request<Project[]>(url)
},
// 上传项目
uploadProject: (formData: FormData): Promise<UploadResponse> => {