修复黄瓜
This commit is contained in:
parent
ef882b2154
commit
91f880bd8d
@ -19,22 +19,23 @@ export function getProcessMenuData(menuData) {
|
|||||||
igdList: cur.igdList.reduce((igdArr, igdData) => {
|
igdList: cur.igdList.reduce((igdArr, igdData) => {
|
||||||
if (igdData.id > 0) {
|
if (igdData.id > 0) {
|
||||||
const tarDetail = cur.detail.find(obj => obj.id === igdData.id);
|
const tarDetail = cur.detail.find(obj => obj.id === igdData.id);
|
||||||
if (tarDetail) {
|
|
||||||
igdArr.push({
|
igdArr.push({
|
||||||
id: igdData.id,
|
id: igdData.id,
|
||||||
name: igdData.name,
|
name: igdData.name,
|
||||||
carbonRatio: igdData.carbonRatio,
|
carbonRatio: igdData.carbonRatio,
|
||||||
fatRatio: igdData.fatRatio,
|
fatRatio: igdData.fatRatio,
|
||||||
proteinRatio: igdData.proteinRatio,
|
proteinRatio: igdData.proteinRatio,
|
||||||
cusUnit: tarDetail.cus_unit,
|
cusUnit: tarDetail ? tarDetail.cus_unit : igdData.cusUnit,
|
||||||
cusWeight: tarDetail.cus_weight,
|
cusWeight: tarDetail ? tarDetail.cus_weight : igdData.cusWeight,
|
||||||
weight: parseFloat(tarDetail.weight),
|
weight: tarDetail
|
||||||
|
? parseFloat(tarDetail.weight)
|
||||||
|
: parseFloat(igdData.weight),
|
||||||
notRec: igdData.notRec,
|
notRec: igdData.notRec,
|
||||||
rec: igdData.rec,
|
rec: igdData.rec,
|
||||||
type: igdData.type
|
type: igdData.type
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return igdArr;
|
return igdArr;
|
||||||
}, [])
|
}, [])
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user