import { axios } from '@/utils/request'

// 购物车列表
export const purchaseCartList = (params) => {
  const url = `/purchaseCart/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 添加到购物车
export const purchaseCartSave = params => {
  return axios({
    url: '/purchaseCart/save',
    data: params,
    method: 'post'
  })
}
// 购物车已存在的产品
export const purchaseCartExistProduct = params => {
  return axios({
    url: '/purchaseCart/existProduct',
    data: params,
    method: 'post'
  })
}
// 批量删除购物车产品
export const purchaseDeleteBatch = params => {
  return axios({
    url: '/purchaseCart/deleteBatch',
    data: params,
    method: 'post'
  })
}
// 修改购物车数量
export const purchaseUpdateQty = params => {
  return axios({
    url: '/purchaseCart/updateQty',
    data: params,
    method: 'post'
  })
}