...
|
...
|
@@ -120,8 +120,34 @@ class BookingController extends AdminBaseController |
|
|
}
|
|
|
}
|
|
|
|
|
|
$res1 = Db::name('yuyue')->where(['yuyue_day'=>$day,'teach_id'=>$uid,'uid'=>['gt','0']])->select()->toArray();
|
|
|
|
|
|
$all_arr1 = [];
|
|
|
for($t = 7;$t<=18;$t++){
|
|
|
$all_arr1[]=$t;
|
|
|
}
|
|
|
|
|
|
$arr1 = [];
|
|
|
for($i = 0;$i<count($res);$i++){
|
|
|
$begin = $res[$i]["yuyue_begin"];
|
|
|
$end = $res[$i]["yuyue_end"];
|
|
|
for($j= $begin;$j<$end;$j++){
|
|
|
$arr1[]=$j;
|
|
|
}
|
|
|
}
|
|
|
$ok_arr1 = [];
|
|
|
for($q = 0;$q< count($all_arr);$q++){
|
|
|
if(in_array($all_arr[$q],$arr)){
|
|
|
$ok_arr1[] = "no";
|
|
|
}else{
|
|
|
$ok_arr1[] = "yes";
|
|
|
}
|
|
|
}
|
|
|
$dataa[0] = $ok_arr;
|
|
|
$dataa[1] = $ok_arr1;
|
|
|
|
|
|
if ($ok_arr){
|
|
|
return json(['code'=>'1','msg'=>'获取成功','data'=>json_encode($ok_arr,true)]);
|
|
|
return json(['code'=>'1','msg'=>'获取成功','data'=>json_encode($dataa,true)]);
|
|
|
}else{
|
|
|
return json(['code'=>'0','msg'=>'获取失败']);
|
|
|
}
|
...
|
...
|
|