detail.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view class="mobile-item-container">
  3. <Navbar title="公告详情" bgColor="#fff" :h5Show="false"></Navbar>
  4. <view style="font-size: 40rpx; font-weight: bold;">{{notice.noticeTitle}}</view>
  5. <view style="display: flex; font-size: 12px; color: #909399;">
  6. <u-icon name="clock" size="12"></u-icon>
  7. <text>{{notice.createTime}}</text>
  8. <u-icon name="account" size="12"></u-icon>
  9. <text>{{notice.remark}}</text>
  10. </view>
  11. <view style="margin-top: 40rpx;">
  12. <u-parse :content="notice.noticeContent"></u-parse>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import * as NoticeApi from '@/api/work/notice'
  18. import Navbar from '@/components/navbar/Navbar'
  19. export default {
  20. components: {
  21. Navbar,
  22. },
  23. data () {
  24. return {
  25. noticeId: undefined,
  26. notice: {}
  27. }
  28. },
  29. onLoad (params) {
  30. this.noticeId = params.id
  31. this.loadData()
  32. },
  33. methods: {
  34. loadData () {
  35. const app = this
  36. NoticeApi.noticeById(this.noticeId).then(res => {
  37. app.notice = res.data
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. </style>