gift_list.blade.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. </tr>
  42. </thead>
  43. <tbody>
  44. @foreach($list as $item)
  45. <tr>
  46. <td>{{ $item->id }}</td>
  47. <td>{{ $item->gift_id }}</td>
  48. <td>{{ $item->gift_name }}</td>
  49. <td>{{ $item->total_bonus }}%</td>
  50. <td>{{ $item->bonus_instantly }}%</td>
  51. <td>{{ $item->first_pay ? '是' : '否' }}</td>
  52. <td>{{ $item->is_vip ? '是' : '否' }}</td>
  53. <td>{{ number_format($item->recommend ?? 0, 2) }}</td>
  54. <td>{{ $item->valid_h }}</td>
  55. <td>{{ $item->valid_h_2 ?? 0 }}</td>
  56. <td>
  57. @if($item->day_rewards)
  58. <small>总: {{ $item->day_rewards['total_bonus'] }}% | 天数: {{ $item->day_rewards['bonus_day'] }}</small>
  59. @else
  60. -
  61. @endif
  62. </td>
  63. <td>
  64. @if($item->betting_bonus)
  65. <small>总: {{ $item->betting_bonus['total_bonus'] }}% | 每注: {{ $item->betting_bonus['per_bet'] }}</small>
  66. @else
  67. -
  68. @endif
  69. </td>
  70. <td>
  71. @if($item->betting_task)
  72. <small>总: {{ $item->betting_task['total_bonus'] }}% | 倍数: {{ $item->betting_task['bet_pay_times'] }}</small>
  73. @else
  74. -
  75. @endif
  76. </td>
  77. <td>
  78. <button class="btn btn-sm btn-gradient-info" onclick="update({{ $item->id }})">修改</button>
  79. <button class="btn btn-sm btn-gradient-danger" onclick="del({{ $item->id }})">删除</button>
  80. </td>
  81. </tr>
  82. @endforeach
  83. </tbody>
  84. </table>
  85. </div>
  86. <div class="box-footer clearfix">
  87. {!! $list->links() !!}
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <script>
  96. function add() {
  97. layer.open({
  98. type: 2,
  99. title: '添加充值礼包',
  100. shadeClose: true,
  101. shade: 0.8,
  102. area: ['90%', '90%'],
  103. content: '/admin/recharge/gift_add'
  104. });
  105. }
  106. function update(id) {
  107. layer.open({
  108. type: 2,
  109. title: '修改充值礼包',
  110. shadeClose: true,
  111. shade: 0.8,
  112. area: ['90%', '90%'],
  113. content: '/admin/recharge/gift_update/' + id
  114. });
  115. }
  116. function del(id) {
  117. layer.confirm('确定删除该礼包吗?', function(index) {
  118. myRequest("/admin/recharge/gift_delete/" + id, "post", {}, function(res) {
  119. layer.msg(res.msg);
  120. if (res.code == '200') {
  121. setTimeout(function() {
  122. location.reload();
  123. }, 1500);
  124. }
  125. });
  126. layer.close(index);
  127. });
  128. }
  129. </script>
  130. @endsection