From c28fd7d6690bfe6138377f45d9cf0cddf3861d4b Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 5 Jun 2025 17:57:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor(PhysicalTestService):=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=B9=B4=E9=BE=84=E5=AD=97=E6=AE=B5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=B7=AF=E5=BE=84-=20=E4=BB=8E=20$v['customerResourcesHasOne']?= =?UTF-8?q?['age']=20=E4=BF=AE=E6=94=B9=E4=B8=BA=20$v['age']=20-=20?= =?UTF-8?q?=E4=BB=8E=20$data['customerResourcesHasOne']['age']=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20$data['age']?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- niucloud/app/service/api/apiService/PhysicalTestService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/niucloud/app/service/api/apiService/PhysicalTestService.php b/niucloud/app/service/api/apiService/PhysicalTestService.php index 08b429a5..d72df915 100644 --- a/niucloud/app/service/api/apiService/PhysicalTestService.php +++ b/niucloud/app/service/api/apiService/PhysicalTestService.php @@ -58,7 +58,7 @@ class PhysicalTestService extends BaseApiService foreach ($data['data'] as &$v) { - $age = $v['customerResourcesHasOne']['age'];//年龄 + $age = $v['age'];//年龄 $gender = $v['customerResourcesHasOne']['gender'] == 'female' ? 2:1 ;//性别( 1:男,2:女) $height = $v['height'];//身高 $weight = $v['weight'];//体重 @@ -91,7 +91,7 @@ class PhysicalTestService extends BaseApiService if ($data) { $data = $data->toArray(); - $age = $data['customerResourcesHasOne']['age'];//年龄 + $age = $data['age'];//年龄 $gender = $data['customerResourcesHasOne']['gender'] == 'female' ? 2 : 1;//性别( 1:男,2:女) $height = $data['height'];//身高 $weight = $data['weight'];//体重