zilong 4 лет назад
Родитель
Сommit
89f275c813

+ 3 - 3
app/Http/Controllers/Api/V2/DoctorController.php

xqd xqd xqd
@@ -1388,7 +1388,7 @@ class DoctorController extends AuthController
                     } else {
                         $patientsArr[$kk]['sex'] = '女';
                     }
-                    $patientsArr[$kk]['age'] = numBirthday($vv['birthday']);
+                    $patientsArr[$kk]['age'] = birthday_to_age($vv['birthday']);
                 }
             }
         }
@@ -1409,7 +1409,7 @@ class DoctorController extends AuthController
                 $orderArr[$k]['product_type'] = $v['product_type'];
                 $orderArr[$k]['created_at'] = $v['created_at'];
                 $orderArr[$k]['name'] = $v['order_patient']['name'];
-                $orderArr[$k]['birthday'] = numBirthday($v['order_patient']['birthday']);
+                $orderArr[$k]['birthday'] = birthday_to_age($v['order_patient']['birthday']);
             }
         }
 
@@ -1488,7 +1488,7 @@ class DoctorController extends AuthController
             default:
                 $finds['relationship_type'] = '其他';
         }
-        $finds['age'] = numBirthday($finds['birthday']);
+        $finds['age'] = birthday_to_age($finds['birthday']);
         $user_id = $user['id'];
         // 患者单子
         $order_where = [];

+ 5 - 5
app/Http/Controllers/Api/V2/PatientController.php

xqd xqd xqd xqd xqd
@@ -135,7 +135,7 @@ class PatientController extends AuthController
                     $list[$k]['created_at'] = $v['created_at'];
                     $list[$k]['appoint_time'] = empty($v['appoint_start_time']) ? '---' : date('Y-m-d H:i:s', $v['appoint_start_time']);
                     $list[$k]['name'] = $v['oanme'];
-                    $list[$k]['birthday'] = numBirthday($v['obirthday']);
+                    $list[$k]['birthday'] = birthday_to_age($v['obirthday']);
                 }
 
             }
@@ -461,7 +461,7 @@ class PatientController extends AuthController
             $res_patient['patient_id'] = $data['patient_id'];
             $res_patient['product_type'] = $data['product_type'];
             $res_patient['name'] = $data['order_patient']['name'];//患者姓名
-            $res_patient['numbirthday'] = numBirthday($data['order_patient']['birthday']);//年龄
+            $res_patient['numbirthday'] = birthday_to_age($data['order_patient']['birthday']);//年龄
             $res_patient['card_number'] = $data['order_patient']['card_number'];//身份证号
             $res_patient['created_at'] = $data['created_at'];//下单时间
             $res_patient['nickname'] = $data['user']['nickname'];//下单用户
@@ -492,7 +492,7 @@ class PatientController extends AuthController
             $res_patient['sex'] = $data['order_patient']['sex'];
             $res_patient['product_type'] = $data['product_type'];
             $res_patient['name'] = $data['order_patient']['name'];
-            $res_patient['numbirthday'] = numBirthday($data['order_patient']['birthday']);
+            $res_patient['numbirthday'] = birthday_to_age($data['order_patient']['birthday']);
             $res_patient['card_number'] = $data['order_patient']['card_number'];
             $res_patient['symptoms'] = $data['order_patient']['symptoms'];//病情描述
             $res_patient['medical_imgs'] = json_decode($data['order_patient']['medical_imgs'], true);//病情照片
@@ -508,7 +508,7 @@ class PatientController extends AuthController
             $res_patient['patient_id'] = $data['patient_id'];
             $res_patient['product_type'] = $data['product_type'];
             $res_patient['name'] = $data['order_patient']['name']; // 患者
-            $res_patient['numbirthday'] = numBirthday($data['order_patient']['birthday']); //年龄
+            $res_patient['numbirthday'] = birthday_to_age($data['order_patient']['birthday']); //年龄
             $res_patient['card_number'] = $data['order_patient']['card_number']; // 证件号
             $res_patient['appoint_time'] = date('Y年m月d日 H:i', $data['order_patient']['appoint_start_time']);// 预约时间
             $res_patient['order_status'] = $data['order_status'];// 订单状态
@@ -792,7 +792,7 @@ class PatientController extends AuthController
             $res_patient['user_avatar'] = $data['user']['avatar'];
             $res_patient['sex'] = $data['order_patient']['sex'];
             $res_patient['name'] = $data['order_patient']['name'];
-            $res_patient['numbirthday'] = numBirthday($data['order_patient']['birthday']);
+            $res_patient['numbirthday'] = birthday_to_age($data['order_patient']['birthday']);
             $res_patient['symptoms'] = $data['order_patient']['symptoms'];//病情描述
             $res_patient['medical_imgs'] = json_decode($data['order_patient']['medical_imgs'], true);//病情照片
         }