解决下载和页面分页问题

This commit is contained in:
2025-08-21 19:01:35 +08:00
parent beeaf4055d
commit 4d0f045de5
5 changed files with 496 additions and 46 deletions
+5 -2
View File
@@ -55,12 +55,15 @@ class ArtistService {
`/v1/user/illusts?${stringify(params)}`
);
console.log('Artworks response keys:', Object.keys(response));
console.log('Artworks count:', response.illusts?.length || 0);
console.log('Next URL:', response.next_url);
return {
success: true,
data: {
artworks: response.illusts,
next_url: response.next_url,
total: response.illusts.length
next_url: response.next_url
}
};
+3
View File
@@ -774,6 +774,9 @@ class DownloadService {
allArtworks.push(...artworks);
offset += artworks.length;
// 基于 next_url 判断是否还有更多页面
hasMore = !!artworksResult.data.next_url;
// 添加延迟避免请求过于频繁
await new Promise(resolve => setTimeout(resolve, 500));
}