feat: 支持收藏歌单和专辑

This commit is contained in:
qier222 2022-04-05 21:23:55 +08:00
parent db5730dfdd
commit 49bb849982
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
12 changed files with 242 additions and 46 deletions

View file

@ -27,3 +27,23 @@ export function fetchAlbum(
params: { ...params, ...otherParams },
})
}
export interface LikeAAlbumParams {
t: 1 | 2
id: number
}
export interface LikeAAlbumResponse {
code: number
}
export function likeAAlbum(
params: LikeAAlbumParams
): Promise<LikeAAlbumResponse> {
return request({
url: '/album/sub',
method: 'post',
params: {
...params,
timestamp: Date.now(),
},
})
}