123456789101112131415161718192021222324252627282930313233343536 |
- <?php /*a:2:{s:71:"D:\project\gyx\gaoyixia\application\nutrition\view\video_url\index.html";i:1713337518;s:56:"D:\project\gyx\gaoyixia\application\admin\view\main.html";i:1699858976;}*/ ?>
- <div class="layui-card layui-bg-gray"><?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?><div class="layui-card-header layui-anim layui-anim-fadein notselect"><span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span><?php echo htmlentities((isset($title) && ($title !== '')?$title:'')); ?><div class="pull-right"><button data-action='<?php echo url("remove"); ?>' data-confirm="确定要删除吗?" data-csrf="<?php echo systoken('remove'); ?>" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</button><a href="javascript:history.go(-1);" data-title="返 回" class='layui-btn layui-btn-sm layui-btn-primary'>返 回</a><button data-open='<?php echo url("add"); ?>?video_id=<?php echo htmlentities($video_id); ?>' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button></div></div><?php endif; ?><div class="layui-card-body layui-anim layui-anim-upbit"><div class="think-box-shadow"><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='list-table-sort-td'><button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button></th><th class='text-left nowrap'>ID</th><th class='text-left nowrap'>标题</th><th class='text-left nowrap'>视频</th><th class='text-left nowrap'>绑定用户</th><th class='text-left nowrap'>是否VIP</th><th class="text-left" style="width: 20%">操作</th></tr></thead><tbody><?php foreach($list as $key=>$vo): ?><tr><td class='list-table-check-td think-checkbox'><input class="list-check-box" value='<?php echo htmlentities($vo['id']); ?>' type='checkbox'></td><td class='list-table-sort-td'><input data-action-blur="<?php echo request()->url(); ?>" data-value="id#<?php echo htmlentities($vo['id']); ?>;action#sort;sort#{value}" data-loading="false" value="<?php echo htmlentities($vo['sort']); ?>" class="list-sort-input"></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['id']) && ($vo['id'] !== '')?$vo['id']:'')); ?></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['title']) && ($vo['title'] !== '')?$vo['title']:'')); ?></td><td class='text-left nowrap'><img class="video_player" alert="点击播放" src="<?php echo htmlentities((isset($vo['cover']) && ($vo['cover'] !== '')?$vo['cover']:'')); ?>" data-src="<?php echo htmlentities((isset($vo['url']) && ($vo['url'] !== '')?$vo['url']:'')); ?>" style="height: 50px;width: 75px" /></td><td class='text-left nowrap'><?php echo htmlentities((isset($vo['phone']) && ($vo['phone'] !== '')?$vo['phone']:'--')); ?></td><td class='text-left nowrap'><?php echo !empty($vo['is_vip']) ? '是' : '否'; ?></td><td class='text-left' style="width: 20%"><a data-title="编辑" class="layui-btn layui-btn-xs" data-open='<?php echo url("edit"); ?>?id=<?php echo htmlentities($vo['id']); ?>&video_id=<?php echo htmlentities($vo['video_id']); ?>'>编 辑</a><a data-title="评论" class="layui-btn layui-btn-xs" data-open='<?php echo url("/nutrition/video_comment/index"); ?>?url_id=<?php echo htmlentities($vo['id']); ?>&video_id=<?php echo htmlentities($vo['video_id']); ?>'>评 论</a><?php if($vo['status'] == 1): ?><span class="layui-btn layui-btn-xs layui-btn-warm" onclick="btn_confirm('禁用','forbidden','<?php echo htmlentities($vo['id']); ?>');" >禁 用</span><?php else: ?><span class="layui-btn layui-btn-xs layui-btn-xs" onclick="btn_confirm('启用','enable','<?php echo htmlentities($vo['id']); ?>');">启 用</span><?php endif; ?><span class="layui-btn layui-btn-xs layui-btn-danger" onclick="btn_confirm('删除','del','<?php echo htmlentities($vo['id']); ?>');">删 除</span></td></tr><?php endforeach; ?></tbody></table><?php if(empty($list) || (($list instanceof \think\Collection || $list instanceof \think\Paginator ) && $list->isEmpty())): ?><span class="notdata">没有记录哦</span><?php else: ?><?php echo (isset($pagehtml) && ($pagehtml !== '')?$pagehtml:''); ?><?php endif; ?></div><script> function btn_confirm(msg,fun,id) {
- layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
- var url = "/nutrition/video_url/"+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)
- }
- });
- });
- }
- $(document).on("click",'.video_player',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
- });
- form.render();
- });
- </script></div></div>
|