You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
999 B

4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
  1. <template>
  2. <view class="content padding">
  3. <view class="tit">{{ info.title }}</view>
  4. <u-parse :content="info.content" :tagStyle="style"></u-parse>
  5. <view class="timeDesc" v-if="info.timeDesc">创建时间 {{ info.timeDesc }}</view>
  6. </view>
  7. </template>
  8. <script setup>
  9. import { ref } from 'vue'
  10. import {
  11. onLoad,
  12. onPullDownRefresh,
  13. } from '@dcloudio/uni-app'
  14. import { getNoticeDetail } from '@/config/api.js'
  15. let articleId = ''
  16. const info = ref('')
  17. async function getNoticeDetailFn() {
  18. const {data: res} = await getNoticeDetail({articleId})
  19. info.value = res
  20. }
  21. onLoad((option)=>{
  22. articleId = option.id
  23. getNoticeDetailFn()
  24. })
  25. onPullDownRefresh(async()=>{
  26. await getNoticeDetailFn()
  27. uni.stopPullDownRefresh()
  28. })
  29. </script>
  30. <style lang="scss" scoped>
  31. .tit {
  32. font-size: 32rpx;
  33. font-weight: 700;
  34. padding: 20rpx 0;
  35. text-align: center;
  36. }
  37. .timeDesc {
  38. text-align: right;
  39. font-size: 28rpx;
  40. color: #999;
  41. padding: 30px 0;
  42. }
  43. </style>