重构批量下载逻辑,优化历史显示和下载管理

This commit is contained in:
2025-08-25 09:10:00 +08:00
parent 29ef34b5a9
commit 4033e4eed2
10 changed files with 1240 additions and 254 deletions
+21
View File
@@ -128,6 +128,27 @@ class DownloadService {
return apiService.get('/api/download/downloaded-ids');
}
/**
* 清理历史记录
*/
async cleanupHistory(keepCount = 500) {
return apiService.post('/api/download/cleanup/history', { keepCount });
}
/**
* 清理已完成的任务
*/
async cleanupTasks(keepActive = true, keepCompleted = 100) {
return apiService.post('/api/download/cleanup/tasks', { keepActive, keepCompleted });
}
/**
* 获取系统统计信息
*/
async getSystemStats() {
return apiService.get('/api/download/stats');
}
/**
* 使用SSE监听下载进度
*/