1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <template>
- <view style="padding: 20px; line-height: 32px;">
- <view class="tt1">{{notice.title}}</view>
- <view class="tt3" style="color: #666;">{{notice.createTime}}</view>
- <view class="tt2">
- <rich-text :nodes="notice.content | formatRichText"></rich-text>
- </view>
-
- </view>
- </template>
- <script>
- import {
- noticeDetail
- } from '@/api/notice.js'
-
- export default {
- data() {
- return {
- noticeId: '',
- notice: {}
- }
- },
- onLoad(options){
- this.noticeId = options.id
- this.fetchNoticeDetail()
- },
- methods: {
- fetchNoticeDetail() {
- noticeDetail(this.noticeId).then(data => {
- //打印请求返回的数据
- this.notice = data
- }, error => {
- console.log(error);
- })
- },
- }
-
- }
- </script>
- <style>
- </style>
|