diff --git a/app/Controller/PatientDoctorController.php b/app/Controller/PatientDoctorController.php index aaa978a..b4c868a 100644 --- a/app/Controller/PatientDoctorController.php +++ b/app/Controller/PatientDoctorController.php @@ -74,6 +74,20 @@ class PatientDoctorController extends AbstractController return $this->response->json($data); } + /** + * 获取我历史问诊医生列表 + * @return ResponseInterface + */ + public function getHistoryDoctorList(): ResponseInterface + { + $user_info = $this->request->getAttribute("userInfo") ?? []; + + $PatientDoctorService = new PatientDoctorService(); + $data = $PatientDoctorService->getIndexPatientDoctorLimit($user_info['client_user_id']); + + return $this->response->json($data); + } + /** * 获取医生评价 * @return ResponseInterface diff --git a/config/routes.php b/config/routes.php index d147eaa..55f849b 100644 --- a/config/routes.php +++ b/config/routes.php @@ -402,6 +402,9 @@ Router::addGroup('/patient', function () { // 获取我的问诊、关注医生列表 Router::get('/my', [PatientDoctorController::class, 'getDoctorList']); + // 获取我历史问诊医生列表 + Router::get('/my', [PatientDoctorController::class, 'getHistoryDoctorList']); + // 获取医生评价 Router::get('/evaluation/{doctor_id:\d+}', [PatientDoctorController::class, 'getDoctorEvaluationList']);