diff --git a/music-qianduan/src/views/Home.vue b/music-qianduan/src/views/Home.vue index 6821324..c896d65 100644 --- a/music-qianduan/src/views/Home.vue +++ b/music-qianduan/src/views/Home.vue @@ -33,7 +33,7 @@ const loadingNewSingers = ref(false) const fetchLatestMusic = async () => { loadingNewSongs.value = true try { - const res = await getLatestMusic(8) // 获取8首最新音乐 + const res = await getLatestMusic(5) // 获取5首最新音乐 if (res.code === 200) { newSongs.value = res.data.map(item => ({ ...item, @@ -57,7 +57,7 @@ const fetchHotMusic = async () => { loadingHotSongs.value = true try { // 注意:这里调用的是新的 hot-music API - const res = await getHotMusic(8) // 获取8首热门音乐 + const res = await getHotMusic(5) // 获取5首热门音乐 if (res.code === 200) { hotSongs.value = res.data.map(item => ({ ...item, @@ -79,7 +79,7 @@ const fetchHotMusic = async () => { const fetchLatestPlaylist = async () => { loadingNewPlaylists.value = true try { - const res = await getLatestPlaylist(8) // 获取8个最新歌单 + const res = await getLatestPlaylist(5) // 获取5个最新歌单 if (res.code === 200) { newPlaylists.value = res.data console.log('最新歌单数据:', newPlaylists.value) @@ -98,7 +98,7 @@ const fetchLatestPlaylist = async () => { const fetchLatestSinger = async () => { loadingNewSingers.value = true try { - const res = await getLatestSinger(8) // 获取8个最新歌手 + const res = await getLatestSinger(5) // 获取5个最新歌手 if (res.code === 200) { newSingers.value = res.data.map(item => ({ ...item,