fix: bugs

This commit is contained in:
qier222 2021-06-08 00:09:30 +08:00
parent 22c9691a73
commit c506dea02b
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
18 changed files with 79 additions and 32 deletions

View file

@ -206,6 +206,11 @@ export default {
}
},
},
watch: {
album: function () {
this.$parent.$refs.main.scrollTo({ top: 0 });
},
},
created() {
this.loadData(this.$route.params.id);
},

View file

@ -261,18 +261,19 @@ export default {
this.loadData(this.$route.params.id);
},
activated() {
if (this.show) {
if (this.artist.id.toString() !== this.$route.params.id) {
this.show = false;
NProgress.start();
this.loadData(this.$route.params.id);
}
if (this.artist?.id?.toString() !== this.$route.params.id) {
this.loadData(this.$route.params.id);
} else {
this.$parent.$refs.scrollbar.restorePosition();
}
},
methods: {
...mapMutations(['appendTrackToPlayerList']),
...mapActions(['playFirstTrackOnList', 'playTrackOnListByID', 'showToast']),
loadData(id, next = undefined) {
NProgress.start();
this.show = false;
this.$parent.$refs.main.scrollTo({ top: 0 });
getArtist(id).then(data => {
this.artist = data.artist;
this.popularTracks = data.hotSongs;

View file

@ -21,7 +21,7 @@ import { dailyRecommendTracks } from '@/api/playlist';
import TrackList from '@/components/TrackList.vue';
export default {
name: 'dailyTracks',
name: 'DailyTracks',
components: {
TrackList,
},
@ -40,6 +40,7 @@ export default {
} else {
this.show = true;
}
this.$parent.$refs.main.scrollTo(0, 0);
},
methods: {
...mapMutations(['updateDailyTracks']),

View file

@ -117,6 +117,7 @@ export default {
},
activated() {
this.loadData();
this.$parent.$refs.scrollbar.restorePosition();
},
methods: {
...mapMutations(['togglePlaylistCategory']),

View file

@ -106,6 +106,7 @@ export default {
},
activated() {
this.loadData();
this.$parent.$refs.scrollbar.restorePosition();
},
methods: {
loadData() {

View file

@ -234,6 +234,7 @@ export default {
this.loadData();
},
activated() {
this.$parent.$refs.scrollbar.restorePosition();
this.loadData();
dailyTask();
},

View file

@ -267,7 +267,6 @@ export default {
clearInterval(this.qrCodeCheckInterval);
this.qrCodeInformation = '登录成功,请稍等...';
result.code = 200;
console.log(result);
this.handleLoginResponse(result);
}
});
@ -463,6 +462,7 @@ button.loading {
margin-bottom: 12px;
}
.qr-code-info {
color: var(--color-text);
text-align: center;
margin-bottom: 28px;
}

View file

@ -218,7 +218,7 @@ export default {
return this.player.currentTrack?.al?.picUrl + '?param=1024y1024';
},
bgImageUrl() {
return this.player.currentTrack?.al?.picUrl + '?param=500y500';
return this.player.currentTrack?.al?.picUrl + '?param=512y512';
},
lyricWithTranslation() {
let ret = [];

View file

@ -81,6 +81,7 @@ export default {
},
activated() {
this.loadTracks();
this.$parent.$refs.scrollbar.restorePosition();
},
methods: {
...mapActions(['playTrackOnListByID']),