index.blade.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/coupon_active/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/coupon_active/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入活动名称查询" />
  14. </div>
  15. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  16. <a href="{{url('admin/coupon_active/index')}}" class="btn btn-sm btn-default" >重置</a>
  17. </form>
  18. <div class="row">
  19. <div class="col-xs-12">
  20. <div class="table-responsive">
  21. <table class="table table-striped table-bordered table-hover">
  22. <thead>
  23. <tr>
  24. <th>活动ID</th>
  25. <th>活动名称</th>
  26. <th>开始时间</th>
  27. <th>结束时间</th>
  28. <th>内部跳转</th>
  29. <th>宣发链接</th>
  30. <th>活动状态</th>
  31. <th>修改时间</th>
  32. <th>操作</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. @foreach ($list as $a)
  37. <tr>
  38. <th>{{$a['id']}}</th>
  39. <td>{{$a['name']}}</td>
  40. <td>{{date('Y/m/d H:i:s',$a['start_time'])}}</td>
  41. <td>{{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  42. <td>/pages/coupon/active?id={{$a['id']}}</td>
  43. <td>{{$a['mp_urllink']}}</td>
  44. <td>
  45. @if( $a['status'] )
  46. 停用
  47. @else
  48. @if( $a['start_time'] <= time() && $a['end_time'] <= time() )
  49. 已结束
  50. @endif
  51. @if( $a['start_time'] <= time() && $a['end_time'] > time() )
  52. 进行中
  53. @endif
  54. @if( $a['start_time'] > time() )
  55. 待进行
  56. @endif
  57. @endif
  58. </td>
  59. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  60. <td>
  61. @if(check_auth('admin/coupon_active_coupon/index'))
  62. <a href="{{url('admin/coupon_active_coupon/index?'.http_build_query(['active_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >活动优惠券</a>
  63. @endif
  64. @if(check_auth('admin/coupon_active/edit'))
  65. <a href="{{url('admin/coupon_active/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  66. @endif
  67. @if(check_auth('admin/coupon_active/get_poster'))
  68. <a href="{{url('admin/coupon_active/get_poster?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-success" >海报</a>
  69. @endif
  70. @if(check_auth('admin/coupon_active/set_status'))
  71. @if($a['status'])
  72. <a data-url="{{url('admin/coupon_active/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  73. @else
  74. <a data-url="{{url('admin/coupon_active/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  75. @endif
  76. @endif
  77. </td>
  78. </tr>
  79. @endforeach
  80. <tr>
  81. <td colspan="20" class="page">{{$list->render()}}</td>
  82. </tr>
  83. <tr>
  84. <td colspan="20">总计 {{$list->total()}} 个活动</td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. </div>
  89. </div>
  90. </div>
  91. @endsection