重构批量下载逻辑,优化历史显示和下载管理
This commit is contained in:
@@ -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监听下载进度
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user