garden.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="garden">
  3. <div class="container">
  4. <div class="title">
  5. <p><i class="icon-info"/>园区活动</p>
  6. <a href="/townInfo">更多</a>
  7. </div>
  8. <div class="content">
  9. <div class="info-list" v-for="item in list">
  10. <div class="img">
  11. <img :src="item.ac_icon">
  12. </div>
  13. <div class="list-right">
  14. <p v-text="item.ac_title">企业为员工打造全新潼湖小镇,舒服办公环境</p>
  15. <span v-text="item.ac_desc">2017年,优软科技携手碧桂园创办全新智慧生态园,发扬优软新势力,适应互联网潮流 发展.</span>
  16. </div>
  17. <div class="detail">
  18. <h4 v-text="item.ac_title">12</h4>
  19. <span v-text="item.ac_desc">3213ffds</span>
  20. <p v-text="formatDate(item.ac_startdate)">32342</p>
  21. <p v-text="item.ac_addr">32342</p>
  22. <p>{{item.ac_enternum}}&nbsp;参加活动</p>
  23. <a :href="'/townInfo/' + item.ac_id">查看详情</a>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import {formatDate} from '@/utils/date.js'
  32. export default {
  33. name: 'Garden',
  34. computed: {
  35. list () {
  36. return this.$store.state.gardens.list.data.list
  37. }
  38. },
  39. methods: {
  40. // 格式化时间
  41. formatDate (row) {
  42. let date = new Date(row)
  43. return formatDate(date, 'yyyy-MM-dd hh:mm')
  44. }
  45. }
  46. }
  47. </script>
  48. <style scoped type="text/scss" lang="scss">
  49. .garden{
  50. height:610px;
  51. background: #f4f4f4;
  52. .title{
  53. position:relative;
  54. a{
  55. position:absolute;
  56. right:0;
  57. top:65px;
  58. display:block;
  59. width:50px;
  60. height:26px;
  61. line-height: 26px;
  62. text-align: center;
  63. background: #fff;
  64. color:#797979;
  65. &:hover{
  66. cursor:pointer;
  67. color:#149ccf;
  68. }
  69. }
  70. p{
  71. line-height: 130px;
  72. font-size: 26px;
  73. color:#149ccf;
  74. margin:0;
  75. i{
  76. margin-right:10px;
  77. }
  78. }
  79. }
  80. .content{
  81. .info-list{
  82. position:relative;
  83. display:inline-block;
  84. width:24%;
  85. height:430px;
  86. vertical-align: top;
  87. margin-right:10px;
  88. background: #fff;
  89. overflow: hidden;
  90. &:last-child{
  91. margin:0;
  92. }
  93. &:hover{
  94. cursor:pointer;
  95. .detail{
  96. opacity:1;
  97. top:0;
  98. }
  99. }
  100. .img{
  101. width:280px;
  102. height:250px;
  103. img{
  104. width:100%;
  105. height:100%;
  106. border:none;
  107. padding:0;
  108. }
  109. }
  110. .list-right{
  111. padding:24px 16px 0 16px;
  112. overflow: hidden;
  113. p{
  114. font-size: 20px;
  115. color:#333;
  116. margin-bottom:25px;
  117. width:98%;
  118. overflow: hidden;
  119. text-overflow: ellipsis;
  120. white-space: nowrap;
  121. }
  122. span{
  123. font-size: 14px;
  124. line-height: 20px;
  125. color:#969696;
  126. }
  127. }
  128. .detail{
  129. position:absolute;
  130. top:100%;
  131. opacity:0;
  132. transition: all .5s ease;
  133. background: rgba(0,0,0,.8);
  134. width:100%;
  135. height:430px;
  136. padding:30px 16px;
  137. h4{
  138. font-size: 20px;
  139. color:#fff;
  140. margin-bottom:25px;
  141. }
  142. span{
  143. display:block;
  144. font-size: 14px;
  145. color:#fff;
  146. line-height: 20px;
  147. margin-bottom:10px;
  148. }
  149. p{
  150. font-size: 14px;
  151. color:#b4b4b4;
  152. margin-bottom:10px;
  153. }
  154. a{
  155. display: block;
  156. width:200px;
  157. height:40px;
  158. line-height: 38px;
  159. text-align: center;
  160. margin:0 auto;
  161. margin-top:30px;
  162. font-size: 16px;
  163. color:#fff;
  164. border:1px solid #fff;
  165. &:hover{
  166. cursor:pointer;
  167. color:#149ccf;
  168. border: 1px solid #149ccf;
  169. }
  170. }
  171. }
  172. }
  173. }
  174. }
  175. </style>