点击下一页时,怎么把搜索条件传过去啊,我的搜索是用post传的值
$city = I('post.city');
if(!empty($city)){
$map['aid_2'] = $city;
}
//获取满足要求的总记录数
$total = D('basicBusinesszone')->where($map)->count();
foreach($map as $key=>$val){
$Page->parameter .= "$key=".urlencode($val).'&';
}
//设置分页
$REQUEST = (array)I('request.');
if( isset($REQUEST['r']) ){
$listRows = (int)$REQUEST['r'];
}else{
$listRows = C('LIST_ROWS') > 0 ? C('LIST_ROWS') : 10;
}
$Page = new \Think\Page($total, $listRows);
$p = $Page->show();
$this->assign('_page', $p ? $p: '');
$this->assign('_total', $total);
//获取数据列表
$lists = D('basicBusinesszone')->where($map)->limit($Page->firstRow.','.$Page->listRows)->order('sortid asc,id asc')->select();
$this->assign('_lists', $lists); //列表
cookie('__forward__', $_SERVER['REQUEST_URI']);
$this->display(); 最佳答案