rymc = $jwtAuth->getRymc(); //setRybh是在middleware/jwtAuth中完成的 } public function selectTestUnit($data,$group_type,$pageNum=1,$pageSize=10) { //判断where条件 //任务名称:模糊查询 $where=[ ['groupname','=', $group_type,] ]; if ($data['name'] != '' ) array_push($where, ['name', 'LIKE', '%'.$data['name'].'%']); //获取数据 $result = (new Jcdw())->getInfoList($where,$pageNum, $pageSize)->toArray(); //过滤字段 $data=(new Arr())->Arr_columns($result, 'id,name,groupname,ssqy'); //获取总数 $count=(new Jcdw())->getInfoListCount($where); return ['rows'=>$data, 'total'=>$count,]; } }