--- a/application/p/logic/Nutrition.php +++ b/application/p/logic/Nutrition.php @@ -100,7 +100,10 @@ // } if (!empty($nutrition)) { foreach ($nutrition as $key => $value) { - $nutrition[$key] = $this->normalizeDictionaryCreateTime($value); + $nutrition[$key] = $this->normalizeDictionaryCreateTime($value); + if ($field === ['a.*', 'b.name as set_name']) { + $nutrition[$key] = \app\common\service\NutritionFloat82Write::physicalForModel($nutrition[$key], 'nutrition', $this->model); + } $nutrition[$key]['img_path'] = getImgFullPath($value['img_path']); $nutrition[$key]['source_img_path'] = getImgFullPath($value['source_img_path']); $nutrition[$key]['app_img'] = getImgFullPath($value['app_img']); --- a/application/m/logic/Nutrition.php +++ b/application/m/logic/Nutrition.php @@ -162,7 +162,10 @@ } if (!empty($rand_data)) { foreach ($rand_data as $key => $value) { - $rand_data[$key] = $this->normalizeDictionaryCreateTime($value); + $rand_data[$key] = $this->normalizeDictionaryCreateTime($value); + if ($field === ['a.*', 'b.name as set_name']) { + $rand_data[$key] = \app\common\service\NutritionFloat82Write::physicalForModel($rand_data[$key], 'nutrition', $this->model); + } $rand_data[$key]['img_path'] = getImgFullPath($value['img_path']); $rand_data[$key]['source_img_path'] = getImgFullPath($value['source_img_path']); }