content.vue 900 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view>
  3. <u-navbar :border-bottom="false" :is-back="true" :title="title"></u-navbar>
  4. <view class="u-content">
  5. <u-parse :autosetTitle="true"
  6. :html="content"
  7. :selectable="true"
  8. :show-with-animation="true"></u-parse>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. title: '资讯',
  17. content: ``
  18. }
  19. },
  20. onLoad(option) {
  21. let id = option.id
  22. let url = "/api/notice/getNotice/" + id;
  23. this.$u.get(url).then(res => {
  24. this.title = res.data.noticeTitle
  25. this.content = res.data.noticeContent
  26. });
  27. },
  28. }
  29. </script>
  30. <style>
  31. page {
  32. background-color: #FFFFFF;
  33. }
  34. </style>
  35. <style lang="scss" scoped>
  36. .u-content {
  37. margin: 0 10 rpx;
  38. padding: 24 rpx;
  39. font-size: 34 rpx;
  40. color: $u-main-color;
  41. line-height: 1.8;
  42. white-space: pre-wrap !important;
  43. }
  44. </style>