orderby('sort','desc')->whereIn('type', array(2,3,4,5,6,7))->get(); if(!$data){ return -6010000122; } return $data->toArray(); } //更新设置 function updateInfos($data,$id){ $res=$this->where('id',$id)->update($data); if(!$res){ return -7020050022;//更新失败 } return 1; } // function upInfos($id){ $res=$this->where('id',$id)->first(); if(!$res){ return -7020050022;// } return $res->toArray(); } }