feat:直播 Tab 顶部显示关注主播在线列表

This commit is contained in:
Developer
2026-03-19 20:46:16 +08:00
parent c0b7b8e974
commit f5d49cd3f9
3 changed files with 138 additions and 24 deletions

View File

@@ -425,3 +425,21 @@ export async function getDanmaku(cid: number): Promise<DanmakuItem[]> {
return [];
}
}
export async function getFollowedLiveRooms(): Promise<LiveRoom[]> {
const res = await api.get(`${LIVE_BASE}/xlive/web-ucenter/v1/xfetter/FeedList`, {
params: { page: 1, page_size: 10, platform: 'web' },
});
const list = res.data?.data?.list ?? [];
return list.map((r: any) => ({
roomid: r.room_id,
uid: r.uid,
title: r.title,
uname: r.uname,
face: r.face,
cover: r.cover || r.keyframe || '',
online: r.online ?? 0,
area_name: r.area_v2_name ?? '',
parent_area_name: r.area_v2_parent_name ?? '',
}));
}