userBanLogList.blade.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link rel="stylesheet" href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">用户封禁记录</h3>
  10. </div>
  11. <div class="panel-body">
  12. <div class="form-inline pb-20">
  13. <div class="form-group">
  14. <input type="text" class="form-control" name="username" value="{{Request::get('username')}}" id="username" placeholder="用户名">
  15. </div>
  16. <div class="btn-group">
  17. <button class="btn btn-primary" onclick="doSearch()">搜索</button>
  18. <button class="btn btn-danger" onclick="doReset()">重置</button>
  19. </div>
  20. </div>
  21. <table class="text-center" data-toggle="table" data-mobile-responsive="true">
  22. <thead class="thead-default">
  23. <tr>
  24. <th> #</th>
  25. <th> 用户名</th>
  26. <th> 时长</th>
  27. <th> 理由</th>
  28. <th> 封禁时间</th>
  29. <th> 最后连接时间</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @if($list->isEmpty())
  34. <tr>
  35. <td colspan="6">暂无数据</td>
  36. </tr>
  37. @else
  38. @foreach($list as $vo)
  39. <tr>
  40. <td>
  41. <a href="{{url('admin/userList?username=' . $vo->id)}}" target="_blank" rel="noopener"> {{$vo->id}}</a>
  42. </td>
  43. <td> {{empty($vo->user) ? '【账号已删除】' : $vo->user->username}} </td>
  44. <td> {{$vo->minutes}}分钟</td>
  45. <td> {{$vo->desc}} </td>
  46. <td> {{$vo->created_at}} </td>
  47. <td> {{date("Y-m-d H:i:s", $vo->user->t)}} </td>
  48. </tr>
  49. @endforeach
  50. @endif
  51. </tbody>
  52. </table>
  53. </div>
  54. <div class="panel-footer">
  55. <div class="row">
  56. <div class="col-sm-4">
  57. 共 {{$list->total()}} 条记录
  58. </div>
  59. <div class="col-sm-8">
  60. <nav class="Page navigation float-right">
  61. {{ $list->links() }}
  62. </nav>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. @endsection
  69. @section('script')
  70. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
  71. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
  72. <script type="text/javascript">
  73. // 搜索
  74. function doSearch() {
  75. var username = $("#username").val();
  76. window.location.href = '/admin/userBanLogList?username=' + username;
  77. }
  78. // 重置
  79. function doReset() {
  80. window.location.href = '/admin/userBanLogList';
  81. }
  82. </script>
  83. @endsection