gift_list.blade.php 5.9 KB

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