feature.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. $view
  3. ->set('name', 'feature')
  4. ->set('title', '专题')
  5. ->import('inc/head')
  6. # 专题
  7. ->loop
  8. (
  9. '.features-module .swiper-slide',
  10. 'main/content.list_feature',
  11. array
  12. (
  13. 'a|0' => array
  14. (
  15. 'href' => '$v.link',
  16. 'title' => '$v.name',
  17. 'img' => array
  18. (
  19. 'src' => '$v.small_pic',
  20. 'alt' => '$v.name',
  21. ),
  22. ),
  23. 'a|1' => array
  24. (
  25. 'href' => '$v.link',
  26. 'title' => '$v.name',
  27. 'html' => '$v.name ."<br/>". $v.desc',
  28. ),
  29. 'div' => array
  30. (
  31. 'p' => array
  32. (
  33. 'html' => '$v.info',
  34. ),
  35. 'span' => array
  36. (
  37. 'html' => '$v.pdate_string',
  38. ),
  39. ),
  40. )
  41. )
  42. ->fetch('.features-module@style', 'main/content.home_feature', 'none')
  43. # 广告
  44. ->loop
  45. (
  46. '.ad-swiper .swiper-slide',
  47. 'main/content.ad|key=feature_ad&name=专题广告',
  48. array
  49. (
  50. 'a' => array
  51. (
  52. 'href' => '$v.link',
  53. 'title' => '$v.name',
  54. ),
  55. 'img' => array
  56. (
  57. 'src' => '$v.pic',
  58. 'alt' => '$v.name',
  59. ),
  60. )
  61. )
  62. ->fetch('.ad-swiper@style', 'main/content.ad?key=feature_ad&name=专题广告', 'none')
  63. ->loop
  64. (
  65. '.news-module dl',
  66. 'main/content.news|type=2',
  67. array
  68. (
  69. 'a|0' => array
  70. (
  71. 'href' => '$v.link',
  72. 'title' => '$v.name',
  73. 'img' => array
  74. (
  75. 'src' => '$v.pic',
  76. 'alt' => '$v.name',
  77. ),
  78. ),
  79. 'a|1' => array
  80. (
  81. 'href' => '$v.link',
  82. 'title' => '$v.name',
  83. 'html' => '$v.name ."<br/>". $v.desc',
  84. ),
  85. 'p' => array
  86. (
  87. 'html' => '$v.info',
  88. ),
  89. 'span' => array
  90. (
  91. 'html' => '$v.pdate_string',
  92. ),
  93. )
  94. )
  95. ->fetch('.more@href', 'javascript:;')
  96. ->fetch('.more@dever-show', 'Dever::pageInfo()["link"] ? "1" : "2"')
  97. ->fetch('.more@style', 'Dever::pageInfo()["link"] ? "" : "display:none"')
  98. ->append('body', '<div id="page" dever-page-link="<{Dever::pageInfo()["link"]}>" dever-page-list=".dever-page"></div>')
  99. ->import('inc/foot')
  100. ->display();