25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

notice.vue 1.5 KiB

4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
4 yıl önce
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view id="notice" class="page">
  3. <view class="padding text-lg">
  4. <u-parse v-if="ready&&contentType == 1" :imageProp="{ domain: apiRoot }" :content="content"></u-parse>
  5. <iframe v-if="ready&&contentType == 2" style="width: 100%;height: calc(100vh - 150px);" :src="CONFIG('webHost')+'/Utility/ListContentView?keyValue='+keyValue" frameborder="0"></iframe>
  6. </view>
  7. <view class="padding-sm text-grey notice-info">
  8. <view class="text-right">本页内容发布于 {{ time }}</view>
  9. <view class="text-right">{{ date }}</view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import moment from 'moment'
  15. export default {
  16. data() {
  17. return {
  18. ready: false,
  19. content: '',
  20. time: '',
  21. date: '',
  22. contentType:'',
  23. keyValue:'',
  24. }
  25. },
  26. async onLoad() {
  27. await this.init()
  28. },
  29. methods: {
  30. async init() {
  31. this.LOADING('加载中…')
  32. const noticeItem = this.GET_PARAM()
  33. this.keyValue = noticeItem.f_id
  34. if(noticeItem.f_category){
  35. this.contentType = 2
  36. }else{
  37. this.contentType = 1
  38. }
  39. console.log(noticeItem)
  40. this.content = this.CONVERT_HTML(noticeItem.f_content)
  41. this.time = moment(noticeItem.f_time).format('HH : mm')
  42. this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日')
  43. this.SET_TITLE(noticeItem.f_title)
  44. this.ready = true
  45. this.HIDE_LOADING()
  46. let _postData = {
  47. newsId: noticeItem.f_id,
  48. }
  49. this.HTTP_POST('learun/news/newsRead',_postData, '加载数据时出错');
  50. }
  51. }
  52. }
  53. </script>