更新 问卷记录返回 增加性别字段

main
鹿和sa0ChunLuyu 1 year ago
parent b8cf11c64d
commit 3771ff155c

@ -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,

Loading…
Cancel
Save