index.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {extend name='admin@main'}
  2. {block name="content"}
  3. <div class="think-box-shadow">
  4. {include file='user_video/index_search'}
  5. <table class="layui-table margin-top-20" lay-skin="line">
  6. <thead>
  7. <tr>
  8. <th class='text-left nowrap' >用户</th>
  9. <th class='text-left nowrap' >标题</th>
  10. <th class='text-left nowrap' >视频</th>
  11. <th class='text-left nowrap' >分类</th>
  12. <th class='text-left nowrap'>审核状态</th>
  13. <th class='text-left nowrap' >状态</th>
  14. <th class='text-left nowrap'>置顶</th>
  15. <th class="text-left nowrap">操作</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. {foreach $list as $key=>$vo}
  20. <tr>
  21. <td class='text-left nowrap'>
  22. <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
  23. <div class="inline-block">
  24. 用户ID:{$vo.user_id|default='--'}<br>
  25. 手机号:{$vo.phone|default='--'}<br>
  26. 用户昵称:{$vo.user_name|default='--'}
  27. </div>
  28. </td>
  29. <td class='text-left nowrap'>{$vo.title|default=''}</td>
  30. <td class='text-left nowrap'>
  31. <img class="video_player" alert="点击播放" src="{$vo.cover|default=''}" data-src="{$vo.video_url|default=''}" style="height: 50px;width: 75px" />
  32. </td>
  33. <td class='text-left nowrap'>{$video_cate[$vo.first_classify]['title']|default='--'}--{$video_cate[$vo.second_classify]['title']|default='--'}</td>
  34. <td class='text-left nowrap'>{$vo.status == 0 ?'待审核' : ($vo.status == 1?'审核通过':'审核拒绝')}</td>
  35. <td class='text-left '>
  36. {if $vo.is_deleted == 0}
  37. <span class="layui-btn layui-btn-xs">正 常</span>
  38. {else}
  39. <span class="layui-btn layui-btn-xs layui-btn-warm ">已下架</span>
  40. {/if}
  41. </td>
  42. <td class='text-left nowrap'>{$vo.is_top == 1 ?'是' :'否'}</td>
  43. <td class='text-left nowrap' >
  44. {if $vo.status == 0}
  45. <a data-title="审核" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("edit")}?id={$vo.id}'>审 核</a>
  46. {else}
  47. <a data-title="查看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
  48. {eq name='vo.status' value='1'}
  49. <a data-title="加入系列" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("series")}?id={$vo.id}'>加入系列</a>
  50. <!-- <a data-title="新建视频" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("new_video")}?id={$vo.id}'>新建视频</a>-->
  51. {/eq}
  52. {/if}
  53. <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','del','{$vo.id}');">删 除</span>
  54. </td>
  55. </tr>
  56. {/foreach}
  57. </tbody>
  58. </table>
  59. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  60. </div>
  61. <script>
  62. function btn_confirm(msg,fun,id) {
  63. layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
  64. var url = "/nutrition/user_video/"+fun;
  65. layer.closeAll();
  66. $.ajax({
  67. type: "post",
  68. url: url,
  69. data: {id:id},
  70. dataType: "json",
  71. async: false,
  72. success: function (data) {
  73. layer.msg(data.info);
  74. setTimeout(function () {
  75. window.location.reload();
  76. },1000)
  77. }
  78. });
  79. });
  80. }
  81. $('.video_player').click(function () {
  82. vUrl = $(this).data('src'); //获取到播放的url
  83. var loadstr = '<video width="100%" height="100%" controls="controls" autobuffer="autobuffer" autoplay="autoplay" loop="loop">' +
  84. '<source src='+vUrl+' type="video/mp4"></source></video>';
  85. layer.open({
  86. type: 1,
  87. title: false,
  88. area: ['730px', '500px'],
  89. shade: [0.8, 'rgb(14, 16, 22)'],
  90. skin: 'demo-class',
  91. content: loadstr
  92. });
  93. });
  94. </script>
  95. {/block}