mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: monorepo
This commit is contained in:
parent
4d54060a4f
commit
42089d4996
200 changed files with 1530 additions and 1521 deletions
32
packages/web/api/artist.ts
Normal file
32
packages/web/api/artist.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import request from '@/web/utils/request'
|
||||
import {
|
||||
FetchArtistParams,
|
||||
FetchArtistResponse,
|
||||
FetchArtistAlbumsParams,
|
||||
FetchArtistAlbumsResponse,
|
||||
} from '@/shared/api/Artist'
|
||||
|
||||
// 歌手详情
|
||||
export function fetchArtist(
|
||||
params: FetchArtistParams,
|
||||
noCache: boolean
|
||||
): Promise<FetchArtistResponse> {
|
||||
const otherParams: { timestamp?: number } = {}
|
||||
if (noCache) otherParams.timestamp = new Date().getTime()
|
||||
return request({
|
||||
url: '/artists',
|
||||
method: 'get',
|
||||
params: { ...params, ...otherParams },
|
||||
})
|
||||
}
|
||||
|
||||
// 获取歌手的专辑列表
|
||||
export function fetchArtistAlbums(
|
||||
params: FetchArtistAlbumsParams
|
||||
): Promise<FetchArtistAlbumsResponse> {
|
||||
return request({
|
||||
url: 'artist/album',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue