home.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. use wechat\assets\AppAsset;
  3. use yii\helpers\Html;
  4. use yii\helpers\Url;
  5. AppAsset::addCss($this,Yii::$app->request->baseUrl."/js/index/swiper-3.4.2.min.css");
  6. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/index/swiper-3.4.2.min.js');
  7. // AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/news/js.js');
  8. AppAsset::addCss($this,Yii::$app->request->baseUrl."/css/news.css");
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/album_menu/iscroll.js");
  10. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/album_menu/navbarscroll.js");
  11. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/homelist/dropload.min.js");
  12. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/homelist/main.js');
  13. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/news_ajax.js");
  14. AppAsset::addScript($this,Yii::$app->request->baseUrl."/js/news/home.js");
  15. $this->title = '资讯首页-易购房';
  16. ?>
  17. <!-- 侧边栏 -->
  18. <?php $this->beginContent('@app/views/public/navsidebar.php'); ?>
  19. <?php $this->endContent(); ?>
  20. <!-- <div class="y_homelist_head wm-top">
  21. <div class="w_wek_box" >
  22. <div class="header_back"><a href="/"><img src="/image/v2/search1.png"></a></div>
  23. <div class="w_a"><a class="m_lplist_inp" href="javascript:void(0)">搜索你感兴趣的内容</a><i><img src="/image/search/w_sek.png" alt=""></i></div>
  24. <div class="header_menu"><a></a></div>
  25. </div>
  26. </div>
  27. -->
  28. <!-- <div style="height:55px;"></div> -->
  29. <div class="Home-header c">
  30. <div class="Home-header-box houselist-header y_header">
  31. <div class="header_back"><a href="<?php if($this->params['referer'] == '/'){ echo $this->params['referer'];}else{ echo 'javascript:history.back(-1)';} ?>"><img src="/image/v2/dh1.png"></a></div>
  32. <div class="header_logo2"><a href="/"><img src="/image/v2/index01.png"></a></div>
  33. <div class="header_menu"><a></a></div>
  34. </div>
  35. <!-- 导航 -->
  36. <div class="news_nav find_nav Home-header-nav c y_qylist">
  37. <div class="find_nav_left" id="demo05">
  38. <div class="find_nav_list scroller siwh">
  39. <ul class="clearfix">
  40. <?php foreach ($lei as $val){
  41. ?>
  42. <li <?php $a = Yii::$app->request->get('cid'); if(isset($a) && $a == $val['id'] ){echo 'class="on"';}?>
  43. data-id="<?= $val['id'] ?>">
  44. <a href="javascript:;">
  45. <?= $val['news_name'] ?>
  46. </a>
  47. </li>
  48. <?php } ?>
  49. </ul>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="navsidebar" style="height:55px;"></div>
  55. <!-- 轮播图 -->
  56. <div class="m_swiper_box">
  57. <div class="news_banner swiper-container2" style="<?php modules_show(52) ?>">
  58. <ul class="y_lphomepc_swip_main swiper-wrapper">
  59. <?php if(!empty($top)){
  60. foreach ($top as $val){
  61. ?>
  62. <li class="y_neirongpc swiper-slide">
  63. <a href="/news/details/<?= $val['id'] ?>/">
  64. <div class="baner">
  65. <img src="<?= Yii::$app->params['httpImg']['host'],Yii::$app->params['httpImg']['pushnews'],$val['img'] ?>" alt="">
  66. <div class="font_box"><?= $val['subject'] ?></div>
  67. </div>
  68. </a>
  69. </li>
  70. <?php } } ?>
  71. </ul>
  72. <div class="y_longhr">
  73. <div class="swiper-pagination"></div>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="m_albumtnav_box news_nav">
  78. <div class="wrapper02_box">
  79. <div class="wrapper02 siwh" id="demo06">
  80. <div class="scroller">
  81. <ul class="clearfix">
  82. <?php foreach ($lei as $val){
  83. ?>
  84. <li data-id="<?= $val['id'] ?>"
  85. <?php $a = Yii::$app->request->get('cid'); if(isset($a) && $a == $val['id'] ){echo 'class="cur"';}?>
  86. ><img src="<?= $val['img'] ?>" alt=""><p><?= $val['news_name'] ?></p></li>
  87. <?php } ?>
  88. </ul>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <!-- 列表 -->
  94. <div class="news_list y_homelist_list">
  95. <div class="ns"></div>
  96. </div>
  97. <!-- 侧边栏 -->
  98. <?php $this->beginContent('@app/views/news/news_search.php'); ?>
  99. <?php $this->endContent(); ?>