1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- {extend name='admin@main'}
- {block name="button"}
- <button data-action='{:url("del")}' data-confirm="确定要删除吗?" data-csrf="{:systoken('del')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button>
- {/block}
- {block name="content"}
- <div class="think-box-shadow">
- {include file='user_video/index_search'}
- <table class="layui-table margin-top-20" lay-skin="line">
- <thead>
- <tr>
- <th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th>
- <th class='text-left nowrap' >ID</th>
- <th class='text-left nowrap' >用户</th>
- <th class='text-left ' style="max-width: 20%">标题</th>
- <th class='text-left nowrap' >标签</th>
- <th class='text-left nowrap'>状态</th>
- <th class="text-left nowrap">操作</th>
- </tr>
- </thead>
- <tbody>
- {foreach $list as $key=>$vo}
- <tr>
- <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
- <td class='text-left'>{$vo.id|default=''}</td>
- <td class='text-left nowrap'>
- <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
- <div class="inline-block">
- 用户ID:{$vo.user_id|default='--'}<br>
- 手机号:{$vo.phone|default='--'}<br>
- 用户昵称:{$vo.user_name|default='--'}
- </div>
- </td>
- <td class='text-left'>{$vo.title|default=''}</td>
- <td class='text-left nowrap'>{$vo.label|default=''}</td>
- <td class='text-left nowrap'>{$vo.status == 0 ?'待审核' : ($vo.status == 1?'审核通过':'审核拒绝')}</td>
- <td class='text-left nowrap' >
- {if $vo.status == 0}
- <a data-title="审核" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("edit")}?id={$vo.id}'>审 核</a>
- {else}
- <a data-title="查看" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>查 看</a>
- {eq name='vo.status' value='1'}
- <!-- <a data-title="加入系列" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("series")}?id={$vo.id}'>加入系列</a>-->
- <!-- <a data-title="新建图文" class="layui-btn layui-btn-sm layui-btn-warm" data-modal='{:url("new_article")}?id={$vo.id}'>新建图文</a>-->
- {/eq}
- {/if}
- <span class="layui-btn layui-btn-sm layui-btn-danger" onclick="btn_confirm('删除','del','{$vo.id}');">删 除</span>
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
- </div>
- <script>
- function btn_confirm(msg,fun,id) {
- layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
- var url = "/nutrition/user_article/"+fun;
- layer.closeAll();
- $.ajax({
- type: "post",
- url: url,
- data: {id:id},
- dataType: "json",
- async: false,
- success: function (data) {
- layer.msg(data.info);
- setTimeout(function () {
- window.location.reload();
- },1000)
- }
- });
- });
- }
- $('.video_player').click(function () {
- vUrl = $(this).data('src'); //获取到播放的url
- var loadstr = '<video width="100%" height="100%" controls="controls" autobuffer="autobuffer" autoplay="autoplay" loop="loop">' +
- '<source src='+vUrl+' type="video/mp4"></source></video>';
- layer.open({
- type: 1,
- title: false,
- area: ['730px', '500px'],
- shade: [0.8, 'rgb(14, 16, 22)'],
- skin: 'demo-class',
- content: loadstr
- });
- });
- </script>
- {/block}
|