v1.5更新

事务大厅以此为准;
This commit is contained in:
zyb
2025-05-16 19:18:36 +08:00
parent 0c0b5d869c
commit 8e052811e3
13 changed files with 85 additions and 84 deletions

View File

@@ -11,7 +11,7 @@ export const getMaps = async (params = {}) => {
search: params.search || '',
player_count: params.player_count || '',
tags: params.tags || '',
ordering: params.ordering || '-download_count'
ordering: params.ordering || ''
}
})
return response.data
@@ -22,18 +22,18 @@ export const getMaps = async (params = {}) => {
}
// 获取每周推荐地图
export const getWeeklyTopMaps = async () => {
export const getWeeklyTopMaps = async (params = {}) => {
try {
const response = await axios.get('https://ra3.z31.xyz/v1/maps/', {
const response = await axios.get(`${API_BASE_URL}/maps/`, {
params: {
ordering: '-download_count',
p: params.page || 1,
format: 'json',
p: 1
ordering: params.ordering || ''
}
})
return response.data.results.slice(0, 10)
return response.data.results
} catch (error) {
console.error('获取每周推荐地图失败:', error)
console.error('获取地图列表失败:', error)
throw error
}
}