易优第一张图片为视频后为图片的技巧【eyoucms教程】
广告或者相册第一张为视频后为图片的替代方法:参考易居的法子通用
<div class="fix-width clearfix">
<div class="detail-info ">
<div class="slides-box width600 fl">
<div class="slides-big-box width600">
<ul>
{eju:notempty name="$eju.field.video"}
<li style="height: 400px;">
<video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" width="100%" height="100%" controls webkit-playsinline preload="none"
poster="{$eju.field.litpic}" data-setup="{}">
<source src="{$eju.field.video}" type="video/mp4">
您的浏览器不支持HTML5视频
</video>
</li>
{/eju:notempty}
{eju:fanglist type="photo" id="vo" group="photo_type"}
{eju:fanglist name="$vo.children" id="field" limit='0,1'}
<li> <a href="{:arcurl('home/Xinfang/view',['aid'=>$eju.field.xinfang.aid,'dirname'=>$eju.field.xinfang.dirname,'dirpath'=>$eju.field.xinfang.dirpath,'column'=>'photo','photo_type'=>$field.photo_type,'province_id'=>$eju.field.xinfang.province_id,'city_id'=>$eju.field.xinfang.city_id,'area_id'=>$eju.field.xinfang.area_id])}"><img src="{$field.photo_pic}" alt="{$field.photo_type}{$field.photo_title}"></a> </li>
{/eju:fanglist}
{/eju:fanglist}
</ul>
<a href="javascript:;" class="slides-icon slides-big-left"></a> <a href="javascript:;" class="slides-icon slides-big-right"></a> </div>
<div class="slides-small"> <a href="javascript:;" class="prev iconfont"></a> <a href="javascript:;" class="next iconfont"></a>
<ul class="slides-small-box width600">
{eju:notempty name="$eju.field.video"}
<li>
<a href="javascript:void(0);"><img class="zmd-index" src="{$eju.field.litpic}"></a>
<h2>视频看房</h2>
</li>
{/eju:notempty}
{eju:fanglist type="photo" id="vo" group="photo_type"}
{eju:fanglist name="$vo.children" id="field" limit='0,1'}
<li> <a href="javascript:;"><img src="{$field.photo_pic}" alt="{$field.photo_type}{$field.photo_title}"></a>
<h2>{$field.photo_type}{$field.photo_title}</h2>
</li>
{/eju:fanglist}
{/eju:fanglist}
</ul>
</div>
</div>
手机端logo:/uploads/allimg/20190604/f6d6bb5265ae3bca241d886df3ff6203.png