деструктурировал нужные объекты для предварительной загрузки в initializationInfo()
This commit is contained in:
parent
d332dac38f
commit
3da3f39f5a
|
|
@ -161,7 +161,6 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('initPlayer');
|
||||
// console.log(this.$store.state);
|
||||
if (this.user?.id) {
|
||||
this.checkSongIsFavorite();
|
||||
this.getSongList();
|
||||
|
|
@ -193,14 +192,15 @@ export default {
|
|||
app
|
||||
.getNowplaying()
|
||||
.then((responce) => {
|
||||
console.log(responce.now_playing.song);
|
||||
const { art, title, artist } = responce.now_playing.song;
|
||||
|
||||
this.$store.dispatch('setCurrentPlay', {
|
||||
...this.currentPlay,
|
||||
isLoader: false,
|
||||
...responce.now_playing.song,
|
||||
art,
|
||||
title,
|
||||
artist,
|
||||
});
|
||||
console.log(this.player.target.src);
|
||||
// console.log(this.$store.state);
|
||||
})
|
||||
.catch((error) => console.log(error));
|
||||
},
|
||||
|
|
@ -236,6 +236,7 @@ export default {
|
|||
},
|
||||
getPlaying(e) {
|
||||
const jsonData = JSON.parse(e.data);
|
||||
|
||||
if (jsonData?.pub?.data) {
|
||||
const data = jsonData?.pub?.data;
|
||||
if (this.currentPlay.live) {
|
||||
|
|
@ -358,6 +359,7 @@ export default {
|
|||
app
|
||||
.getAudio(id)
|
||||
.then((res) => {
|
||||
console.log('res в методе getAudio', res);
|
||||
const blob = new Blob([res], { type: 'application/audio' });
|
||||
const audioUrl = URL.createObjectURL(blob);
|
||||
this.$store.dispatch('changePlayer', audioUrl);
|
||||
|
|
|
|||
Loading…
Reference in New Issue