video.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. $view
  3. ->set('name', 'video')
  4. ->set('title', '视频')
  5. ->import('inc/head')
  6. ->fetch('.videoposter img@src', 'main/content.home_video_first#pic')
  7. ->fetch('.videoplayer img@src', 'main/content.home_video_first#pic')
  8. ->fetch(array('.icon-play@data-url', 0), 'main/content.home_video_first#video_link')
  9. ->fetch(array('h3@html', 0), 'main/content.home_video_first#sname')
  10. ->fetch(array('p@html', 0), 'main/content.home_video_first#info')
  11. ->fetch(array('span@html', 0), 'main/content.home_video_first#pdate_string')
  12. ->fetch('.topic-video@style', 'main/content.home_video_first', 'none')
  13. ->loop
  14. (
  15. '.video-recs li',
  16. 'main/content.news|type=3',
  17. array
  18. (
  19. 'a|0' => array
  20. (
  21. 'href' => '$v.link',
  22. 'title' => '$v.name',
  23. 'img' => array
  24. (
  25. 'src' => '$v.pic',
  26. 'alt' => '$v.name',
  27. ),
  28. 'em' => array
  29. (
  30. 'class' => 'a iconfont icon-play',
  31. 'data-title' => '$v.name',
  32. 'data-subtitle' => '$v.desc',
  33. 'data-desc' => '$v.info',
  34. 'data-by' => '$v.pdate_string',
  35. 'data-url' => '$v.video_link',
  36. ),
  37. ),
  38. 'a|1' => array
  39. (
  40. 'href' => '$v.link',
  41. 'title' => '$v.name',
  42. 'html' => '$v.name',
  43. ),
  44. )
  45. )
  46. ->loop
  47. (
  48. '.video-module dl',
  49. 'main/content.news|type=3',
  50. array
  51. (
  52. 'a|1' => array
  53. (
  54. 'href' => '$v.link',
  55. 'title' => '$v.name',
  56. 'img' => array
  57. (
  58. 'src' => '$v.pic',
  59. 'alt' => '$v.name',
  60. ),
  61. 'em' => array
  62. (
  63. 'class' => 'a iconfont icon-play',
  64. 'data-title' => '$v.name',
  65. 'data-subtitle' => '$v.desc',
  66. 'data-desc' => '$v.info',
  67. 'data-by' => '$v.pdate_string',
  68. 'data-url' => '$v.video_link',
  69. ),
  70. ),
  71. 'a|0' => array
  72. (
  73. 'href' => '$v.link',
  74. 'title' => '$v.name',
  75. 'html' => '$v.name ."<br/>". $v.desc',
  76. ),
  77. 'p' => array
  78. (
  79. 'html' => '$v.info',
  80. ),
  81. 'span' => array
  82. (
  83. 'html' => '$v.pdate_string',
  84. ),
  85. )
  86. )
  87. # 广告
  88. ->loop
  89. (
  90. '.ad-swiper .swiper-slide',
  91. 'main/content.ad|key=video_ad&name=视频广告',
  92. array
  93. (
  94. 'a' => array
  95. (
  96. 'href' => '$v.link',
  97. 'title' => '$v.name',
  98. ),
  99. 'img' => array
  100. (
  101. 'src' => '$v.pic',
  102. 'alt' => '$v.name',
  103. ),
  104. )
  105. )
  106. ->fetch('.common-pagination', '<{Dever::pageInfo()["html"]}>')
  107. ->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".dever-page"></div>')
  108. ->import('inc/foot')
  109. ->display();