新增获取医生信息接口
This commit is contained in:
parent
c128a3724d
commit
bba24692e5
@ -201,4 +201,15 @@ class UserDoctorController extends AbstractController
|
|||||||
$data = $UserDoctorService->getDoctorEvaluationList();
|
$data = $UserDoctorService->getDoctorEvaluationList();
|
||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生信息
|
||||||
|
* @return ResponseInterface
|
||||||
|
*/
|
||||||
|
public function getDoctorCenterInfo(): ResponseInterface
|
||||||
|
{
|
||||||
|
$UserDoctorService = new UserDoctorService();
|
||||||
|
$data = $UserDoctorService->getDoctorCenterInfo();
|
||||||
|
return $this->response->json($data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -643,6 +643,46 @@ class UserDoctorService extends BaseService
|
|||||||
|
|
||||||
return success($order_evaluation);
|
return success($order_evaluation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生信息
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getDoctorCenterInfo(): array
|
||||||
|
{
|
||||||
|
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||||
|
|
||||||
|
// 获取医生信息
|
||||||
|
$params = array();
|
||||||
|
$params['doctor_id'] = $user_info['client_user_id'];
|
||||||
|
|
||||||
|
$fields = [
|
||||||
|
'doctor_id',
|
||||||
|
'user_name',
|
||||||
|
'iden_auth_status',
|
||||||
|
'idcard_status',
|
||||||
|
'multi_point_status',
|
||||||
|
'avatar',
|
||||||
|
'brief_introduction',
|
||||||
|
];
|
||||||
|
$user_doctor = UserDoctor::getOne($params, $fields);
|
||||||
|
if (empty($user_doctor)) {
|
||||||
|
return fail(HttpEnumCode::HTTP_ERROR, "非法医生");
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = $this->checkDoctorAuth($user_doctor);
|
||||||
|
if ($res !== true) {
|
||||||
|
return fail(HttpEnumCode::HTTP_ERROR, $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user_doctor['avatar'] = addAliyunOssWebsite($user_doctor['avatar']);
|
||||||
|
|
||||||
|
return success($user_doctor->toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测医生身份认证
|
* 检测医生身份认证
|
||||||
* @param object|array $user_doctor 医生表数据
|
* @param object|array $user_doctor 医生表数据
|
||||||
|
|||||||
@ -96,6 +96,9 @@ Router::addGroup('/doctor', function () {
|
|||||||
Router::addGroup('/center', function () {
|
Router::addGroup('/center', function () {
|
||||||
// 获取医生个人中心数据
|
// 获取医生个人中心数据
|
||||||
Router::get('', [UserDoctorController::class, 'getDoctorCenter']);
|
Router::get('', [UserDoctorController::class, 'getDoctorCenter']);
|
||||||
|
|
||||||
|
// 获取医生信息
|
||||||
|
Router::get('/info', [UserDoctorController::class, 'getDoctorCenterInfo']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 我的账户
|
// 我的账户
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user