home.php 6.1 KB

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