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

@ -125,7 +125,6 @@ import {
import { randomNum, dailyTask } from "@/utils/common";
import { getPlaylistDetail } from "@/api/playlist";
import { isAccountLoggedIn } from "@/utils/auth";
import { playPlaylistByID } from "@/utils/play";
import NProgress from "nprogress";
import TrackList from "@/components/TrackList.vue";
@ -193,7 +192,11 @@ export default {
...mapActions(["showToast"]),
...mapMutations(["updateModal"]),
playLikedSongs() {
playPlaylistByID(this.playlists[0].id, "first", true);
this.$store.state.player.playPlaylistByID(
this.playlists[0].id,
"first",
true
);
},
updateCurrentTab(tab) {
if (!isAccountLoggedIn() && tab !== "playlists") {