修复 issues #1019

This commit is contained in:
是虹川飴 2021-11-06 22:51:10 +08:00
parent df9e1369a1
commit 05a3082676

View File

@ -286,8 +286,15 @@ export default {
getLyric( getLyric(
this.liked.songs[randomNum(0, this.liked.songs.length - 1)] this.liked.songs[randomNum(0, this.liked.songs.length - 1)]
).then(data => { ).then(data => {
console.log(data + '歌词接口似乎会无限挂起'); if (data.lrc !== undefined) {
// if (data.lrc !== undefined) this.lyric = data.lrc.lyric; let ifl = data.lrc.lyric.split('\n').filter(l => {
if (l.includes('作词')) {
this.lyric = data.lrc.lyric;
return true + ifl;
}
return false;
});
}
}); });
}, },
openAddPlaylistModal() { openAddPlaylistModal() {