toGovernmentList.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <!-- 分割线 -->
  3. <view class="container">
  4. <view class="rnwdList">
  5. <view class="list" v-for="(item, index) in indexList1" :key="index" @click="toGovernmentList1">
  6. <span class="listTitle">{{ item.titleName }}</span>
  7. <view class="onePic" v-if="item.urls!=null&&item.urls.length > 0" v-for="(url, i) in item.urls">
  8. <image :src="'http://localhost:88/dev-api'+url" :key="i"></image>
  9. </view>
  10. <view class="jlSj">
  11. <span class="jf">
  12. {{ item.createTime }}
  13. </span>
  14. <view class="ck">
  15. <span>
  16. <em class="iconfont icon-chakan"></em>
  17. {{ item.watchNum }}
  18. </span>
  19. <span>
  20. <em class="iconfont icon-shoucang"></em>
  21. {{ item.likeNum }}
  22. </span>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import {governmentListMore} from '@/api/information/information.js'
  31. export default {
  32. data() {
  33. return {
  34. indexList1: []
  35. };
  36. }
  37. /**
  38. * 生命周期函数--监听页面加载
  39. */,
  40. onLoad(options) {
  41. this.governmentListMores()
  42. },
  43. mounted() {
  44. },
  45. methods: {
  46. toGovernmentList1(){
  47. uni.navigateTo({
  48. url: '/pages/toGovernmentList/toGovernmentListDetail'
  49. });
  50. },
  51. governmentListMores(){
  52. let params = {
  53. pageSize: 10,
  54. pageNum: 1,
  55. type:10,
  56. isGovernment:1
  57. }
  58. governmentListMore(params).then(res =>{
  59. if (res.code==200) {
  60. this.indexList1=res.rows
  61. }
  62. })
  63. }
  64. }
  65. };
  66. </script>
  67. <style scoped>
  68. @import url("./index.css");
  69. </style>