Showing
1 changed file
with
42 additions
and
10 deletions
| 1 | {include file="common/head"/} | 1 | {include file="common/head"/} |
| 2 | +<style> | ||
| 3 | + #picVideo:after{ | ||
| 4 | + width:0; | ||
| 5 | + height:0; | ||
| 6 | + content:''; | ||
| 7 | + display: block; | ||
| 8 | + clear: both; | ||
| 9 | + } | ||
| 10 | + | ||
| 11 | + #picVideo .layui-input-block{ | ||
| 12 | + width:260px; | ||
| 13 | + margin-left: 0; | ||
| 14 | + text-align: center; | ||
| 15 | + margin-bottom:10px; | ||
| 16 | + } | ||
| 17 | + .layui-upload-img{ | ||
| 18 | + width:260px; | ||
| 19 | + height: 200px; | ||
| 20 | + } | ||
| 21 | + #picImg .layui-input-block{ | ||
| 22 | + width:260px; | ||
| 23 | + margin-left: 0; | ||
| 24 | + text-align: center; | ||
| 25 | + margin-bottom:10px; | ||
| 26 | + } | ||
| 27 | +</style> | ||
| 2 | <div class="admin-main layui-anim layui-anim-upbit"> | 28 | <div class="admin-main layui-anim layui-anim-upbit"> |
| 3 | <fieldset class="layui-elem-field layui-field-title"> | 29 | <fieldset class="layui-elem-field layui-field-title"> |
| 4 | <legend>{$title}</legend> | 30 | <legend>{$title}</legend> |
| @@ -37,12 +63,18 @@ | @@ -37,12 +63,18 @@ | ||
| 37 | </div> | 63 | </div> |
| 38 | </div> | 64 | </div> |
| 39 | 65 | ||
| 40 | - <div style="overflow: hidden;border: 1px solid #ccc;" id="picVideo"> | ||
| 41 | - <span class="layui-form-label">视频</span> | 66 | + <div style="overflow: hidden;border: 1px solid #ccc;margin-bottom:15px;" id="picVideo"> |
| 67 | + <div style="width:110px;height:38px;background:#f8f8f8;border:1px solid #e6e6e6;text-align:center;line-height:38px;">视频</div> | ||
| 68 | + <div id="video-list"> | ||
| 69 | + | ||
| 70 | + </div> | ||
| 42 | </div> | 71 | </div> |
| 43 | 72 | ||
| 44 | - <div style="overflow: hidden;border: 1px solid #ccc;" id="picImg"> | ||
| 45 | - <span class="layui-form-label">GIF图片</span> | 73 | + <div style="overflow: hidden;border: 1px solid #ccc;margin-bottom:30px;" id="picImg"> |
| 74 | + <div style="width:110px;height:38px;background:#f8f8f8;border:1px solid #e6e6e6;text-align:center;line-height:38px;">GIF图片</div> | ||
| 75 | + <div id="img-list"> | ||
| 76 | + | ||
| 77 | + </div> | ||
| 46 | </div> | 78 | </div> |
| 47 | 79 | ||
| 48 | <div class="layui-form-item"> | 80 | <div class="layui-form-item"> |
| @@ -90,14 +122,14 @@ | @@ -90,14 +122,14 @@ | ||
| 90 | if(data.code==1){ | 122 | if(data.code==1){ |
| 91 | $.each(data.data, function(key, val) { | 123 | $.each(data.data, function(key, val) { |
| 92 | if(val.type=="png"){ | 124 | if(val.type=="png"){ |
| 93 | - var str = '<img class="layui-upload-img" id="adPic" src="http://'+val.pic+'">' | ||
| 94 | - + '<div class="layui-input-block"><input type="radio" name="dishesGif" value="'+val.pic+'" title="'+val.name+'"></div>'; | ||
| 95 | - $("#picImg").append(str); | 125 | + 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+'">' |
| 126 | + + '<div class="layui-input-block"><input type="radio" name="dishesGif" value="'+val.pic+'" title="'+val.name+'"></div></div>'; | ||
| 127 | + $("#img-list").append(str); | ||
| 96 | form.render(); | 128 | form.render(); |
| 97 | }else{ | 129 | }else{ |
| 98 | - var str = '<video id="adVideo" autoplay="autoplay" controls="controls" src ="http://'+val.pic+'" style="width: 260px;height: 200px;display: block;"></video>' | ||
| 99 | - + '<div class="layui-input-block"><input type="radio" name="dishesVideo" value="'+val.pic+'" title="'+val.name+'"></div>'; | ||
| 100 | - $("#picVideo").append(str); | 130 | + 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>' |
| 131 | + + '<div class="layui-input-block"><input type="radio" name="dishesVideo" value="'+val.pic+'" title="'+val.name+'"></div></div>'; | ||
| 132 | + $("#video-list").append(str); | ||
| 101 | form.render(); | 133 | form.render(); |
| 102 | } | 134 | } |
| 103 | }); | 135 | }); |
-
Please register or login to post a comment