From 46aed8ec0aab2461e8ddfab53141784d29ccd39e Mon Sep 17 00:00:00 2001 From: yanzai Date: Mon, 30 Dec 2024 17:47:57 +0800 Subject: [PATCH] =?UTF-8?q?web=E7=AB=AF=E5=88=A4=E6=96=AD=E5=A9=9A?= =?UTF-8?q?=E5=90=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/API/Web/OrderController.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Laravel/app/Http/Controllers/API/Web/OrderController.php b/Laravel/app/Http/Controllers/API/Web/OrderController.php index 2a40393..15e56d9 100644 --- a/Laravel/app/Http/Controllers/API/Web/OrderController.php +++ b/Laravel/app/Http/Controllers/API/Web/OrderController.php @@ -25,6 +25,15 @@ class OrderController extends Controller $doctor = request('doctor');//预约的医生名字 $appdoctor = request('appdoctor');//协助预约的医生名字 $person= request('person'); //sex,birthday,married,name,id_number,phone + $married_array=["未婚","已婚","丧偶","离婚","其他"]; + if(isset($person['married'])){ + $key= array_search($person['married'], $married_array); + if ($key !== false) { + $person['married']=$key; + } else { + $person['married']=4; + } + } if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空'); if (!isset($type)) return \Yz::echoError1('type体检类型不能为空'); @@ -253,6 +262,15 @@ class OrderController extends Controller $doctor = request('doctor');//预约的医生名字 $appdoctor = request('appdoctor');//协助预约的医生名字 $person= request('person'); //sex,birthday,married,name,id_number,phone + $married_array=["未婚","已婚","丧偶","离婚","其他"]; + if(isset($person['married'])){ + $key= array_search($person['married'], $married_array); + if ($key !== false) { + $person['married']=$key; + } else { + $person['married']=4; + } + } if (!isset($hospital_id)) return \Yz::echoError1('医院id不能为空'); if (!isset($type)) return \Yz::echoError1('type体检类型不能为空');