import { useRequest } from '@/use/useHttp'

/**
 *  获取购物车列表
 * @returns
 */
export const GetShoppingCartApi = () => {
  return useRequest({
    url: '/v1/mall/shoppingCart/productColor',
    method: 'get',
  })
}

/**
 *  批量添加面料颜色到物车列表
 * @returns
 */
export const AddShoppingCartApi = () => {
  return useRequest({
    url: '/v1/mall/shoppingCart/productColor/list',
    method: 'post',
  })
}

/**
 *  批量删除购物车面料颜色
 * @returns
 */
export const DelShoppingCartApi = () => {
  return useRequest({
    url: '/v1/mall/shoppingCart/productColor',
    method: 'delete',
  })
}

/**
 *  修改购物车数量
 * @returns
 */
export const UpdateShoppingCartApi = () => {
  return useRequest({
    url: '/v1/mall/shoppingCart/productColor',
    method: 'put',
  })
}

/**
 *  获取购物车列表v2
 * @returns
 */
export const GetShoppingCartV2Api = () => {
  return useRequest({
    url: '/v2/mall/shoppingCart/productColor',
    method: 'get',
  })
}

/**
 *  获取购物车sku数量
 * @returns
 */
export const GetProductColorApi = () => {
  return useRequest({
    url: '/v2/mall/shoppingCart/productColor/num',
    method: 'get',
  })
}

/**
 *  获取配套螺纹
 * @returns
 */
export const GetScrewProductApi = () => {
  return useRequest({
    url: '/v2/mall/shoppingCart/productColor/screwProduct',
    method: 'get',
  })
}
