import request from '@/utils/request'

// 查询音乐列表
export function listMusic(query) {
  return request({
    url: '/back/music/list',
    method: 'get',
    params: query
  })
}

// 获取分类已绑定的音乐
export function getCategoryBoundMusic(categoryId) {
  return request({
    url: `/back/category/cate/music/${categoryId}`,
    method: 'get'
  })
}

// 绑定音乐到分类
export function bindMusicToCategory(categoryId, musicIds) {
  return request({
    url: `/back/category/bind/${categoryId}/${musicIds.join(',')}`,
    method: 'put',
  })
} 