Skip to content

Commit

Permalink
fix: 收藏请求兼容处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin-Hongwei committed Jan 17, 2023
1 parent 18769d8 commit 377245c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions music-client/src/views/personal/Personal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ export default defineComponent({
const collectIDList = result.data || []; // 存放收藏的歌曲ID
// 通过歌曲ID获取歌曲信息
for (const item of collectIDList) {
if (!item.songId) {
console.error(`歌曲${item}异常`);
continue;
}
const result = (await HttpManager.getSongOfId(item.songId)) as ResponseBody;
collectSongList.value.push(result.data[0]);
}
Expand Down

0 comments on commit 377245c

Please sign in to comment.