feat(singer): 优化歌手搜索功能

- 修改了前端 Singer.vue 文件,增加了对 keyword 的判断,以显示不同的标题
- 更新了后端 SingerServiceImpl 文件,改进了搜索逻辑,支持多字段查询
This commit is contained in:
ikmkj
2025-07-29 19:56:08 +08:00
parent 8aa076ded1
commit f67c6f2262
2 changed files with 8 additions and 3 deletions

View File

@@ -243,7 +243,7 @@ onMounted(() => {
</div>
<!-- 热门歌手 -->
<div class="hot-singers" v-if="activeType === null && currentPage === 1">
<div class="hot-singers" v-if="!keyword && activeType === null && currentPage === 1">
<h2>热门歌手</h2>
<div class="singer-list" v-loading="loadingHot">
<div
@@ -277,7 +277,8 @@ onMounted(() => {
<!-- 歌手列表 -->
<div class="all-singers">
<h2 v-if="activeType === null && currentPage === 1">全部歌手</h2>
<h2 v-if="keyword">搜索结果</h2>
<h2 v-else-if="activeType === null && currentPage === 1">全部歌手</h2>
<div class="singer-list" v-loading="loading">
<div
v-for="singer in singers"