| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-table-cell { |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <script type="text/html" id="thumbFormat"> |
| | | <img src="{{d.thumb}}" /> |
| | | </script> |
| | | <script type="text/html" id="is-up-format"> |
| | | {{# |
| | | var status = { |
| | |
| | | <span shiro:lacksPermission="video:view,video:update,video:delete"> |
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限 |
| | | </span> |
| | | {{# if(d.isUp == 1) { }} |
| | | <button lay-event="isUp" type="button" class="layui-btn layui-btn-xs layui-btn-danger isUp">下架</button> |
| | | {{# } else { }} |
| | | <button lay-event="isUp" type="button" class="layui-btn layui-btn-xs layui-btn-normal isUp">上架</button> |
| | | {{# } }} |
| | | <a lay-event="edit" shiro:hasPermission="video:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | <a lay-event="del" shiro:hasPermission="video:delete"><i class="layui-icon febs-edit-area febs-red"></i></a> |
| | |
| | | }); |
| | | } |
| | | if (layEvent === 'edit') { |
| | | febs.modal.open('修改视频', 'video/update/' + data.name, { |
| | | area: $(window).width() <= 750 ? '90%' : '50%', |
| | | offset: '30px', |
| | | febs.modal.open('修改视频', 'video/update/' + data.id, { |
| | | area: ['100%', '100%'], |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#user-update').find('#submit').trigger('click'); |
| | | $('#video-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'isUp') { |
| | | var text; |
| | | if (data.isUp == 1) { |
| | | text = "下架"; |
| | | } else { |
| | | text = "上架"; |
| | | } |
| | | febs.modal.confirm('是否' + text + "该视频", '确定' + text + '该视频?', function () { |
| | | febs.post(ctx + 'video/video/changeIsUp/' + data.id, null, function () { |
| | | febs.alert.success(text + '视频成功'); |
| | | $query.click(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'title', title: '视频名', minWidth: 100}, |
| | | {field: 'thumb', title: '缩略图'}, |
| | | {templet: '#thumbFormat', title: '缩略图'}, |
| | | {title: '是否上架', templet: '#is-up-format'}, |
| | | {title: '会员', templet: '#is-free-format'}, |
| | | {field: 'createdTime', title: '创建时间', minWidth: 180, sort: true}, |
| | | {title: '操作', toolbar: '#user-option', minWidth: 140} |
| | | {field: 'playCnt', title: '播放量'}, |
| | | {field: 'collectCnt', title: '收藏量'}, |
| | | {field: 'starCnt', title: '点赞量'}, |
| | | {field: 'createdTime', title: '创建时间', minWidth: 180}, |
| | | {title: '操作', toolbar: '#user-option'} |
| | | ]] |
| | | }); |
| | | } |