gift_list.blade.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. @extends('base.base')
  2. @section('base')
  3. <div class="main-panel">
  4. <div class="content-wrapper">
  5. <div class="page-header">
  6. <h3 class="page-title">
  7. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  8. <i class="mdi mdi-gift"></i>
  9. </span>
  10. 充值礼包配置管理
  11. </h3>
  12. <nav aria-label="breadcrumb">
  13. <button class="btn btn-sm btn-gradient-primary" onclick="add()">
  14. <i class="mdi mdi-plus"></i> 添加礼包
  15. </button>
  16. </nav>
  17. </div>
  18. <div class="row">
  19. <div class="col-lg-12 grid-margin stretch-card">
  20. <div class="card">
  21. <div class="card-body">
  22. <h4 class="card-title">礼包列表</h4>
  23. <div class="table-responsive">
  24. <table class="table table-bordered">
  25. <thead>
  26. <tr>
  27. <th>ID</th>
  28. <th>礼包ID</th>
  29. <th>礼包名称</th>
  30. <th>总获得(%)</th>
  31. <th>立即获得(%)</th>
  32. <th>首充</th>
  33. <th>VIP</th>
  34. <th>推荐充值档位值</th>
  35. <th>配置倒计时(小时)</th>
  36. <th>到期后倒计时(小时)</th>
  37. <th>每日奖励</th>
  38. <th>下注奖励</th>
  39. <th>下注任务</th>
  40. <th>每日任务奖励</th>
  41. <th>操作</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. @foreach($list as $item)
  46. <tr>
  47. <td>{{ $item->id }}</td>
  48. <td>{{ $item->gift_id }}</td>
  49. <td>{{ $item->gift_name }}</td>
  50. <td>{{ $item->total_bonus }}%</td>
  51. <td>{{ $item->bonus_instantly }}%</td>
  52. <td>{{ $item->first_pay ? '是' : '否' }}</td>
  53. <td>{{ $item->is_vip ? '是' : '否' }}</td>
  54. <td>{{ number_format($item->recommend ?? 0, 2) }}</td>
  55. <td>{{ $item->valid_h }}</td>
  56. <td>{{ $item->valid_h_2 ?? 0 }}</td>
  57. <td>
  58. @if($item->day_rewards)
  59. <small>总: {{ $item->day_rewards['total_bonus'] }}% | 天数: {{ $item->day_rewards['bonus_day'] }}</small>
  60. @else
  61. -
  62. @endif
  63. </td>
  64. <td>
  65. @if($item->betting_bonus)
  66. <small>总: {{ $item->betting_bonus['total_bonus'] }}% | 每注: {{ $item->betting_bonus['per_bet'] }}</small>
  67. @else
  68. -
  69. @endif
  70. </td>
  71. <td>
  72. @if($item->betting_task)
  73. <small>总: {{ $item->betting_task['total_bonus'] }}% | 倍数: {{ $item->betting_task['bet_pay_times'] }}</small>
  74. @else
  75. -
  76. @endif
  77. </td>
  78. <td>
  79. @if($item->task_bonus !== null)
  80. {{ number_format($item->task_bonus, 2) }}
  81. @else
  82. -
  83. @endif
  84. </td>
  85. <td>
  86. <button class="btn btn-sm btn-gradient-info" onclick="update({{ $item->id }})">修改</button>
  87. <button class="btn btn-sm btn-gradient-danger" onclick="del({{ $item->id }})">删除</button>
  88. </td>
  89. </tr>
  90. @endforeach
  91. </tbody>
  92. </table>
  93. </div>
  94. <div class="box-footer clearfix">
  95. {!! $list->links() !!}
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <script>
  104. function add() {
  105. layer.open({
  106. type: 2,
  107. title: '添加充值礼包',
  108. shadeClose: true,
  109. shade: 0.8,
  110. area: ['90%', '90%'],
  111. content: '/admin/recharge/gift_add'
  112. });
  113. }
  114. function update(id) {
  115. layer.open({
  116. type: 2,
  117. title: '修改充值礼包',
  118. shadeClose: true,
  119. shade: 0.8,
  120. area: ['90%', '90%'],
  121. content: '/admin/recharge/gift_update/' + id
  122. });
  123. }
  124. function del(id) {
  125. layer.confirm('确定删除该礼包吗?', function(index) {
  126. myRequest("/admin/recharge/gift_delete/" + id, "post", {}, function(res) {
  127. layer.msg(res.msg);
  128. if (res.code == '200') {
  129. setTimeout(function() {
  130. location.reload();
  131. }, 1500);
  132. }
  133. });
  134. layer.close(index);
  135. });
  136. }
  137. </script>
  138. @endsection