import request from '@/utils/request'

// 查询直播间题库列表
export function listLiveQuestionLive(query) {
    return request({
        url: '/live/liveQuestionLive/list',
        method: 'get',
        params: query
    })
}

// 查询直播间可选题库列表
export function listLiveQuestionOptionList(query) {
    return request({
        url: '/live/liveQuestionLive/optionList',
        method: 'get',
        params: query
    })
}

// 新增直播间题库
export function addLiveQuestionLive(data) {
    return request({
        url: '/live/liveQuestionLive',
        method: 'post',
        params: data
    })
}

// 删除直播间题库
export function deleteLiveQuestionLive(data) {
    return request({
        url: '/live/liveQuestionLive/' + data.liveId,
        method: 'delete',
        params: {ids: data.ids}
    })
}

// 查询直播观看奖励设置列表
export function listConfig(query) {
  return request({
    url: '/live/config/list',
    method: 'get',
    params: query
  })
}

// 查询直播观看奖励设置详细
export function getConfig(id) {
  return request({
    url: '/live/config/' + id,
    method: 'get'
  })
}

// 新增直播观看奖励设置
export function addConfig(data,liveId) {
  return request({
    url: '/live/config' + '?liveId=' + liveId,
    method: 'post',
    data: data
  })
}

// 修改直播观看奖励设置
export function updateConfig(data,liveId) {
  return request({
    url: '/live/config' + '?liveId=' + liveId,
    method: 'put',
    data: data
  })
}

// 删除直播观看奖励设置
export function delConfig(id) {
  return request({
    url: '/live/config/' + id,
    method: 'delete'
  })
}

// 导出直播观看奖励设置
export function exportConfig(query) {
  return request({
    url: '/live/config/export',
    method: 'get',
    params: query
  })
}
