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,