xygkXiaoyuanfengguang.vue 2.0 KB

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