正在显示
2 个修改的文件
包含
4 行增加
和
2 行删除
@@ -176,13 +176,15 @@ class GroupController extends AdminBaseController | @@ -176,13 +176,15 @@ class GroupController extends AdminBaseController | ||
176 | public function groupPeopleAdd(){ | 176 | public function groupPeopleAdd(){ |
177 | 177 | ||
178 | $user_id=explode(',',input('user_id')); | 178 | $user_id=explode(',',input('user_id')); |
179 | + dump($user_id); | ||
179 | foreach ($user_id as $k=>$v){ | 180 | foreach ($user_id as $k=>$v){ |
180 | $insert[$k]['user_id']=$v; | 181 | $insert[$k]['user_id']=$v; |
181 | $insert[$k]['group_id']=input('group_id'); | 182 | $insert[$k]['group_id']=input('group_id'); |
182 | $insert[$k]['addtime']=time(); | 183 | $insert[$k]['addtime']=time(); |
183 | } | 184 | } |
185 | + dump($insert); | ||
184 | db('group_user')->insertAll($insert); | 186 | db('group_user')->insertAll($insert); |
185 | - $this->success(); | 187 | + // $this->success(); |
186 | } | 188 | } |
187 | 189 | ||
188 | } | 190 | } |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | <form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}"> | 8 | <form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}"> |
9 | 添加用户 | 9 | 添加用户 |
10 | <input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true"> | 10 | <input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true"> |
11 | - <input class="form-control" type="hidden" name="post[author_id]" value="" name="user_id" id="js-users-id-input"/> | 11 | + <input class="form-control" type="hidden" value="" name="user_id" id="js-users-id-input"/> |
12 | <input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/> | 12 | <input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/> |
13 | 13 | ||
14 | <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a> | 14 | <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a> |
-
请 注册 或 登录 后发表评论