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