emailLog.blade.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h2 class="panel-title">邮件投递记录</h2>
  10. </div>
  11. <div class="panel-body">
  12. <div class="form-row">
  13. <div class="form-group col-lg-3 col-sm-4">
  14. <input type="text" class="form-control" name="email" id="email" value="{{Request::get('email')}}" placeholder="用户名"/>
  15. </div>
  16. <div class="form-group col-lg-2 col-sm-4">
  17. <select class="form-control" name="type" id="type" onChange="Search()">
  18. <option value="" @if(Request::get('type') == '') selected hidden @endif>类型</option>
  19. <option value="1" @if(Request::get('type') == '1') selected hidden @endif>邮件</option>
  20. <option value="2" @if(Request::get('type') == '2') selected hidden @endif>ServerChan</option>
  21. <option value="3" @if(Request::get('type') == '3') selected hidden @endif>Bark</option>
  22. <option value="4" @if(Request::get('type') == '4') selected hidden @endif>Telegram</option>
  23. </select>
  24. </div>
  25. <div class="form-group col-lg-1 col-sm-4 btn-group">
  26. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  27. <a href="/admin/emailLog" class="btn btn-danger">重 置</a>
  28. </div>
  29. </div>
  30. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  31. <thead class="thead-default">
  32. <tr>
  33. <th> #</th>
  34. <th> 类型</th>
  35. <th> 识别码</th>
  36. <th> 收信地址</th>
  37. <th> 标题</th>
  38. <th> 内容</th>
  39. <th> 投递时间</th>
  40. <th> 投递状态</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. @if($list->isEmpty())
  45. <tr>
  46. <td colspan="8">暂无数据</td>
  47. </tr>
  48. @else
  49. @foreach($list as $vo)
  50. <tr>
  51. <td> {{$vo->id}} </td>
  52. <td> {{$vo->type == 1 ? 'Email' : 'serverChan'}} </td>
  53. <td> @if($vo->type == 3)
  54. <a href="/b/{{$vo->code}}" target="_blank">{{$vo->code}}</a> @endif </td>
  55. <td> {{$vo->address}} </td>
  56. <td> {{$vo->title}} </td>
  57. <td> {{$vo->content}} </td>
  58. <td> {{$vo->created_at}} </td>
  59. <td>
  60. @if($vo->status < 0)
  61. <span class="badge badge-danger"> {{\Illuminate\Support\Str::limit($vo->error)}} </span>
  62. @elseif($vo->status > 0)
  63. <labe class="badge badge-success">投递成功</labe>
  64. @else
  65. <span class="badge badge-default"> 等待投递 </span>
  66. @endif
  67. </td>
  68. </tr>
  69. @endforeach
  70. @endif
  71. </tbody>
  72. </table>
  73. </div>
  74. <div class="panel-footer">
  75. <div class="row">
  76. <div class="col-sm-4">
  77. 共 <code>{{$list->total()}}</code> 条记录
  78. </div>
  79. <div class="col-sm-8">
  80. <nav class="Page navigation float-right">
  81. {{$list->links()}}
  82. </nav>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. @endsection
  89. @section('script')
  90. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  91. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  92. <script type="text/javascript">
  93. // 搜索
  94. function Search() {
  95. window.location.href = '/admin/emailLog?email=' + $("#email").val() + '&type=' + $("#type option:selected").val();
  96. }
  97. </script>
  98. @endsection