mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
修复bug和优化体验
This commit is contained in:
parent
b399d5bbdc
commit
861125ea8c
17 changed files with 120 additions and 72 deletions
|
|
@ -51,7 +51,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
goToMv(id) {
|
||||
this.$router.push({ path: "/mv/" + id });
|
||||
let query = {};
|
||||
if (this.$parent.player !== undefined) {
|
||||
query = { autoplay: this.$parent.player.playing };
|
||||
}
|
||||
this.$router.push({ path: "/mv/" + id, query });
|
||||
},
|
||||
getUrl(mv) {
|
||||
if (mv.cover !== undefined) return mv.cover;
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { updateMediaSessionMetaData } from "@/utils/mediaSession";
|
||||
import { mapState, mapMutations, mapActions } from "vuex";
|
||||
import "@/assets/css/slider.css";
|
||||
|
||||
|
|
@ -152,14 +153,18 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
"updatePlayingStatus",
|
||||
"updateShuffleStatus",
|
||||
"updatePlayerList",
|
||||
"shuffleTheList",
|
||||
"updatePlayerState",
|
||||
"updateRepeatStatus",
|
||||
]),
|
||||
...mapActions(["nextTrack", "previousTrack", "playTrackOnListByID"]),
|
||||
...mapActions([
|
||||
"nextTrack",
|
||||
"previousTrack",
|
||||
"playTrackOnListByID",
|
||||
"addNextTrackEvent",
|
||||
]),
|
||||
play() {
|
||||
if (this.playing) {
|
||||
this.howler.pause();
|
||||
|
|
@ -168,6 +173,10 @@ export default {
|
|||
this.playTrackOnListByID(this.player.currentTrack.id);
|
||||
}
|
||||
this.howler.play();
|
||||
if (this.howler._onend.length === 0) {
|
||||
this.addNextTrackEvent();
|
||||
updateMediaSessionMetaData(this.player.currentTrack);
|
||||
}
|
||||
}
|
||||
},
|
||||
next() {
|
||||
Loading…
Add table
Add a link
Reference in a new issue