public function index(){
//后台设置后缀为空,否则分页出错
$this->config->set_item('url_suffix', '');
//载入分页类
$this->load->library('pagination');
$perPage = 16;
//配置项设置
$config['base_url'] = site_url('admin/user/index');
$config['total_rows'] = $this->db->count_all('user');
$config['per_page'] = $perPage;
$config['uri_segment'] = 4;
$config['first_link'] = '第一页';
$config['prev_link'] = '上一页';
$config['next_link'] = '下一页';
$config['last_link'] = '最后一页';
$this->pagination->initialize($config);
$data['links'] = $this->pagination->create_links();
// p($data);die;
$offset = $this->uri->segment(4);
$this->db->limit($perPage, $offset);
$data['user'] = $this->user->get_user();
//p($data['user'] );die();
$this->load->view('admin/user-list.html',$data);
}