import axios from '../api'

/**
 * API接口
 */
export default {

  getAllList(params) {
    return axios({
      method: "GET",
      url: '/api/admin/spectrum/list',
      params: {
        ...params
      }
    })
  },

  upload(params) {
    return axios({
      method: "POST",
      url: '/api/admin/spectrum/upload',
      data: params,
      timeout: 1000000,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },

  edit(params) {
    return axios({
      method: "POST",
      url: '/api/admin/spectrum/edit',
      data: params
    })
  },

  getDetail(id) {
    return axios({
      method: "GET",
      url: '/api/admin/spectrum/detail',
      params: {
        id
      }
    })
  },

  remove(params) {
    return axios({
      method: "POST",
      url: '/api/admin/spectrum/remove',
      data: params
    })
  },
}
