From aa0274d273654617cd604887e664579f440f1a61 Mon Sep 17 00:00:00 2001 From: xuan Date: Thu, 12 Jan 2023 18:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001104):=20=E3=80=90?= =?UTF-8?q?=E5=86=85=E9=83=A8=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91--?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E9=9D=A2=E6=96=99=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【内部小程序】--购物车面料选择后无法取消】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001104 --- src/pages/shopping/components/shoppingCartItem/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/shopping/components/shoppingCartItem/index.tsx b/src/pages/shopping/components/shoppingCartItem/index.tsx index bb99f58..9471941 100644 --- a/src/pages/shopping/components/shoppingCartItem/index.tsx +++ b/src/pages/shopping/components/shoppingCartItem/index.tsx @@ -280,12 +280,13 @@ const ShoppingCartItem: FC = (props) => { const { fetchData } = ShoppingCartListApi() useEffect(() => { - if (itemData?.purchaser_id === 1708 || itemData?.purchaser_id === 642) { + if (itemData?.purchaser_id === 1709) { console.log('useEffect multipleSelection', multipleSelection, colorStore) } }, [itemData, multipleSelection, colorStore]) // 更新当前客户的多选项 const updatePurchaserMultipleSelection = (purchaserId: number, payload: Goods, operationType: OperationType, goodsId: number) => { + console.log('delete', colorStore, purchaserId) if (operationType === 'add') { dispatch({ type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX, @@ -299,7 +300,7 @@ const ShoppingCartItem: FC = (props) => { }) } else if (operationType === 'delete') { - const temp = { ...colorStore?.[purchaserId].multipleSelection } + const temp = { ...colorStore?.[purchaserId]?.multipleSelection } delete temp?.[goodsId] dispatch({ type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX,