mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 23:57:22 +08:00
🦄 refactor: 重构整个项目 优化打包 修改后台服务为本地运行 添加更新版本检测功能
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { IList } from '@/type/list';
|
||||
import type { IListDetail } from '@/type/listDetail';
|
||||
import request from '@/utils/request';
|
||||
|
||||
interface IListByTagParams {
|
||||
tag: string;
|
||||
before: number;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
interface IListByCatParams {
|
||||
cat: string;
|
||||
offset: number;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
// 根据tag 获取歌单列表
|
||||
export function getListByTag(params: IListByTagParams) {
|
||||
return request.get<IList>('/top/playlist/highquality', { params });
|
||||
}
|
||||
|
||||
// 根据cat 获取歌单列表
|
||||
export function getListByCat(params: IListByCatParams) {
|
||||
return request.get('/top/playlist', {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 获取推荐歌单
|
||||
export function getRecommendList(limit: number = 30) {
|
||||
return request.get('/personalized', { params: { limit } });
|
||||
}
|
||||
|
||||
// 获取歌单详情
|
||||
export function getListDetail(id: number | string) {
|
||||
return request.get<IListDetail>('/playlist/detail', { params: { id } });
|
||||
}
|
||||
|
||||
// 获取专辑内容
|
||||
export function getAlbum(id: number | string) {
|
||||
return request.get('/album', { params: { id } });
|
||||
}
|
||||
Reference in New Issue
Block a user