From a232ece05867020c3121423aa38f0d34568aaacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Thu, 26 Oct 2023 03:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=8A=A0=E8=BD=BD=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E5=B0=81=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/music.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/music.js b/src/music.js index 1415f32..73b6e71 100644 --- a/src/music.js +++ b/src/music.js @@ -379,8 +379,10 @@ export default class MusicList { }) } } else { - this.标题.textContent = item.name // 替换标题 - this.封面.style.backgroundImage = `url(${item.picture})` // 替换封面图像 + this.标题.textContent = item.name + if (item.picture) { + this.封面.style.backgroundImage = `url(${item.picture})` + } // 替换浏览器媒体信息(使系统通知栏显示歌曲信息) if ('mediaSession' in navigator) { navigator.mediaSession.metadata = new MediaMetadata({