From a8f746584eed582c422af7af12d7d8cd8604ce65 Mon Sep 17 00:00:00 2001 From: Zachary Date: Sat, 20 Feb 2021 05:27:13 +0800 Subject: [PATCH] update * add playlist detail page * add DetailInfoCard component --- src/assets/css/base.css | 3 - src/assets/css/fakeqqmusic.css | 2 +- src/components/common/DetailInfoCard.vue | 191 ++++++++++++++ src/components/common/Player.vue | 28 +- src/components/content/RecommendedBar.vue | 15 +- src/router/index.js | 4 +- src/views/musicLibrary/AlbumDetail.vue | 84 +----- src/views/musicLibrary/PlaylistDetail.vue | 304 ++++++++++++++++++++++ src/views/musicLibrary/SongDetail.vue | 92 +------ src/views/musicLibrary/SongerDetail.vue | 86 +----- 10 files changed, 554 insertions(+), 255 deletions(-) create mode 100644 src/components/common/DetailInfoCard.vue create mode 100644 src/views/musicLibrary/PlaylistDetail.vue diff --git a/src/assets/css/base.css b/src/assets/css/base.css index ce17d70..a412ab5 100644 --- a/src/assets/css/base.css +++ b/src/assets/css/base.css @@ -14,9 +14,6 @@ a { color: #000; text-decoration: none; } -a:hover { - color: #31c27c; -} li { list-style: none; diff --git a/src/assets/css/fakeqqmusic.css b/src/assets/css/fakeqqmusic.css index ed49f38..81a0b31 100644 --- a/src/assets/css/fakeqqmusic.css +++ b/src/assets/css/fakeqqmusic.css @@ -852,7 +852,7 @@ img .playlist__pic { .data_info__item { float: left; line-height: 27px; - width: 166px; + width: 200px; margin-right: 10px; white-space: nowrap; overflow: hidden; diff --git a/src/components/common/DetailInfoCard.vue b/src/components/common/DetailInfoCard.vue new file mode 100644 index 0000000..47538cb --- /dev/null +++ b/src/components/common/DetailInfoCard.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/components/common/Player.vue b/src/components/common/Player.vue index c9f1360..4c41127 100644 --- a/src/components/common/Player.vue +++ b/src/components/common/Player.vue @@ -51,10 +51,11 @@ hidefocus="true" class="f-thide name fc1 f-fl" :title="currentSong.name" + @click="gotoSongDetail(currentSong.id)" >{{ currentSong.name }} - + {{ currentSong.artistsText }} @@ -110,17 +111,9 @@ > + - - {{ playlist.length }} @@ -294,6 +282,14 @@ export default { this.$store.commit("music/setPlayingState", true); } }, + gotoSongDetail(id) { + console.log(id); + this.$router.push({ + path: "/musicLibrary/songDetail", + query: { id: id }, + }); + }, + gotoSongerDetail(id) {}, }, computed: { audio() { diff --git a/src/components/content/RecommendedBar.vue b/src/components/content/RecommendedBar.vue index db49c9f..dfb51f7 100644 --- a/src/components/content/RecommendedBar.vue +++ b/src/components/content/RecommendedBar.vue @@ -25,9 +25,9 @@ />

- {{ item.name }} + + {{ item.name }} +

播放量:{{ processCount(item.playCount) }}
@@ -126,6 +126,12 @@ export default { }); }); }, + gotoPlaylistDetail(id) { + this.$router.push({ + path: "/musicLibrary/playlistDetail", + query: { id: id }, + }); + }, }, }; @@ -201,4 +207,7 @@ export default { filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr='#4C000000', endColorstr='#4C000000'); background-color: rgba(0, 0, 0, 0.3); } +a:hover { + color: #31c27c; +} diff --git a/src/router/index.js b/src/router/index.js index 0a24f26..e535dd1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ const MV = () => import("views/musicLibrary/MV"); const SongerDetail = () => import("views/musicLibrary/SongerDetail"); const SongDetail = () => import("views/musicLibrary/SongDetail"); const AlbumDetail = () => import("views/musicLibrary/AlbumDetail"); +const PlaylistDetail = () => import("views/musicLibrary/PlaylistDetail"); const My = () => import("views/My"); @@ -33,7 +34,8 @@ const routes = [ { path: "mv", component: MV }, { path: "songerDetail", name: "songerDetail", component: SongerDetail }, { path: "songDetail", component: SongDetail }, - { path: "albumDetail", component: AlbumDetail } + { path: "albumDetail", component: AlbumDetail }, + { path: "playlistDetail", component: PlaylistDetail } ] }, { diff --git a/src/views/musicLibrary/AlbumDetail.vue b/src/views/musicLibrary/AlbumDetail.vue index 1e05d56..8c52756 100644 --- a/src/views/musicLibrary/AlbumDetail.vue +++ b/src/views/musicLibrary/AlbumDetail.vue @@ -1,76 +1,7 @@ + + diff --git a/src/views/musicLibrary/SongDetail.vue b/src/views/musicLibrary/SongDetail.vue index 0352fad..2e0342c 100644 --- a/src/views/musicLibrary/SongDetail.vue +++ b/src/views/musicLibrary/SongDetail.vue @@ -1,84 +1,6 @@ diff --git a/src/views/musicLibrary/SongerDetail.vue b/src/views/musicLibrary/SongerDetail.vue index bd52d86..66c57e1 100644 --- a/src/views/musicLibrary/SongerDetail.vue +++ b/src/views/musicLibrary/SongerDetail.vue @@ -1,79 +1,11 @@