index.blade.php 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. <th>操作</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. @foreach ($list as $a)
  38. <tr>
  39. <th>{{$a['id']}}</th>
  40. <td>{{$a['name']}}</td>
  41. <td>{{date('Y/m/d H:i:s',$a['start_time'])}}</td>
  42. <td>{{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  43. <td>/pages/coupon/active?id={{$a['id']}}</td>
  44. <td>{{$a['mp_urllink']}}</td>
  45. <td>
  46. @if( $a['status'] )
  47. 停用
  48. @else
  49. @if( $a['start_time'] <= time() && $a['end_time'] <= time() )
  50. 已结束
  51. @endif
  52. @if( $a['start_time'] <= time() && $a['end_time'] > time() )
  53. 进行中
  54. @endif
  55. @if( $a['start_time'] > time() )
  56. 待进行
  57. @endif
  58. @endif
  59. </td>
  60. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  61. <td>
  62. @if(check_auth('admin/coupon_active_coupon/index'))
  63. <a href="{{url('admin/coupon_active_coupon/index?'.http_build_query(['active_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >活动优惠券</a>
  64. @endif
  65. @if(check_auth('admin/coupon_active/edit'))
  66. <a href="{{url('admin/coupon_active/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  67. @endif
  68. @if(check_auth('admin/coupon_active/get_poster'))
  69. <a href="{{url('admin/coupon_active/get_poster?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-success" >海报</a>
  70. @endif
  71. @if(check_auth('admin/coupon_active/set_status'))
  72. @if($a['status'])
  73. <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>
  74. @else
  75. <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>
  76. @endif
  77. @endif
  78. </td>
  79. </tr>
  80. @endforeach
  81. <tr>
  82. <td colspan="20" class="page">{{$list->render()}}</td>
  83. </tr>
  84. <tr>
  85. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. @endsection