xsydXueshenghuodong.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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" />
  16. <view class="list-time-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. const data = reactive({
  50. list: '',
  51. total: '',
  52. page: 1,
  53. size: 5
  54. })
  55. function handleClick(data) {
  56. uni.navigateTo({
  57. url: `/pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo?id=${data.id}`
  58. })
  59. }
  60. function getList(data) {
  61. return httpApi.getXueshengHuodongList(data)
  62. }
  63. function handleGo() {
  64. uni.navigateTo({
  65. url: '/pages/index/index'
  66. })
  67. }
  68. function pageInit() {
  69. httpApi.getXueshengHuodongList({page: data.page,size: data.size}).then(res => {
  70. data.content = res.data.content;
  71. })
  72. }
  73. </script>
  74. <style>
  75. </style>