index.blade.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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-earth"></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>ID</th>
  29. <th>RegionID</th>
  30. <th>DomainUrl</th>
  31. <th>Logo</th>
  32. <th>Icon</th>
  33. <th>GroupID</th>
  34. <th>BindChannels</th>
  35. <th>ThemeKey</th>
  36. <th>{{ __('auto.操作') }}</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. @foreach($list as $v)
  41. <tr>
  42. <td>{{$v->id}}</td>
  43. <td>{{$v->RegionID}}</td>
  44. <td>{{$v->DomainUrl}}</td>
  45. <td>
  46. @if($v->LogoUrl)
  47. @php
  48. $logoUrl = $v->DomainUrl . $v->LogoUrl;
  49. $isSvg = strtolower(pathinfo($v->LogoUrl, PATHINFO_EXTENSION)) === 'svg';
  50. @endphp
  51. <div style="background-color: #000; display: inline-block; padding: 5px; width: 100%; text-align: center;">
  52. @if($isSvg)
  53. <object data="{{$logoUrl}}" type="image/svg+xml" style="max-width: 150px; width: 100%; height: auto; pointer-events: none;">
  54. <img src="{{$logoUrl}}" style="max-width: 150px; height: auto;" alt="Logo">
  55. </object>
  56. @else
  57. <img src="{{$logoUrl}}" style="max-width: 150px; height: auto; border-radius: 0;" alt="Logo">
  58. @endif
  59. </div>
  60. @endif
  61. </td>
  62. <td>
  63. @if($v->IconUrl)
  64. @php
  65. $iconUrl = $v->DomainUrl . $v->IconUrl;
  66. $isIconSvg = strtolower(pathinfo($v->IconUrl, PATHINFO_EXTENSION)) === 'svg';
  67. @endphp
  68. @if($isIconSvg)
  69. <div style="width: 192px; height: 192px; display: flex; align-items: center; justify-content: center;">
  70. <object data="{{$iconUrl}}" type="image/svg+xml" style="width: 100%; height: 100%; pointer-events: none;">
  71. <img src="{{$iconUrl}}" style="width: 192px; height: 192px;" alt="Icon">
  72. </object>
  73. </div>
  74. @else
  75. <img src="{{$iconUrl}}" style="width: 192px; height: 192px; border-radius: 0;" alt="Icon">
  76. @endif
  77. @endif
  78. </td>
  79. <td>{{$v->GroupID}}</td>
  80. <td style="word-break: break-all; max-width: 300px;">
  81. @if($v->BindChannels)
  82. {{ is_array($v->BindChannels) ? implode(',', $v->BindChannels) : $v->BindChannels }}
  83. @endif
  84. </td>
  85. <td>{{$v->ThemeKey}}</td>
  86. <td>
  87. <a href="{{ url('admin/web_region_config/edit/'.$v->id) }}" class="btn btn-sm btn-gradient-info">{{ __('auto.编辑') }}</a>
  88. </td>
  89. </tr>
  90. @endforeach
  91. </tbody>
  92. </table>
  93. <div class="box-footer clearfix" id="pages">
  94. {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  95. {!! $list->links() !!}
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. @endsection