From bd5af9c721d204218d273e0ad885bbdc0011f379 Mon Sep 17 00:00:00 2001 From: Younglina Date: Tue, 13 Aug 2024 14:26:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E5=80=BC=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=AF=BC=E8=87=B4=E5=8A=A0=E8=BD=BD=E7=A9=BA=E8=8A=82?= =?UTF-8?q?=E7=82=B9=20(#2280)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CoverRow.vue | 2 +- src/views/artist.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/CoverRow.vue b/src/components/CoverRow.vue index 46857a4..76c1e1b 100644 --- a/src/components/CoverRow.vue +++ b/src/components/CoverRow.vue @@ -50,7 +50,7 @@ export default { props: { items: { type: Array, required: true }, type: { type: String, required: true }, - subText: { type: String, default: 'null' }, + subText: { type: String, default: 'none' }, subTextFontSize: { type: String, default: '16px' }, showPlayCount: { type: Boolean, default: false }, columnNumber: { type: Number, default: 5 }, diff --git a/src/views/artist.vue b/src/views/artist.vue index 4d6aae2..3e08bb8 100644 --- a/src/views/artist.vue +++ b/src/views/artist.vue @@ -185,6 +185,7 @@ import { followAArtist, similarArtists, } from '@/api/artist'; +import { getTrackDetail } from '@/api/track'; import locale from '@/locale'; import { isAccountLoggedIn } from '@/utils/auth'; import NProgress from 'nprogress'; @@ -278,7 +279,7 @@ export default { this.$parent.$refs.main.scrollTo({ top: 0 }); getArtist(id).then(data => { this.artist = data.artist; - this.popularTracks = data.hotSongs; + this.setPopularTracks(data.hotSongs); if (next !== undefined) next(); NProgress.done(); this.show = true; @@ -295,6 +296,12 @@ export default { this.similarArtists = data.artists; }); }, + setPopularTracks(hotSongs) { + const trackIDs = hotSongs.map(t => t.id); + getTrackDetail(trackIDs.join(',')).then(data => { + this.popularTracks = data.songs; + }); + }, goToAlbum(id) { this.$router.push({ name: 'album',