import service from '@/utils/request'

// @Summary 获取列表
// @Produce  application/json
// @Router /cms/adPosition/getList [post]
export const getAdPositionList = (data) => {
  return service({
    url: '/cms/adPosition/getList',
    method: 'post',
    data
  })
}

// @Summary 新增
// @Produce  application/json
// @Param menu Object
// @Router /cms/adPosition/add [post]
export const addAdPosition = (data) => {
  return service({
    url: '/cms/adPosition/add',
    method: 'post',
    data
  })
}

// @Summary 删除
// @Produce  application/json
// @Param ID int
// @Router /cms/adPosition/delete [delete]
export const deleteAdPosition = (data) => {
  return service({
    url: '/cms/adPosition/delete',
    method: 'delete',
    data
  })
}

// @Summary 修改
// @Produce  application/json
// @Param menu Object
// @Router /cms/adPosition/update [put]
export const updateAdPosition = (data) => {
  return service({
    url: '/cms/adPosition/update',
    method: 'put',
    data
  })
}

// @Summary 根据id获取
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.GetById true "根据id获取"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /cms/adPosition/get [get]
export const getAdPositionById = (params) => {
  return service({
    url: '/cms/adPosition/get',
    method: 'get',
    params
  })
}
