2
0

index.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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-palette"></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. <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
  25. <h4 class="card-title">{{ __('auto.主题列表') }}</h4>
  26. <a href="{{ url('admin/web_theme_config/add') }}" class="btn btn-gradient-primary">{{ __('auto.添加主题') }}</a>
  27. </div>
  28. <table class="table table-bordered">
  29. <thead>
  30. <tr>
  31. <th>ID</th>
  32. <th>{{ __('auto.主题KEY') }}</th>
  33. <th>{{ __('auto.绑定的Region ID') }}</th>
  34. <th>{{ __('auto.操作') }}</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. @foreach($list as $v)
  39. <tr>
  40. <td>{{$v->id}}</td>
  41. <td>{{$v->ThemeKey}}</td>
  42. <td>
  43. @if($v->BindRegions)
  44. {{ is_array($v->BindRegions) ? implode(',', $v->BindRegions) : $v->BindRegions }}
  45. @endif
  46. </td>
  47. <td>
  48. <a href="{{ url('admin/web_theme_config/edit/'.$v->id) }}" class="btn btn-sm btn-gradient-info">{{ __('auto.编辑') }}</a>
  49. <button class="btn btn-sm btn-gradient-danger" onclick="deleteTheme({{$v->id}})">{{ __('auto.删除') }}</button>
  50. </td>
  51. </tr>
  52. @endforeach
  53. </tbody>
  54. </table>
  55. <div class="box-footer clearfix" id="pages">
  56. {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  57. {!! $list->links() !!}
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <script>
  66. function deleteTheme(id) {
  67. if (confirm('确认删除此主题配置?')) {
  68. $.ajax({
  69. url: '/admin/web_theme_config/delete/' + id,
  70. type: 'POST',
  71. success: function(res) {
  72. if (res.code === 200) {
  73. alert('删除成功');
  74. location.reload();
  75. } else {
  76. alert(res.msg || '删除失败');
  77. }
  78. }
  79. });
  80. }
  81. }
  82. </script>
  83. @endsection