video.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title><{$info['name']}> - <{$config['name']}></title>
  7. <link href="css/global.css?v=d4ecd76d" rel="stylesheet"><link href="css/video.css?v=d4ecd76d" rel="stylesheet"></head>
  8. <body>
  9. <header style="display:none;">
  10. <a class="back" style="display:none;"></a>
  11. <{$config['name']}>
  12. </header>
  13. <div class="main">
  14. <!--视频-->
  15. <div class="banner">
  16. <div class="poster">
  17. <img src="<{$info['pic_cover_169']}>"
  18. alt="" class="media-cover">
  19. <div class="ico-video-play"></div>
  20. </div>
  21. <div class="video-cont">
  22. <video class="video-js" id="demo-video"></video>
  23. </div>
  24. <a class="btn-open" href="<{$app}>">打开JSTYLE精美APP,查看更多精彩视频>></a>
  25. </div>
  26. <h1 class="h1"><{$info['name']}></h1>
  27. <div class='article-infos'>
  28. <div class='author'>作者:<{$info['author']['name']}></div>
  29. <{if(in_array(1, $info['function'])):}>
  30. <div class='div-nums' wx:if="{{divs_yes}}">
  31. <span class='ico-view'></span> <{$info['num_view']}></div>
  32. <{endif}>
  33. </div>
  34. <div class="rich-wrapper">
  35. <!--段落-->
  36. <{$info['content']}>
  37. </div>
  38. <{if(isset($comment) && $comment && in_array(2, $info['function'])):}>
  39. <div class="comments">
  40. <div class='title'><span>热门评论</span></div>
  41. <div class="comments-list">
  42. <{loop($comment):}>
  43. <div class='comment'>
  44. <div class='user'>
  45. <image src="<{isset($v['avatar']) ? $v['avatar'] : ""}>"></image>
  46. </div>
  47. <div class='info'>
  48. <div class='username'>
  49. <span><{$v['username']}></span>
  50. </div>
  51. <div class='date'>
  52. <span><{$v['time']}></span>
  53. </div>
  54. <div class='p'>
  55. <span><{$v['content']}></span>
  56. </div>
  57. </div>
  58. </div>
  59. <{endloop}>
  60. </div>
  61. </div>
  62. <a class="app-open" href="<{$app}>">打开JSTYLE精美APP,查看全部评论</a>
  63. <{endif}>
  64. <{if(isset($relation) && $relation):}>
  65. <div class="recommends">
  66. <div class='title'><span>相关推荐</span></div>
  67. <div class="recommends-list">
  68. <{loop($relation):}>
  69. <div class='article clearfix' style="cursor: pointer;" onclick="getUrl('<{Dever::url('view.get?type=' . $type . '&id=' . $v1['id'], 'h5')}>')">
  70. <div class='cover'>
  71. <img class='default' src="<{$v1['pic_cover_169']}>" />
  72. <div class='ico-play'></div>
  73. </div>
  74. <div class='tit'><span>
  75. <{$v1['name']}>
  76. </span></div>
  77. <div class='date'>
  78. <!-- <span class='type'>{{item.author_name}}</span> -->
  79. <span class='d'><{$v1['cate_name']}> <{$v1['pdate']}></span>
  80. </div>
  81. </div>
  82. <{endloop}>
  83. </div>
  84. </div>
  85. <{endif}>
  86. </div>
  87. <dl class="fixed-app-open">
  88. <dt>
  89. <img src="images/logo.png" alt="">
  90. <div>
  91. <h3>JSTYLE精美</h3>
  92. <span>我的时尚指南</span>
  93. </div>
  94. </dt>
  95. <dd>
  96. <a href="<{$app}>">打开APP</a>
  97. </dd>
  98. </dl>
  99. <script type="text/javascript" src="js/global.js?v=d4ecd76d"></script><script type="text/javascript" src="js/video.js?v=d4ecd76d"></script></body>
  100. <{Dever::render('share', $this->data)}>
  101. <script>
  102. function getUrl(url)
  103. {
  104. location.href= url;
  105. }
  106. $('.ico-video-play').click(function(){
  107. $('.video-cont').show();
  108. $('.poster').hide();
  109. var player = $('#demo-video')[0];
  110. player.src = '<{$info['video']}>';
  111. player.load();
  112. player.play();
  113. player.addEventListener('pause', function () {
  114. $('.video-cont').hide();
  115. $('.poster').show();
  116. },false);
  117. player.addEventListener('ended', function () {
  118. $('.video-cont').hide();
  119. $('.poster').show();
  120. },false);
  121. })
  122. </script>
  123. </html>