🐞 fix(ID1001104): 【内部小程序】--购物车面料选择后无法取消
【【内部小程序】--购物车面料选择后无法取消】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001104
This commit is contained in:
parent
e346eb824e
commit
aa0274d273
@ -280,12 +280,13 @@ const ShoppingCartItem: FC<PropsType> = (props) => {
|
|||||||
|
|
||||||
const { fetchData } = ShoppingCartListApi()
|
const { fetchData } = ShoppingCartListApi()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (itemData?.purchaser_id === 1708 || itemData?.purchaser_id === 642) {
|
if (itemData?.purchaser_id === 1709) {
|
||||||
console.log('useEffect multipleSelection', multipleSelection, colorStore)
|
console.log('useEffect multipleSelection', multipleSelection, colorStore)
|
||||||
}
|
}
|
||||||
}, [itemData, multipleSelection, colorStore])
|
}, [itemData, multipleSelection, colorStore])
|
||||||
// 更新当前客户的多选项
|
// 更新当前客户的多选项
|
||||||
const updatePurchaserMultipleSelection = (purchaserId: number, payload: Goods, operationType: OperationType, goodsId: number) => {
|
const updatePurchaserMultipleSelection = (purchaserId: number, payload: Goods, operationType: OperationType, goodsId: number) => {
|
||||||
|
console.log('delete', colorStore, purchaserId)
|
||||||
if (operationType === 'add') {
|
if (operationType === 'add') {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX,
|
type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX,
|
||||||
@ -299,7 +300,7 @@ const ShoppingCartItem: FC<PropsType> = (props) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else if (operationType === 'delete') {
|
else if (operationType === 'delete') {
|
||||||
const temp = { ...colorStore?.[purchaserId].multipleSelection }
|
const temp = { ...colorStore?.[purchaserId]?.multipleSelection }
|
||||||
delete temp?.[goodsId]
|
delete temp?.[goodsId]
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX,
|
type: ShoppingDispatchType.UPDATE_CHANGED_CHECKBOX,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user