123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <template>
- <view class="container">
- <uni-title type="h1" class="title" align="center" :title="info.title || info.noticeTitle"></uni-title>
- <text class="time">创建时间:{{ info.createTime }}</text>
- <u-parse :content="info.content" @navigate="navigate" />
- </view>
- </template>
- <script>
- import request from '../../api/cms.js';
- import uParse from '@/components/gaoyia-parse/parse.vue'
- export default {
- components: {
- uParse
- },
- onLoad: function (option) {
- this.id = option.id;
- },
- data() {
- return {
- id: '',
- info: null,
- }
- },
- async mounted() {
- const res = await request.getArticleDetail({ id: this.id });
- this.info = res.data;
- },
- methods: {
- preview(src, e) {
- console.log(src, e)
- },
- navigate(href, e) {
- uni.navigateTo({ url: `/pages/questionnaire/web?url=${href}` })
- }
- }
- }
- </script>
- <style>
- .time {
- width: 100%;
- text-align: center;
- display: block;
- font-size: 12px;
- }
- .content {
- display: block;
- width: 90%;
- margin: 10px auto;
- }
- .title {
- width: 90%;
- margin: 0 auto;
- display: block;
- }
- .uni-title__base {
- line-height: 1.2em !important;
- }
- </style>
|