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.

44 lines
886 B

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>
  6. </template>
  7. <script setup>
  8. import { ref } from 'vue'
  9. let style = {
  10. // p: 'font-size:32rpx',
  11. // span: 'font-size: 30rpx',
  12. img: 'max-width: 100%'
  13. }
  14. import {
  15. onLoad,
  16. onPullDownRefresh,
  17. } from '@dcloudio/uni-app'
  18. import { getNoticeDetail } from '@/config/api.js'
  19. let articleId = ''
  20. const info = ref('')
  21. async function getNoticeDetailFn() {
  22. const {data: res} = await getNoticeDetail({articleId})
  23. info.value = res
  24. }
  25. onLoad((option)=>{
  26. articleId = option.id
  27. getNoticeDetailFn()
  28. })
  29. onPullDownRefresh(async()=>{
  30. await getNoticeDetailFn()
  31. uni.stopPullDownRefresh()
  32. })
  33. </script>
  34. <style lang="scss" scoped>
  35. .tit {
  36. font-size: 32rpx;
  37. font-weight: 700;
  38. padding: 20rpx 0;
  39. }
  40. </style>