home.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <?php
  2. $view
  3. ->set('name', 'index')
  4. /*
  5. ->fetch(array('link@href', 2), Dever::assets("global.css"))
  6. ->fetch(array('link@href', 3), Dever::assets('<{(isset($name) ? $name : "index")}>.css', "css"))
  7. ->fetch(array('script@src', 2), Dever::assets('global.js'))
  8. ->fetch(array('script@src', 3), Dever::assets('<{(isset($name) ? $name : "index")}>.js', 'js'))
  9. */
  10. ->import('inc/head')
  11. //->fetch(array('.ad', 0), '<{Dever::load("main/content.getAd", "首页精选下侧广告位1200X180")}>')
  12. //->fetch(array('.ad', 1), '<{Dever::load("main/content.getAd", "首页时装右侧广告位380X458")}>')
  13. # 焦点图
  14. ->loop
  15. (
  16. '.index-slide .swiper-slide',
  17. 'main/content.focus|key=home_focus&name=首页焦点图',
  18. array
  19. (
  20. 'a' => array
  21. (
  22. 'href' => '$v.link',
  23. 'title' => '$v.name',
  24. 'img' => array
  25. (
  26. 'src' => '$v.pic',
  27. 'alt' => '$v.name',
  28. ),
  29. 'span' => array
  30. (
  31. 'html' => '$v.name ."<br/>". $v.desc',
  32. ),
  33. ),
  34. )
  35. )
  36. ->fetch('.index-slide@style', 'main/content.focus?key=home_focus&name=首页焦点图', 'none')
  37. # 广告
  38. ->loop
  39. (
  40. '.ad-swiper .swiper-slide',
  41. 'main/content.ad|key=home_ad&name=首页广告',
  42. array
  43. (
  44. 'a' => array
  45. (
  46. 'href' => '$v.link',
  47. 'title' => '$v.name',
  48. ),
  49. 'img' => array
  50. (
  51. 'src' => '$v.pic',
  52. 'alt' => '$v.name',
  53. ),
  54. )
  55. )
  56. ->fetch('.ad-swiper@style', 'main/content.ad?key=home_ad&name=首页广告', 'none')
  57. # 资讯
  58. ->loop
  59. (
  60. '.news-module dl',
  61. 'main/content.home_news',
  62. array
  63. (
  64. 'a|0' => array
  65. (
  66. 'href' => '$v.link',
  67. 'title' => '$v.name',
  68. 'img' => array
  69. (
  70. 'src' => '$v.pic',
  71. 'alt' => '$v.name',
  72. ),
  73. ),
  74. 'a|1' => array
  75. (
  76. 'href' => '$v.link',
  77. 'title' => '$v.name',
  78. 'html' => '$v.name ."<br/>". $v.desc',
  79. ),
  80. 'p' => array
  81. (
  82. 'html' => '$v.info',
  83. ),
  84. 'span' => array
  85. (
  86. 'html' => '$v.pdate_string',
  87. ),
  88. )
  89. )
  90. ->fetch(array('.common-tit@style', 0), 'main/content.home_news', 'none')
  91. ->fetch('.news-module@style', 'main/content.home_news', 'none')
  92. ->fetch('.news-module .more@href', 'Dever::url("news")')
  93. # 虚拟人
  94. ->loop
  95. (
  96. '.character-module li',
  97. 'main/content.home_xnr',
  98. array
  99. (
  100. 'a' => array
  101. (
  102. 'href' => '$v.link',
  103. 'title' => '$v.name',
  104. 'img' => array
  105. (
  106. 'src' => '$v.pic',
  107. 'alt' => '$v.name',
  108. ),
  109. 'h5' => array
  110. (
  111. 'html' => '$v.name',
  112. ),
  113. 'p' => array
  114. (
  115. 'html' => '$v.info',
  116. ),
  117. ),
  118. )
  119. )
  120. ->fetch(array('.common-tit@style', 1), 'main/content.home_xnr', 'none')
  121. ->fetch('.character-module@style', 'main/content.home_xnr', 'none')
  122. ->fetch('.character-module .more@href', 'Dever::url("xnr")')
  123. # 专题
  124. ->loop
  125. (
  126. '.features-module .swiper-slide',
  127. 'main/content.home_feature',
  128. array
  129. (
  130. 'a|0' => array
  131. (
  132. 'href' => '$v.link',
  133. 'title' => '$v.name',
  134. 'img' => array
  135. (
  136. 'src' => '$v.small_pic',
  137. 'alt' => '$v.name',
  138. ),
  139. ),
  140. 'a|1' => array
  141. (
  142. 'href' => '$v.link',
  143. 'title' => '$v.name',
  144. 'html' => '$v.name ."<br/>". $v.desc',
  145. ),
  146. 'p' => array
  147. (
  148. 'html' => '$v.info',
  149. ),
  150. 'span' => array
  151. (
  152. 'html' => '$v.pdate_string',
  153. ),
  154. )
  155. )
  156. ->fetch(array('.common-tit@style', 2), 'main/content.home_feature', 'none')
  157. ->fetch('.features-module@style', 'main/content.home_feature', 'none')
  158. ->fetch('.features-module .more@href', 'Dever::url("feature")')
  159. # 视频
  160. ->fetch('.videoposter img@src', 'main/content.home_video_first#pic')
  161. ->fetch('.videoplayer img@src', 'main/content.home_video_first#pic')
  162. ->fetch(array('.icon-play@data-url', 0), 'main/content.home_video_first#video_link')
  163. ->fetch(array('.topic-video h3@html', 0), 'main/content.home_video_first#sname')
  164. ->fetch(array('.topic-video p@html', 0), 'main/content.home_video_first#info')
  165. ->fetch(array('.topic-video span@html', 0), 'main/content.home_video_first#pdate_string')
  166. ->fetch('.topic-video@style', 'main/content.home_video_first', 'none')
  167. ->loop
  168. (
  169. '.video-module dl',
  170. 'main/content.home_video_other',
  171. array
  172. (
  173. 'a|1' => array
  174. (
  175. 'href' => '$v.link',
  176. 'title' => '$v.name',
  177. 'img' => array
  178. (
  179. 'src' => '$v.pic',
  180. 'alt' => '$v.name',
  181. ),
  182. 'em' => array
  183. (
  184. 'class' => 'a iconfont icon-play',
  185. 'data-title' => '$v.name',
  186. 'data-subtitle' => '$v.desc',
  187. 'data-desc' => '$v.info',
  188. 'data-by' => '$v.pdate_string',
  189. 'data-url' => '$v.video_link',
  190. ),
  191. ),
  192. 'a|0' => array
  193. (
  194. 'href' => '$v.link',
  195. 'title' => '$v.name',
  196. 'html' => '$v.name ."<br/>". $v.desc',
  197. ),
  198. 'p' => array
  199. (
  200. 'html' => '$v.info',
  201. ),
  202. 'span' => array
  203. (
  204. 'html' => '$v.pdate_string',
  205. ),
  206. )
  207. )
  208. ->fetch(array('.common-tit@style', 3), 'main/content.home_video_first', 'none')
  209. ->fetch('.video-module@style', 'main/content.home_video_first', 'none')
  210. # 活动
  211. ->loop
  212. (
  213. '.activity-recs li',
  214. 'main/content.home_act',
  215. array
  216. (
  217. 'img' => array
  218. (
  219. 'src' => '$v.small_pic',
  220. 'alt' => '$v.name',
  221. ),
  222. 'a' => array
  223. (
  224. 'href' => '$v.link',
  225. 'title' => '$v.name',
  226. 'h3' => array
  227. (
  228. 'html' => '$v.name ."<br/>". $v.desc',
  229. ),
  230. 'p' => array
  231. (
  232. 'html' => '$v.info',
  233. ),
  234. 'span' => array
  235. (
  236. 'html' => '$v.pdate_s',
  237. ),
  238. ),
  239. )
  240. )
  241. ->fetch(array('.common-tit@style', 4), 'main/content.home_act', 'none')
  242. ->fetch('.activity-recs@style', 'main/content.home_act', 'none')
  243. ->import('inc/foot')
  244. ->display();