微信

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <div class="mainPage">
  3. <div class="topBanner">
  4. <swiper :options="swiperOption" ref="mySwiper">
  5. <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
  6. <img src="" class="cover" alt="">
  7. </swiper-slide>
  8. </swiper>
  9. </div>
  10. <div class="pageTitle flex-h">
  11. <h5 class="flex-item">
  12. <span>银城5A全龄生活体验平台</span>
  13. </h5>
  14. </div>
  15. <div class="flex-h">
  16. <nav class="pageNav flex-item">
  17. <router-link :to="{name:'fiveA',query:{}}" v-for="(item,index) in 5" :key="index">
  18. <a>
  19. <img src="" class="centerLabel cover" alt="">
  20. <em>标题</em>
  21. </a>
  22. <span>备注内容</span>
  23. </router-link>
  24. </nav>
  25. </div>
  26. <div class="MsgBanner">
  27. <div class="flex-h">
  28. <i class="iconfont icon-xiaoxi"></i>
  29. <span>最新消息:</span>
  30. <div class="flex-item">
  31. <div>
  32. <swiper :options="swiperOptionMsg" ref="mySwiperMsg">
  33. <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
  34. <router-link :to="{name:'',query:{}}">这是一条消息</router-link>
  35. </swiper-slide>
  36. <div class="swiper-pagination" slot="pagination"></div>
  37. </swiper>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="pageTitle flex-h">
  43. <h5 class="flex-item">
  44. <span>售楼处项目专题</span>
  45. </h5>
  46. </div>
  47. <div class="flex-h">
  48. <ul class="projectList flex-item">
  49. <router-link tag="li" :to="{name:'majorProjects',query:{}}" v-for="(item,index) in 3" :key="index">
  50. <img src="" class="centerLabel cover" alt="">
  51. </router-link>
  52. </ul>
  53. </div>
  54. <div style="width:100%;height:.1rem;background:#f8f8f8;margin:.25rem auto 0;"></div>
  55. <div class="pageTitle flex-h">
  56. <h5 class="flex-item">
  57. <span>活动资讯</span>
  58. </h5>
  59. </div>
  60. <div class="flex-h">
  61. <ul class="newsList flex-item">
  62. <router-link tag="li" :to="{name:'',query:{}}" v-for="(item,index) in newsList" :key="index">
  63. <newsItem :data="item"></newsItem>
  64. </router-link>
  65. </ul>
  66. </div>
  67. </div>
  68. </template>
  69. <script>
  70. import newsItem from '../../../../components/newsItem/index'
  71. import { swiper, swiperSlide } from 'vue-awesome-swiper'
  72. import 'swiper/dist/css/swiper.css'
  73. import { mapState, createNamespacedHelpers } from 'vuex'
  74. const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
  75. export default {
  76. name: '',
  77. data () {
  78. return {
  79. swiperOption: {
  80. observer: true,
  81. loop: true,
  82. autoplay: {
  83. disableOnInteraction: false,
  84. }
  85. },
  86. swiperOptionMsg: {
  87. observer: true,
  88. direction: 'vertical',
  89. loop: true,
  90. autoplay: {
  91. disableOnInteraction: false,
  92. }
  93. },
  94. newsList: [{ // 资讯列表
  95. title: '我是标题我是标题我是标题我是标题我是标题我是标题',
  96. time: '2018年5月25日',
  97. img: '',
  98. id: ''
  99. }, {
  100. title: '我是标题我是标题我是标题我是标题我是标题我是标题',
  101. time: '2018年5月25日',
  102. img: '',
  103. id: ''
  104. }, {
  105. title: '我是标题我是标题我是标题我是标题我是标题我是标题',
  106. time: '2018年5月25日',
  107. img: '',
  108. id: ''
  109. }, {
  110. title: '我是标题我是标题我是标题我是标题我是标题我是标题',
  111. time: '2018年5月25日',
  112. img: '',
  113. id: ''
  114. }, {
  115. title: '我是标题我是标题我是标题我是标题我是标题我是标题',
  116. time: '2018年5月25日',
  117. img: '',
  118. id: ''
  119. }]
  120. }
  121. },
  122. computed: {
  123. ...mapState({
  124. banner: x => x.index.banner
  125. }),
  126. MySwiper () {
  127. return this.$refs.mySwiper.swiper
  128. },
  129. MySwiperMsg () {
  130. return this.$refs.MySwiperMsg.swiper
  131. }
  132. },
  133. components: {
  134. newsItem,
  135. swiper,
  136. swiperSlide,
  137. },
  138. created () {
  139. this.getIndexInfo({ orgId: '1' })
  140. },
  141. methods: {
  142. ...mapIndexActions(['getIndexInfo'])
  143. }
  144. }
  145. </script>
  146. <!-- Add "scoped" attribute to limit CSS to this component only -->
  147. <style lang="scss" scoped>
  148. @import "page.scss";
  149. </style>