diff --git a/src/api/artist.js b/src/api/artist.js index 08428b1..31b0742 100644 --- a/src/api/artist.js +++ b/src/api/artist.js @@ -89,3 +89,17 @@ export function followAArtist(params) { params, }); } + +/** + * 相似歌手 + * 说明 : 调用此接口 , 传入歌手 id, 可获得相似歌手 + * - id: 歌手 id + * @param {number} id + */ +export function similarArtists(id) { + return request({ + url: "/simi/artist", + method: "post", + params: { id }, + }); +} diff --git a/src/components/CoverRow.vue b/src/components/CoverRow.vue index 8f935cb..e66cee1 100644 --- a/src/components/CoverRow.vue +++ b/src/components/CoverRow.vue @@ -1,5 +1,5 @@ @@ -111,6 +121,7 @@ import { getArtistAlbum, artistMv, followAArtist, + similarArtists, } from "@/api/artist"; import { isAccountLoggedIn } from "@/utils/auth"; import NProgress from "nprogress"; @@ -144,6 +155,7 @@ export default { showMorePopTracks: false, mvs: [], hasMoreMV: false, + similarArtists: [], }; }, computed: { @@ -176,6 +188,9 @@ export default { this.mvs = data.mvs; this.hasMoreMV = data.hasMore; }); + similarArtists(id).then((data) => { + this.similarArtists = data.artists; + }); }, goToAlbum(id) { this.$router.push({ @@ -343,4 +358,10 @@ export default { } } } + +.similar-artists { + .section-title { + margin-bottom: 24px; + } +}