🐞 fix(ID1000955):加入购物车,大货类型roll字段偶尔为字符串格式导致提交出错

This commit is contained in:
Haiyi 2022-12-09 14:37:23 +08:00
parent e73c87cf6f
commit 13482814bb

View File

@ -115,8 +115,8 @@ const SearchPage = () => {
const list: any[] = []
arr.forEach((it) => {
list.push({
roll: search.modeId === 0 ? it.nums : 0,
length: search.modeId !== 0 ? it.nums * 100 : 0,
roll: search.modeId === 0 ? Number(it.nums) : 0,
length: search.modeId !== 0 ? Number(it.nums * 100) : 0,
product_color_id: Number(it.id),
})
})