gift_list.blade.php 5.7 KB

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