<template>
	<view style="padding: 30rpx">
		<view style="font-size: 34rpx">{{ articleItem.title }}</view>
		<view style="height: 20rpx"></view>
		<view style="color: #999; font-size: 30rpx">发布时间：{{ timeFormat(articleItem.createTime, 'yyyy-MM-dd hh:mm:ss') }}</view>
		<view style="height: 20rpx"></view>
		<video v-if="articleItem.video" style="width: 690rpx; height: 388rpx" :poster="articleItem.cover" :src="articleItem.video" :direction="90"></video>
		<view style="height: 20rpx"></view>
		<view>
			<mp-html :content="articleItem.content" />
		</view>
		<view style="50rpx"></view>
	</view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app';
import { ref, computed } from 'vue';
import api from '@/api/index';
import { timeFormat } from '@/utils/fun.js';


const articleItem = ref({});

onLoad((options: any) => {
	api.noticeInfo({ id: options.id }).then((res) => {
		articleItem.value = res;
	});
});
</script>

<style></style>
