details.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {extend name="public/container"}
  2. {block name="title"}{$title}{/block}
  3. {block name="head_top"}
  4. <style>
  5. .content{padding: 0.3rem}
  6. .content video{width: 100%}
  7. .content img{width: 100%;height: auto;}
  8. .video-js .vjs-big-play-button{top:50%!important;left:50%!important;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}
  9. </style>
  10. <link rel="stylesheet" type="text/css" href="{__WAP_PATH}zsff/css/video-js.min.css"/>
  11. <script src="{__WAP_PATH}zsff/js/video.min.js"></script>
  12. <script src="{__WAP_PATH}zsff/js/zh-CN.js"></script>
  13. <script src="{__WAP_PATH}zsff/js/md5.js"></script>
  14. {/block}
  15. {block name="content"}
  16. <div v-cloak class="content" id="app">
  17. {$content}
  18. <shortcut></shortcut>
  19. </div>
  20. {/block}
  21. {block name='foot'}
  22. <script>
  23. var uid="{$uid}";
  24. require(['vue', '{__WAP_PATH}zsff/js/shortcut.js'],function (Vue) {
  25. new Vue({
  26. el:'#app',
  27. mounted: function () {
  28. mapleWx($jssdk(), function () {
  29. this.onMenuShareAll({
  30. title:"{$title}" ,
  31. desc: "{$synopsis}",
  32. imgUrl: "{$image}",
  33. link: location.href.indexOf('?') == -1 ? location.href + '?spread_uid=' + uid : location.href + '&spread_uid=' + uid,
  34. });
  35. });
  36. this.$nextTick(function () {
  37. var myPlayer=[],width=$('.content').width();
  38. $('.video-ue').each(function (index) {
  39. var id="video-ue-"+index,videoUrl=$(this).attr('src');
  40. $(this).attr('id',id);
  41. $(this).html("<source src='"+videoUrl+"' type='video/mp4' />")
  42. $(this).addClass("video-js");
  43. videojs(id, {}, function(){
  44. this.width(width);
  45. });
  46. })
  47. });
  48. }
  49. })
  50. });
  51. </script>
  52. {/block}