作者 sgj
1 个管道 的构建 通过 耗费 0 秒

圈子人员静态页面

... ... @@ -53,6 +53,45 @@ class CommonController extends AdminBaseController
return $this->fetch();
}
public function selectUsersMore()
{
$param = $this->request->param();
$ids = $this->request->param('ids');
$selectedIds = explode(',',$ids);
if (!is_array($selectedIds)) {
$selectedIds = [$selectedIds];
}
$where['user_type'] = ['in','1,2,3'];
$request = input('request.');
if (!empty($request['uid'])) {
$where['id'] = intval($request['uid']);
}
$keywordComplex = [];
if (!empty($request['keyword'])) {
$keyword = $request['keyword'];
$keywordComplex['user_login|user_nickname|mobile'] = ['like', "%$keyword%"];
}
$usersQuery = Db::name('user');
$list = $usersQuery->field('id,user_nickname,user_login,avatar,mobile')
->whereOr($keywordComplex)
->where($where)
->order("create_time DESC")
->paginate(50);
$list->appends($param);
$this->assign('selectedIds', $selectedIds);
$this->assign('uid', isset($param['uid']) ? $param['uid'] : '');
$this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
$this->assign('ids', isset($param['ids']) ? $param['ids'] : '');
$this->assign('list', $list->items());
$this->assign('page', $list->render());
return $this->fetch();
}
public function selectGroup(){
$param = $this->request->param();
$ids = $this->request->param('ids');
... ...