public function dadlist($request)
{
$npost = array_merge($_GET,$_POST);
if(!empty($npost['status'])){
$dds['status'] = $npost['status'];
}
if(!empty($npost['ordernum'])){
$dds['ordernum'] = ['like',"%".$npost['ordernum']."%"];
}
if(!empty($npost['preordernum'])){
$dds['preordernum'] = ['like',"%".$npost['preordernum']."%"];
}
if(!empty($npost['userid'])){
$dds['userid'] = $npost['userid'];
}
$count = M('Dd')->where($dds)->count();
$Page = $page = new \Think\Page($count, 15,$npost);
$show = $Page->show();
$list = M('Dd')->where($dds)->order('id desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
//var_dump($list);die;
$params = array(
'ddlist' => $list,
'count' => $count,
'Page' => $show,
'pageName' => '列表'
);
return [1,$params];
}
来源:CSDN
作者:fciboke
链接:https://blog.csdn.net/fciboke/article/details/103462945