// 视频上传
upload.render({
elem: '#videoBtn',
url: "{:url('mxadmin/upload/upload_file_same')}", //改成您自己的上传接口
accept: 'video', //视频文件
size: 500000, //限制文件大小,单位 KB
acceptMime: 'video/mp4',
before: function () {
layui.use('layer', function () {
layui.layer.load();
//console.log(Lodingindex) opacity
$(".layui-layer-shade").css('background', '#000000')
$(".layui-layer-shade").css('opacity', '0.2')
$(".layui-layer-shade").click(function (event) {
event.stopPropagation();
})
})
},
done: function(res){
if (res.code === 1) {
layer.msg(res.msg, {icon: 1});
} else {
layer.msg(res.msg, {icon: 5, anim: 6});
}
layui.$('[name="video"]').val(res.data.filePath);
layui.layer.closeAll('loading');
}
});
【mxadmin后台视频上传代码修改】
于 2023-07-27 17:34:20 首次发布