xygkXiaoyuanfengguang.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. <!-- 图 -->
  16. <image :src="item.content"></image>
  17. <!-- 内容 -->
  18. <view class="list-right-box">
  19. <view class="time-data">{{formatDateToYearMonthDay(item.createTime).join(-)}}</view>
  20. <view class="list-name">{{item.title}}</view>
  21. </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/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo?id=${data.id}`
  55. })
  56. }
  57. function getList(data) {
  58. return httpApi.getCommonGaikuangRongyuList(data)
  59. }
  60. function handleGo() {
  61. uni.navigateTo({
  62. url: '/pages/index/index'
  63. })
  64. }
  65. function pageInit() {
  66. httpApi.getCommonGaikuangRongyuList({
  67. page: data.page,
  68. size: data.size
  69. }).then(res => {
  70. data.total = res.data.total;
  71. data.list = res.data.data;
  72. })
  73. }
  74. </script>
  75. <style>
  76. </style>