| | |
| | | <template> |
| | | <view class="box"> |
| | | <view class="name"> |
| | | 中国社科院都阳:中国人口转变的独特性及其影响 |
| | | {{msg.docTitle}} |
| | | </view> |
| | | <view class="font"> |
| | | <view class="left"> |
| | | 政策类型 |
| | | {{type}} |
| | | </view> |
| | | <view class="right"> |
| | | 发布时间:2024-04-27 |
| | | 发布时间:{{msg.createTime}} |
| | | </view> |
| | | </view> |
| | | <view style="margin-top: 20rpx;" v-html="msg.docContent"> |
| | | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { doc } from '@/api/index.js' |
| | | import { getDicts } from '@/api/data.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | msg:{}, |
| | | type:'' |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getdata() |
| | | onLoad(options) { |
| | | this.getdata(options.id) |
| | | }, |
| | | methods: { |
| | | getdata(){ |
| | | console.log(this.$route.query) |
| | | //doc() |
| | | |
| | | getdata(id){ |
| | | doc(id).then(val => { |
| | | this.msg = val.data.data |
| | | this.msg.createTime = this.msg.createTime.slice(0, 10) |
| | | this.msg.docContent = decodeURIComponent(this.msg.docContent) |
| | | this.msg.docContent = this.msg.docContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"') |
| | | console.log(this.msg.docContent) |
| | | getDicts('doc_type').then(val => { |
| | | console.log(this.msg.docType) |
| | | |
| | | const value = val.data.data.find(item => item.dictValue == this.msg.docType) |
| | | this.type = value.dictLabel |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | </style> |
| | | <style scoped lang="scss"> |
| | | img{ |
| | | width: 100%; |
| | | } |
| | | .box{ |
| | | padding: 32rpx; |
| | | } |