index.blade.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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/share_message/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/share_message/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="table-responsive">
  14. <table class="table table-striped table-bordered table-hover">
  15. <thead>
  16. <tr>
  17. <th>ID</th>
  18. <th>配置页面</th>
  19. <th>产品编码/活动ID</th>
  20. <th>产品名称/活动名称</th>
  21. <th>分享标题</th>
  22. <th>分享图标</th>
  23. <th>状态</th>
  24. <th>修改时间</th>
  25. <th>操作</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. @foreach ($list as $a)
  30. <tr>
  31. <th>{{$a['id']}}</th>
  32. <td>
  33. @foreach ( $pagesList as $pages=>$name)
  34. @if( $pages == $a['pages'])
  35. {{$name}}
  36. @endif
  37. @endforeach
  38. </td>
  39. <td>{{$a['item_id']}}</td>
  40. <td>{{$a['item_name']}}</td>
  41. <td>{{$a['title']}}</td>
  42. <td> <img src="{{path_compat($a['image_url'])}}" alt="" height="30"> </td>
  43. <td>{{$a['status']?'停用':'启用'}}</td>
  44. <td>{{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  45. <td>
  46. @if(check_auth('admin/share_message/edit'))
  47. <a href="{{url('admin/share_message/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  48. @endif
  49. @if(check_auth('admin/share_message/set_status'))
  50. @if($a['status'])
  51. <a data-url="{{url('admin/share_message/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  52. @else
  53. <a data-url="{{url('admin/share_message/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  54. @endif
  55. @endif
  56. </td>
  57. </tr>
  58. @endforeach
  59. <tr>
  60. <td colspan="20" class="page">{{$list->render()}}</td>
  61. </tr>
  62. <tr>
  63. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  64. </tr>
  65. </tbody>
  66. </table>
  67. </div>
  68. </div>
  69. </div>
  70. @endsection