refactor: player

This commit is contained in:
qier222 2021-01-05 22:17:47 +08:00
parent 0482e6a1ed
commit f6c36fbcac
22 changed files with 659 additions and 500 deletions

View file

@ -112,7 +112,6 @@ import {
artistMv,
followAArtist,
} from "@/api/artist";
import { playAList } from "@/utils/play";
import { isAccountLoggedIn } from "@/utils/auth";
import NProgress from "nprogress";
@ -186,7 +185,12 @@ export default {
},
playPopularSongs(trackID = "first") {
let trackIDs = this.popularTracks.map((t) => t.id);
playAList(trackIDs, this.artist.id, "artist", trackID);
this.$store.state.player.replacePlaylist(
trackIDs,
this.artist.id,
"artist",
trackID
);
},
followArtist() {
if (!isAccountLoggedIn()) {