From e9d1d13a62e1f585a8a24bf3176d12be956a63c8 Mon Sep 17 00:00:00 2001
From: 346149741 <346149741@qq.com>
Date: 星期六, 22 六月 2024 15:40:37 +0800
Subject: [PATCH] 信息公示接口对接

---
 pages/hqzc/details.vue |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/pages/hqzc/details.vue b/pages/hqzc/details.vue
index 4e7bd6c..5565333 100644
--- a/pages/hqzc/details.vue
+++ b/pages/hqzc/details.vue
@@ -1,35 +1,51 @@
 <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 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)
+					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
+					})
+				})
 			}
 		}
 	}

--
Gitblit v1.9.1