xydtXueyuanfengcai.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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.cover"></image>
  19. <div class="video-play-btn"></div>
  20. <!-- 内容 -->
  21. <view class="video-mask-box">
  22. <view class="video-data">[{{formatDateToYearMonthDay(item.createTime).join('-')}}]
  23. </view>
  24. <view class="video-title">{{item.title}}</view>
  25. </view>
  26. </view>
  27. </template>
  28. </MtaScrollViewVue>
  29. </view>
  30. <!-- 底部导航 -->
  31. <MtaFooter></MtaFooter>
  32. </view>
  33. </view>
  34. </template>
  35. <script setup>
  36. import {
  37. ref,
  38. reactive
  39. } from "vue";
  40. import {
  41. onLoad
  42. } from "@dcloudio/uni-app"
  43. import * as httpApi from "@/api/common.js"
  44. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  45. import {
  46. formatDateToYearMonthDay,
  47. getStringByHtml3
  48. } from "@/utils/common.js"
  49. import MtaFooter from "@/components/MtaFooter.vue"
  50. import default2 from '@/static/images/common/news-bj2.png'
  51. const data = reactive({
  52. list: '',
  53. total: '',
  54. page: 1,
  55. size: 5
  56. })
  57. function handleClick(data) {
  58. uni.navigateTo({
  59. url: `/pages/xydtXueyuanfengcaiInfo/xydtXueyuanfengcaiInfo?id=${data.id}`
  60. })
  61. }
  62. function getList(data) {
  63. return httpApi.getDongtaiXueyuanFengcaiList(data)
  64. }
  65. function handleGo() {
  66. uni.navigateTo({
  67. url: '/pages/index/index'
  68. })
  69. }
  70. function pageInit() {
  71. httpApi.getDongtaiXueyuanFengcaiList({page: data.page,size:data.size}).then(res => {
  72. data.list = res.data.data;
  73. data.total = res.data.total;
  74. })
  75. }
  76. </script>
  77. <style>
  78. </style>