import service from '@/utils/request'

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

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

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

// @Summary 修改
// @Produce  application/json
// @Param menu Object
// @Router /cms/live/update [put]
export const updateLive = (data) => {
  return service({
    url: '/cms/live/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/live/get [get]
export const getLiveById = (params) => {
  return service({
    url: '/cms/live/get',
    method: 'get',
    params
  })
}
