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.

notice.vue 1018 B

4 vuotta sitten
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view id="notice" class="page">
  3. <view class="padding text-lg">
  4. <u-parse v-if="ready" :imageProp="{ domain: apiRoot }" :content="content"></u-parse>
  5. </view>
  6. <view class="padding-sm text-grey notice-info">
  7. <view class="text-right">本页内容发布于 {{ time }}</view>
  8. <view class="text-right">{{ date }}</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import moment from 'moment'
  14. export default {
  15. data() {
  16. return {
  17. ready: false,
  18. content: '',
  19. time: '',
  20. date: ''
  21. }
  22. },
  23. async onLoad() {
  24. await this.init()
  25. },
  26. methods: {
  27. async init() {
  28. this.LOADING('加载中…')
  29. const noticeItem = this.GET_PARAM()
  30. this.content = this.CONVERT_HTML(noticeItem.f_content)
  31. this.time = moment(noticeItem.f_time).format('HH : mm')
  32. this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日')
  33. this.SET_TITLE(noticeItem.f_title)
  34. this.ready = true
  35. this.HIDE_LOADING()
  36. }
  37. }
  38. }
  39. </script>