作者 王晓刚
1 个管道 的构建 通过 耗费 2 秒

分享bug

@@ -25,7 +25,11 @@ class UsersController extends AdminBaseController{ @@ -25,7 +25,11 @@ class UsersController extends AdminBaseController{
25 $where['b.user_nickname'] = ['like',"%$keyword%"]; 25 $where['b.user_nickname'] = ['like',"%$keyword%"];
26 } 26 }
27 if($_POST['identity'] != ""){ 27 if($_POST['identity'] != ""){
28 - $where['a.status'] = $_POST['identity']; 28 + if($_POST['identity'] == -1){
  29 + $where['a.status'] = 0;
  30 + }else{
  31 + $where['a.status'] = $_POST['identity'];
  32 + }
29 } 33 }
30 $data = Db::name('my_user') -> alias('a') -> field('a.*,b.user_nickname') -> join('user b','a.uid = b.id','LEFT') -> where($where) -> paginate(1000000); 34 $data = Db::name('my_user') -> alias('a') -> field('a.*,b.user_nickname') -> join('user b','a.uid = b.id','LEFT') -> where($where) -> paginate(1000000);
31 }else{ 35 }else{
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 <option value="2">一级业务员</option> 28 <option value="2">一级业务员</option>
29 <option value="3">二级业务员</option> 29 <option value="3">二级业务员</option>
30 <option value="4">学生</option> 30 <option value="4">学生</option>
  31 + <option value="-1">自由人</option>
31 </select> 32 </select>
32 <input type="submit" class="btn btn-primary" value="搜索"/> 33 <input type="submit" class="btn btn-primary" value="搜索"/>
33 <a class="btn btn-danger" href="{:url('Users/user_list')}">清空</a> 34 <a class="btn btn-danger" href="{:url('Users/user_list')}">清空</a>