consultationDetails.vue 1.3 KB
<template>
	<view class="">
		<view class="mainBox">
			<view class="title">{{detail.title}}</view>
			<view class="timenev flexD">
				<view class="time">
					发布时间{{detail.publishtime}}
				</view>
				<image src="../../static/ic_fenxiang.png" mode=""></image>
			</view>
			<rich-text :nodes="detail.content"></rich-text>
		</view>

	</view>
</template>

<script>
	import {
		arc_detail
	} from '@/api/index.js'
	export default {
		data() {
			return {
				id: "",
				detail: {
					title: "",
					publishtime: "",
					content: "",
				}
			}
		},
		onLoad(options) {
			this.id = options.id
			this.arc_detail()
		},
		methods: {
			//详情
			async arc_detail() {
				try {
					const res = await arc_detail(this.id)
					this.detail = res.detail
					console.log('arc_detail', res)
					// 保存数据
				} catch (err) {
					uni.showToast({
						title: err,
						icon: 'none'
					})
					console.log('arc_detail', err)
				}
			},
		}
	}
</script>

<style lang="less">
	.mainBox {
		padding: 24rpx 31rpx;

		.timenev {
			margin-top: 20rpx;
			color: rgba(179, 179, 179, 1);
			font-size: 24rpx;
			font-weight: 400;
			font-family: "PingFang SC";

			image {
				width: 40rpx;
				height: 40rpx;
			}
		}
	}
</style>