xydtXueyuanfengcaiInfo.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="dljt-page-box" v-if="data.info">
  3. <MtaNavbar></MtaNavbar>
  4. <view class="dljt-container-box">
  5. <!-- 详情页面 -->
  6. <view class="dljt-page-title">党群工作</view>
  7. <view class="dljt-page-content-box">
  8. <!-- 导航 -->
  9. <view class="dljt-breadcrumb-box">
  10. <view class="breadcrumb-text" @click="handleGo('shouye')">首页</view>
  11. <icon class="breadcrumb-jt"></icon>
  12. <view class="breadcrumb-text">校园动态</view>
  13. <icon class="breadcrumb-jt"></icon>
  14. <view class="breadcrumb-text" @click="handleGo('xyfc')">学院风采</view>
  15. <icon class="breadcrumb-jt"></icon>
  16. <view class="breadcrumb-active">详情</view>
  17. </view>
  18. <view class="dljt-detail-box">
  19. <!-- 标题 -->
  20. <view class="detail-title">{{data.info.title}}</view>
  21. <!-- 时间 -->
  22. <view class="detail-data">{{formatDate.join('-') }}</view>
  23. <!-- 富文本 -->
  24. <MtaMpHtml class="dljt-editor-box" :content="data.info.content"></MtaMpHtml>
  25. <!-- 其他 -->
  26. <!-- <view class="dljt-video-title" v-if="data.info.otherList && data.info.otherList.length">
  27. <view class="video-text">相关视频</view>
  28. </view>
  29. <view v-if="data.info.otherList && data.info.otherList.length">
  30. <view class="video-item-box" v-for="item in data.info.otherList" :key="item.id"
  31. @click="handleClick(item)">
  32. <image :src="item.cover"></image>
  33. <view class="video-mask-box">
  34. <view class="video-data">[{{formatDateToYearMonthDay(item.createTime).join('-')}}]
  35. </view>
  36. <view class="video-title">{{item.title}}</view>
  37. </view>
  38. </view>
  39. </view> -->
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 底部导航 -->
  44. <MtaFooter></MtaFooter>
  45. </view>
  46. </template>
  47. <script setup>
  48. import {
  49. ref,
  50. reactive,
  51. computed,
  52. onMounted,
  53. onUnmounted
  54. } from "vue";
  55. import {
  56. onLoad
  57. } from "@dcloudio/uni-app"
  58. import * as httpApi from "@/api/common.js"
  59. import {
  60. formatDateToYearMonthDay
  61. } from "@/utils/common.js"
  62. import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
  63. import MtaFooter from "@/components/MtaFooter.vue"
  64. const data = reactive({
  65. info: null,
  66. id: null
  67. })
  68. const formatDate = computed(() => {
  69. if (data.info && data.info.createTime) {
  70. return formatDateToYearMonthDay(data.info.createTime)
  71. }
  72. return []
  73. })
  74. onLoad(({
  75. id
  76. }) => {
  77. data.id = id;
  78. pageInit();
  79. })
  80. function handleClick(item) {
  81. uni.navigateTo({
  82. url: `/pages/xydtXueyuanfengcaiInfo/xydtXueyuanfengcaiInfo?id=${item.id}`
  83. })
  84. }
  85. function handleGo(code) {
  86. if (code == 'shouye') {
  87. uni.navigateTo({
  88. url: '/pages/index/index'
  89. })
  90. }
  91. if (code == 'xyfc') {
  92. uni.navigateTo({
  93. url: '/pages/xydtXueyuanfengcai/xydtXueyuanfengcai'
  94. })
  95. }
  96. }
  97. function pageInit() {
  98. httpApi.getDongtaiXueyuanFengcaiInfo({
  99. id: data.id
  100. }).then(res => {
  101. data.info = res.data;
  102. })
  103. }
  104. </script>
  105. <style>
  106. </style>