移动端
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vor 4 Jahren
vor 4 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 4 Jahren
vor 4 Jahren
vor 3 Jahren
vor 4 Jahren
vor 4 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 4 Jahren
vor 3 Jahren
vor 4 Jahren
vor 4 Jahren
vor 4 Jahren
vor 3 Jahren
vor 3 Jahren
vor 3 Jahren
vor 4 Jahren
vor 4 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <div class="app-container">
  3. <van-row>
  4. <van-col span="2">
  5. <van-image src="../../static/images/index/logo.png" />
  6. </van-col>
  7. <van-col span="22" style="line-height: 29px;font-size: 20px;">农村产权交易平台</van-col>
  8. </van-row>
  9. <van-swipe class="my-swipe" :autoplay="3000" height="180" indicator-color="white">
  10. <van-swipe-item v-for="(item,index) in bannerList" :key="index">
  11. <van-image :src="item.img" height="180" />
  12. <p class="bannerTit">{{item.title}}</p>
  13. </van-swipe-item>
  14. </van-swipe>
  15. <div style="border-radius: 10px;overflow: hidden;">
  16. <van-grid :border="false" :column-num="3">
  17. <van-grid-item to="/news/index">
  18. <van-image src="../../static/images/icon/icon_new.png" width="40" height="40" />
  19. <p>新闻资讯</p>
  20. </van-grid-item>
  21. <van-grid-item>
  22. <van-image src="../../static/images/icon/icon_bidding.png" width="40" height="40" />
  23. <p>竞价大厅</p>
  24. </van-grid-item>
  25. <van-grid-item to="/notice/index">
  26. <van-image src="../../static/images/icon/icon_project.png" width="40" height="40" />
  27. <p>项目公告</p>
  28. </van-grid-item>
  29. <van-grid-item>
  30. <van-image src="../../static/images/icon/icon_statute.png" width="40" height="40" />
  31. <p>政策法规</p>
  32. </van-grid-item>
  33. <van-grid-item to="/interaction/index">
  34. <van-image src="../../static/images/icon/icon_talk.png" width="40" height="40" />
  35. <p>互动交流</p>
  36. </van-grid-item>
  37. <van-grid-item to="/supply/index">
  38. <van-image src="../../static/images/icon/icon_need.png" width="40" height="40" />
  39. <p>个人供求</p>
  40. </van-grid-item>
  41. </van-grid>
  42. </div>
  43. <p class="newTit">新闻咨询</p>
  44. <div style="border-radius: 10px;overflow: hidden;">
  45. <van-list
  46. v-model="loading"
  47. :finished="finished"
  48. finished-text="没有更多了"
  49. @load="getList()"
  50. >
  51. <!-- @load="newList"-->
  52. <van-cell v-for="item in newList" :key="item.id" :title="item.title" :label="item.newsTime">
  53. <!-- 使用 right-icon 插槽来自定义右侧图标 -->
  54. <template #right-icon>
  55. <van-image :src="item.img" class="search-icon" width="30%" />
  56. </template>
  57. </van-cell>
  58. </van-list>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import { newList } from "@/api/index";
  64. export default {
  65. name: "index",
  66. data() {
  67. return {
  68. //是否显示加载
  69. loading: false,
  70. //是否滚动到底部
  71. finished: false,
  72. //查询参数
  73. queryParams: {
  74. pageNum: 1,
  75. pageSize: 5,
  76. deptId:100,
  77. number:2
  78. },
  79. //新闻集合
  80. newList:[],
  81. //轮播图集合
  82. bannerList:''
  83. };
  84. },
  85. created() {
  86. //this.getList();
  87. this.getBanner();
  88. },
  89. methods: {
  90. getList(){
  91. this.loading = true;
  92. this.queryParams.number = 2 ;
  93. this.queryParams.pageSize = 5 ;
  94. newList(this.queryParams).then(response => {
  95. console.log(response);
  96. for (var i = 0; i < response.rows.length; i++) {
  97. this.newList.push(response.rows[i]);
  98. var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
  99. if (imgStrs != null && imgStrs != '') {
  100. console.log(imgStrs[0].length-2)
  101. console.log(imgStrs[0])
  102. this.newList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12));
  103. }
  104. }
  105. console.log(this.newList)
  106. if(this.newList.length >= response.total){
  107. this.finished = true;
  108. return;
  109. }
  110. this.queryParams.pageNum += 1 ;
  111. this.loading = false;
  112. });
  113. },
  114. getBanner(){
  115. this.loading = true;
  116. this.queryParams.number = 1 ;
  117. this.queryParams.pageSize = 5 ;
  118. newList(this.queryParams).then(response => {
  119. console.log(response);
  120. this.bannerList = response.rows;
  121. for (var i = 0; i < response.rows.length; i++) {
  122. var imgStrs = response.rows[i].content.match(/<IMG src=\"([^\"]*?)\">/gi)
  123. if (imgStrs != null && imgStrs != '') {
  124. console.log(imgStrs[0].length-2)
  125. console.log(imgStrs[0])
  126. this.bannerList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12));
  127. }
  128. }
  129. this.loading = false;
  130. });
  131. }
  132. },
  133. };
  134. </script>
  135. <style scoped lang="scss">
  136. .app-container {
  137. padding: 6% 3% 0;
  138. }
  139. .bannerTit{
  140. position: absolute;
  141. bottom: 0;
  142. background: #000;
  143. opacity: 0.5;
  144. width: 100%;
  145. height: 0.8rem;
  146. line-height: 0.8rem;
  147. color: #eee;
  148. text-align: center;
  149. overflow: hidden;
  150. padding: 0 5%;
  151. }
  152. .link{
  153. color: #000;
  154. }
  155. .my-swipe {
  156. border-radius: 30px;
  157. margin-top: 0.4rem;
  158. margin-bottom: 0.4rem;
  159. }
  160. .my-swipe .van-swipe-item .van-image{
  161. width: 100%;
  162. }
  163. .van-grid-item p{
  164. margin-top: 10px;
  165. }
  166. .newTit{
  167. font-size: 0.45rem;
  168. margin: 0.4rem 0;
  169. font-family: Source Han Sans SC, Source Han Sans SC-Medium;
  170. font-weight: 500;
  171. text-align: left;
  172. color: #333333;
  173. }
  174. .search-icon {
  175. line-height: inherit;
  176. margin-left: 10px;
  177. }
  178. </style>