public function select(){
if(request()->post()) {
$data=input("post.");
if(($data['realname']=='')&&($data['phone']=='')){
return json(false,0);
}else{
if($data['realname']!=''){
$where['realname'] = ['like','%'.$data['realname'].'%'];
}
if($data['phone']!=''){
$where['phone'] = ['like','%'.$data['phone'].'%'];
}
}
$result = Db::name('worker')->where($where)->select();
return json(true,200);
}
}