diff --git a/Laravel/app/Http/Controllers/API/H5/QuestionnairesLogsController.php b/Laravel/app/Http/Controllers/API/H5/QuestionnairesLogsController.php index 4fdffee..fe772ba 100644 --- a/Laravel/app/Http/Controllers/API/H5/QuestionnairesLogsController.php +++ b/Laravel/app/Http/Controllers/API/H5/QuestionnairesLogsController.php @@ -88,6 +88,7 @@ class QuestionnairesLogsController extends Controller $person_info = json_decode($log_info->person_info, true); $age = !!$person_info['birthday'] ? date('Y') - date('Y', strtotime($person_info['birthday'])) : 0; + $sex = !!$person_info['sex'] ? $person_info['sex'] : 1; $weight = !!$log_info->weight ? $log_info->weight : 0; $height = !!$log_info->height ? $log_info->height : 0; $items_ids = json_decode($log_info->check_items, true); @@ -109,6 +110,7 @@ class QuestionnairesLogsController extends Controller } return \Yz::Return(true, '操作完成', [ 'date' => date('Y-m-d', strtotime($log_info->created_at)), + 'sex' => $sex, 'age' => $age, 'weight' => $wh, 'items' => $items,