超人男神女神投票有效户想修改把投票页的信息视频信息移至最顶端,该方法适用于任何版本,顺便也把该方法分享一下
找到前端文件 /addons/xiaof_toupiao/template/mobile/show.html
也许315行,找到该段代码视频信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | {if $contestantitem['video']} <div class="act-info act-describe"> <div class="act-describe-title custom-font-color player-describe-title">- 选手视频 -</div> <div class="act-describe-content player-describe-content"> <div class="weui-panel weui-panel_access wrapper"> <div id="video-container"><video id="video-show" style="width: ; height: ;" poster="{if $contestantitem['video_poster']}{php echo tomedia($contestantitem['video_poster'])}{else}{$contestantitem['video']}?vframe/jpg/offset/0|imageView2/1/w/496/h/280{/if}" preload="metadata" controls="controls" width="300" height="150"> <source src="{$contestantitem['video']}" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2"" /> </video> <script language="javascript"> $(function(){ var md = document.getElementsByTagName("video")[0]; if(md.ended){ console.log("结束"); md.webkitExitFullScreen(); } md.addEventListener("ended",function(){//判断视频播放结束 console.log("结束"); //md.webkitExitFullScreen(); //this.webkitExitFullScreen(); //this.srcObject = new window.webkitMediaStream; //window.history.back(-1); }); var pwidth = $(document).width(); if(pwidth >= 1024){ $("#video-show1").height(parseInt($(document).width()/2.13)); }else if(pwidth >= 720){ $("#video-show1").height(parseInt($(document).width()/1.60)); }else if(pwidth <= 480){ $("#video-show1").height(parseInt($(document).width()/1.33)); } }); </script></div> </div> </div> </div> {/if} |
替代掉168行图片信息(或者把原来的解释加在后面)
1 2 3 4 5 6 7 8 9 10 11 12 | <div class="swiper-container" data-space-between="10" data-pagination=".swiper-pagination" data-autoplay="3000"> <div class="swiper-wrapper">{if $lists} {loop $lists $thumbitem} <div class="swiper-slide"><img src="{php echo tomedia($thumbitem['thumb']);}" width="" /></div> {/loop} {else} <div class="swiper-slide"><a href="#"> <img src="{php echo tomedia($setting['thumb'][0]);}" width="" /></a></div> {/if} </div> </div> |
也可以把两段代码到换,视频在上,图片在下,结果如下
假如赚麻烦也可直接下载文件替代下即可