index_clone.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-settings"></i>
  10. </span>
  11. {{ __('auto.渠道审核修改') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.渠道管理') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.渠道审核修改') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">{{ __('auto.渠道审核修改') }}</h4>
  25. <table class="table table-bordered">
  26. <thead>
  27. <tr>
  28. <th width="5%">{{ __('auto.渠道名称') }}</th>
  29. <th width="8%">{{ __('auto.审核状态') }}</th>
  30. <th width="8%">{{ __('auto.修改日期') }}</th>
  31. <th width="8%">{{ __('auto.允许开放地区') }}</th>
  32. <th width="8%">{{ __('auto.审核开关') }}</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. @foreach($list as $k=>$v)
  37. <tr>
  38. <td>{{ $v->name }}</td>
  39. <td>
  40. @if ($v->status == 1)
  41. {{ __('auto.开放中') }}
  42. @else
  43. {{ __('auto.关闭中') }}
  44. @endif
  45. </td>
  46. <td>{{$v->updated_at}}</td>
  47. <td>{{$v->open_region}}</td>
  48. <td>
  49. @if ($v->status == 1)
  50. <button type="button" class="btn btn-sm btn-danger" onclick="switch_control({{$v->id}},'off')">{{ __('auto.关闭') }}</button>
  51. @elseif ($v->status == -1)
  52. <button type="button" class="btn btn-sm btn-primary" onclick="switch_control({{$v->id}},'on')">{{ __('auto.开启') }}</button>
  53. @endif
  54. <button class="btn btn-sm btn-gradient-dark" onclick="update_region({{$v->id}})">{{ __('auto.修改开放地区') }}</button>
  55. </td>
  56. </tr>
  57. @endforeach
  58. </tbody>
  59. </table>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <script>
  67. function switch_control(id,type){
  68. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?",function(){
  69. myRequest("/admin/channel/switch/"+id,"post",{type},function(res){
  70. layer.msg(res.msg)
  71. setTimeout(function(){
  72. window.location.reload();
  73. },1500)
  74. });
  75. });
  76. }
  77. function update_region(id) {
  78. layer.open({
  79. type: 2,
  80. title: '{{ __('auto.修改开放地区') }}',
  81. shadeClose: true,
  82. shade: 0.8,
  83. area: ['50%', '50%'],
  84. content: '/admin/channel/update/'+id
  85. });
  86. }
  87. </script>
  88. @endsection