feat:调整首页各个模块的数量显示

- 将最新音乐、热门音乐、最新歌单和最新歌手的数量从 8条调整为 5 条- 此修改旨在优化首页内容展示,减少每个模块的条目数,提高用户浏览体验
This commit is contained in:
ikmkj
2025-07-27 14:50:29 +08:00
parent 384b6b667f
commit 4bbaff62d0

View File

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