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

		<!-- 时间区域 -->
		<view class="time">{{ dayjs(info.createTime).format('YYYY-MM-DD HH:mm:ss') }}</view>

		<!-- 内容区域 -->
		<view class="content">
			<uv-parse :content="info.content"></uv-parse>
		</view>
	</view>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import dayjs from 'dayjs'

// 新闻详情信息
const info = ref({})

onLoad((options) => {
	if (options.info) {
		info.value = JSON.parse(decodeURIComponent(options.info))
		// console.log(info.value)
	}
})
</script>

<style lang="scss" scoped>
.container {
	padding: 20rpx 18rpx;
	min-height: 100vh;

	.title {
		font-size: 32rpx;
		font-weight: bold;
	}

	.time {
		margin-top: 15rpx;
		font-size: 24rpx;
		color: #808080;
	}

	.content {
		margin-top: 20rpx;
	}
}
</style>
