news.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | home
  5. |--------------------------------------------------------------------------
  6. */
  7. $view
  8. ->set('name', 'news')
  9. ->set('title', '企业动态')
  10. ->import('inc/head')
  11. # 定义名称
  12. ->fetch('body@t', '1')
  13. ->fetch('.banner img@src', 'main/api.config#news_pic')
  14. ->fetch('.banner b', 'main/api.config#news_name')
  15. ->fetch('.banner span', 'main/api.config#news_desc')
  16. ->fetch(array('.float-shares img@src', 0), 'main/api.config#wechat')
  17. ->fetch(array('.float-shares img@src', 1), 'main/api.config#douyin')
  18. ->fetch(array('.float-shares img@src', 2), 'main/api.config#weibo')
  19. ->loop
  20. (
  21. '.news-tab a',
  22. 'main/api.news_cate',
  23. array
  24. (
  25. 'href' => '$v.link',
  26. 'class' => '$v.class',
  27. 'html' => '$v.name',
  28. )
  29. )
  30. ->loop
  31. (
  32. '.news-list dl',
  33. 'main/api.news',
  34. array
  35. (
  36. 'a|0' => array
  37. (
  38. 'href' => '$v.link',
  39. 'img' => array
  40. (
  41. 'src' => '$v.pic_cover',
  42. )
  43. ),
  44. 'a|1' => array
  45. (
  46. 'href' => '$v.link',
  47. 'html' => '$v.name',
  48. ),
  49. 'p' => '$v.desc',
  50. 'span' => '$v.cdate',
  51. )
  52. )
  53. ->fetch('#page','<{Dever::page("current")}>')
  54. # display
  55. ->display();