<template>
	<view>
		<navBar leftText="历史时间轴" :hideNavBg="true"></navBar>
		<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
		<view v-if="newsInfo" class="contentC fixed" :style="'top: '+navH+'px;'">
			<view class="title">{{newsInfo.title}}</view>
			<view class="labelTimeC ">
				<text class="time">{{getLocalTime(newsInfo.published_time)}}</text>
			</view>
			<view class="content">
				<ua-markdown :source="newsInfo.detail" />
			</view>
		</view>
	</view>
</template>

<script>
	import { inject } from 'vue';
	import { getLocaleTime } from '@/utils/util';
	
	export default {
		data() {
			return {
				navH:inject('navHeight'),
				newsInfo:null,
				getLocalTime:getLocaleTime
			}
		},
		onLoad(e) {
			this.newsInfo = JSON.parse(decodeURIComponent(e.info)) 
		}
	}
	
</script>

<style lang="less">
page 
{
	background-color: #070707;
}
.topBg 
{
	top: 0;
	left: 0;
	width: 100%;
	height: auto;
}	  
.contentC 
{
	background-color: #FFF9F5;
	margin: 20rpx 25rpx 0;
	padding: 28rpx 30rpx;
	left: 0;
	right: 0;
	bottom: 100rpx;
	border-radius: 10rpx;
	overflow-y: scroll;
	.title 
	{
		margin: 0 10rpx;
		font-size: 30rpx;
		font-weight: bold;
		color: #2B2B2B;
	}
	.labelTimeC {
		margin: 0 10rpx;
		.time 
		{
			font-size: 24rpx;
			font-weight: 500;
			color: #666;
		}
	}
	.content 
	{
		margin-top: 30rpx;
	}
}
</style>
