import request from '@/utils/request'

// 查询购物车列表
export function listLiveCart(query) {
  return request({
    url: '/live/liveCart/list',
    method: 'get',
    params: query
  })
}

// 查询购物车详细
export function getLiveCart(cardId) {
  return request({
    url: '/live/liveCart/' + cardId,
    method: 'get'
  })
}

// 新增购物车
export function addLiveCart(data) {
  return request({
    url: '/live/liveCart',
    method: 'post',
    data: data
  })
}

// 修改购物车
export function updateLiveCart(data) {
  return request({
    url: '/live/liveCart',
    method: 'put',
    data: data
  })
}

// 删除购物车
export function delLiveCart(cardId) {
  return request({
    url: '/live/liveCart/' + cardId,
    method: 'delete'
  })
}

// 导出购物车
export function exportLiveCart(query) {
  return request({
    url: '/live/liveCart/export',
    method: 'get',
    params: query
  })
}