feat(music): 优化音乐和歌手相关数据结构和功能
- 在 MusicDTO 中添加 typeName 和 releaseDate 字段 - 在 SingerDTO 中将 type 替换为 typeId 和 typeName - 更新 MusicServiceImpl 和 SingerServiceImpl 中的相关逻辑 - 在前端 SingerDetail 组件中使用 typeName 替换类型代码
This commit is contained in:
@@ -404,21 +404,6 @@ const formatFans = (count) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取歌手类型名称
|
||||
const getSingerTypeName = (type) => {
|
||||
const typeMap = {
|
||||
1: '华语男歌手',
|
||||
2: '华语女歌手',
|
||||
3: '华语组合',
|
||||
4: '欧美男歌手',
|
||||
5: '欧美女歌手',
|
||||
6: '欧美组合',
|
||||
7: '日韩男歌手',
|
||||
8: '日韩女歌手',
|
||||
9: '日韩组合'
|
||||
}
|
||||
return typeMap[type] || '未知'
|
||||
}
|
||||
|
||||
// WebSocket 订阅实例
|
||||
let commentSubscription = null;
|
||||
@@ -480,7 +465,7 @@ onUnmounted(() => {
|
||||
</div>
|
||||
<div class="singer-meta">
|
||||
<h1 class="singer-name">{{ singer.name }}</h1>
|
||||
<div class="singer-type">类型:{{ getSingerTypeName(singer.type) }}</div>
|
||||
<div class="singer-type">类型:{{ singer.typeName }}</div>
|
||||
<div class="singer-stats">
|
||||
<div class="stat-item">
|
||||
<div class="stat-value">{{ singer.musicCount }}</div>
|
||||
|
||||
Reference in New Issue
Block a user