feat:调整首页各个模块的数量显示
- 将最新音乐、热门音乐、最新歌单和最新歌手的数量从 8条调整为 5 条- 此修改旨在优化首页内容展示,减少每个模块的条目数,提高用户浏览体验
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user