// import http from '@/utils/http'
import type { MusicFInd, TypeList } from '@/types/home'
import { http } from '@/utils/http'

//首页轮播图路径
const home = '/home/banner'

//首页音乐类型路径
const musicType = '/type/find'
//查询具体的音乐
const musicFindUrl = '/music/find'
export const getHomeApi = (distributionSite = 1) => {
  return http<TypeList[]>({
    method: 'GET',
    url: home,
    data: {
      distributionSite,
    },
  })
}

export const musicTypeApi = () => {
  return http<TypeList[]>({
    method: 'GET',
    url: musicType,
    data: {},
  })
}

export const musicFindApi = (id: string) => {
  return http<MusicFInd[]>({
    method: 'GET',
    url: musicFindUrl + `/${id}`,
  })
}
