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

圈子人员静态页面

@@ -53,6 +53,45 @@ class CommonController extends AdminBaseController @@ -53,6 +53,45 @@ class CommonController extends AdminBaseController
53 return $this->fetch(); 53 return $this->fetch();
54 } 54 }
55 55
  56 + public function selectUsersMore()
  57 + {
  58 + $param = $this->request->param();
  59 + $ids = $this->request->param('ids');
  60 + $selectedIds = explode(',',$ids);
  61 + if (!is_array($selectedIds)) {
  62 + $selectedIds = [$selectedIds];
  63 + }
  64 +
  65 + $where['user_type'] = ['in','1,2,3'];
  66 + $request = input('request.');
  67 +
  68 + if (!empty($request['uid'])) {
  69 + $where['id'] = intval($request['uid']);
  70 + }
  71 + $keywordComplex = [];
  72 + if (!empty($request['keyword'])) {
  73 + $keyword = $request['keyword'];
  74 +
  75 + $keywordComplex['user_login|user_nickname|mobile'] = ['like', "%$keyword%"];
  76 + }
  77 + $usersQuery = Db::name('user');
  78 + $list = $usersQuery->field('id,user_nickname,user_login,avatar,mobile')
  79 + ->whereOr($keywordComplex)
  80 + ->where($where)
  81 + ->order("create_time DESC")
  82 + ->paginate(50);
  83 + $list->appends($param);
  84 +
  85 + $this->assign('selectedIds', $selectedIds);
  86 + $this->assign('uid', isset($param['uid']) ? $param['uid'] : '');
  87 + $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
  88 + $this->assign('ids', isset($param['ids']) ? $param['ids'] : '');
  89 + $this->assign('list', $list->items());
  90 + $this->assign('page', $list->render());
  91 +
  92 + return $this->fetch();
  93 + }
  94 +
56 public function selectGroup(){ 95 public function selectGroup(){
57 $param = $this->request->param(); 96 $param = $this->request->param();
58 $ids = $this->request->param('ids'); 97 $ids = $this->request->param('ids');