mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
feat: B站首页推荐 — 个性化推荐/音乐区排行/热门视频
- BiliBiliProvider.getDailyRecommendSongs: 个性化推荐(登录后更准确), fallback 到音乐区排行榜 - BiliBiliProvider.getPopularVideos: 热门视频列表 - 新增 GET /api/music/bilibili/popular 端点 - 首页新增"B站热门"板块,带B站蓝色徽标 - Store 缓存 bilibiliPopular 数据 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
05d7f7d5f7
commit
cf293299c8
4 files changed
+141
-4
No files matched your search
@@ -50,6 +50,7 @@ export const usePlayerStore = defineStore('player', {
|
||||
recommendPlaylists: [] as PlaylistItem[],
|
||||
dailySongs: [] as Song[],
|
||||
userPlaylists: [] as PlaylistItem[],
|
||||
bilibiliPopular: [] as Song[],
|
||||
lastFetchTime: 0,
|
||||
}),
|
||||
|
||||
@@ -270,10 +271,11 @@ export const usePlayerStore = defineStore('player', {
|
||||
return;
|
||||
}
|
||||
|
||||
const [playlistRes, dailyRes, userRes] = await Promise.allSettled([
|
||||
const [playlistRes, dailyRes, userRes, biliRes] = await Promise.allSettled([
|
||||
axios.get('/api/music/recommend/playlists'),
|
||||
axios.get('/api/music/recommend/songs'),
|
||||
axios.get('/api/music/user/playlists'),
|
||||
axios.get('/api/music/bilibili/popular?limit=12'),
|
||||
]);
|
||||
|
||||
if (playlistRes.status === 'fulfilled') {
|
||||
@@ -285,6 +287,9 @@ export const usePlayerStore = defineStore('player', {
|
||||
if (userRes.status === 'fulfilled') {
|
||||
this.userPlaylists = userRes.value.data.playlists;
|
||||
}
|
||||
if (biliRes.status === 'fulfilled') {
|
||||
this.bilibiliPopular = biliRes.value.data.songs;
|
||||
}
|
||||
|
||||
this.lastFetchTime = Date.now();
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user