全局分页

全局通用分页函数getLists
function getLists($model,$map="",$num="10",$listsort="id desc",$field=""){ 
$res["list"]=db($model)->where($map)->field($field)->order($listsort)->paginate($num);
$res["page"]= $res["list"]->render();
return $res;
}