<template>
	<view class="container" v-if="info !== null">
		<!-- 标题区域 -->
		<view class="title">{{ info.title }}</view>

		<!-- 发布时间区域 -->
		<view class="time">{{ info.update_time }}</view>

		<!-- 内容区域 -->
		<mp-html :content="info.content" />
	</view>
</template>

<script>
export default {
	data() {
		return {
			info: null
		}
	},
	onLoad(options) {
		this.info = JSON.parse(decodeURIComponent(options.info))
		// this.info.content = this.info.content.replace(/data-src/g, 'src')
	}
}
</script>

<style lang="scss" scoped>
.container {
	padding: 0 30rpx;
	min-height: 100vh;
	background-color: #fff;

	.title {
		padding-top: 30rpx;
		text-align: center;
		font-size: 32rpx;
		font-weight: bold;
	}

	.time {
		margin-top: 20rpx;
		text-align: center;
		color: #666666;
		font-size: 24rpx;
	}
}
</style>
