$uname = $this->request->post('uname'); if($uname){ $where['username']=$uname; } $where['pid']=$uid; $ret= Db::name('user') ->where($where) ->order('createtime desc') ->paginate(8); $page = $ret->render(); 先分页;=了 在处理 不然分页数据会重复 $list = $ret->all(); //这是关键