diff --git a/Laravel/app/Http/Controllers/API/H5/PlanController.php b/Laravel/app/Http/Controllers/API/H5/PlanController.php index 545d377..f44562b 100644 --- a/Laravel/app/Http/Controllers/API/H5/PlanController.php +++ b/Laravel/app/Http/Controllers/API/H5/PlanController.php @@ -107,7 +107,7 @@ class PlanController extends Controller ->where(['hospital_id'=>$hospital_id,'type'=>1,'is_del'=>0]) ->where('is_vip','<>',1) ->whereIn('use_type',[0,$use_type]); - $comboItemsNmr=false; + $comboItemsNmr=[]; if(!!$combo_id){ $comboInfo=DB::table('combos')->where(['combo_id'=>$combo_id])->first(); if(!empty($comboInfo->keyue_start_time) and !empty($comboInfo->keyue_end_time)){ @@ -133,7 +133,7 @@ class PlanController extends Controller }); } $list=$list->orderBy('time','asc')->get(); - if(!!$comboItemsNmr){ + if(count($comboItemsNmr)>0){ //如果有核磁项目,11点往后的号源不可用 foreach ($list as $key=>$item) { if($item->time > '11:00:00' and $item->time <= '12:00:00'){ @@ -163,7 +163,7 @@ class PlanController extends Controller if(!empty($comboInfo->keyue_start_time) and !empty($comboInfo->keyue_end_time)){ $weeklist=$weeklist->whereBetween('time',[$comboInfo->keyue_start_time,$comboInfo->keyue_end_time]); } - if(!!$comboItemsNmr){ + if(count($comboItemsNmr)>0){ $weeklist=$weeklist->whereNotBetween('time',['11:00:00','12:00:00']); } } diff --git a/h5/pages/main/selectDoctor/selectDoctor.vue b/h5/pages/main/selectDoctor/selectDoctor.vue index c1d96bb..3e69d7d 100755 --- a/h5/pages/main/selectDoctor/selectDoctor.vue +++ b/h5/pages/main/selectDoctor/selectDoctor.vue @@ -110,7 +110,7 @@ }; const clickDoctor = (item) => { - if(!!yytjInfo.value.nmr_list && yytjInfo.value.nmr_list[0].time.substring(0,10) != selectedDate.value && selectedDate.value!='' &&selectedDate.value!=null){ + if(yytjInfo.value.nmr_list != null && yytjInfo.value.nmr_list.length>0 && yytjInfo.value.nmr_list[0].time.substring(0,10) != selectedDate.value && selectedDate.value!='' &&selectedDate.value!=null){ console.log('日期不一致'); uni.showModal({ title: "提示",