fix: 私人推荐歌单 (#1665)

* fix: 私人推荐歌单

* update
This commit is contained in:
memorydream 2022-06-19 20:51:42 +08:00 committed by GitHub
parent 1496a8a0d0
commit 2a2ac5a37d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 15 deletions

View file

@ -66,13 +66,9 @@
<script>
import { mapState, mapMutations } from 'vuex';
import NProgress from 'nprogress';
import {
topPlaylist,
highQualityPlaylist,
recommendPlaylist,
toplists,
} from '@/api/playlist';
import { topPlaylist, highQualityPlaylist, toplists } from '@/api/playlist';
import { playlistCategories } from '@/utils/staticData';
import { getRecommendPlayList } from '@/utils/playList';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
import CoverRow from '@/components/CoverRow.vue';
@ -155,9 +151,9 @@ export default {
return this.getTopPlayList();
},
getRecommendPlayList() {
recommendPlaylist({ limit: 100 }).then(data => {
getRecommendPlayList(100, true).then(list => {
this.playlists = [];
this.updatePlaylist(data.result);
this.updatePlaylist(list);
});
},
getHighQualityPlaylist() {

View file

@ -69,10 +69,11 @@
</template>
<script>
import { toplists, recommendPlaylist } from '@/api/playlist';
import { toplists } from '@/api/playlist';
import { toplistOfArtists } from '@/api/artist';
import { byAppleMusic } from '@/utils/staticData';
import { newAlbums } from '@/api/album';
import { byAppleMusic } from '@/utils/staticData';
import { getRecommendPlayList } from '@/utils/playList';
import NProgress from 'nprogress';
import { mapState } from 'vuex';
import CoverRow from '@/components/CoverRow.vue';
@ -112,10 +113,8 @@ export default {
setTimeout(() => {
if (!this.show) NProgress.start();
}, 1000);
recommendPlaylist({
limit: 10,
}).then(data => {
this.recommendPlaylist.items = data.result;
getRecommendPlayList(10, false).then(items => {
this.recommendPlaylist.items = items;
NProgress.done();
this.show = true;
});

View file

@ -318,6 +318,10 @@ const specialPlaylist = {
name: '一周原创发现',
gradient: 'gradient-blue-purple',
},
2829883282: {
name: '华语私人雷达',
gradient: 'gradient-yellow-red',
},
3136952023: {
name: '私人雷达',
gradient: 'gradient-radar',