import axios from '../api'

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

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

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

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

  template(params) {
    return axios({
      method: "GET",
      url: '/api/admin/trend/template',
      data: params
    })
  },

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

}
