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

圈子人员设置

... ... @@ -152,7 +152,7 @@ class GroupController extends AdminBaseController
->field('g.id as gid,u.*')
->where($map)
->join('user u','g.user_id=u.id')
->paginate('1');
->paginate('20');
$page = $list->render();
$this->assign('group', $group);
$this->assign('list', $list);
... ... @@ -174,8 +174,15 @@ class GroupController extends AdminBaseController
}
public function groupPeopleAdd(){
dump(input());
$this->success();
$user_id=explode(',',input('user_id'));
foreach ($user_id as $k=>$v){
$insert[$k]['user_id']=$v;
$insert[$k]['group_id']=input('group_id');
$insert[$k]['addtime']=time();
}
db('group_user')->insertAll($insert);
$this->success();
}
}
\ No newline at end of file
... ...
... ... @@ -8,7 +8,7 @@
<form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}">
添加用户
<input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true">
<input class="form-control" type="hidden" name="post[author_id]" value="" name="user_id" id="js-users-id-input"/>
<input class="form-control" type="hidden" value="" name="user_id" id="js-users-id-input"/>
<input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/>
<a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
... ...