增加周榜,月榜,日榜搜索和批量下载

This commit is contained in:
2025-08-23 15:04:24 +08:00
parent 46e46e6410
commit 20b336cf31
18 changed files with 1743 additions and 427 deletions
+35
View File
@@ -0,0 +1,35 @@
import api from './api';
export interface RankingParams {
mode: 'day' | 'week' | 'month';
type: 'art' | 'manga' | 'novel';
offset?: number;
limit?: number;
}
export interface RankingResponse {
artworks: any[];
next_url?: string;
}
class RankingService {
/**
* 获取排行榜数据
*/
async getRanking(params: RankingParams) {
try {
const response = await api.get('/api/ranking', { params });
return {
success: true,
data: response.data
};
} catch (error: any) {
return {
success: false,
error: error.response?.data?.error || error.message || '获取排行榜失败'
};
}
}
}
export default new RankingService();