import http from './request'
import {get, post, uploadFile} from './http'

const prefix = '/cart'
/**
 * 获取购物车列表
 * @param params
 * @returns {Promise<*>}
 */
export async function getCartListApi(params) {
    return await get(`${prefix}/list`, params, 3)
}
/**
 * 获取购物车数量
 * @param params
 * @returns {Promise<*>}
 */
export async function getCartCountsApi(params) {
    return await get(`${prefix}/cart-counts`, params, 3)
}
/**
 * 加入购物车
 * @param params
 * @returns {Promise<*>}
 */
export async function saveCartApi(params) {
    return await post(`${prefix}/save-cart`, params, 3)
}
