jyjxKeyandongtai.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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-text">教育教学</view>
  11. <icon class="breadcrumb-jt"></icon>
  12. <view class="breadcrumb-active">科研活动</view>
  13. </view>
  14. <MtaScrollViewVue :refreshFn="getList">
  15. <template v-slot="{ list }">
  16. <view class="data-content-item" v-for="item in list" :key="item.id" @click="handleClick(item)">
  17. <view class="list-time-box">
  18. <view class="time-data">{{formatDateToYearMonthDay(item.createTime)[1]}}</view>
  19. <view class="time-year">{{formatDateToYearMonthDay(item.createTime)[0]}}</view>
  20. </view>
  21. <view class="list-title-box"> {{item.title}} </view>
  22. </view>
  23. </template>
  24. </MtaScrollViewVue>
  25. </view>
  26. <!-- 底部导航 -->
  27. <MtaFooter></MtaFooter>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import {
  33. ref,
  34. reactive
  35. } from "vue";
  36. import {
  37. onLoad
  38. } from "@dcloudio/uni-app"
  39. import * as httpApi from "@/api/common.js"
  40. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  41. import {
  42. formatDateToYearMonthDay,
  43. getStringByHtml3
  44. } from "@/utils/common.js"
  45. import MtaFooter from "@/components/MtaFooter.vue"
  46. const data = reactive({
  47. list: '',
  48. total: '',
  49. page: 1,
  50. size: 5
  51. })
  52. function handleClick(data) {
  53. uni.navigateTo({
  54. url: `/pages/jyjxKeyandongtaiInfo/jyjxKeyandongtaiInfo?id=${data.id}`
  55. })
  56. }
  57. function getList(data) {
  58. return httpApi.getJiaoyuKeyanList(data)
  59. }
  60. function handleGo() {
  61. uni.navigateTo({
  62. url: '/pages/index/index'
  63. })
  64. }
  65. function pageInit() {
  66. httpApi.getJiaoyuKeyanList({page: 1,size: 5}).then(res => {
  67. data.list = res.data.data;
  68. })
  69. }
  70. </script>
  71. <style>
  72. </style>