import request from '@/utils/request'
export function recentLive() {
  return request({
    url: '/liveData/liveData/recentLive',
    method: 'get',
  })
}

export function dashboardData(liveId) {
  return request({
    url: '/liveData/liveData/dashboardData' + '?liveId=' +liveId,
    method: 'get'
  })
}

export function listLiveData(data) {
  return request({
    url: '/liveData/liveData/listLiveData',
    method: 'post',
    data:data,
  })
}

export function exportLiveData(data) {
  return request({
    url: '/liveData/liveData/exportLiveData',
    method: 'post',
    data: data,
  })
}

export function getLiveDataDetailBySql(liveId) {
  return request({
    url: '/liveData/liveData/getLiveDataDetailBySql?liveId=' + liveId,
    method: 'get'
  })
}

export function getLiveUserDetailListBySql(params) {
  let url = '/liveData/liveData/getLiveUserDetailListBySql?liveId=' + params.liveId;
  if (params.pageNum) {
    url += '&pageNum=' + params.pageNum;
  }
  if (params.pageSize) {
    url += '&pageSize=' + params.pageSize;
  }
  return request({
    url: url,
    method: 'get'
  })
}

export function getLiveDataDetailByServer(liveId) {
  return request({
    url: '/liveData/liveData/getLiveDataDetailByServer?liveId=' + liveId,
    method: 'get'
  })
}

export function getLiveUserDetailListByServer(liveId) {
  return request({
    url: '/liveData/liveData/getLiveUserDetailListByServer?liveId=' + liveId,
    method: 'get'
  })
}

// 导出直播间用户详情数据
export function exportLiveUserDetail(liveId) {
  return request({
    url: '/liveData/liveData/exportLiveUserDetail?liveId=' + liveId,
    method: 'get'
  })
}
