xygkXiaoyuanfengguang.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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" :size="20">
  15. <template v-slot="{ list }">
  16. <view class="video-item-box" v-for="item in list" :key="item.id" @click="handleClick(item)">
  17. <!-- 图 -->
  18. <image :src="item.content"></image>
  19. <!-- 内容 -->
  20. <view class="video-mask-box">
  21. <view class="video-data">[{{formatDateToYearMonthDay(item.createTime).join('-')}}]
  22. </view>
  23. <view class="video-title">{{item.title}}</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 {
  50. getCommonXygkXiaoyuanfengguang
  51. } from "@/api/common";
  52. const data = reactive({
  53. list: '',
  54. total: '',
  55. page: 1,
  56. size: 10
  57. })
  58. function handleClick(item) {
  59. uni.previewImage({
  60. urls: [item.content],
  61. });
  62. }
  63. function getList(data) {
  64. return httpApi.getCommonXygkXiaoyuanfengguang(data)
  65. }
  66. function handleGo() {
  67. uni.navigateTo({
  68. url: '/pages/index/index'
  69. })
  70. }
  71. function pageInit() {
  72. httpApi.getCommonXygkXiaoyuanfengguang({
  73. page: data.page,
  74. size: data.size
  75. }).then(res => {
  76. data.total = res.data.total;
  77. data.list = res.data.data;
  78. })
  79. }
  80. </script>
  81. <style>
  82. </style>