From bfbb1ea3c6bb2dd7db064fb189290a1bfcf6c9cd Mon Sep 17 00:00:00 2001
From: seatonwan9
Date: 星期四, 28 八月 2025 02:14:48 +0800
Subject: [PATCH] 提交源码

---
 src/api/cartApi.ts |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/api/cartApi.ts b/src/api/cartApi.ts
index 2d46ee8..20cf968 100644
--- a/src/api/cartApi.ts
+++ b/src/api/cartApi.ts
@@ -5,7 +5,7 @@
 
 const cartApi = {
   // 娣诲姞鍟嗗搧鍒拌喘鐗╄溅
-  addToCart(data: any, userId: number, unitId: number): ApiPromise {
+  addToCart(data: any, userId: string, unitId: string): ApiPromise {
     return createAxios({
       url: `${baseUrl}/add`,
       method: 'post',
@@ -15,7 +15,7 @@
   },
 
   // 浠庤喘鐗╄溅绉婚櫎鍟嗗搧
-  removeFromCart(userId: number, unitId: number, pricingId: number): ApiPromise {
+  removeFromCart(userId: string, unitId: string, pricingId: string): ApiPromise {
     return createAxios({
       url: `${baseUrl}/remove`,
       method: 'delete',
@@ -24,7 +24,7 @@
   },
 
   // 鏇存柊璐墿杞﹀晢鍝佹暟閲�
-  updateCartItem(userId: number, unitId: number, pricingId: number, quantity: number): ApiPromise {
+  updateCartItem(userId: string, unitId: string, pricingId: number, quantity: number): ApiPromise {
     return createAxios({
       url: `${baseUrl}/update`,
       method: 'put',
@@ -33,7 +33,7 @@
   },
 
   // 鑾峰彇璐墿杞︿俊鎭�
-  getCartInfo(userId: number, unitId: number): ApiPromise {
+  getCartInfo(userId: string, unitId: string): ApiPromise {
     return createAxios({
       url: `${baseUrl}/info`,
       method: 'get',
@@ -42,7 +42,7 @@
   },
 
   // 鑾峰彇璐墿杞﹀晢鍝佸垪琛�
-  getCartItems(userId: number, unitId: number): ApiPromise {
+  getCartItems(userId: string, unitId: string): ApiPromise {
     return createAxios({
       url: `${baseUrl}/items`,
       method: 'get',
@@ -51,7 +51,7 @@
   },
 
   // 娓呯┖璐墿杞�
-  clearCart(userId: number, unitId: number): ApiPromise {
+  clearCart(userId: string, unitId: string): ApiPromise {
     return createAxios({
       url: `${baseUrl}/clear`,
       method: 'delete',

--
Gitblit v1.8.0