🐞 fix(ID1000914): 散剪,在购物车页面调节米数的增减,统计数据没变化

【散剪,在购物车页面调节米数的增减,统计数据没变化】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001000914
This commit is contained in:
xuan 2022-12-06 17:29:23 +08:00
parent 78b49d92b1
commit ab25f8abef

View File

@ -325,8 +325,9 @@ const ShoppingCartItem: FC<PropsType> = (props) => {
// id: 4562, // id: 4562,
// ... // ...
// } // }
if (!res.data.list.length) { return alert.error('修改数量失败') }
const newGoodsKind = Object.fromEntries( const newGoodsKind = Object.fromEntries(
res.data[0]?.[BackEndSaleModeListFieldMap[selected]].map(item => [ res.data.list[0]?.[BackEndSaleModeListFieldMap[selected]].map(item => [
item?.id, item?.id,
{ {
id: item?.id, id: item?.id,
@ -359,7 +360,7 @@ const ShoppingCartItem: FC<PropsType> = (props) => {
), ),
}, },
}) })
setItemData(() => res.data[0]) setItemData(() => res.data.list[0])
} }
else { else {
alert.error('请求失败') alert.error('请求失败')