diff --git a/.workbuddy/memory/MEMORY.md b/.workbuddy/memory/MEMORY.md index 088aae2..858e7a6 100644 --- a/.workbuddy/memory/MEMORY.md +++ b/.workbuddy/memory/MEMORY.md @@ -25,6 +25,8 @@ - VIP 审核页:`src/pages/user/vip-review/index.tsx` - VIP 升级页:`src/pages/user/vip-upgrade/index.tsx` - 门店中心:`src/pages/store/center/index.tsx` +- 购物车 API:`src/api/shop/shopCart/index.ts`(批量删除接口 `/shop/shop-cart/batch` 后端期望直接接收 `ArrayList` 即 `[1,2,3]`,不要用 `{ ids }` 包裹) +- 购物车 Context:`src/contexts/CartContext.tsx` ## 订阅消息 - 模板 ID:`sh1K9iK7vZjebUNFu6OsMsnsJxm4whThWGrhN7I4zVg`(交易提醒) diff --git a/src/api/shop/shopCart/index.ts b/src/api/shop/shopCart/index.ts index d8c9c37..1c212bc 100644 --- a/src/api/shop/shopCart/index.ts +++ b/src/api/shop/shopCart/index.ts @@ -118,7 +118,7 @@ export async function removeShopCart(id: number) { export async function removeBatchShopCart(ids: number[]) { const res = await request.del>( '/shop/shop-cart/batch', - { ids } + ids ); if (res.code === 0) { return res.message || '删除成功';