|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <template>
- <view id="notice" class="page">
- <view class="padding text-lg">
- <u-parse v-if="ready" :imageProp="{ domain: apiRoot }" :content="content"></u-parse>
- </view>
- <view class="padding-sm text-grey notice-info">
- <view class="text-right">本页内容发布于 {{ time }}</view>
- <view class="text-right">{{ date }}</view>
- </view>
- </view>
- </template>
-
- <script>
- import moment from 'moment'
-
- export default {
- data() {
- return {
- ready: false,
- content: '',
- time: '',
- date: ''
- }
- },
-
- async onLoad() {
- await this.init()
- },
-
- methods: {
- async init() {
- this.LOADING('加载中…')
- const noticeItem = this.GET_PARAM()
-
- this.content = this.CONVERT_HTML(noticeItem.f_content)
-
- this.time = moment(noticeItem.f_time).format('HH : mm')
- this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日')
- this.SET_TITLE(noticeItem.f_title)
-
- this.ready = true
- this.HIDE_LOADING()
- }
- }
- }
- </script>
|