diff --git a/app/Services/IndexService.php b/app/Services/IndexService.php index be3f2bc..6474821 100644 --- a/app/Services/IndexService.php +++ b/app/Services/IndexService.php @@ -137,6 +137,9 @@ class IndexService extends BaseService // 获取banner $banner = []; co(function () use ($wg, &$banner) { + defer(function() use ($wg) { + $wg->done(); + }); $params = array(); $params["app_type"] = 1; $params["client_type"] = 1; @@ -148,45 +151,47 @@ class IndexService extends BaseService $item['banner_path'] = addAliyunOssWebsite($item['banner_path']); } } - - // 计数器减一 - $wg->done(); }); // 获取模块 $module = []; co(function () use ($wg, &$module) { + defer(function() use ($wg) { + $wg->done(); + }); + $params = array(); $params["app_type"] = 1; $params["client_type"] = 1; $params["module_place"] = 1; $params["module_status"] = 1; $module = ModuleModel::getList($params); - - // 计数器减一 - $wg->done(); }); // 我的医生 $my_doctor = []; co(function () use ($wg, &$my_doctor,$user_info) { + defer(function() use ($wg) { + $wg->done(); + }); + $PatientDoctorService = new PatientDoctorService(); if (!empty($user_info)) { $my_doctor = $PatientDoctorService->getIndexPatientDoctorLimit($user_info['client_user_id']); } - // 计数器减一 - $wg->done(); }); // 推荐医生 $recommend_doctor = []; co(function () use ($wg, &$recommend_doctor) { + defer(function() use ($wg) { + $wg->done(); + }); + $PatientDoctorService = new PatientDoctorService(); $recommend_doctor = $PatientDoctorService->getIndexRecommendDoctorLimit(); - // 计数器减一 - $wg->done(); }); $wg->wait(); diff --git a/app/Services/InquiryService.php b/app/Services/InquiryService.php index 14226f2..febdc66 100644 --- a/app/Services/InquiryService.php +++ b/app/Services/InquiryService.php @@ -81,8 +81,8 @@ class InquiryService extends BaseService return fail(HttpEnumCode::HTTP_ERROR, "请您到线下问诊"); } - // 是否存在禁忌 - if (empty($request_params['is_taboo'])) { + // 是否服用过禁忌药物,且无相关禁忌(0:否 1:是)问诊购药时存在 + if ($request_params['is_taboo'] == 0) { return fail(HttpEnumCode::HTTP_ERROR, "无法为您开具药物"); } @@ -377,7 +377,8 @@ class InquiryService extends BaseService $params['family_id'] = $order_inquiry_case['family_id']; $patient_family_health = PatientFamilyHealth::getOne($params); $order_inquiry_case['diagnosis_hospital'] = $patient_family_health['diagnosis_hospital'] ?? ""; - $order_inquiry_case['drugs_name'] = $patient_family_health['drugs_name'] ?? ""; + $order_inquiry_case['is_take_medicine'] = $patient_family_health['is_take_medicine'] ?: 0; + $order_inquiry_case['drugs_name'] = $patient_family_health['drugs_name'] ?: ""; // 获取患者家庭成员信息表-个人情况 $params = array();