mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
fix: bugs
This commit is contained in:
parent
7d580e7113
commit
5355caa4e4
7 changed files with 72 additions and 59 deletions
|
|
@ -169,9 +169,6 @@ export default {
|
|||
title: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loadData(this.$route.params.id);
|
||||
},
|
||||
computed: {
|
||||
...mapState(["player", "data"]),
|
||||
albumTime() {
|
||||
|
|
@ -197,6 +194,9 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.loadData(this.$route.params.id);
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["appendTrackToPlayerList"]),
|
||||
...mapActions(["playFirstTrackOnList", "playTrackOnListByID", "showToast"]),
|
||||
|
|
@ -211,15 +211,20 @@ export default {
|
|||
likeAAlbum({
|
||||
id: this.album.id,
|
||||
t: this.dynamicDetail.isSub ? 0 : 1,
|
||||
}).then((data) => {
|
||||
if (data.code === 200) {
|
||||
this.dynamicDetail.isSub = !this.dynamicDetail.isSub;
|
||||
if (toast === true)
|
||||
this.showToast(
|
||||
this.dynamicDetail.isSub ? "已保存到音乐库" : "已从音乐库删除"
|
||||
);
|
||||
}
|
||||
});
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.code === 200) {
|
||||
this.dynamicDetail.isSub = !this.dynamicDetail.isSub;
|
||||
if (toast === true)
|
||||
this.showToast(
|
||||
this.dynamicDetail.isSub ? "已保存到音乐库" : "已从音乐库删除"
|
||||
);
|
||||
}
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.showToast(`${error.response.data.message || error}`);
|
||||
});
|
||||
},
|
||||
formatTitle() {
|
||||
let splitTitle = splitSoundtrackAlbumTitle(this.album.name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue