All files / src/api songListAPI.js

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                                                                 
import axios from 'axios'
import BACKURL from './backConfig'
 
const host = BACKURL
 
export default {
  /**
   * @msg: 获取全部歌单
   * @return: {Promise}
   */
  getSongList () {
    return axios.get(`${host}/songList`)
  },
 
  /**
   * @msg: 获取歌单类型
   * @param {String} style
   * @return: {Promise}
   */
  getSongListOfStyle (style) {
    return axios.get(`${host}/songList/style/detail?style=${style}`)
  },
 
  /**
   * @msg: 返回标题包含文字的歌单
   * @param {String} keywords
   * @return: {Promise}
   */
  getSongListOfLikeTitle (keywords) {
    return axios.get(`${host}/songList/likeTitle/detail?title=${keywords}`)
  }
}