fix: bugs

This commit is contained in:
qier222 2021-03-06 18:48:53 +08:00
parent 11eb29b3b8
commit ee77b34ee9
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
13 changed files with 606 additions and 153 deletions

View file

@ -129,6 +129,7 @@ import { mapActions, mapMutations, mapState } from "vuex";
import { getTrackDetail, getLyric } from "@/api/track";
import {
userDetail,
userAccount,
userPlaylist,
likedAlbums,
likedArtists,
@ -169,9 +170,21 @@ export default {
},
created() {
NProgress.start();
userDetail(this.data.user.userId).then((data) => {
this.$store.commit("updateData", { key: "user", value: data.profile });
});
if (isAccountLoggedIn()) {
userAccount().then((result) => {
this.$store.commit("updateData", {
key: "user",
value: result.profile,
});
});
} else {
userDetail(this.data.user.userId).then((result) => {
this.$store.commit("updateData", {
key: "user",
value: result.profile,
});
});
}
},
activated() {
if (!this.data.likedSongPlaylistID) {