message_list.blade.php 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="row">
  7. <div class="col-12 grid-margin stretch-card">
  8. <div class="card">
  9. <div class="card-body">
  10. <h4 class="card-title">{{ __('auto.请编辑邮件内容') }}</h4>
  11. {{--<p class="card-email">--}}
  12. {{--Basic form elements--}}
  13. {{--</p>--}}
  14. <table class="table table-bordered">
  15. <thead>
  16. <tr>
  17. <th>{{ __('auto.序号') }}</th>
  18. <th>ID</th>
  19. <th>{{ __('auto.用户名') }}</th>
  20. <th>{{ __('auto.时间') }}</th>
  21. <th>{{ __('auto.内容') }}</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. @foreach($list as $k=>$v)
  26. <tr>
  27. <td style="width: 5%">{{ $v->ID }}</td>
  28. <td style="width: 7%">{{ $v->GameID }}</td>
  29. <td style="width: 15%">
  30. @if (!empty($v->NickName))
  31. {{ $v->NickName }}
  32. @else
  33. 【{{ __('auto.管理员】') }}{{$v->admin_nickname}}
  34. @endif
  35. </td>
  36. <td style="width: 15%">{{ $v->CreateAt }}</td>
  37. <td style="width: 30%">{{ $v->Msg }}</td>
  38. </tr>
  39. @endforeach
  40. </tbody>
  41. </table>
  42. <form class="forms-sample" id="form">
  43. <div class="form-group">
  44. <h4 class="card-title">{{ __('auto.回复留言') }}</h4>
  45. <input type="hidden" name="uid" value="{{$game_id}}">
  46. <textarea class="form-control" name="message" rows="4"></textarea>
  47. </div>
  48. <button type="button" onclick="commit({{$id}})" class="btn btn-sm btn-gradient-primary btn-icon-text">
  49. <i class="mdi mdi-file-check btn-icon-prepend"></i>
  50. {{ __('auto.提交') }}
  51. </button>
  52. <button type="button" onclick="cancel()" class="btn btn-sm btn-gradient-warning btn-icon-text">
  53. <i class="mdi mdi-reload btn-icon-prepend"></i>
  54. {{ __('auto.取消') }}
  55. </button>
  56. </form>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <script>
  64. function commit(id){
  65. if(!checkForm()){
  66. return false;
  67. }
  68. var data = $("#form").serializeObject();
  69. myRequest("/admin/opinion/reply/"+id,"post",data,function(res){
  70. layer.msg(res.msg)
  71. setTimeout(function(){
  72. parent.location.reload();
  73. },1500)
  74. });
  75. }
  76. function cancel() {
  77. parent.location.reload();
  78. }
  79. </script>
  80. @endsection