import axios from '../utils/request'
// 获取列表
export const imgList = (data) => {
  return axios({
    method: 'post',
    url: '/cms/img/list',
    data
  })
}
// 排序
export const imgSort = (id, sort) => {
  return axios({
    url: `/cms/img/sort/${id}/${sort}`
  })
}
// 是否显示
export const imgDisplay = (id, display) => {
  return axios({
    url: `/cms/img/display/${id}/${display}`
  })
}
// 点击删除
export const imgRemove = (id) => {
  return axios({
    url: `/cms/img/remove/${id}`
  })
}
// 新增、编辑
export const imgSave = (data) => {
  return axios({
    method: 'post',
    url: '/cms/img/save',
    data
  })
}
// 通过id获取详情
export const imgDetail = (id) => {
  return axios({
    url: `/cms/img/detail/${id}`
  })
}
