dqgzDangjiangongzuo.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view class="dljt-page-box">
  3. <MtaNavbar></MtaNavbar>
  4. <view class="dljt-container-box">
  5. <view class="dljt-page-title">党群工作</view>
  6. <view class="dljt-page-content-box">
  7. <view class="dljt-breadcrumb-box">
  8. <view class="breadcrumb-text" @click="handleGo()">首页</view>
  9. <icon class="breadcrumb-jt"></icon>
  10. <view class="breadcrumb-active">党建工作</view>
  11. </view>
  12. <MtaScrollViewVue :refreshFn="getList">
  13. <template v-slot="{ list }">
  14. <view class="list-item-box" v-for="item in list" :key="item.id" @click="handleClick(item)">
  15. <img class="list-img" :src="item.cover || default1" />
  16. <view class="list-time-box time-red-box">
  17. <view class="time-data">{{formatDateToYearMonthDay(item.createTime)[1]}}</view>
  18. <view class="time-year">{{formatDateToYearMonthDay(item.createTime)[0]}}</view>
  19. </view>
  20. <view class="list-right-box">
  21. <view class="list-name">{{item.title}}</view>
  22. <view class="list-line"></view>
  23. <view class="list-content" v-html="getStringByHtml3(item.content)"> </view>
  24. </view>
  25. </view>
  26. </template>
  27. </MtaScrollViewVue>
  28. </view>
  29. <!-- 底部导航 -->
  30. <MtaFooter></MtaFooter>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import {
  36. ref,
  37. reactive
  38. } from "vue";
  39. import {
  40. onLoad
  41. } from "@dcloudio/uni-app"
  42. import * as httpApi from "@/api/common.js"
  43. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  44. import {
  45. formatDateToYearMonthDay,
  46. getStringByHtml3
  47. } from "@/utils/common.js"
  48. import MtaFooter from "@/components/MtaFooter.vue"
  49. import default1 from '@/static/images/common/news-bj1.jpg'
  50. const data = reactive({
  51. list: '',
  52. total: '',
  53. page: 1,
  54. size: 5
  55. })
  56. onLoad(() => {})
  57. function handleClick(data) {
  58. console.log('data', data);
  59. uni.navigateTo({
  60. url: `/pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo?id=${data.id}`
  61. })
  62. }
  63. function getList(data) {
  64. return httpApi.getDangjianGongzuoList(data)
  65. }
  66. function pageInit() {
  67. httpApi.getDangjianGongzuoList({
  68. page: data.page,
  69. size: data.size
  70. }).then(res => {
  71. data.list = res.data.data;
  72. data.total = res.data.total;
  73. })
  74. }
  75. function handleGo() {
  76. uni.navigateTo({
  77. url: '/pages/index/index'
  78. })
  79. }
  80. </script>
  81. <style>
  82. </style>