hall_announcement.blade.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
  26. <i class="mdi mdi-plus btn-icon-prepend"></i>
  27. {{ __('auto.添加活动') }}
  28. </button>
  29. <table class="table table-bordered">
  30. <thead>
  31. <tr>
  32. <th width="5%">{{ __('auto.权重') }}</th>
  33. <th width="5%">{{ __('auto.类型') }}</th>
  34. <th width="8%">{{ __('auto.功能名称') }}</th>
  35. <th width="8%">{{ __('auto.发布内容') }}</th>
  36. <th width="8%">{{ __('auto.最后修改日期') }}</th>
  37. <th width="8%">{{ __('auto.开关') }}</th>
  38. <th width="8%">{{ __('auto.操作') }}</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach($list as $k=>$v)
  43. <tr>
  44. <td>{{$v->Sort}}</td>
  45. <td>
  46. @if ($v->Type == 1)
  47. {{ __('auto.文本') }}
  48. @else
  49. {{ __('auto.图片') }}
  50. @endif
  51. </td>
  52. <td>{{$v->Title}}</td>
  53. <td>
  54. @if ($v->Type == 1)
  55. <textarea name="" id="" rows="4" class="form-control" style="float: left;width: 80%">{{$v->Content}}</textarea>
  56. @else
  57. <img src="{{$v->Content}}" alt="" width="80px">
  58. @endif
  59. </td>
  60. <td>{{$v->LastTime}}</td>
  61. <td>
  62. @if ($v->Status == 1)
  63. {{ __('auto.已开启') }}
  64. <button class="btn-sm btn-gradient-dark"
  65. onclick="switchFunc({{$v->ID}},2)">
  66. {{ __('auto.关闭') }}
  67. </button>
  68. @else
  69. {{ __('auto.已关闭') }}
  70. <button class="btn-sm btn-gradient-dark"
  71. onclick="switchFunc({{$v->ID}},1)">
  72. {{ __('auto.开启') }}
  73. </button>
  74. @endif
  75. </td>
  76. <td>
  77. <button class="btn btn-sm btn-gradient-dark"
  78. onclick="update({{$v->ID}})">
  79. {{ __('auto.修改') }}
  80. </button>
  81. <button class="btn btn-sm btn-gradient-primary"
  82. onclick="del({{$v->ID}})">
  83. {{ __('auto.删除') }}
  84. </button>
  85. </td>
  86. </tr>
  87. @endforeach
  88. </tbody>
  89. </table>
  90. <div class="box-footer clearfix" id="pages">
  91. {{ __('auto.总共') }} <b>{{ $list->appends([
  92. 'list'=>$list,
  93. ])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  94. {!! $list->links() !!}
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <script>
  103. function switchFunc(ID,Status) {
  104. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  105. myRequest("/admin/notice/hall_announcement_switch/" + ID, "post", {Status}, function (res) {
  106. layer.msg(res.msg)
  107. setTimeout(function () {
  108. window.location.reload();
  109. }, 2000)
  110. });
  111. });
  112. }
  113. function del(ID) {
  114. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  115. myRequest("/admin/notice/hall_announcement_del/" + ID, "post", {}, function (res) {
  116. layer.msg(res.msg)
  117. setTimeout(function () {
  118. window.location.reload();
  119. }, 2000)
  120. });
  121. });
  122. }
  123. function add() {
  124. layer.open({
  125. type: 2,
  126. title: '{{ __('auto.新增活动') }}',
  127. shadeClose: true,
  128. shade: 0.8,
  129. area: ['70%', '70%'],
  130. content: '/admin/notice/hall_announcement_add'
  131. });
  132. }
  133. // 修改
  134. function update(id) {
  135. layer.open({
  136. type: 2,
  137. title: '{{ __('auto.修改') }}',
  138. shadeClose: true,
  139. shade: 0.8,
  140. area: ['70%', '70%'],
  141. content: '/admin/notice/hall_announcement_update/' + id
  142. });
  143. }
  144. function switch_control(id, ChannelIndex, AndroidVersion, type) {
  145. myConfirm("{{ __('auto.操作不可逆,是否继续') }}?", function () {
  146. myRequest("/admin/channel/switch/" + id, "post", {ChannelIndex, AndroidVersion, type}, function (res) {
  147. layer.msg(res.msg)
  148. setTimeout(function () {
  149. window.location.reload();
  150. }, 2000)
  151. });
  152. });
  153. }
  154. </script>
  155. @endsection