home.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | home
  5. |--------------------------------------------------------------------------
  6. */
  7. $view
  8. ->set('name', 'index')
  9. ->set('title', '项目介绍')
  10. ->import('inc/head')
  11. # 定义名称
  12. ->fetch('body@t', '1')
  13. ->fetch('.video h3', 'main/api.config#video_name')
  14. ->fetch('.video p', 'main/api.config#video_desc')
  15. ->fetch('.video img@src', 'main/api.config#video_pic')
  16. ->fetch('.video img@data-video', 'main/api.config#video')
  17. ->fetch('.video video@src', 'main/api.config#video')
  18. ->fetch('#cities ul', 'main/api.config#citys')
  19. ->fetch('#cities .button@href', 'main/api.config#contact_link')
  20. ->fetch('.news .more@href', 'main/api.config#news_link')
  21. ->loop
  22. (
  23. '.news dl',
  24. 'main/api.getNews',
  25. array
  26. (
  27. 'a' => array
  28. (
  29. 'href' => '$v.link',
  30. 'img' => array
  31. (
  32. 'src' => '$v.pic_cover',
  33. ),
  34. 'dd' => array('html' => '$v.name'),
  35. ),
  36. )
  37. )
  38. ->fetch(array('script@src', 1), Dever::assets('global.js'))
  39. ->fetch(array('script@src', 2), Dever::assets('<{(isset($name) ? $name : "index")}>.js', 'js'))
  40. # display
  41. ->display();