feat(playlist): 优化歌单详情页面加载逻辑

- 将评论获取移至歌单详情获取成功后
- 添加评论数到歌单 DTO
- 优化前端歌单详情展示
This commit is contained in:
ikmkj
2025-07-29 20:27:57 +08:00
parent b0efe29b3b
commit 34a3358ea4
2 changed files with 10 additions and 1 deletions

View File

@@ -88,6 +88,9 @@ const fetchPlaylistDetail = async () => {
// 更新歌单内歌曲的状态
updateMusicStatuses(playlist.value.songs)
// 获取评论
fetchComments()
} else {
ElMessage.error(res.message || '获取歌单详情失败')
}
@@ -474,7 +477,6 @@ let commentSubscription = null;
onMounted(() => {
fetchPlaylistDetail()
fetchComments()
// 连接 WebSocket 并订阅评论
connect(() => {