import request from '@/utils/request'

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

// 查询购物车详细
export function getInfo(id) {
  return request({
    url: '/shopCart/info/' + id,
    method: 'get'
  })
}

// 新增购物车
export function addInfo(data) {
  return request({
    url: '/shopCart/info',
    method: 'post',
    data: data
  })
}

// 修改购物车
export function updateInfo(data) {
  return request({
    url: '/shopCart/info/'+data.id,
    method: 'put',
    data: data
  })
}

// 删除购物车
export function delInfo(id) {
  return request({
    url: '/shopCart/info/' + id,
    method: 'delete'
  })
}
