From 59f4dc012a2c42eebd31301444e0f8df9af088e0 Mon Sep 17 00:00:00 2001 From: wjt <1797368093@qq.com> Date: 星期三, 26 六月 2024 10:13:12 +0800 Subject: [PATCH] Merge branch 'master' of http://218.28.192.34:9999/r/sqys/sqys_xcx --- pages/hqzc/details.vue | 77 +++++++++++++++++++++++++++++++++++++- 1 files changed, 74 insertions(+), 3 deletions(-) diff --git a/pages/hqzc/details.vue b/pages/hqzc/details.vue index 8183fd0..ee0e71b 100644 --- a/pages/hqzc/details.vue +++ b/pages/hqzc/details.vue @@ -1,18 +1,53 @@ <template> - <view> - + <view class="box"> + <view class="name"> + {{msg.docTitle}} + </view> + <view class="font"> + <view class="left"> + {{type}} + </view> + <view class="right"> + 鍙戝竷鏃堕棿锛歿{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:'' } + }, + onLoad(options) { + this.getdata(options.id) }, methods: { + 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 + }) + }) + } } } </script> @@ -20,3 +55,39 @@ <style> </style> +<style scoped lang="scss"> + img{ + width: 100%; + } + .box{ + padding: 32rpx; + } + .name{ + color: #202d44; + font-size: 40rpx; + font-weight: bold; + } + .font{ + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #f1f1f1; + padding-bottom: 26rpx; + margin-top: 20rpx; + .left{ + text-align: center; + height: 42rpx; + line-height: 42rpx; + padding: 0 10rpx; + border-radius: 4rpx; + background: #1171E0; + color: #ffffff; + font-size: 24rpx; + + } + .right{ + color: #7e8596; + font-size: 28rpx; + } + } +</style> \ No newline at end of file -- Gitblit v1.9.1