diff --git a/src/components/MusicList.vue b/src/components/MusicList.vue index 8a83910..7304127 100644 --- a/src/components/MusicList.vue +++ b/src/components/MusicList.vue @@ -3,7 +3,10 @@ :show="show" :height="isMobile ? '100vh' : '70vh'" placement="bottom" + block-scroll + mask-closable :style="{ backgroundColor: 'transparent' }" + @mask-click="close" >
@@ -93,7 +96,16 @@ const formatDetail = computed(() => (detail: any) => { const handlePlay = () => { const tracks = songList || []; - store.commit('setPlayList', tracks); + store.commit( + 'setPlayList', + tracks.map((item) => ({ + ...item, + picUrl: item.al.picUrl, + song: { + artists: item.ar, + }, + })), + ); }; const close = () => { @@ -111,7 +123,6 @@ const loadMoreSongs = async () => { const reslist = await getMusicDetail(trackIds); // displayedSongs.value = displayedSongs.value.concat(reslist.data.songs); displayedSongs.value = JSON.parse(JSON.stringify([...displayedSongs.value, ...reslist.data.songs])); - console.log('displayedSongs.value', displayedSongs.value); page.value++; } catch (error) { console.error('error', error); diff --git a/src/components/common/SongItem.vue b/src/components/common/SongItem.vue index 3d9ca33..ae28f92 100644 --- a/src/components/common/SongItem.vue +++ b/src/components/common/SongItem.vue @@ -7,8 +7,8 @@
- {{ artists.name }}{{ artistsindex < item.artists.length - 1 ? ' / ' : '' }}{{ artists.name }}{{ artistsindex < (item.ar || item.song.artists).length - 1 ? ' / ' : '' }}
@@ -32,12 +32,12 @@