index.blade.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. <form class="well form-inline margin-top-20" method="get" action='/admin/web_channel_config/list'>
  26. <span style="padding-left: 5px">{{ __('auto.渠道号:') }}</span>
  27. <input type="text" name="Channel" value="{{$channel}}" class="form-control">&nbsp;&nbsp;
  28. <span style="padding-left: 5px">{{ __('auto.包名:') }}</span>
  29. <input type="text" name="PackageName" value="{{$packageName}}" class="form-control">&nbsp;&nbsp;
  30. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  31. <a href="/admin/web_channel_config/list" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}&{{ __('auto.刷新') }}</a>&nbsp;&nbsp;
  32. </form>
  33. <br>
  34. {{-- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">--}}
  35. {{-- <i class="mdi mdi-plus btn-icon-prepend"></i>--}}
  36. {{-- {{ __('auto.添加配置') }}--}}
  37. {{-- </button>--}}
  38. <table class="table table-bordered">
  39. <thead>
  40. <tr>
  41. <th>ID</th>
  42. <th>{{ __('auto.渠道号') }}</th>
  43. <th>{{ __('auto.包名') }}</th>
  44. <th>RegionID</th>
  45. <th>{{ __('auto.备注') }}</th>
  46. <th>StateNo</th>
  47. <th>Platform</th>
  48. <th>BonusArr</th>
  49. <th>{{ __('auto.操作') }}</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. @foreach($list as $k=>$v)
  54. <tr>
  55. <td>{{$v->ID}}</td>
  56. <td>{{$v->Channel}}</td>
  57. <td>{{$v->PackageName}}</td>
  58. <td>
  59. @php
  60. $regionInfo = $regionMap[$v->RegionID] ?? null;
  61. @endphp
  62. @if($regionInfo && $regionInfo['has_logo'])
  63. <div style="background-color: #000; display: inline-block; padding: 2px;">
  64. <img src="{{$regionInfo['logo']}}" style="max-height: 30px; width: auto;" alt="Logo" title="{{$v->RegionID}}">
  65. </div>
  66. @else
  67. <span style="color: {{$regionInfo['color'] ?? ''}}">{{$v->RegionID}}</span>
  68. @endif
  69. </td>
  70. <td>{{$v->Remarks}}</td>
  71. <td>{{$v->StateNo}}</td>
  72. <td>{{$v->PlatformName}} ({{$v->PlatformID}})</td>
  73. <td>{{$v->BonusArr}}</td>
  74. <td>
  75. <button class="btn btn-sm btn-gradient-dark" onclick="edit({{$v->ID}})">
  76. {{ __('auto.修改') }}
  77. </button>
  78. </td>
  79. </tr>
  80. @endforeach
  81. </tbody>
  82. </table>
  83. <div class="box-footer clearfix" id="pages">
  84. {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  85. {!! $list->appends(['Channel' => $channel, 'PackageName' => $packageName])->links() !!}
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script>
  94. function add() {
  95. layer.open({
  96. type: 2,
  97. title: '{{ __('auto.添加配置') }}',
  98. shadeClose: true,
  99. shade: 0.8,
  100. area: ['70%', '80%'],
  101. content: '/admin/web_channel_config/add'
  102. });
  103. }
  104. function edit(id) {
  105. layer.open({
  106. type: 2,
  107. title: '{{ __('auto.修改配置') }}',
  108. shadeClose: true,
  109. shade: 0.8,
  110. area: ['70%', '80%'],
  111. content: '/admin/web_channel_config/update/' + id
  112. });
  113. }
  114. </script>
  115. @endsection