style: remove mapTrackPlayableStatus from vue components

This commit is contained in:
qier222 2020-10-21 15:50:56 +08:00
parent c3d0aeff23
commit 89bb04b51b
5 changed files with 25 additions and 23 deletions

View file

@ -92,7 +92,6 @@ import NProgress from "nprogress";
import { getPlaylistDetail, subscribePlaylist } from "@/api/playlist";
import { playAList } from "@/utils/play";
import { getTrackDetail } from "@/api/track";
import { mapTrackPlayableStatus } from "@/utils/common";
import { isLoggedIn } from "@/utils/auth";
import ButtonTwoTone from "@/components/ButtonTwoTone.vue";
@ -166,7 +165,6 @@ export default {
.then(data => {
this.playlist = data.playlist;
this.tracks = data.playlist.tracks;
this.tracks = mapTrackPlayableStatus(this.tracks);
NProgress.done();
if (next !== undefined) next();
this.show = true;
@ -194,7 +192,6 @@ export default {
trackIDs = trackIDs.map(t => t.id);
getTrackDetail(trackIDs.join(",")).then(data => {
this.tracks.push(...data.songs);
this.tracks = mapTrackPlayableStatus(this.tracks);
this.lastLoadedTrackIndex += trackIDs.length;
this.loadingMore = false;
});