Commit ac9c7cf23c2395a63c9930f1ea750b185f96e3b8

Authored by u123231312
1 parent 6f43ad6e

样式调整。

{include file="common/head"/}
<style>
#picVideo:after{
width:0;
height:0;
content:'';
display: block;
clear: both;
}
#picVideo .layui-input-block{
width:260px;
margin-left: 0;
text-align: center;
margin-bottom:10px;
}
.layui-upload-img{
width:260px;
height: 200px;
}
#picImg .layui-input-block{
width:260px;
margin-left: 0;
text-align: center;
margin-bottom:10px;
}
</style>
<div class="admin-main layui-anim layui-anim-upbit">
<fieldset class="layui-elem-field layui-field-title">
<legend>{$title}</legend>
... ... @@ -37,12 +63,18 @@
</div>
</div>
<div style="overflow: hidden;border: 1px solid #ccc;" id="picVideo">
<span class="layui-form-label">视频</span>
<div style="overflow: hidden;border: 1px solid #ccc;margin-bottom:15px;" id="picVideo">
<div style="width:110px;height:38px;background:#f8f8f8;border:1px solid #e6e6e6;text-align:center;line-height:38px;">视频</div>
<div id="video-list">
</div>
</div>
<div style="overflow: hidden;border: 1px solid #ccc;" id="picImg">
<span class="layui-form-label">GIF图片</span>
<div style="overflow: hidden;border: 1px solid #ccc;margin-bottom:30px;" id="picImg">
<div style="width:110px;height:38px;background:#f8f8f8;border:1px solid #e6e6e6;text-align:center;line-height:38px;">GIF图片</div>
<div id="img-list">
</div>
</div>
<div class="layui-form-item">
... ... @@ -90,14 +122,14 @@
if(data.code==1){
$.each(data.data, function(key, val) {
if(val.type=="png"){
var str = '<img class="layui-upload-img" id="adPic" src="http://'+val.pic+'">'
+ '<div class="layui-input-block"><input type="radio" name="dishesGif" value="'+val.pic+'" title="'+val.name+'"></div>';
$("#picImg").append(str);
var str = '<div style="display:inline-block;width:260px;height:auto;margin-left:30px;padding-top:30px;"><img class="layui-upload-img" style="width:260px;"id="adPic" src="http://'+val.pic+'">'
+ '<div class="layui-input-block"><input type="radio" name="dishesGif" value="'+val.pic+'" title="'+val.name+'"></div></div>';
$("#img-list").append(str);
form.render();
}else{
var str = '<video id="adVideo" autoplay="autoplay" controls="controls" src ="http://'+val.pic+'" style="width: 260px;height: 200px;display: block;"></video>'
+ '<div class="layui-input-block"><input type="radio" name="dishesVideo" value="'+val.pic+'" title="'+val.name+'"></div>';
$("#picVideo").append(str);
var str = '<div style="display:inline-block;width:260px;height:270px;margin-left:30px;padding-top:30px;"><video id="adVideo" autoplay="autoplay" controls src ="http://'+val.pic+'" style="width: 260px;height: 200px;display: block;"></video>'
+ '<div class="layui-input-block"><input type="radio" name="dishesVideo" value="'+val.pic+'" title="'+val.name+'"></div></div>';
$("#video-list").append(str);
form.render();
}
});
... ...