import { Service } from '@/Service/Service';
export class CarService {
    /**
     * 购物车列表
     * GET /api/Car/GetUserCarList
     */
    static async GetUserCarList(page: number) {
        return await Service.Request( "/api/Car/GetUserCarList", 'GET',{ page });
    }

    /**
     * 添加购物车
     * POST /api/Car/AddUserCar
     */
    static async AddUserCar(goodsId:string,rule:string,count:number) {
        return await Service.Request( "/api/Car/AddUserCar",'POST', {goodsId,rule,count });
    }
	

    /**
     * 删除购物车记录
     * POST /api/Car/DelUserCar
     */
    static async DelUserCar(par:string,type:number) {
        return await Service.Request( "/api/Car/DelUserCar",'POST', {par,type});
    }

    /**
     * 修改购物车数量
     * POST /api/Car/UpdateCarCount
     */
    static async UpdateCarCount(cgId:string,count:number) {
        return await Service.Request( "/api/Car/UpdateCarCount",'POST', {cgId, count});
    }
}