From de9e50171a1f5072e0cabe0bf66d10142f0cfe10 Mon Sep 17 00:00:00 2001 From: yanzai Date: Thu, 5 Dec 2024 12:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8C=BB=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/API/H5/DoctorController.php | 39 +++++++++++++------ h5/pages/main/selectDoctor/selectDoctor.vue | 7 +++- h5/pages/main/ysdate/ysdate_new.vue | 5 ++- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/Laravel/app/Http/Controllers/API/H5/DoctorController.php b/Laravel/app/Http/Controllers/API/H5/DoctorController.php index a50b17b..f29f845 100644 --- a/Laravel/app/Http/Controllers/API/H5/DoctorController.php +++ b/Laravel/app/Http/Controllers/API/H5/DoctorController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\API\H5; use App\Http\Controllers\API\AspNetZhuanController; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; class DoctorController extends Controller { @@ -15,6 +16,9 @@ class DoctorController extends Controller $hospital = request('hospital'); $month = request('month'); $doctor_id = request('doctor_id'); + $person_id = request('person_id'); + if(!isset($person_id)) return \Yz::echoError1("用户id缺失"); + $personInfo=DB::table('web_user_person')->where('id',$person_id)->first(); $hospital_map = [ 'h1' => '6', @@ -51,29 +55,42 @@ class DoctorController extends Controller "data" => $datesArray, "action" => "1" ]); - // return \Yz::Return(true,"",$res); + // return \Yz::Return(true,"",['data'=>$res]); $list = []; $keshi=[ 'A0030090'=>'内科', 'A0030091'=>'妇科', 'A0030102'=>'外科' ]; + $keshi_sex_list=[ + 'A0030116'=>'2', + 'A0030106'=>'1' + ]; if ($res['code'] == '200' && count($res['yisheng']) != 0) { foreach ($res['yisheng'] as $key => $value) { $keshiname=''; + $keshi_sex=''; if(isset($keshi[$value['KSID']])){ $keshiname=$keshi[$value['KSID']]; } - $list[] = [ - 'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'], - 'name' => $value['U_NAME'], - 'id' => $value['U_ID'], - 'level' => $value['ZC_NAME'], - 'hospital' => '', - 'time' => $value['U_GDPB'], - 'desc' => $value['U_JIANJIE'], - 'keshiname'=>$keshiname - ]; + if(isset($keshi_sex_list[$value['KSID']])){ + $keshi_sex=$keshi_sex_list[$value['KSID']]; + } + if($keshi_sex==$personInfo->sex){ + $list[] = [ + 'head_img' => 'data:image/jpeg;base64,' . $value['U_IMG'], + 'name' => $value['U_NAME'], + 'id' => $value['U_ID'], + 'level' => $value['ZC_NAME'], + 'hospital' => '', + 'time' => $value['U_GDPB'], + 'desc' => $value['U_JIANJIE'], + 'keshiname'=>$keshiname, + 'keshi_id'=>$value['KSID'], + 'keshi_sex'=>$keshi_sex, + ]; + } + } } $paiban=[]; diff --git a/h5/pages/main/selectDoctor/selectDoctor.vue b/h5/pages/main/selectDoctor/selectDoctor.vue index fab2981..cce6066 100755 --- a/h5/pages/main/selectDoctor/selectDoctor.vue +++ b/h5/pages/main/selectDoctor/selectDoctor.vue @@ -12,6 +12,7 @@ import { useStore } from "@/store"; const $store = useStore(); let dqDate = ref(""); let yytjInfo = ref({}); // 预约信息 +let buy_info=ref({}); const $props = defineProps({ date: { type: String, @@ -28,6 +29,7 @@ const mountedAction = () => { uni.showLoading({ title: "加载中", }); + buy_info.value= $store.getBuyInfo(); yytjInfo.value = $store.getYytjInfo(); yytjInfo.value = { doctor_date: "", @@ -46,9 +48,10 @@ const doctor_list = ref(false); const getdoctorList = async () => { // 获取 体检报告列表 let obj = { - hospital: $store.save.hospital, + hospital: $store.save.hospital, date: dqDate.value, - month:$props.month + month:$props.month, + person_id:buy_info.value.person_id }; const response = await $api("DoctorGetList", obj); $response(response, () => { diff --git a/h5/pages/main/ysdate/ysdate_new.vue b/h5/pages/main/ysdate/ysdate_new.vue index 04c6053..fbde6ae 100644 --- a/h5/pages/main/ysdate/ysdate_new.vue +++ b/h5/pages/main/ysdate/ysdate_new.vue @@ -123,7 +123,7 @@ yytjInfo.value.doctor_date = e.fulldate; $store.setYytjInfo(yytjInfo.value); uni.navigateTo({ - url: '/pages/main/combo/combo?keshi_name='+DoctorInfo.value.keshiname + url: '/pages/main/combo/combo?keshi_name='+DoctorInfo.value.keshiname+'&keshi_sex='+DoctorInfo.value.keshi_sex }) } const changerl = (e) => { @@ -164,7 +164,8 @@ let obj = { hospital: $store.save.hospital, month:month, - doctor_id:yytjInfo.value.doctor_id?yytjInfo.value.doctor_id:null + doctor_id:yytjInfo.value.doctor_id?yytjInfo.value.doctor_id:null, + person_id:buyInfo.value.person_id }; uni.showLoading({ title: "加载中",