zsjyYouxiubiyeshengInfo.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="dljt-page-box yxbys-page" 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('yxbys')">优秀毕业生</view>
  15. <icon class="breadcrumb-jt"></icon>
  16. <view class="breadcrumb-active">详情</view>
  17. </view>
  18. <view class="dljt-detail-box yxbys-detail-box">
  19. <view class="dljt-detail-title"><view class="title-text">简介</view></view>
  20. <!-- 图 -->
  21. <image :src="data.info.cover"></image>
  22. <!-- 标题 -->
  23. <view class="detail-title yxbys-name">{{data.info.title}}</view>
  24. <!-- 简介 -->
  25. <view>{{data.info.jianjie}}</view>
  26. <!-- 富文本 -->
  27. <MtaMpHtml class="dljt-editor-box" :content="data.info.content" ></MtaMpHtml>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 底部导航 -->
  32. <MtaFooter></MtaFooter>
  33. </view>
  34. </template>
  35. <script setup>
  36. import {
  37. ref,
  38. reactive,
  39. computed,
  40. onMounted,
  41. onUnmounted
  42. } from "vue";
  43. import {
  44. onLoad
  45. } from "@dcloudio/uni-app"
  46. import * as httpApi from "@/api/common.js"
  47. import {formatDateToYearMonthDay } from "@/utils/common.js"
  48. import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
  49. import MtaPDFVue from "@/components/MtaPDF.vue";
  50. import MtaFooter from "@/components/MtaFooter.vue"
  51. const data = reactive({
  52. info: null,
  53. id: null
  54. })
  55. const formatDate = computed(() => {
  56. if (data.info && data.info.createTime) {
  57. return formatDateToYearMonthDay(data.info.createTime)
  58. }
  59. return []
  60. })
  61. onLoad(({
  62. id
  63. }) => {
  64. data.id = id;
  65. pageInit();
  66. })
  67. function handleGo(code) {
  68. if (code == 'shouye') {
  69. uni.navigateTo({
  70. url: '/pages/index/index'
  71. })
  72. }
  73. if (code == 'yxbys') {
  74. uni.navigateTo({
  75. url: '/pages/zsjyYouxiubiyesheng/zsjyYouxiubiyesheng'
  76. })
  77. }
  78. }
  79. function handleDownFile() {
  80. window.location.href = pdfUrl;
  81. }
  82. function pageInit() {
  83. httpApi.getCommonZSJYYouxiubiyeshengInfo({id:data.id}).then(res => {
  84. data.info = res.data;
  85. })
  86. }
  87. </script>
  88. <style>
  89. </style>