-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
搜索不出来,一搜索就显示下图 #285
Comments
前端没判空导致的,SearchSong.vue中,result.data为null if (!result.data.length) {
currentSongList.value = [];
(proxy as any).$message({
message: "暂时没有相关歌曲",
type: "warning",
});
} else {
currentSongList.value = result.data;
} 后端在没查到音乐时,返回的是 public R songOfSingerName(String name) {
QueryWrapper<Song> queryWrapper = new QueryWrapper<>();
queryWrapper.like("name",name);
List<Song> songs = songMapper.selectList(queryWrapper);
if (songs.isEmpty()){
return R.error("添加失败,没有找到该歌,无法加入该歌单");
}
return R.success(null, songMapper.selectList(queryWrapper));
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: